ConvNeXt Networks#

Classes#

class ConvNeXt(name, in_shape, out_shape, *, max_drop_path=0, layer_scale=1e-06, dims=None, depths=None)[source]#

Bases: Network

ConvNeXt network using Network.

Original paper implementation: arXiv:2201.03545.

Attributes:
layer_numint, Optional

Number of layers to use, if None use all layers

groupint

Which group is the active group if a layer has the group attribute

namestr

Name of the network, used for saving

versionstr

NetLoader version string

checkpointslist[TensorListLike]

Outputs from each checkpoint with each Tensor having shape (N,…) and type float, where N is the batch size

configdict[str, Any]

Network configuration

kl_lossTensor

KL divergence loss on the latent space, of shape (1) and type float, if using a sample layer

netTypedModuleList

Network construction

shapesShapes

Layer output shapes

check_shapesShapes

Checkpoint output shapes

Parameters:
namestr

Name of the network configuration file

in_shapelist[int] | tuple[int, …]

Shape of the input tensor, excluding batch size

out_shapelist[int]

shape of the output tensor, excluding batch size

max_drop_pathfloat, Optional

Maximum drop path fraction, default = 0

layer_scalefloat, Optional

Default value for learnable parameters to scale the convolutional filters in a ConvNeXt block, default = 1e-6

dimslist[int] | NoneType, Optional

Number of convolutional filters in each downscaled section of the network, default = [96, 192, 384, 768]

depthslist[int] | NoneType, Optional

Number of ConvNeXt blocks in each downscaled section of the network, default = [3, 3, 9, 3]

class ConvNeXtTiny(in_shape, out_shape, *, max_drop_path=0, layer_scale=1e-06)[source]#

Bases: ConvNeXt

Tiny version of ConvNeXt with the number of convolutional filters in each downscaled section following [96, 192, 384, 768] with the number of ConvNeXt blocks in each downscaled section following [3, 3, 9, 3].

Original paper implementation: arXiv:2201.03545.

Attributes:
layer_numint, Optional

Number of layers to use, if None use all layers

groupint

Which group is the active group if a layer has the group attribute

namestr

Name of the network, used for saving

versionstr

NetLoader version string

checkpointslist[TensorListLike]

Outputs from each checkpoint with each Tensor having shape (N,…) and type float, where N is the batch size

configdict[str, Any]

Network configuration

kl_lossTensor

KL divergence loss on the latent space, of shape (1) and type float, if using a sample layer

netTypedModuleList

Network construction

shapesShapes

Layer output shapes

check_shapesShapes

Checkpoint output shapes

Parameters:
in_shapelist[int] | list[list[int]] | tuple[int, …]

Shape of the input tensor(s), excluding batch size

out_shapelist[int]

shape of the output tensor, excluding batch size

max_drop_pathfloat, Optional

Maximum drop path fraction, default = 0

layer_scalefloat, Optional

Default value for learnable parameters to scale the convolutional filters in a ConvNeXt block, default = 1e-6

class ConvNeXtSmall(in_shape, out_shape, *, max_drop_path=0, layer_scale=1e-06)[source]#

Bases: ConvNeXt

Small version of ConvNeXt with the number of convolutional filters in each downscaled section following [96, 192, 384, 768] with the number of ConvNeXt blocks in each downscaled section following [3, 3, 27, 3].

Original paper implementation: arXiv:2201.03545.

Attributes:
layer_numint, Optional

Number of layers to use, if None use all layers

groupint

Which group is the active group if a layer has the group attribute

namestr

Name of the network, used for saving

versionstr

NetLoader version string

checkpointslist[TensorListLike]

Outputs from each checkpoint with each Tensor having shape (N,…) and type float, where N is the batch size

configdict[str, Any]

Network configuration

kl_lossTensor

KL divergence loss on the latent space, of shape (1) and type float, if using a sample layer

netTypedModuleList

Network construction

shapesShapes

Layer output shapes

check_shapesShapes

Checkpoint output shapes

Parameters:
in_shapelist[int] | list[list[int]] | tuple[int, …]

Shape of the input tensor(s), excluding batch size

out_shapelist[int]

shape of the output tensor, excluding batch size

max_drop_pathfloat, Optional

Maximum drop path fraction, default = 0

layer_scalefloat, Optional

Default value for learnable parameters to scale the convolutional filters in a ConvNeXt block, default = 1e-6

class ConvNeXtBase(in_shape, out_shape, *, max_drop_path=0, layer_scale=1e-06)[source]#

Bases: ConvNeXt

Base version of ConvNeXt with the number of convolutional filters in each downscaled section following [128, 256, 512, 1024] with the number of ConvNeXt blocks in each downscaled section following [3, 3, 27, 3].

Original paper implementation: arXiv:2201.03545.

Attributes:
layer_numint, Optional

Number of layers to use, if None use all layers

groupint

Which group is the active group if a layer has the group attribute

namestr

Name of the network, used for saving

versionstr

NetLoader version string

checkpointslist[TensorListLike]

Outputs from each checkpoint with each Tensor having shape (N,…) and type float, where N is the batch size

configdict[str, Any]

Network configuration

kl_lossTensor

KL divergence loss on the latent space, of shape (1) and type float, if using a sample layer

netTypedModuleList

Network construction

shapesShapes

Layer output shapes

check_shapesShapes

Checkpoint output shapes

Parameters:
in_shapelist[int] | list[list[int]] | tuple[int, …]

Shape of the input tensor(s), excluding batch size

out_shapelist[int]

shape of the output tensor, excluding batch size

max_drop_pathfloat, Optional

Maximum drop path fraction, default = 0

layer_scalefloat, Optional

Default value for learnable parameters to scale the convolutional filters in a ConvNeXt block, default = 1e-6

class ConvNeXtLarge(in_shape, out_shape, *, max_drop_path=0, layer_scale=1e-06)[source]#

Bases: ConvNeXt

Large version of ConvNeXt with the number of convolutional filters in each downscaled section following [192, 384, 768, 1536] with the number of ConvNeXt blocks in each downscaled section following [3, 3, 27, 3].

Original paper implementation: arXiv:2201.03545.

Attributes:
layer_numint, Optional

Number of layers to use, if None use all layers

groupint

Which group is the active group if a layer has the group attribute

namestr

Name of the network, used for saving

versionstr

NetLoader version string

checkpointslist[TensorListLike]

Outputs from each checkpoint with each Tensor having shape (N,…) and type float, where N is the batch size

configdict[str, Any]

Network configuration

kl_lossTensor

KL divergence loss on the latent space, of shape (1) and type float, if using a sample layer

netTypedModuleList

Network construction

shapesShapes

Layer output shapes

check_shapesShapes

Checkpoint output shapes

Parameters:
in_shapelist[int] | list[list[int]] | tuple[int, …]

Shape of the input tensor(s), excluding batch size

out_shapelist[int]

shape of the output tensor, excluding batch size

max_drop_pathfloat, Optional

Maximum drop path fraction, default = 0

layer_scalefloat, Optional

Default value for learnable parameters to scale the convolutional filters in a ConvNeXt block, default = 1e-6

class ConvNeXtXLarge(in_shape, out_shape, *, max_drop_path=0, layer_scale=1e-06)[source]#

Bases: ConvNeXt

Extra large version of ConvNeXt with the number of convolutional filters in each downscaled section following [256, 512, 1024, 2048] with the number of ConvNeXt blocks in each downscaled section following [3, 3, 27, 3].

Original paper implementation: arXiv:2201.03545.

Attributes:
layer_numint, Optional

Number of layers to use, if None use all layers

groupint

Which group is the active group if a layer has the group attribute

namestr

Name of the network, used for saving

versionstr

NetLoader version string

checkpointslist[TensorListLike]

Outputs from each checkpoint with each Tensor having shape (N,…) and type float, where N is the batch size

configdict[str, Any]

Network configuration

kl_lossTensor

KL divergence loss on the latent space, of shape (1) and type float, if using a sample layer

netTypedModuleList

Network construction

shapesShapes

Layer output shapes

check_shapesShapes

Checkpoint output shapes

Parameters:
in_shapelist[int] | list[list[int]] | tuple[int, …]

Shape of the input tensor(s), excluding batch size

out_shapelist[int]

shape of the output tensor, excluding batch size

max_drop_pathfloat, Optional

Maximum drop path fraction, default = 0

layer_scalefloat, Optional

Default value for learnable parameters to scale the convolutional filters in a ConvNeXt block, default = 1e-6