TorchLean API

NN.Runtime.Autograd.Engine.LibTorch.Ops.Shape

CUDA Tape Operations: Shape and Reduction Nodes #

Reductions / views #

@[inline]

Reduce-sum of all entries, producing a scalar.

Instances For
    @[inline]

    Flatten s into a 1D vector of length Spec.Shape.size s.

    Instances For
      @[inline]

      Reshape a buffer while preserving number of elements.

      This is a no-copy view operation: it reuses the same contiguous buffer.

      Instances For
        @[inline]

        Swap adjacent axes at a given depth in an N-D buffer.

        If depth is out of range, this is treated as the identity (matches the spec-layer helper).

        Instances For
          @[inline]

          Broadcast x : s₁ to s₂.

          Forward: broadcastTo. Backward: sum-reduce broadcasted axes (reduceFromBroadcastTo).

          Instances For
            @[inline]

            Reduce-sum along axis.

            Instances For
              @[inline]

              Reduce-mean along axis.

              Instances For