stared / livelossplot

Live training loss plot in Jupyter Notebook for Keras, PyTorch and others
https://p.migdal.pl/livelossplot
MIT License
1.29k stars 142 forks source link

Use Tensorflow's Keras sub-package if the Keras package is not available. #32

Closed fabianDadada closed 5 years ago

fabianDadada commented 5 years ago

Hey :-) Thanks, for livelossplot!

The Tensorflow Python package includes a keras sub-package. If one only wants to use Keras with the Tensorflow backend, it is not necessary to install the Keras package, but one can use the sub-package.

stared commented 5 years ago

@fabianDadada A fair point, especially as Keras became (also) a part of the official TensorFlow API.

However, I still think what is the best way to incorporate that. If someone has (standalone) Keras but wants to TF, isn't it likely to cause problems? (As it will use a different Keras version than intended.)

Also, I think if there is a way to import TF/Keras only when using appropriate modules. That way it would be simple to:

stared commented 5 years ago

Also, I asked a question on StackOverflow: https://stackoverflow.com/questions/53958762/conditional-import-in-python-when-creating-an-object-inheriting-from-it

stared commented 5 years ago

Regardless, the current version would need changes, as it assumes that there is Keras or TensorFlow.

stared commented 5 years ago

@fabianDadada If interested, feel invited to help me with #36.