Skip to contents

Reshapes the tensor according to the parameter shape, by calling torch_reshape(). This preprocessing function is applied batch-wise.

Format

R6Class inheriting from PipeOpTaskPreprocTorch.

Parameters

  • shape :: integer()
    The desired output shape. The first dimension is the batch dimension and should usually be -1.