tf.contrib是否有任何特殊的安装说明? 我正在尝试遵循enter link description here,并在第二行
images = mnist_data_provider.provide_data(FLAGS.batch_size)
获取错误
NameError: name 'mnist_data_provider' is not defined
使用TensorFlow:1.13.1 脾气暴躁:1.16.3 的Python:3.7.2
答案 0 :(得分:0)
tf.confib将很快过时,建议切换到其他名称。我可以建议为此目的使用tf.keras.data:
import tensorflow as tf
mnist = tf.keras.datasets.mnist
(train_images, train_labels), (test_images, test_labels) = mnist.load_data() # we only need train images here [60000, 28, 28]
# convert that into data provider
dataste = tf.data.Dataset.from_tensor_slices((train_images, train_labels))
我认为,当您将其提供给tfgan.gan_model