[英]TensorFlow that runs in Colab but doesn't on local machine
I just started the TensorFlow course and all its labs are in Google Colab, which works perfect.我刚开始学习 TensorFlow 课程,它的所有实验室都在 Google Colab 中,效果非常好。 However, I would also like to keep the notes of what I do on my computer, but it shows me a 'couple pages long' error, last line saying "TypeError: 'NoneType' object is not iterable" as soon as I run a tensorFlow command such as:
然而,我也想记录下我在电脑上所做的事情,但它显示了一个“几页长”的错误,最后一行在我运行tensorFlow 命令如:
model = tf.keras.Sequential([l0])
OR:要么:
dataset, metadata = tfds.load('fashion_mnist', as_supervised=True, with_info=True)
I successfully pip installed TensorFlow and import it as tf at the beginning of the file.我成功 pip 安装了 TensorFlow 并在文件开头将其导入为 tf。 Can anybody tell me what am I not doing, please?
谁能告诉我我没有做什么?
Try loading the dataset using keras尝试使用 keras 加载数据集
from keras.datasets import fashion_mnist
(X_train, y_train), (X_test, y_test) = fashion_mnist.load_data()
And this for the first part这是第一部分
from keras.models import Sequential
model = Sequential()
model.add(...)
Check the version as Leon said, and tell us.按照 Leon 所说检查版本,然后告诉我们。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.