提交 8a8a19ba 编写于 作者: F Fariz Rahman 提交者: François Chollet

docstring fixes (#10603)

上级 b6bb0be1
......@@ -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:
......
......@@ -159,7 +159,7 @@ class Network(Layer):
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.
......@@ -169,7 +169,7 @@ class Network(Layer):
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. '
......@@ -180,7 +180,7 @@ class Network(Layer):
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:
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册