Skip to content

Commit

Permalink
make sure dropout_rates are in valid form
Browse files Browse the repository at this point in the history
Coderx7 committed Feb 19, 2023
1 parent 6208543 commit 0f5ebc0
Showing 2 changed files with 4 additions and 4 deletions.
4 changes: 2 additions & 2 deletions Cifar/models/simplenet.py
Original file line number Diff line number Diff line change
@@ -240,8 +240,8 @@ def __init__(
(320, 1, 0.0),
],
}

self.dropout_rates = drop_rates
# make sure values are in proper form!
self.dropout_rates = {int(key):float(value) for key,value in drop_rates.items()}
# 15 is the last layer of the network(including two previous pooling layers)
# basically specifying the dropout rate for the very last layer to be used after the pooling
self.last_dropout_rate = self.dropout_rates.get(15, 0.0)
4 changes: 2 additions & 2 deletions ImageNet/simplenet.py
Original file line number Diff line number Diff line change
@@ -240,8 +240,8 @@ def __init__(
(320, 1, 0.0),
],
}

self.dropout_rates = drop_rates
# make sure values are in proper form!
self.dropout_rates = {int(key):float(value) for key,value in drop_rates.items()}
# 15 is the last layer of the network(including two previous pooling layers)
# basically specifying the dropout rate for the very last layer to be used after the pooling
self.last_dropout_rate = self.dropout_rates.get(15, 0.0)

0 comments on commit 0f5ebc0

Please sign in to comment.