| 133 | auto update = get_update_function<Float, optimizer_type>(); |
| 134 | l3_regularization *= 3; |
| 135 | FOR(i, dim) { |
| 136 | Float h = head[i]; |
| 137 | Float t = tail[i]; |
| 138 | Float r = relation[i]; |
| 139 | head[i] -= (optimizer.*update)(h, gradient * r * t + l3_regularization * abs(h) * h, weight); |
| 140 | tail[i] -= (optimizer.*update)(t, gradient * h * r + l3_regularization * abs(t) * t, weight); |
| 141 | relation[i] -= relation_lr_multiplier * |
| 142 | (optimizer.*update)(r, gradient * h * t + l3_regularization * abs(r) * r, weight); |
| 143 | } |
| 144 | } |
| 145 | |
| 146 | template<OptimizerType optimizer_type> |
nothing calls this directly
no outgoing calls
no test coverage detected