我把28*28的mnist数据集resize成60*60的再压缩成gz文件去学习,学习效率一直很低。我知道有点蠢,但是就是找不到原因,请各位高手指点一下。谢谢!
主要改的cnn代码为:
mnist = input_data.read_data_sets("MNIST_data/mnist60/", one_hot=True)
pixel = 3600
row = 60
x = tf.placeholder("float",[None,pixel])
y_ = tf.placeholder("float", [None,10])
……
W_fc1 = weight_variable([15 * 15 * 64, 1024])
b_fc1 = bias_variable([1024])
h_pool2_flat = tf.reshape(h_pool2, [-1, 15 * 15 * 64])
还有input_data.py文件中
def next_batch(self, batch_size, fake_data=False):
"""Return the next batch_size
examples from this data set."""
if fake_data:
fake_image = [1.0 for _ in xrange(3600)]
fake_label = 0
return [fake_image for _ in xrange(batch_size)], [fake_label for _ in xrange(batch_size)]
……
多谢多谢~!