jittor.models

这里是Jittor的骨干网络模块的API文档,您可以通过from jittor import models来获取该模块。

class jittor.models.AlexNet(num_classes=1000)[源代码]

AlexNet model architecture.

Args:

  • num_classes: Number of classes. Default: 1000.

Example:

model = jittor.models.AlexNet(500)
x = jittor.random([10,224,224,3])
y = model(x) # [10, 500]
execute(x)[源代码]
class jittor.models.GoogLeNet(num_classes=1000, aux_logits=True, init_weights=True, blocks=None)[源代码]

GoogLeNet model architecture.

Args:

  • num_classes: Number of classes. Default: 1000.

  • aux_logits: If True, add an auxiliary branch that can improve training. Default: True

  • init_weights: Defualt: True.

  • blocks: List of three blocks, [conv_block, inception_block, inception_aux_block]. If None, will use [BasicConv2d, Inception, InceptionAux] instead. Default: None.

eager_outputs(x, aux2, aux1)[源代码]
execute(x)[源代码]
class jittor.models.Inception3(num_classes=1000, aux_logits=True, inception_blocks=None, init_weights=True)[源代码]

Inceptionv3 model architecture.

Args:

  • num_classes: Number of classes. Default: 1000.

  • aux_logits: If True, add an auxiliary branch that can improve training. Default: True

  • inception_blocks: List of seven blocks, [conv_block, inception_a, inception_b, inception_c, inception_d, inception_e, inception_aux]. If None, will use [BasicConv2d, InceptionA, InceptionB, InceptionC, InceptionD, InceptionE, InceptionAux] instead. Default: None.

  • init_weights: Defualt: True.

eager_outputs(x, aux)[源代码]
execute(x)[源代码]
class jittor.models.MNASNet(alpha, num_classes=1000, dropout=0.2)[源代码]

MNASNet model architecture. version=2.

Args:

  • alpha: Depth multiplier.

  • num_classes: Number of classes. Default: 1000.

  • dropout: Dropout probability of dropout layer.

execute(x)[源代码]
class jittor.models.MobileNetV2(num_classes=1000, width_mult=1.0, inverted_residual_setting=None, round_nearest=8, block=None)[源代码]

MobileNetV2 model architecture.

Args:

  • num_classes: Number of classes. Default: 1000.

  • width_mult: Width multiplier - adjusts number of channels in each layer by this amount. Default: 1.0.

  • init_weights: Defualt: True.

  • inverted_residual_setting: Network structure

  • round_nearest: Round the number of channels in each layer to be a multiple of this number. Set to 1 to turn off rounding. Default: 8.

  • block: Module specifying inverted residual building block for mobilenet. If None, use InvertedResidual instead. Default: None.

execute(x)[源代码]
jittor.models.Resnet101(**kwargs)[源代码]

ResNet-101 model architecture.

Example:

model = jittor.models.Resnet101()
x = jittor.random([10,224,224,3])
y = model(x) # [10, 1000]
jittor.models.Resnet152(**kwargs)[源代码]
jittor.models.Resnet18(**kwargs)[源代码]
jittor.models.Resnet34(**kwargs)[源代码]
jittor.models.Resnet50(**kwargs)[源代码]
jittor.models.Resnext101_32x8d(**kwargs)[源代码]
jittor.models.Resnext50_32x4d(**kwargs)[源代码]
jittor.models.Wide_resnet101_2(**kwargs)[源代码]
jittor.models.Wide_resnet50_2(**kwargs)[源代码]
jittor.models.alexnet(**kwargs)[源代码]
jittor.models.googlenet(**kwargs)[源代码]
jittor.models.inception_v3(pretrained=False, progress=True, **kwargs)[源代码]
jittor.models.mnasnet0_5(**kwargs)[源代码]
jittor.models.mnasnet0_75(**kwargs)[源代码]
jittor.models.mnasnet1_0(**kwargs)[源代码]
jittor.models.mnasnet1_3(**kwargs)[源代码]
jittor.models.mobilenet_v2()[源代码]
jittor.models.res2net101(output_stride)[源代码]
jittor.models.res2net50(output_stride)[源代码]
jittor.models.resnet101(**kwargs)

ResNet-101 model architecture.

Example:

model = jittor.models.Resnet101()
x = jittor.random([10,224,224,3])
y = model(x) # [10, 1000]
jittor.models.resnet152(**kwargs)
jittor.models.resnet18(**kwargs)
jittor.models.resnet34(**kwargs)
jittor.models.resnet50(**kwargs)
jittor.models.resnext101_32x8d(**kwargs)
jittor.models.resnext50_32x4d(**kwargs)
jittor.models.shufflenet_v2_x0_5()[源代码]
jittor.models.shufflenet_v2_x1_0()[源代码]
jittor.models.shufflenet_v2_x1_5()[源代码]
jittor.models.shufflenet_v2_x2_0()[源代码]
jittor.models.squeezenet1_0(**kwargs)[源代码]
jittor.models.squeezenet1_1(**kwargs)[源代码]
jittor.models.vgg11(**kwargs)[源代码]
jittor.models.vgg11_bn(**kwargs)[源代码]
jittor.models.vgg13(**kwargs)[源代码]
jittor.models.vgg13_bn(**kwargs)[源代码]
jittor.models.vgg16(**kwargs)[源代码]
jittor.models.vgg16_bn(**kwargs)[源代码]
jittor.models.vgg19(**kwargs)[源代码]
jittor.models.vgg19_bn(**kwargs)[源代码]
jittor.models.wide_resnet101_2(**kwargs)
jittor.models.wide_resnet50_2(**kwargs)