我尝试使用tensorboard来使用DNN可视化图像分类器。我非常确定目录路径是正确的,但是没有显示数据。
当我尝试
SELECT
table_a.*,
(
SELECT
count(*)
FROM
table_b
WHERE
table_b.id_b = table_a.id_A
) AS totala
FROM
table_a
返回:在logdir' PATH /'
我想我的编码肯定有问题。
图形
tensorboard --inspect --logdir='PATH/'
运行
batch_size = 500
graph = tf.Graph()
with graph.as_default():
# Input data. For the training data, we use a placeholder that will be fed
# at run time with a training minibatch.
with tf.name_scope('train_input'):
tf_train_dataset = tf.placeholder(tf.float32,
shape=(batch_size, image_size * image_size),
name = 'train_x_input')
tf_train_labels = tf.placeholder(tf.float32, shape=(batch_size, num_labels),
name = 'train_y_input')
with tf.name_scope('validation_input'):
tf_valid_dataset = tf.constant(valid_dataset, name = 'valid_x_input')
tf_test_dataset = tf.constant(test_dataset, name = 'valid_y_input')
# Variables.
with tf.name_scope('layer'):
with tf.name_scope('weights'):
weights = tf.Variable(
tf.truncated_normal([image_size * image_size, num_labels]),
name = 'W')
variable_summaries(weights)
with tf.name_scope('biases'):
biases = tf.Variable(tf.zeros([num_labels]), name = 'B')
variable_summaries(biases)
# Training computation.
with tf.name_scope('Wx_plus_b'):
logits = tf.matmul(tf_train_dataset, weights) + biases
tf.summary.histogram('logits', logits)
with tf.name_scope('loss'):
loss = tf.reduce_mean(
tf.nn.softmax_cross_entropy_with_logits(labels=tf_train_labels, logits=logits),
name = 'loss')
tf.summary.histogram('loss', loss)
tf.summary.scalar('loss_scalar', loss)
# Optimizer.
with tf.name_scope('optimizer'):
optimizer = tf.train.GradientDescentOptimizer(0.5).minimize(loss)
# Predictions for the training, validation, and test data.
train_prediction = tf.nn.softmax(logits)
valid_prediction = tf.nn.softmax(tf.matmul(tf_valid_dataset, weights) + biases)
test_prediction = tf.nn.softmax(tf.matmul(tf_test_dataset, weights) + biases)
答案 0 :(得分:10)
解决。对于那些在我的命令行上不好的人来说,问题是在命令行中,不要使用quote('')来标记你的目录。
假设您的数据位于'X:\ X \ file.x'
首先进入X:\命令行。
然后输入:
tensorboard --logdir=X/
不
tensorboard --logdir='.X/'
答案 1 :(得分:0)
with tf.Session() as sess:
writer = tf.summary.FileWriter("output", sess.graph)
Windows OS.Tensorboard输出文件夹是在file.py所处的文件夹中创建的。因此,如果从Windows Documents文件夹运行example.py,可以在命令提示符下尝试:tensorboard --logdir=C:\Users\YourName\Documents\output