Skip to content

Commit 13a0493

Browse files
committed
Container -> Module
1 parent 11821d6 commit 13a0493

File tree

3 files changed

+5
-5
lines changed

3 files changed

+5
-5
lines changed

torchvision/models/alexnet.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@
1010
}
1111

1212

13-
class AlexNet(nn.Container):
13+
class AlexNet(nn.Module):
1414
def __init__(self, num_classes=1000):
1515
super(AlexNet, self).__init__()
1616
self.features = nn.Sequential(

torchvision/models/resnet.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ def conv3x3(in_planes, out_planes, stride=1):
2121
padding=1, bias=False)
2222

2323

24-
class BasicBlock(nn.Container):
24+
class BasicBlock(nn.Module):
2525
expansion = 1
2626

2727
def __init__(self, inplanes, planes, stride=1, downsample=None):
@@ -53,7 +53,7 @@ def forward(self, x):
5353
return out
5454

5555

56-
class Bottleneck(nn.Container):
56+
class Bottleneck(nn.Module):
5757
expansion = 4
5858

5959
def __init__(self, inplanes, planes, stride=1, downsample=None):
@@ -92,7 +92,7 @@ def forward(self, x):
9292
return out
9393

9494

95-
class ResNet(nn.Container):
95+
class ResNet(nn.Module):
9696
def __init__(self, block, layers, num_classes=1000):
9797
self.inplanes = 64
9898
super(ResNet, self).__init__()

torchvision/models/vgg.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
]
88

99

10-
class VGG(nn.Container):
10+
class VGG(nn.Module):
1111
def __init__(self, features):
1212
super(VGG, self).__init__()
1313
self.features = features

0 commit comments

Comments
 (0)