If you are facing issues with Tensorboard, please follow the steps given in this discussion on CloudxLab forum.
Taking you to the next exercise in seconds...
Want to create exercises like this yourself? Click here.
No hints are availble for this assesment
Answer is not availble for this assesment
Please login to comment
141 Comments
Can someone help me with this issue?
Upvote ShareHi,
A good idea is to run the existing notebook(from cloudxlab repo). If that notebook runs smoothly, then it would be easier to introspect and understand clearly about the issue.
Thanks.
Upvote ShareHello,
Thank you for the reply. Turns out mse_summary in tf v2.5 should be mse_summary = tf.compat.v1.summary.scalar()
This is because although tf.summary.scalar() exists in tfv2.5, it works differently and hence the tf v1 should be used to follow the code in the lecture.
1 Upvote ShareThis comment has been removed.
Hi Team,
IFrame not able to embedd html on my jupyter. It is giving me a blank page. Is there any issue with my browser which is stopping it.Please let me know the solution, I am not abe to visualize tensor graphs on jupyter.
Regards,
Birendra Singh
Hi,
Please attach the screenshot.
Thanks.
Upvote ShareHi, is the Modularity(last topic of this video) part is over ? or their is another video for that.
Upvote ShareHi,
Yes, this is the last video on this topic.
Thanks.
Upvote ShareAt 50:14
I did not understand.
tf,Variable(0.2, name="b")
tf.Variable=(0.3,name="c")
What are we calculating here??
Upvote ShareHi,
We are not calculating anything, we are simply declaring a variable here.
Thanks.
Upvote Sharei did not understand.
Tensor Board
Why are we creating summary in MSE in step2 ??
Upvote ShareHi,
TensorBoard provides the visualization and tooling needed for machine learning experimentation.
Thanks.
Upvote ShareThis comment has been removed.
Hi,
For using python, you no longer need to activate py36 environment.
All, you need to do is set the path using this command: export PATH=/usr/local/anaconda/bin:$PATH
Thanks.
Upvote ShareHi,
Please go through the below steps if you are facing issues with Tensorboard:
https://discuss.cloudxlab.com/t/solved-cannot-start-tensorboard-server/5146
Thanks.
Upvote ShareHi,
Please check the kernel you are using. Follow the below discussion for more details:
https://discuss.cloudxlab.com/t/explained-how-to-run-tensorflow-2-notebooks-in-cloudxlab/5432
Thanks.
Upvote ShareThanks. It worked for Tensorflow 1
1 Upvote ShareI could not under this piece of coce in the deeplearning notebook <b>tensorflow.ipynb</b>. Maybe I have missed some basic python syntax.
when the 'differentiate' function is called, first paraemeter is just 'sq', How does that work when 'sq' function itself takes a parameter 'x'? If no parameter is supplied at the time
of the fucntion call, is there any default value that is assumed for parameter 'x'?
Thanks in advance
Upvote ShareHi,
Functions can be parameters too! When sq is passed as a parameter, inside the differentiate() function it acts as a function. Try running f(x + dx) only from inside the differentiate function and observe the value it returns.
Thanks.
1 Upvote ShareThank you sir but i could not able to see tensor board with following URL
http://g.cloudxlab.com.ec2.internal :6006
Help Me how to do that
Upvote ShareHi,
Please go through the below link for a few troubleshooting steps:
[SOLVED] Cannot start Tensorboard Server - Lab Support - CloudxLab Discussions
If this does not help, please check if the required files have been saved for Tensorboard to display. Also, share a screenshot of how you are trying to start the Tensorboard.
Thanks.
Upvote Sharee
For using python, you no longer need to activate py36 environment.
All, you need to do is set the path using this command: export PATH=/usr/local/anaconda/bin:$PATH
Help Me, i am stuck in the first step of starting Tensor board ,
3rd sreenshot
___________________________
2nd sreenshot
________________________
Hello,
I need your help in understanding few issues reproducing the Tensorflow graph on browser using web console. Please refer to the 3 images below and answer the queries below:
1) Why am I able to see only 2 runs /graph? Although when I refer to your video TensorFlow- session 02 - 2:24:13 part, I see that there are multiple runs inside the TensorBoard
2) Even the folder 'ml/deep_learning/tf_logs' does not contain multiple logs. Am I missing something here?
3) What steps do we need to take to visualize multiple logs and graphs?
4) Or if I am able to see only one log after executing the code once in Jupyter notebook, there will be only one graph? Please advise if I am wrong or else please guide.
Thanks
Hi,
The number of graphs showing on Tensorboard depends on the number of graphs saved in the folder, which in turn depends on the code you wrote. Please do not compare what is shown in the lecture videos with your work because they may not match owing to various reasons including we may have supplied data separately to show how Tensorboard works.
You can go through the below link for more information on Tensorboard:
[SOLVED] Cannot start Tensorboard Server - Lab Support - CloudxLab Discussions
Thanks.
Upvote ShareOne more question -
What does to, msev mean here?
>> if epoch % 100 == 0:
to, msev = sess.run([training_op, mse], feed_dict={X: X_batch, y: y_batch})
erros.append(msev)
Thanks
__________________________________________________________________
# This is execution phase
# Fetch the mini-batches one by one then provide the value of x and y via the feed_dict parameter
erros = []
with tf.Session() as sess:
sess.run(init)
for epoch in range(n_epochs):
for batch_index in range(n_batches):
X_batch, y_batch = fetch_batch(epoch, batch_index, batch_size)
if epoch % 100 == 0:
to, msev = sess.run([training_op, mse], feed_dict={X: X_batch, y: y_batch})
erros.append(msev)
else:
sess.run(training_op, feed_dict={X: X_batch, y: y_batch})
best_theta = theta.eval()
print(best_theta)
Hi,
These are variables where the output from the right side of the code is being saved.
Thanks.
Upvote ShareHello,
Please let me know why are we using the this code below?
>> init = tf.global_variables_initializer()
Which global variables are we initializing and for what o/p will this function be used?
When I look at the help it says: " An Op that initializes global variables in the graph.". Which graph and variables are we talking about here?
Thanks
______________________________________________________________________
#Let's implement mini-batch using placeholder nodes
reset_graph()
learning_rate = 0.01
# Let's make X and y as placeholder nodes
X = tf.placeholder(tf.float32, shape=(None, n + 1), name="X")
y = tf.placeholder(tf.float32, shape=(None, 1), name="y")
theta = tf.Variable(tf.random_uniform([n + 1, 1], -1.0, 1.0, seed=42), name="theta")
y_pred = tf.matmul(X, theta, name="predictions")
error = y_pred - y
mse = tf.reduce_mean(tf.square(error), name="mse")
optimizer = tf.train.GradientDescentOptimizer(learning_rate=learning_rate)
training_op = optimizer.minimize(mse)
init = tf.global_variables_initializer()
Upvote ShareHi,
Please find a detailed answer in the below discussion:
tensorflow - What is the purpose of tf.global_variables_initializer? - Stack Overflow
Thanks.
Upvote ShareThis comment has been removed.
This comment has been removed.
Hi Sir,
Kindly, provide the tensor python code book which is using the latest tensorflow 2.0. Since, I have install the tensorflow 2.0. It is giving the error in the notebook that
Hi,
This course is built on Tensorflow 1.0. You do not need to install the same on your own computer, you need to use our lab for the same where we have installed TF1.0 and TF2.0 for you to be able to use them.
Thanks.
Upvote ShareHi
I am not able to get the graph ,Its not giving any error. I am running the code locally and I have created a new environment where tensorflow 1.10 and python 3.6.9 is installed .
Upvote ShareHi,
Check if you have activated the correct environment, using the correct URL, see if you are using the correct directory where the graphs are stored.
Thanks.
Upvote ShareHi,
Graph is not being populated in the notebook "tenserflow.ipynb" in the section "9 Visualizing the graph - 9.1 inside Jupyter and 9.2 Using TensorBoard"
Regards,
Punit
Upvote ShareHi,
I am getting issue with Tensorboard. I got error for "source activate py36". Could not find py36 env. with "conda info --envs". I was still able to start the TensorBoard but not able to open it in the browser.
f.cloudxlab.com:6006
Hi,
Please go through the below discussion:
https://discuss.cloudxlab.com/t/solved-cannot-start-tensorboard-server/5146
This should answer both your queries.
Thanks.
Upvote ShareHi Rajtilak,
Thanks.
I executed the steps as suggested in the link. Please check below the outcome.
Started the TensorBoard server using following code but it gave an error "No dashboards are active for the current data set."
(Check the image below)
export PATH=/usr/local/anaconda/bin:$PATH
source activate root
tensorboard --logdir deep_learning/tflogs --port 4066
http://f.cloudxlab.com:4066
Am I missing something?
9 Visualizing the graph - 9.1 inside Jupyter
Error - Did not display the graph
9.2 Using TensorBoard
Executed the steps provided in first 3 cells i.e. till filewriter
file_writer = tf.summary.FileWriter(logdir, tf.get_default_graph())
Copied the name of the latest log file generated by the filewriter and eexcecuted the code (Check the image below)
!ls -lrt tf_logs/run-20200910082500
Output:
total 16
-rw-r--r-- 1 punitnb7985 punitnb7985 15836 Sep 10 08:25 events.out.tfevents.1599726315.cxln5
Executed next five steps till
show_graph(tf.get_default_graph())
Error - Did not display the graph
Hi,
You need to provide the complete path to the folder containing the information, this is because the Jupyter notebook and the folder containing the information to display the graph are in different locations.
Thanks.
Upvote ShareHi Rajtilak,
This is directory for log files as per the code.
root_logdir = "tf_logs"
logdir = "{}/run-{}/".format(root_logdir, now)
It is created in "/ml/deep_learning"
The tensorflow.ipynb is also located in "/ml/deep_learning" directory.
Please let me know which path and where to be changed.
Upvote ShareHi,
Use the complete path to the folder containing the files.
Thanks.
Hi,
Why we are calacualting Gradient ? Only to know the value of Theta or going to use it to Minimize the cost function i.e. MSE.
Upvote ShareHi,
Here we are calculating the gradient to show how it can be done manually, without using any library, so the one can understand how it works.
Thanks.
Upvote Sharepython 3 issue...no file in directory...Python 3 is not activated...kindly help
Upvote ShareHi,
Please try the following line instead:
source activate root
Thanks.
Upvote ShareHi, Rajtilak
Error: No such file or directory.
Regards
Mrityunjay
Hi,
Try these set of commands:
export PATH=/usr/local/anaconda/bin/:$PATH
source activate root
Just curious, what are you trying to achieve here?
Thanks.
Upvote ShareHi, Rajtilak
I want to use TensorBoard.
Regards
Mrityunjay
Upvote ShareHi,
Try this link:
https://discuss.cloudxlab.com/t/solved-cannot-start-tensorboard-server/5146
Thanks.
Upvote ShareHI, i found this link but it is not opening kindly help me out.
http://cxln4:6006/
Error: This site can’t be reached
regards
Mrityunjay
Upvote ShareHi,
Please go through the previous link I shared.
Thanks.
Upvote Sharehttp://cxln5:4066/
Error: This site can’t be reached
regards
Mrityunjay
Upvote ShareThis site can’t be reached
cxln5’s server IP address could not be found.
DNS_PROBE_FINISHED_NXDOMAIN
Upvote ShareHi,
Please go through the discussion in the link I provided, that explains what you need to do in this case.
Thanks.
Upvote ShareSir i use tensorflow 2 so there are certain things not applicable from here when i try myself. I've tried using tf.compat.v1 in some cases, but got stuck here in summary.filewriter. could you please tell me what can i do to fix this problem?
Upvote ShareHi,
I see that you have enrolled for the Deep Learning course from E&ICT, IIT Roorkee. This course was created using Tensorflow 1.0. Here are a couple of suggestions:
1. Use our lab for all the assessments, we have both Tensorflow 1.0 and Tensorflow 2.0 available there
2. If you have installed Tensorflow 2.0 in your personal computer but would like to practice these assessment there, I would suggest you to create another environment and install Tensorflow 1.0 for this purpose
3. Here is a code migration guide from Google, you can try this: https://www.tensorflow.org/guide/migrate
Let me know if you need any further help.
Thanks.
Upvote Share
Upvote Sharesir could you please help me here, what does this selected line do? what is "to"?
Hi,
sess is the session we created, and we are running it using the run function. Before this line we are fetching the mini-batches, and then we are feeding value of X and y via feed_dict parameter.
Thanks.
Upvote Sharesess=tf.session()
Hi,
Are you trying to run this on the tensorflow2 kernel?
Thanks.
Upvote Shareyes,where should i run it then i was running it in cloudxlab tensorflow2
Upvote ShareHi,
This is a Tensorflow 1 code, it will not run in Tensorflow 2. Please change your kernel to Tensorflow 1 to run this code, follow this discussion if you want to know how to change your kernel to Tensorflow 1:
https://discuss.cloudxlab.com/t/explained-how-to-run-tensorflow-2-notebooks-in-cloudxlab/5432
Thanks.
Upvote ShareIn manually calculating method, we take initial value of theta as: tf.Variable(tf.random_uniform([n+1,1],-1.0,1.0,seed=42).
Could you please expain what is n+1 here and -1.0,1.0?
Also, is theta too a global variable?
Thanks.
Upvote ShareHi,
random_uniform generate a random tensor in TensorFlow so that you can use it and maintain it for further use even if you call session run multiple times. E.g:
Here, we're going to create a tensor that’s 1x2x3 with a minimum value of 0 and a max value of 1, and the data type that we're going to use is tf.float32. Also, we're not going to use a seed and we're not going to give it a name.
Thanks.
Upvote ShareThank you.
Just one more question. Why are we taking (n+1) and not just n?
Upvote ShareHi,
Good question! Instead of me answering this, let me help you answer this. Why don't you create 2 variables, one with n and another with n+1, and then print them to see the results. That would help you understand the difference.
Thanks.
Upvote ShareIn the above video at 1.28.59, the following equation is being shown. It is about converting the data to real-time data. But I didn't got the concept of these equations. like, epocj is multiplied by n-batches and added to batch_index. why multiplied to n_batches.
then again, nbatches is calculated as int(np.ceil(m/batch_size)). what is m. why we dividing by batch size.
Please explain.
In the above video at 1.39.31, it is been explained about m. So, that is clear now. Now, i am only facing problem in understanding the fact about batch_index...batch_index is not defined. i understand what index is. But dont we need to define it.
Upvote ShareHi,
These are function parameters that we will pass later while calling the function.
Thanks.
Upvote ShareHi,
Can you please provide me a tutorial or simplified code for these 2 projects
cross attenation for image text
2)text to image conversion
please reply sir it is an urgent need.
Thank you
Hi,
You can try these 2 links:
https://kuanghuei.github.io/SCANProject/
https://gist.github.com/destan/5540702
Thanks.
Upvote ShareHi,
I am running this locally in tensorflow2.2.0 and successfully runned all the above codes and successfully showing the results.
Upvote ShareBut just on running "show_graph(tf.compat.v1.get_default_graph())" it is not showing and graph but it is also not showing any error. Please help me out.
Thanks
Hi,
Probably this function is not compatible in Tensorflow 2, even if you are using compat. Try Stackoverflow if you do not find a solution.
Thanks.
Upvote ShareI have not found any solution even in stackoverflow please help me sir
Hi,
I would not be able to help you much since you are running these codes on your local system, I don't know it's configuration, the packages installed, version number of different packages etc. Best thing for you would be to either port your code to TensorFlow 2, or post your question on Stackoverflow in case you did not find a solution there.
Thanks.
Upvote ShareHi,
How can we run tensorboard locally and not in cloudxlab?? as i am unable to proceed fiurther now.
1 Upvote ShareHi,
Follow the same instructions. In place of the URL, type in localhost:<port#>, and you are good to go.
Thanks.
Upvote Sharei have not understood. for example- if port no. is 8080 then is it locahost:8080????
Upvote ShareHi,
If you are trying to run Tensorboard on your local machine, the URL should be localhost: and then the port number.
Thanks.
Upvote ShareI have tensorflow version- (in my local device)
import tensorflow
print(tensorflow.__version__)
Hi,
I have already replied to your email. Please check.
Thanks.
Upvote ShareI have done the same as shown in this link
https://packaging.python.org/guides/installing-using-pip-and-virtual-environments/
but still showing the same error. please help me sir
Upvote ShareHi,
You cannot use reset_default_graph in Tensorflow 2. You need to find another way to code the same.
Thanks.
Upvote ShareHi,
for epoch in range(n_epochs):
Upvote Shareif epoch % 10 == 0:
print("Epoch", epoch, "MSE =", mse.eval())
x = sess.run(training_op)
best_theta = theta.eval()
In this loop what is the significance of this line???
Hi,
Could you please tell me which line are you referring to?
Thanks.
Upvote ShareI have understoof my doubt
Hi,
theta = tf.Variable(tf.random_uniform([n + 1, 1], -1.0, 1.0, seed=42), name="theta")
in the above code why we are writing [n + 1, 1 and -1.0, 1.0????
Upvote ShareHi,
I have come upto here(screenshot). then in another browser I do: f.cloudxlab.com/6011
--> error: Site cant be reached. Page took too long to respond.
Any suggestions? can't be the internet. I am able to watch video without buffer.
Able to use port 4100 based on discussion in threads below. Issue resolved. Thanks.
Upvote ShareHi,
This is great! Happy learning.
Thanks.
-- Rajtilak Bhattacharjee
Upvote ShareHi,
Please refer to the following discussion for a solution:
https://discuss.cloudxlab.c...
Thanks.
-- Rajtilak Bhattacharjee
Upvote ShareAfter launching tensorboard on terminal, i m not able to open it in browser (screenshot attached
Hi,
Are you still facing this issue? If yes, then please follow the below steps for resolving the issue:
https://discuss.cloudxlab.c...
Thanks.
-- Rajtilak Bhattacharjee
Upvote ShareHi,
I am unable to open tensorboard in the browser after launching it from the terminal. Screenshot attached
Please help.
Upvote ShareHi,
Are you still facing this issue? If yes, then please follow the below steps for resolving the issue:
https://discuss.cloudxlab.c...
Thanks.
-- Rajtilak Bhattacharjee
Upvote ShareHi
I am not able to open tensorboard in browser as shown ion screenshot
Thanks Upvote Share
Please check this note on Tensorboard
-- Praveen Pavithran
Upvote ShareCan we not use the packages like we used to do in sklearn for applying different kinds of models?
Upvote ShareHi,
Could you please elaborate a bit more on your query? We are using Tensorflow here, which itself is an open source library for Deep Learning.
Thanks.
-- Rajtilak Bhattacharjee
Upvote Sharei am asking that in sklearn we have different types of models, so is it same in case of tensorflow?
Upvote ShareHi,
Yes, it does. You can explore them yourself from the below link:
https://www.tensorflow.org/...
Happy learning!
Thanks.
-- Rajtilak Bhattacharjee
Upvote ShareHi
Upvote ShareI am not able to activate python3 in console for running tensorboard. Plz help
Thanks
Hi.
Kindly export this path export PATH=/usr/local/anaconda/bin:$PATH in your web-console and you will be able to access the Python3.
All the best!
-- Satyajit Das
Upvote ShareThanks But I have created a tensorboard at port 6006 but i ma unable to open in browser . Plz help
Upvote ShareHi
Upvote ShareIn Visualizuing the graph portion, code is running without any error but graph is not displayed.Plz help.
Thanks
Prachi
Hi,
Would request you to share a screenshot of your code.
Thanks.
-- Rajtilak Bhattacharjee
Upvote ShareHi
Upvote ShareHow we would decide momentum factor value in momentum gradient descent optimizer?
What is better approach out of gradient descent optimizer and momentum gradient descent optimizer ?
Hi,
In practice, the coefficient of momentum is initialized at 0.5, and gradually annealed to 0.9 over multiple epochs. You can find more details here:
https://blog.paperspace.com...
Thanks.
-- Rajtilak Bhattacharjee
Upvote ShareThanks
Upvote ShareHello,
when i am trying to get grap inside jupyter using the same code. it is just showing blank.. no graph..
Upvote Shareplease help me out with it...
i have pasted it at the end of code after eveluating...
do we have to draw just after graphing code?
Please share screenshot of code if this issue persists
-- Praveen Pavithran
Upvote Sharehousing_data_plus_bias = np.c_[np.ones((m, 1)), housing.data]
here what is np.c_ ??
Upvote ShareHi
Upvote Sharenp.c_ is used to concatenate housing data and array which u have used os size (m,1).Hopw it would help.
thanks Prachi
Upvote Sharewhy am i not getting the value of x when i print it even after i used the global variable initializer and ran it Upvote Share
Hi,
KIndly check your syntax once.
sample example :-
with tf.Session() as sess:
x.initializer.run()
y.initializer.run()
result = f.eval()
result
All the best!
-- Satyajit Das
Upvote ShareHi
Upvote ShareI'm getting this error.
Hi Roshan,
Please ensure that the folder exists. If it does not, would request you to clone our git repository as per the tutorial.
Thanks.
-- Rajtilak Bhattacharjee
Upvote ShareAnother question : The function: gradients = Gradient(ops,[theta]) [0]
Will the elements in the gradients list be the same as the number of elements in the theta list?
Upvote ShareI didn't see you define the theta list in the video , if you did , please tell me where it is,
A question : what is the metaphor meaning for the tesorflow session?
Upvote ShareWhen tried to activate py36 below issue came
This is not the right way
Upvote SharePlease follow the steps in the video
Upvote SharePlease help me with below issue.
You have to first activate the py36 environment . Please follow the steps in the video
Upvote SharePlease follow the video. you will have to activate python 3 environment first
Upvote ShareOnce we created a session, we need to close the session right..!!, but why do you not closing the session after it's use?
Upvote Sharefor mini batch gradient descent, X is having 8 features, for place holder of X, why do we need to use n + 1?
Upvote ShareWhile working on the terminal i am not able able to import tensorflow as the module is absent. I am not able to install it as well due to some permission issues. I believe that is why i am not able to use tensorboard. Can you please help?
Upvote ShareHi Anurag,
I am looking into it. In the meantime, please use the jupyter notebook.
Upvote Sharesource activate py36 gives the error: "bash: activate: No such file or directory"
Upvote ShareThe python3 is in anaconda directory. Please run the following command to run python3:
export PATH=/usr/local/anaconda/bin:$PATH
But I would strongly suggest that you use the jupyter notebook by using "New -> Python3" in the Jupyter Home.
Upvote Shareinstead of source activate py36 .. try
source activate root
then you can check
python --version