Skip to content

Commit

Permalink
visualize_util -> vis_utils
Browse files Browse the repository at this point in the history
  • Loading branch information
fchollet committed Feb 28, 2017
1 parent 4e50446 commit 0e9ac3d
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 5 deletions.
8 changes: 4 additions & 4 deletions docs/templates/visualization.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,15 +2,15 @@
## Model visualization

The `keras.utils.visualize_util` module provides utility functions to plot
a Keras model (using graphviz).
a Keras model (using `graphviz`).

This will plot a graph of the model and save it to a file:
```python
from keras.utils.visualize_util import plot
plot(model, to_file='model.png')
from keras.utils import plot_model
plot_model(model, to_file='model.png')
```

`plot` takes two optional arguments:
`plot_model` takes two optional arguments:

- `show_shapes` (defaults to False) controls whether output shapes are shown in the graph.
- `show_layer_names` (defaults to True) controls whether layer names are shown in the graph.
Expand Down
5 changes: 4 additions & 1 deletion keras/utils/visualize_util.py → keras/utils/vis_utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -86,7 +86,10 @@ def model_to_dot(model, show_shapes=False, show_layer_names=True):
return dot


def plot(model, to_file='model.png', show_shapes=False, show_layer_names=True):
def plot_model(model,
to_file='model.png',
show_shapes=False,
show_layer_names=True):
dot = model_to_dot(model, show_shapes, show_layer_names)
_, extension = os.path.splitext(to_file)
if not extension:
Expand Down

0 comments on commit 0e9ac3d

Please sign in to comment.