Skip to content

Commit

Permalink
Style fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
fchollet committed Feb 24, 2016
1 parent 461573a commit 06a1545
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
2 changes: 2 additions & 0 deletions keras/callbacks.py
Original file line number Diff line number Diff line change
Expand Up @@ -479,6 +479,8 @@ def on_epoch_end(self, epoch, logs={}):
else:
test_function = self.model._test
names = [v.name for v in test_function.inputs]
# TODO: implement batched calls to sess.run
# (current call will likely go OOM on GPU)
feed_dict = dict(zip(names, self.model.validation_data))
result = self.sess.run([self.merged], feed_dict=feed_dict)
summary_str = result[0]
Expand Down
4 changes: 2 additions & 2 deletions keras/layers/core.py
Original file line number Diff line number Diff line change
Expand Up @@ -108,7 +108,7 @@ def __call__(self, X, mask=None, train=False):
layer.name = "dummy"
layer.input = X
if hasattr(self, 'get_input_mask'):
layer.get_input_mask = lambda _: mask
layer.get_input_mask = lambda _: mask
# set temporary previous
tmp_previous = None
if hasattr(self, 'previous'):
Expand Down Expand Up @@ -136,7 +136,7 @@ def set_previous(self, layer, reset_weights=True):
if layer.get_output_mask() is not None:
assert self.supports_masked_input(), 'Cannot connect non-masking layer to layer with masked output.'
if not reset_weights:
assert layer.output_shape == self.input_shape, ('Cannot connect layers without resetting weights: ' +
assert layer.output_shape == self.input_shape, ('Cannot connect layers without resetting weights: ' +
'expected input with shape ' +
str(self.input_shape) +
' but previous layer has output_shape ' +
Expand Down

0 comments on commit 06a1545

Please sign in to comment.