Keras that does not support TensorFlow 2.0. We recommend using `tf.keras`, or alternatively, downgrading to TensorFlow 1.14

前端 未结 7 1572
孤独总比滥情好
孤独总比滥情好 2021-02-13 15:41

I am having an error regarding (Keras that does not support TensorFlow 2.0. We recommend using tf.keras, or alternatively, downgrading to TensorFlow 1.14.) any reco

7条回答
  •  别那么骄傲
    2021-02-13 16:15

    first, import tensorflow:

    import tensorflow as tf
    

    Next, in place of this,

    classifier.add(Dense(output_dim = 6, init = 'uniform', activation = 'relu', input_dim = 11))
    

    use:

    classifier.add(tf.keras.layers.Dense(output_dim = 6, init = 'uniform', activation = 'relu', input_dim = 11))
    

    Let me know if it works.

提交回复
热议问题