Dtype.CastP: def of bendtorch@1.3.0.0 Import: import bendtorch@1.3.0.0/dtype.bend as Dtype Lines 657-658 of bendtorch@1.3.0.0/dtype.bend: https://jend.leeeet.dev/read.txt?path=bendtorch@1.3.0.0/dtype.bend&start_line=657&end_line=658 import Base import bendtorch@1.3.0.0/main.bend as T import bend-ml-tensor-array@0.1.18.0/main.bend as TA def CastP(~X: Type, ~Y: Type, ~S: Type, ~r: Nat, ~c: Nat, ~l: T.Layer, X, Y, S>) -> T.Layer, X, Y, S>: T.Layer{p => x => castp_f(~X, ~Y, ~S, ~r, ~c, ~l, T.Mat.dup(r, c, p), x), p => s => dy => g => castp_b(~X, ~Y, ~S, ~r, ~c, ~l, T.Mat.dup(r, c, p), s, dy, g), op => p => g => st => T.Layer.step(TA.Mat, X, Y, S, l, op, p, g, st), u => T.Layer.zeros(TA.Mat, X, Y, S, l), p => T.Layer.dump(TA.Mat, X, Y, S, l, p), p => xs => off => T.Layer.load(TA.Mat, X, Y, S, l, p, xs, off), p => xs => off => T.Layer.store(TA.Mat, X, Y, S, l, p, xs, off), u => T.Layer.count(TA.Mat, X, Y, S, l)} Uses (12): https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=Nat 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@1.3.0.0/dtype.bend&name=castp_b https://jend.leeeet.dev/definition.txt?path=bendtorch@1.3.0.0/dtype.bend&name=castp_f 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=Layer.count https://jend.leeeet.dev/definition.txt?path=bendtorch@1.3.0.0/main.bend&name=Layer.dump https://jend.leeeet.dev/definition.txt?path=bendtorch@1.3.0.0/main.bend&name=Layer.load https://jend.leeeet.dev/definition.txt?path=bendtorch@1.3.0.0/main.bend&name=Layer.step https://jend.leeeet.dev/definition.txt?path=bendtorch@1.3.0.0/main.bend&name=Layer.store https://jend.leeeet.dev/definition.txt?path=bendtorch@1.3.0.0/main.bend&name=Layer.zeros https://jend.leeeet.dev/definition.txt?path=bendtorch@1.3.0.0/main.bend&name=Mat.dup