Skip to content

Commit

Permalink
docstring fixes (keras-team#10603)
Browse files Browse the repository at this point in the history
  • Loading branch information
farizrahman4u authored and fchollet committed Jul 6, 2018
1 parent b6bb0be commit 8a8a19b
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 4 deletions.
1 change: 0 additions & 1 deletion keras/engine/base_layer.py
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,6 @@ class Layer(object):
ill-defined (e.g. a shared layer with multiple input
shapes), in which case requesting `input_shape` will raise
an Exception. Prefer using
`layer.get_input_shape_for(input_shape)`, or
`layer.get_input_shape_at(node_index)`.
input_spec: List of InputSpec class instances
each entry describes one required input:
Expand Down
6 changes: 3 additions & 3 deletions keras/engine/network.py
Original file line number Diff line number Diff line change
Expand Up @@ -159,7 +159,7 @@ def _init_graph_network(self, inputs, outputs, name=None):
if not hasattr(x, '_keras_history'):
cls_name = self.__class__.__name__
raise ValueError('Input tensors to a ' + cls_name + ' ' +
'must come from `tf.layers.Input`. '
'must come from `keras.layers.Input`. '
'Received: ' + str(x) +
' (missing previous layer metadata).')
# Check that x is an input tensor.
Expand All @@ -169,7 +169,7 @@ def _init_graph_network(self, inputs, outputs, name=None):
layer._inbound_nodes[0].inbound_layers)):
cls_name = self.__class__.__name__
warnings.warn(cls_name + ' inputs must come from '
'`tf.layers.Input` '
'`keras.layers.Input` '
'(thus holding past layer metadata), '
'they cannot be the output of '
'a previous non-Input layer. '
Expand All @@ -180,7 +180,7 @@ def _init_graph_network(self, inputs, outputs, name=None):
layer.name + '.\n'
'Note that input tensors are '
'instantiated via '
'`tensor = tf.layers.Input(shape)`.\n'
'`tensor = keras.layers.Input(shape)`.\n'
'The tensor that caused the issue was: ' +
str(x.name))
for x in self.outputs:
Expand Down

0 comments on commit 8a8a19b

Please sign in to comment.