在 Jupyter 笔记本中运行以下代码 (Python):
import tensorflow as tf
from tensorflow import keras
我看到这个错误:
ImportError: cannot import name 'keras'
我尝试了其他替代第二个命令的命令,例如(但不限于)
from tensorflow.keras import layers
但总是返回一些错误。我正在使用Jupyter的在线版本,运行print(tf.VERSION)
返回1.1.0。我不确定问题是否仅是我拥有错误的版本,还是其他原因。我该怎么解决这个问题?