You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This generate the TypeError:
full2_weight = tf.Variable(tf.truncated_normal([fully_connected_size1, target_size],
stddev=0.1, dtype=tf.float32))
full2_bias = tf.Variable(tf.truncated_normal([target_size], stddev=0.1, dtype=tf.float32))
target_size is wrong, it is 2.0 instead of 10 (9+1).
However, the problem originated from:
from tensorflow.examples.tutorials.mnist import input_data
Use this to fix the problem:
from tensorflow.contrib.learn.python.learn.datasets.mnist import read_data_sets
data_dir = 'temp'
mnist = input_data.read_data_sets(data_dir, one_hot=True)
This generate the TypeError:
full2_weight = tf.Variable(tf.truncated_normal([fully_connected_size1, target_size],
stddev=0.1, dtype=tf.float32))
full2_bias = tf.Variable(tf.truncated_normal([target_size], stddev=0.1, dtype=tf.float32))
target_size is wrong, it is 2.0 instead of 10 (9+1).
However, the problem originated from:
from tensorflow.examples.tutorials.mnist import input_data
Use this to fix the problem:
from tensorflow.contrib.learn.python.learn.datasets.mnist import read_data_sets
data_dir = 'temp'
mnist = input_data.read_data_sets(data_dir, one_hot=True)
data_dir = 'temp'
mnist = read_data_sets(data_dir)
The text was updated successfully, but these errors were encountered: