Prompt: Reshape `x` to shape (4, 6) in row-major order.


Prompt: Return the transpose of `m` as a contiguous tensor.


Prompt: Return the row-wise sum of `b` as a 1-D tensor.


Prompt: Return the column-wise mean of `b`.


Prompt: Clamp `x` to the range [-1, 1].


Prompt: Return the elements of `x` that are strictly positive, in order.


Prompt: Return `x` sorted in descending order (values only).


Prompt: Return the indices that sort `x` ascending, as int64.


Prompt: Concatenate `b` with itself along dim 0.


Prompt: Stack `b` with itself along a NEW leading dimension.


Prompt: Return the matrix product of `m` with itself.


Prompt: Normalise each row of `b` to unit L2 norm.


Prompt: Add a leading batch dimension to `x` so its shape becomes (1, 24).


Prompt: Return the cumulative sum of `x` along dim 0.


Prompt: Cast `x` to float64.


Prompt: Return the pairwise maximum of `x` and its own reverse.


Prompt: Treat `x` as a leaf requiring grad, compute y = (x**2).sum(), backward, and return x.grad.


Prompt: With `x` requiring grad, compute y = (x.sin() * x).sum(), backward, and return x.grad.


Prompt: With `b` requiring grad, compute the mean of b.exp() clamped to a max of 10, backward, and return b.grad.


Prompt: Return the gradient of (x**3).sum() with respect to x, using torch.autograd.grad rather than backward.


Prompt: With `x` requiring grad, compute y = (x**2).sum() but DETACH x before squaring, then return a tensor of zeros shaped like x if no gradient flows (i.e. return the grad, or zeros when it is None).


Prompt: Compute the second derivative of (x**3).sum() with respect to x (create_graph=True), returning d2y/dx2.


Prompt: Apply a Linear(5, 3) layer to `b` whose weight is arange(15).reshape(3,5)/10 (float32) and whose bias is tensor([0.1, 0.2, 0.3]). Return the output.


Prompt: Apply torch.nn.functional.relu to `x`.


Prompt: Apply torch.nn.functional.gelu to `x` with the default approximation.


Prompt: Apply softmax along dim 1 to `l`.


Prompt: Apply log_softmax along dim 1 to `l`.


Prompt: Apply LayerNorm over the last dimension of `b` with eps=1e-5, no learnable affine parameters.


Prompt: Apply 2x2 max pooling with stride 2 to the NCHW batch `i`.


Prompt: Apply 2x2 average pooling with stride 2 to the NCHW batch `i`.


Prompt: Apply a Conv2d(3, 2, kernel_size=3) to `i` with weight filled with 0.01 and bias filled with zero, no padding. Return the output.


Prompt: Flatten `i` from dim 1 onward.


Prompt: Apply an Embedding(5, 4) to the index tensor `s`, where the embedding weight is arange(20).reshape(5,4) as float32. Return the output.


Prompt: Apply sigmoid to `x`.


Prompt: Return the mean-squared-error between `b` and a tensor of zeros of the same shape, as a 1-element tensor.


Prompt: Return the cross-entropy loss of logits `l` against class targets [0, 3, 1] with mean reduction, as a 1-element tensor.


Prompt: Return the PER-SAMPLE cross-entropy of logits `l` against targets [0, 3, 1] (reduction='none').


Prompt: Return the binary cross-entropy between sigmoid(`x`) and a target of all 0.5, mean reduction, as a 1-element tensor.


Prompt: Return the L1 loss between `b` and b.roll(1, 0), mean reduction, as a 1-element tensor.


Prompt: Return the smooth L1 loss (beta=1.0) between `x` and x.flip(0), mean reduction, as a 1-element tensor.


Prompt: Take `x` as a parameter, run ONE SGD step with lr=0.1 on the loss (x**2).sum(), and return the updated parameter values.


Prompt: Take `x` as a parameter, run ONE SGD step with lr=0.1 and momentum=0.9 on the loss (x**2).sum(), and return the updated parameter values.


Prompt: Take `x` as a parameter, run ONE Adam step with lr=0.1 (default betas/eps) on the loss (x**2).sum(), and return the updated parameter values.


Prompt: Take `x` as a parameter, run THREE SGD steps with lr=0.05 on the loss (x**2).sum(), and return the final parameter values.


Prompt: Take `x` as a parameter and return the gradient after clipping the global grad-norm to 1.0, for the loss (x**2).sum().