Skip to contents

Calls torchvision::transform_pad, see there for more information on the parameters. The preprocessing is applied to each element of a batch individually.

Being a trafo_ operator, its stages parameter starts out as "both", so the transformation is applied both while training and when predicting. Set stages = "train" to restrict it to training. See PipeOpTaskPreprocTorch for the stages parameter and this naming convention.

Format

R6Class inheriting from PipeOpTaskPreprocTorch.

Construction

po("trafo_pad")

Parameters

IdTypeDefaultLevels
paddinguntyped-
filluntyped0
padding_modecharacterconstantconstant, edge, reflect, symmetric
stagescharacter-train, predict, both
affect_columnsuntypedselector_all()