GoogleCloudPlatform / tensorflow-without-a-phd

A crash course in six episodes for software developers who want to become machine learning practitioners.
Apache License 2.0
2.79k stars 911 forks source link

how to modify "tf_dataset.make_one_shot_iterator().get_next()" #48

Closed xgxofdream closed 4 years ago

xgxofdream commented 4 years ago

in mnistdata.py, I met a similar issue related to tensorflow version. but I do not know how to modify it.

as this link suggested, I got 'tf_dataset.make_one_shot_iterator()' to 'tf_dataset.compat.v1.data.make_one_shot_iterator'. But unfortunately it did not work! it reported: AttributeError: 'RepeatDataset' object has no attribute 'compat'

anyone can kindly help me with it.

martin-gorner commented 4 years ago

Hello

The updated tutorial is here: https://codelabs.developers.google.com/codelabs/cloud-tensorflow-mnist/#0

It links to the following updated notebooks: keras_01_mnist.ipynb keras_02_mnist_dense.ipynb keras_03_mnist_dense_lrdecay_dropout.ipynb keras_04_mnist_convolutional.ipynb keras_05_mnist_batch_norm.ipynb

I left the other files in the repo because some videos still reference them but as you noticed, they are way behind the current version of Tensorflow.