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

Lines changed: 2 additions & 2 deletions
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

Lines changed: 2 additions & 2 deletions
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)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy