plot.keras.engine.training.Model | R Documentation |
Plot a Keras model
## S3 method for class 'keras.engine.training.Model'
plot(
x,
show_shapes = FALSE,
show_dtype = FALSE,
show_layer_names = TRUE,
...,
rankdir = "TB",
expand_nested = FALSE,
dpi = 96,
layer_range = NULL,
show_layer_activations = FALSE,
to_file = NULL
)
x |
A Keras model instance |
show_shapes |
whether to display shape information. |
show_dtype |
whether to display layer dtypes. |
show_layer_names |
whether to display layer names. |
... |
passed on to |
rankdir |
a string specifying the format of the plot: |
expand_nested |
Whether to expand nested models into clusters. |
dpi |
Dots per inch. Increase this value if the image text appears excessively pixelated. |
layer_range |
|
show_layer_activations |
Display layer activations (only for layers that
have an |
to_file |
File name of the plot image. If |
Nothing, called for it's side effects.
ValueError: if plot_model
is called before the model is
built, unless a input_shape =
argument was supplied to
keras_model_sequential()
.
This function requires pydot and graphviz.
pydot
is by default installed by install_keras()
, but if you installed
tensorflow by other means, you can install pydot directly with :
reticulate::py_install("pydot", pip = TRUE)
In a conda environment, you can install graphviz with:
reticulate::conda_install(packages = "graphviz") # Restart the R session after install.
Otherwise you can install graphviz from here: https://graphviz.gitlab.io/download/
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.