I tried to import some examples from mnist in tensorflow version 2. But the examples are all about tensorflow version 1 and I modifed my tensorflow using
import tensorflow.compat.v1 as tf
tf.disable_v2_behavior()
here, I tried to use
from tensorflow.examples.tutorials.mnist import input_data
mnist = input_data.read_data_sets("MNIST_data/", one_hot=True)
but ModuleNotFoundError: No module named 'tensorflow.examples'
appeared in my VSCode terminal, so I tried with
from keras import Sequential
from tensorflow import keras
import os
mnist = tf.keras.datasets.mnist
(x_train, y_train), (x_test, y_test) = mnist.load_data()
In this way, data loading was successful but the example code,
batch_xs, batch_ys = mnist.next_batch(100)
did not work.
To get the tutorial folder in my tensorflow, I also tried to download from github, but there was no tutorial folder according to ModuleNotFoundError: No module named 'tensorflow.examples'
However, there was no folder named tensorflow_core in my C:\Users\User\anaconda3\envs\tensorflow\Lib\site-packages
help me