What is the difference between keras and tf.keras?

后端 未结 3 1203
后悔当初
后悔当初 2020-12-09 13:43

I\'m learning TensorFlow and Keras. I\'d like to try https://www.amazon.com/Deep-Learning-Python-Francois-Chollet/dp/1617294438/, and it seems to be written in Keras.

<
3条回答
  •  无人及你
    2020-12-09 13:58

    At this point tensorflow has pretty much entirely adopted the keras API and for a good reason - it's simple, easy to use and easy to learn, whereas "pure" tensorflow comes with a lot of boilerplate code. And yes, you can use tf.keras without any issues, though you might have to re-work your imports in the code. For instance

    from keras.layers.pooling import MaxPooling2D
    

    Would turn into:

    from tensorflow.keras.layers import MaxPooling2D
    

提交回复
热议问题