Ich brauche Hilfe in luanching tensorboard von tensorflow auf dem datalab läuft, Mein Code ist das Folgende (alles auf dem datalab ist):Abschuss tensorboard von Google Cloud datalab
import tensorflow as tf
with tf.name_scope('input'):
print ("X_np")
X_np = tf.placeholder(tf.float32, shape=[None, num_of_features],name="input")
with tf.name_scope('weights'):
print ("W is for weights & - 15 number of diseases")
W = tf.Variable(tf.zeros([num_of_features,15]),name="W")
with tf.name_scope('biases'):
print ("b")
#todo:authemate for more diseases
b = tf.Variable(tf.zeros([15]),name="biases")
with tf.name_scope('layer'):
print ("y_train_np")
y_train_np = tf.nn.softmax(tf.matmul(X_np,W) + b)
with tf.name_scope('correct'):
print ("y_ - placeholder for correct answer")
y_ = tf.placeholder(tf.float32, shape=[None, 15],name="correct_answer")
with tf.name_scope('loss'):
print ("cross entrpy")
cross_entropy = -tf.reduce_sum(y_*tf.log(y_train_np))
# % of correct answers found in batch
print("is correct")
is_correct = tf.equal(tf.argmax(y_train_np,1),tf.argmax(y_,1))
print("accuracy")
accuracy = tf.reduce_mean(tf.cast(is_correct,tf.float32))
print("train step")
train_step = tf.train.GradientDescentOptimizer(0.01).minimize(cross_entropy)
# train data and get results for batches
print("initialize all varaible")
init = tf.global_variables_initializer()
print("session")
sess = tf.Session()
writer = tf.summary.FileWriter("logs/", sess.graph)
init = tf.global_variables_initializer()
sess.run(init)
!tensorboard --logdir=/logs
der Ausgang ist: Ab TensorBoard 41 auf Port 6006
jedoch (Sie können zu http://172.17.0.2:6006 navigieren), wenn ich auf den Link klicken, ist die Webseite leer
Bitte lassen Sie mich kno w was ich vermisse. Ich erwarte das Diagramm zu sehen. später möchte ich mehr Daten generieren. Jeder Vorschlag wird geschätzt.
Vielen Dank!
Ich habe versucht, eine Netzwerkregel für Port Hinzufügen 6006: gcloud Beta Compute Firewall-Regeln erstellen tensorboard --action erlauben --Rules tcp: 6006 und http: //: 6006 aber es hat auch nicht funktioniert. irgendein Vorschlag? –
eilalan