Update error messages to reference post TF 1.7 symbol for Input
.
PiperOrigin-RevId: 217025180
This commit is contained in:
parent
e4b1832849
commit
f868981c38
@ -197,7 +197,7 @@ class Network(base_layer.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 `tf.keras.Input`. '
|
||||
'Received: ' + str(x) +
|
||||
' (missing previous layer metadata).')
|
||||
# Check that x is an input tensor.
|
||||
@ -207,14 +207,14 @@ class Network(base_layer.Layer):
|
||||
layer._inbound_nodes and layer._inbound_nodes[0].inbound_layers):
|
||||
cls_name = self.__class__.__name__
|
||||
logging.warning(cls_name + ' inputs must come from '
|
||||
'`tf.layers.Input` (thus holding past layer metadata), '
|
||||
'`tf.keras.Input` (thus holding past layer metadata), '
|
||||
'they cannot be the output of '
|
||||
'a previous non-Input layer. '
|
||||
'Here, a tensor specified as '
|
||||
'input to "' + self.name + '" was not an Input tensor, '
|
||||
'it was generated by layer ' + layer.name + '.\n'
|
||||
'Note that input tensors are '
|
||||
'instantiated via `tensor = tf.layers.Input(shape)`.\n'
|
||||
'instantiated via `tensor = tf.keras.Input(shape)`.\n'
|
||||
'The tensor that caused the issue was: ' + str(x.name))
|
||||
for x in self.outputs:
|
||||
if not hasattr(x, '_keras_history'):
|
||||
|
Loading…
Reference in New Issue
Block a user