nn_reshape: Reshape

nn_reshapeR Documentation

Reshape

Description

Reshape a tensor to the given shape.

Usage

nn_reshape(shape)

Arguments

shape

(integer() | ⁠function()⁠)
The desired output shape, or a ⁠function(shape)⁠ that is called on the shape of the input tensor and returns it.


mlr3torch documentation built on Oct. 30, 2026, 5:10 p.m.