| 53 | Float weight = 1) { |
| 54 | auto update = get_update_function<Float, optimizer_type>(); |
| 55 | FOR(i, dim) { |
| 56 | Float h = head[i]; |
| 57 | Float t = tail[i]; |
| 58 | Float r = relation[i]; |
| 59 | Float s = h + r - t > 0 ? 1 : -1; |
| 60 | head[i] -= (optimizer.*update)(h, -gradient * s, weight); |
| 61 | tail[i] -= (optimizer.*update)(t, gradient * s, weight); |
| 62 | relation[i] -= relation_lr_multiplier * (optimizer.*update)(r, -gradient * s, weight); |
| 63 | } |
| 64 | } |
| 65 | |
| 66 | template<OptimizerType optimizer_type> |
nothing calls this directly
no outgoing calls
no test coverage detected