| 135 | }; |
| 136 | |
| 137 | inline std::shared_ptr<Constraint> CreateConstraint(std::string type) { |
| 138 | return std::make_shared<Constraint>(); |
| 139 | } |
| 140 | /// Apply regularization for parameters (gradient), e.g., L1 norm and L2 norm. |
| 141 | /// TODO(wangwei) implement a sub-class for each type of regularizer |
| 142 | class Regularizer { |
nothing calls this directly
no outgoing calls
no test coverage detected