public ResNetstruct

ResNet(channel_config, block_config, shortcut_config; block, nclasses = 1000)

Create a ResNet model (reference). See also resnet.

Arguments

  • channel_config: the growth rate of the output feature maps within a residual block
  • block_config: a list of the number of residual blocks at each stage
  • shortcut_config: the type of shortcut style (either :A, :B, or :C)
  • block: a function with input (inplanes, outplanes, downsample=false) that returns a new residual block (see Metalhead.basicblock and Metalhead.bottleneck)
  • nclasses: the number of output classes