I'm a Python beginner.I would like to ask an expert to tell me something.
Command Prompt for anaconda Virtual Environment
conda install tensorflow
Enter to install tensorflow.
import tensorflow as tf
I believe that the installation was successful because is passing through the Jupiter Notebook without any errors.
However,
from tensorflow.examples.tutorials.mnist import input_data
When you try to run the
No module named 'tensorflow.examples.tutorials'
The error appears.
I thought this module would be downloaded with tensorflow, but I guess not...
Please tell me how to do it without any errors.
My goal is to do the same thing as what I do on the website at the following URL.
.Tried recognizing handwritten numbers in tensorflow - Qiita
The execution environment is as follows:
python 3.7
jupiter notebook 6.0.3
anaconda3
Windows 10 64bit
tensorflow.examples.tutorials.mnist.input_data
is now deprecated.In addition, tensorflow.examples.tutorials
is no longer included in the pip package , so you can no longer just install the package
Therefore, in order to move the code in the Qiita article referenced, you must place the examples code locally by yourself: https://github.com/tensorflow/tensorflow/tree/master/tensorflow/examples
Also, if you are a beginner, it would be easier to do the official tutorial at https://www.tensorflow.org/tutorials and you don't have to use the old method.For example, if you just want to load MNIST data, you will be using tf.keras.datasets.mnist
.The following is an example:
(x_train,y_train),(x_test,y_test) = tf.keras.datasets.mnist.load_data()
© 2024 OneMinuteCode. All rights reserved.