Block Layers#
Classes#
- class ConvNeXtBlock(net_out, shapes, *, drop_path=0, layer_scale=1e-06, **kwargs)[source]#
Bases:
BaseSingleLayerConvNeXt block using BaseLayer.
Original paper implementation: arXiv:2201.03545.
- Attributes:
- group
int Layer group, if 0 it will always be used, else it will only be used if its group matches the Networks
- description
str Description of the layer
- layers
Sequential Layers part of the parent layer to loop through in the forward pass
- shapes
Shapes Layer output shapes
- check_shapes
Shapes Checkpoint output shapes
- group
- Parameters:
- net_out
list[int] Shape of the network’s output, required only if layer contains factor
- shapes
Shapes Shape of the outputs from each layer
- drop_path
float,Optional Probability of Drop Path dropout, default = 0
- layer_scale
float,Optional Initial scale factor for layer Scale, default = 1e-6
- **kwargs
Leftover parameters for checking if they are valid
- net_out
- forward(x, outputs, checkpoints, *_, **__)[source]#
Forward pass for the ConvNeXt block
- Parameters:
- x
TensorListLike Input with tensors of shape (N,…) and type float, where N is the batch size
- outputs
list[TensorListLike] Output from each layer with tensors of shape (N,…) and type float
- checkpoints
list[TensorListLike] List of checkpoint values with tensors of shape (N,…) and type float
- x
- Returns:
TensorOutput tensor with shape (N,…) and type float