Skip to content

Commit

Permalink
changes to fix issue #8381 (#8391)
Browse files Browse the repository at this point in the history
  • Loading branch information
Diogo authored and fchollet committed Nov 5, 2017
1 parent 3292aa5 commit bbcf0e6
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions keras/engine/training.py
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,6 @@
from .. import losses
from .. import metrics as metrics_module
from ..utils.generic_utils import Progbar
from ..utils.layer_utils import count_params
from .. import callbacks as cbks
from ..legacy import interfaces

Expand Down Expand Up @@ -967,8 +966,8 @@ def _check_trainable_weights_consistency(self):
if not hasattr(self, '_collected_trainable_weights'):
return

if (count_params(self.trainable_weights) !=
count_params(self._collected_trainable_weights)):
if (len(self.trainable_weights) !=
len(self._collected_trainable_weights)):
warnings.warn(UserWarning(
'Discrepancy between trainable weights and collected trainable'
' weights, did you set `model.trainable` without calling'
Expand Down

0 comments on commit bbcf0e6

Please sign in to comment.