Skip to content

Commit 179b664

Browse files
committed
update _make_layers() to set dropout inplace to False to prevent backward issues in pytroch
1 parent f1eaaca commit 179b664

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

Cifar/models/simplenet.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -309,7 +309,7 @@ def _make_layers(self, scale: float):
309309
nn.Conv2d(input_channel, filters, kernel_size=kernel_size, stride=stride, padding=1),
310310
nn.BatchNorm2d(filters, eps=1e-05, momentum=0.05, affine=True),
311311
nn.ReLU(inplace=True),
312-
nn.Dropout2d(p=custom_dropout, inplace=True),
312+
nn.Dropout2d(p=custom_dropout, inplace=False),
313313
]
314314

315315
input_channel = filters

0 commit comments

Comments
 (0)