diff options
Diffstat (limited to 'tensorflow/python/keras/engine/network.py')
-rw-r--r-- | tensorflow/python/keras/engine/network.py | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/tensorflow/python/keras/engine/network.py b/tensorflow/python/keras/engine/network.py index 918488bd7a..5969fea2b2 100644 --- a/tensorflow/python/keras/engine/network.py +++ b/tensorflow/python/keras/engine/network.py @@ -1641,10 +1641,11 @@ class Network(base_layer.Layer): ValueError: if `summary()` is called before the model is built. """ if not self.built: - raise ValueError('This model has never been called, thus its weights ' - 'have not yet been created, so no summary can be ' - 'displayed. Build the model first ' - '(e.g. by calling it on some data).') + raise ValueError('This model has not yet been built. ' + 'Build the model first by calling `build()` or calling ' + '`fit()` with some data, or specify ' + 'an `input_shape` argument in the first layer(s) for ' + 'automatic build.') layer_utils.print_summary(self, line_length=line_length, positions=positions, |