luv91
luv91

Reputation: 1

TensorBoard error - [WinError 2] The system cannot find the file specified

I am trying to run TensorBoard with the following code

%load_ ext tensorboard.notebook

import tensorflow as tf

x = tf.constant( [100,200,300], name = 'x')
y = tf.constant([1,2,3], name = 'y')

sum_x = tf.reduce_sum(x, name="sum_x"
prod y = tf.reduce_prod(y,name="prod_y")

final div = tf.div(sum_x, prod_y, name = 'final div’)
final_mean = tf.reduce_mean([sum_x, prod_y], name = 'final_mean*)
sess=tf .Session()

print ("x: ",sess.run(x))
print ("y: ", sess.run(y))
print ("sum(x): ", sess.run(sum_x))
print ("prod(y): ", sess.run(prod_y))
print ("sum(x)/prod(y): ", sess.run(final_ div))
print ("mean(sum(x), prod(y)): ", sess.run(final_mean))

writer = tf.summary.FileWriter('janani_ex_2', sess.graph)
writer.close()

sess.close()

%tensorboard --logdir = 'janani_ex_2'

This displays Launching tensorboard and then run into a [WinError 2] The system cannot find the file specified error.

What am I doing wrong?

Upvotes: 0

Views: 712

Answers (2)

tdMJN6B2JtUe
tdMJN6B2JtUe

Reputation: 428

If you are not using Jupyter notebook, then in the folder with the tensorboard objects, use this:

tensorboard --logdir ./

It will look in the current folder to get the files. To get to the folder, type cd and then copy and paste the name of the folder.

Upvotes: 0

kett
kett

Reputation: 957

On Windows, you need to change this line

%tensorboard --logdir = 'janani_ex_2'

to

%tensorboard --logdir '.\janani_ex_2'

I'm assuming that the folder janani_ex_2 includes your logs and it's located inside the folder, where your jupyter notebook is in.

Upvotes: 1

Related Questions