BatchedMatmul.right_layout: def of bendtorch-core@0.1.0.0 Import: import bendtorch-core@0.1.0.0/src/tensor/batched_matmul.bend as BatchedMatmul Lines 219-224 of bendtorch-core@0.1.0.0/src/tensor/batched_matmul.bend: https://jend.leeeet.dev/read.txt?path=bendtorch-core@0.1.0.0/src/tensor/batched_matmul.bend&start_line=219&end_line=224 import Base import bendtorch-core@0.1.0.0/src/tensor/matmul.bend as Matrix # left^T @ g, the right operand's gradient over the output's batch: left # [.., rows, inner] by its columns, g [.., rows, columns] by columns, the # rows being the terms. def right_layout(+plan: Plan) -> Layout: Plan{output, batch, +rows, +inner, +columns, +l1, +l2, r1, r2, +o1, +o2, lv, rv} = plan Layout{Matrix.Swapped{}, Matrix.Swapped{}, rows, inner, columns, l1, l2, o1, o2, o2} Uses (3): https://jend.leeeet.dev/definition.txt?path=bendtorch-core@0.1.0.0/src/tensor/batched_matmul.bend&name=Layout https://jend.leeeet.dev/definition.txt?path=bendtorch-core@0.1.0.0/src/tensor/batched_matmul.bend&name=Plan https://jend.leeeet.dev/definition.txt?path=bendtorch-core@0.1.0.0/src/tensor/matmul.bend&name=Order