basecls.models.vgg#

VGG Series

VGG: “Very Deep Convolutional Networks for Large-Scale Image Recognition”

class basecls.models.vgg.VGGStage(w_in, w_out, depth, norm_name, act_name)[源代码]#

基类:Module

VGG stage (sequence of blocks w/ the same output shape).

forward(x)[源代码]#
返回类型

Tensor

class basecls.models.vgg.VGG(depths, widths, norm_name=None, act_name='relu', head=None)[源代码]#

基类:Module

VGG model.

参数
  • depths (Sequence[int]) – depth for each stage (number of blocks in the stage).

  • widths (Sequence[int]) – width for each stage (width of each block in the stage).

  • norm_name (Optional[str]) – normalization function. Default: None

  • act_name (str) – activation function. Default: "relu"

  • head (Optional[Mapping[str, Any]]) – head args. Default: None

forward(x)[源代码]#
返回类型

Tensor