| 147 | : type_(type), coefficient_(coefficient) {} |
| 148 | void Setup(const RegularizerConf& conf); |
| 149 | void Setup(const string& conf_str) { |
| 150 | RegularizerConf conf; |
| 151 | conf.ParseFromString(conf_str); |
| 152 | Setup(conf); |
| 153 | } |
| 154 | |
| 155 | /// Apply the regularizer to a single parmeter object, e.g., W, or b |
| 156 | /// e.g., clip each gradient if it is too large w.r.t the threshold, |