Skip to content

Commit 0f5ebc0

Browse files
committed
make sure dropout_rates are in valid form
1 parent 6208543 commit 0f5ebc0

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed

Cifar/models/simplenet.py

+2-2
Original file line numberDiff line numberDiff line change
@@ -240,8 +240,8 @@ def __init__(
240240
(320, 1, 0.0),
241241
],
242242
}
243-
244-
self.dropout_rates = drop_rates
243+
# make sure values are in proper form!
244+
self.dropout_rates = {int(key):float(value) for key,value in drop_rates.items()}
245245
# 15 is the last layer of the network(including two previous pooling layers)
246246
# basically specifying the dropout rate for the very last layer to be used after the pooling
247247
self.last_dropout_rate = self.dropout_rates.get(15, 0.0)

ImageNet/simplenet.py

+2-2
Original file line numberDiff line numberDiff line change
@@ -240,8 +240,8 @@ def __init__(
240240
(320, 1, 0.0),
241241
],
242242
}
243-
244-
self.dropout_rates = drop_rates
243+
# make sure values are in proper form!
244+
self.dropout_rates = {int(key):float(value) for key,value in drop_rates.items()}
245245
# 15 is the last layer of the network(including two previous pooling layers)
246246
# basically specifying the dropout rate for the very last layer to be used after the pooling
247247
self.last_dropout_rate = self.dropout_rates.get(15, 0.0)

0 commit comments

Comments
 (0)