t-kalinowski / deep-learning-with-R-2nd-edition-code

Code from the book "Deep Learning with R, 2nd Edition"
https://blogs.rstudio.com/ai/posts/2022-05-31-deep-learning-with-r-2e/
41 stars 18 forks source link

Plot requires explicit installation of pydot and graphviz #21

Open yuriy-babenko opened 1 month ago

yuriy-babenko commented 1 month ago

https://github.com/t-kalinowski/deep-learning-with-R-2nd-edition-code/blame/5d666f93d52446511a8a8e4eb739eba1c0ffd199/ch07.R#L188

Running this with the current version of the code hitting the error with plot(model) as plot requires two dependencies: 1) pydot: pydot comes as an extra package with keras3 as keras3::install_keras(envname = "r-reticulate", extra_packages = "pydot") 2) graphviz user must have graphviz installed i.e. brew install graphviz on a mac

To address 1): It seems that original books's code is still using keras (not keras3).

keras3::install_keras(envname = "r-reticulate", extra_packages = "pydot") addressed the issue for me.

To address 2): It might be worth mentioning here to install graphviz