def swapped_matrix

bendtorch-core@0.1.0.0 · src/autograd/tensor_vjp_PROOF.bend:930

import bendtorch-core@0.1.0.0/src/autograd/tensor_vjp_PROOF.bend as TensorVjpPROOF
import Base
import bendtorch-core@0.1.0.0/src/shape/core.bend as Shape
import bendtorch-core@0.1.0.0/src/autograd/tensor_vjp_LAWS.bend as Laws
import bendtorch-core@0.1.0.0/src/tensor/transpose_spec.bend as Transpose

930# The axes transpose_dynamic(t, 0, 1) permutes a rank-2 t by are [1, 0].
931def swapped_matrix(+shape: Shape.Shape, +a: U32, +b: U32, +matrix: {Shape.dimensions(shape) == [a, b] : List<&2, U32>}) ->
932  {Laws.swapped(shape) == [1, 0] : List<&2, U32>}:
933  %Equal.sym(List<&2, U32>, Shape.dimensions(shape), [a, b], matrix) :
934    {Transpose.requested_axes(Shape.rank_dimensions(_), U32.to_nat(0), U32.to_nat(1)) == [1, 0] : List<&2, U32>}
935  {==}

Uses (9)

Used by (2)