torchsig.models.model_utils.general_layersΒΆ

Classes

DebugPrintLayer

A layer for debugging pytorch models; prints out the shape and data type of the input tensor at runtime returns he input tensor unchanged

DropChannel

A layer that drops the last color channel of an image [must be in channel-first form]

LSTMImageReader

Mean

A layer which returns the mean(s) along the dimension specified by dim of the input tensor

Reshape

A layer that reshapes the input tensor to a tensor of the given shape if keep_batch_dim is True (defaults to True), the batch dimension is excluded from the reshape operation; otherwise it is included

ScalingLayer

A layer that given input tensor x outputs scale_val * x used to linearly scale inputs by a fixed value