How to import keras from tf.keras in Tensorflow?

前端 未结 8 1516
隐瞒了意图╮
隐瞒了意图╮ 2020-12-12 22:55
import tensorflow as tf
import tensorflow 

from tensorflow import keras
from keras.layers import Dense

I am getting the below error



        
8条回答
  •  暗喜
    暗喜 (楼主)
    2020-12-12 23:08

    I had the same problem with Tensorflow 2.0.0 in PyCharm. PyCharm did not recognize tensorflow.keras; I updated my PyCharm and the problem was resolved!

提交回复
热议问题