def binary
import bendtorch-core@0.1.0.0/src/autograd/tensor_backward.bend as TensorBackwardimport Base
1265# Records `a op b` from copies of the operands' values. An operand id the tape
1266# does not hold is refused with UnknownNode, and an operation the tensor layer
1267# refuses (shapes that do not broadcast, or a matmul of the wrong ranks or
1268# inner dimensions) with its error; the tape comes back unchanged.
1269def binary(tape: Tape, kind: Binary, +a: Nat, +b: Nat) -> Tape & Result<&2, &2, Error, Nat>:
1270 Tape{entries} = tape
1271 left_found(kind, a, b, value_counted(a, counted(entries)))
Uses (9)
Used by (7)
- bendtorch-core@0.1.0.0/src/autograd/tensor_backward:add
- bendtorch-core@0.1.0.0/src/autograd/tensor_backward:matmul_nt
- bendtorch-core@0.1.0.0/src/autograd/tensor_backward:batched_matmul
- bendtorch-core@0.1.0.0/src/autograd/tensor_backward:matmul
- bendtorch-core@0.1.0.0/src/autograd/tensor_backward:mse_loss
- …