bitorch.models.resnet.ResNetV1

class bitorch.models.resnet.ResNetV1(block: Module, layers: list, channels: list, classes: int, image_resolution: Optional[List[int]] = None, image_channels: int = 3)[source]

ResNet V1 model from “Deep Residual Learning for Image Recognition” paper.

Methods

__init__

Creates ResNetV1 model.

Attributes

__init__(block: Module, layers: list, channels: list, classes: int, image_resolution: Optional[List[int]] = None, image_channels: int = 3) None[source]

Creates ResNetV1 model.

Parameters:
  • block (Module) – Block to be used for building the layers.

  • layers (list) – layer sizes

  • channels (list) – channel num used for input/output channel size of layers. there must always be one more channels than there are layers.

  • classes (int) – number of output classes

  • image_resolution (List[int], optional) – resolution of input image. refer to common_layers.py. Defaults to None.

  • image_channels (int, optional) – input channels of images. Defaults to 3.

Raises:

ValueError – raised if the number of channels does not match number of layer + 1