Skip to content

Commit d607fc1

Browse files
committed
change firstCnn
1 parent ac83e98 commit d607fc1

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

firstCnn.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -46,6 +46,7 @@ def forward(self, x):
4646
classes = ('plane', 'car', 'bird', 'cat', 'deer',
4747
'dog', 'frog', 'horse', 'ship', 'truck')
4848
net = Net()
49+
net = nn.DataParallel(net)
4950
net.cuda()
5051
criterion = nn.CrossEntropyLoss()
5152
optimizer = optim.SGD(net.parameters(), lr=0.001, momentum=0.9)

0 commit comments

Comments
 (0)