def Train.step
import bendtorch@1.3.0.0/main.bend as Bendtorchimport Base
946# forward, loss, backward and one optimizer step: the same code for every model
947def Train.step(~P: Type, ~X: Type, ~Y: Type, ~S: Type, ~T: Type, ~m: Layer<P, X, Y, S>, ~loss: Y -> T -> LossOut<Y>, +cfg: OptCfg, tr: Train<P>, x: X, t: T) -> Train<P>:
948 match tr:
949 case Train{p, g, st, p1, p2, l}:
950 ts2(~P, ~X, ~Y, ~S, ~T, ~m, ~loss, cfg, g, st, p1, p2, t, Layer.fwd(P, X, Y, S, m, p, x))
Uses (6)
Used by (0)
No other definition uses this definition.