def right_layout

bendtorch-core@0.1.0.0 · src/tensor/batched_matmul.bend:219

import bendtorch-core@0.1.0.0/src/tensor/batched_matmul.bend as BatchedMatmul
import Base
import bendtorch-core@0.1.0.0/src/tensor/matmul.bend as Matrix

219# left^T @ g, the right operand's gradient over the output's batch: left
220# [.., rows, inner] by its columns, g [.., rows, columns] by columns, the
221# rows being the terms.
222def right_layout(+plan: Plan) -> Layout:
223  Plan{output, batch, +rows, +inner, +columns, +l1, +l2, r1, r2, +o1, +o2, lv, rv} = plan
224  Layout{Matrix.Swapped{}, Matrix.Swapped{}, rows, inner, columns, l1, l2, o1, o2, o2}

Uses (3)

Used by (1)