models package

Submodules

models.alexnet module

class models.alexnet.AlexNet(num_classes=1000)

Bases: torch.nn.modules.module.Module

forward(x)

Defines the computation performed at every call.

Should be overridden by all subclasses.

Note

Although the recipe for forward pass needs to be defined within this function, one should call the Module instance afterwards instead of this since the former takes care of running the registered hooks while the latter silently ignores them.

models.alexnet.alexnet(num_classes=1000, pretrained=False, **kwargs)

models.googlenet module

models.resnet module

class models.resnet.ResNet(block, layers, num_classes=1000, zero_residual=False)

Bases: torch.nn.modules.module.Module

forward(x)

Defines the computation performed at every call.

Should be overridden by all subclasses.

Note

Although the recipe for forward pass needs to be defined within this function, one should call the Module instance afterwards instead of this since the former takes care of running the registered hooks while the latter silently ignores them.

models.resnet.resnet18(pretrained=False, **kwargs)
models.resnet.resnet34(pretrained=False, **kwargs)
models.resnet.resnet50(pretrained=False, **kwargs)
models.resnet.resnet101(prerained=False, **kwargs)
models.resnet.resnet152(pretrained=False, **kwargs)

models.resnext module

class models.resnext.BottleNeck(inplanes, planes, base_width, cardinality, stride=1, downsample=None)

Bases: torch.nn.modules.module.Module

expansion = 4
forward(x)

Defines the computation performed at every call.

Should be overridden by all subclasses.

Note

Although the recipe for forward pass needs to be defined within this function, one should call the Module instance afterwards instead of this since the former takes care of running the registered hooks while the latter silently ignores them.

class models.resnext.ResNext(block, layers, base_width, cardinality, num_classes=1000, zero_residual=False)

Bases: torch.nn.modules.module.Module

forward(x)

Defines the computation performed at every call.

Should be overridden by all subclasses.

Note

Although the recipe for forward pass needs to be defined within this function, one should call the Module instance afterwards instead of this since the former takes care of running the registered hooks while the latter silently ignores them.

models.resnext.resnext101(base_width, cardinality, num_classes=1000)
models.resnext.resnext152(base_width, cardinality, num_classes=1000)
models.resnext.resnext50(base_width, cardinality, num_classes=1000)

models.vgg module

class models.vgg.VGG(features, num_classes=1000, init_weights=False)

Bases: torch.nn.modules.module.Module

forward(x)

Defines the computation performed at every call.

Should be overridden by all subclasses.

Note

Although the recipe for forward pass needs to be defined within this function, one should call the Module instance afterwards instead of this since the former takes care of running the registered hooks while the latter silently ignores them.

models.vgg.vgg11(num_classes=1000, pretrained=False, **kwargs)
models.vgg.vgg11_bn(num_classes=1000, pretrained=False, **kwargs)
models.vgg.vgg13(num_classes=1000, pretrained=False, **kwargs)
models.vgg.vgg13_bn(num_classes=1000, pretrained=False, **kwargs)
models.vgg.vgg16(num_classes=1000, pretrained=False, **kwargs)
models.vgg.vgg16_bn(num_classes=1000, pretrained=False, **kwargs)
models.vgg.vgg19(num_classes=1000, pretrained=False, **kwargs)
models.vgg.vgg19_bn(num_classes=1000, pretrained=False, **kwargs)

Module contents