BendtorchGpu.Residual: def of bendtorch-gpu@1.3.0.0 Import: import bendtorch-gpu@1.3.0.0/main.bend as BendtorchGpu Lines 198-200 of bendtorch-gpu@1.3.0.0/main.bend: https://jend.leeeet.dev/read.txt?path=bendtorch-gpu@1.3.0.0/main.bend&start_line=198&end_line=200 import Base import bend-ml-tensor-array@0.1.18.0/main.bend as TA import bendtorch@1.3.0.0/main.bend as T # T.Residual with these copies and sums def Residual(~n: Nat, ~c: Nat, ~P: Type, ~S: Type, ~f: T.Layer, TA.Mat, S>) -> T.Layer, Unit>, TA.Mat, TA.Mat, T.Two, Unit>>: T.Seq(~T.Two, ~Unit, ~TA.Mat, ~T.Two, TA.Mat>, ~TA.Mat, ~T.Two, ~Unit, ~T.Fork(~Unit, ~P, ~TA.Mat, ~TA.Mat, ~TA.Mat, ~Unit, ~S, ~(m => Mat.dup(n, c, m)), ~(a => b => Mat.sum2(n, c, a, b)), ~T.Id(~TA.Mat), ~f), ~Add2(n, c)) Uses (11): https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=Nat https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=Unit https://jend.leeeet.dev/definition.txt?path=bend-ml-tensor-array@0.1.19.0/main.bend&name=Mat https://jend.leeeet.dev/definition.txt?path=bendtorch-gpu@1.3.0.0/main.bend&name=Add2 https://jend.leeeet.dev/definition.txt?path=bendtorch-gpu@1.3.0.0/main.bend&name=Mat.dup https://jend.leeeet.dev/definition.txt?path=bendtorch-gpu@1.3.0.0/main.bend&name=Mat.sum2 https://jend.leeeet.dev/definition.txt?path=bendtorch@1.3.0.0/main.bend&name=Fork https://jend.leeeet.dev/definition.txt?path=bendtorch@1.3.0.0/main.bend&name=Id https://jend.leeeet.dev/definition.txt?path=bendtorch@1.3.0.0/main.bend&name=Layer https://jend.leeeet.dev/definition.txt?path=bendtorch@1.3.0.0/main.bend&name=Seq https://jend.leeeet.dev/definition.txt?path=bendtorch@1.3.0.0/main.bend&name=Two