ResNet#
eqxvision.models.ResNet
#
A simple port of torchvision.models.resnet
__init__(self, block: Type[Union[_ResNetBasicBlock, _ResNetBottleneck]], layers: List[int], num_classes: int = 1000, groups: int = 1, width_per_group: int = 64, replace_stride_with_dilation: List[bool] = None, norm_layer: Any = None, *, key: Optional[jax.random.PRNGKey] = None)
#
Arguments:
block:BottleneckorBasicBlockfor constructing the networklayers: A list containing number ofblocksat different levelsnum_classes: Number of classes in the classification task. Also controls the final output shape(num_classes,). Defaults to1000groups: Number of groups to form along the feature depth. Defaults to1width_per_group: Increases width ofblockby a factor ofwidth_per_group/64. Defaults to64replace_stride_with_dilation: Replacing2x2strides with dilated convolution. Defaults to Nonenorm_layer: Normalisation to be applied on the inputs. Defaults toBatchNormkey: Ajax.random.PRNGKeyused to provide randomness for parameter initialisation. (Keyword only argument.)
Exceptions:
NotImplementedError: If anorm_layerother thanequinox.experimental.BatchNormis usedValueError: Ifreplace_stride_with_convolutionis notNoneor a3-tuple
__call__(self, x: Array, *, key: jax.random.PRNGKey) -> Array
#
Arguments:
x: The input. Should be a JAX array with3channelskey: Required parameter. Utilised by few layers such asDropoutorDropPath
eqxvision.models.resnet18(torch_weights = None, **kwargs) -> ResNet
#
ResNet-18 model from
"Deep Residual Learning for Image Recognition" <https://arxiv.org/pdf/1512.03385.pdf>_
Arguments:
torch_weights: APathorURLfor thePyTorchweights. Defaults toNone
eqxvision.models.resnet34(torch_weights = None, **kwargs) -> ResNet
#
ResNet-34 model from
"Deep Residual Learning for Image Recognition" <https://arxiv.org/pdf/1512.03385.pdf>_
Arguments:
torch_weights: APathorURLfor thePyTorchweights. Defaults toNone
eqxvision.models.resnet50(torch_weights = None, **kwargs) -> ResNet
#
ResNet-50 model from Deep Residual Learning for Image Recognition
Arguments:
torch_weights: APathorURLfor thePyTorchweights. Defaults toNone
eqxvision.models.resnet101(torch_weights = None, **kwargs) -> ResNet
#
ResNet-101 model from Deep Residual Learning for Image Recognition
Arguments:
torch_weights: APathorURLfor thePyTorchweights. Defaults toNone
eqxvision.models.resnet152(torch_weights = None, **kwargs) -> ResNet
#
ResNet-152 model from Deep Residual Learning for Image Recognition
Arguments:
torch_weights: APathorURLfor thePyTorchweights. Defaults toNone
eqxvision.models.resnext50_32x4d(torch_weights = None, **kwargs) -> ResNet
#
ResNeXt-50 32x4d model from Aggregated Residual Transformation for Deep Neural Networks
Arguments:
torch_weights: APathorURLfor thePyTorchweights. Defaults toNone
eqxvision.models.resnext101_32x8d(torch_weights = None, **kwargs) -> ResNet
#
ResNeXt-101 32x8d model from Aggregated Residual Transformation for Deep Neural Networks
Arguments:
torch_weights: APathorURLfor thePyTorchweights. Defaults toNone
eqxvision.models.wide_resnet50_2(torch_weights = None, **kwargs) -> ResNet
#
Wide ResNet-50-2 model from Wide Residual Networks The model is the same as ResNet except for the bottleneck number of channels which is twice larger in every block. The number of channels in outer 1x1 convolutions is the same, e.g. last block in ResNet-50 has 2048-512-2048 channels, and in Wide ResNet-50-2 has 2048-1024-2048.
Arguments:
torch_weights: APathorURLfor thePyTorchweights. Defaults toNone
eqxvision.models.wide_resnet101_2(torch_weights = None, **kwargs) -> ResNet
#
Wide ResNet-101-2 model from Wide Residual Networks The model is the same as ResNet except for the bottleneck number of channels which is twice larger in every block. The number of channels in outer 1x1 convolutions is the same, e.g. last block in ResNet-50 has 2048-512-2048 channels, and in Wide ResNet-50-2 has 2048-1024-2048.
Arguments:
torch_weights: APathorURLfor thePyTorchweights. Defaults toNone