Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How do I know which version of the Keras API is implemented in tf.keras?

In the standard implementation of Keras, one can get the API version using keras.__version__.

However, there is no tf.keras.__version__.

So how do I check the version of the Keras API implemented in tf.keras?

like image 664
P-Gn Avatar asked Jan 27 '23 19:01

P-Gn


2 Answers

You can simply run this code

from tensorflow.python import keras
print(keras.__version__)

which is compatible with TF v1.8.0.

like image 139
Abhishek Sehgal Avatar answered Jan 30 '23 08:01

Abhishek Sehgal


This has recently been updated:

>>> import tensorflow as tf
>>> print(tf.keras.__version__)
2.1.6-tf
>>> print(tf.__version__)
1.12.0
like image 29
user3076252 Avatar answered Jan 30 '23 09:01

user3076252