Analyzing Models with TensorBoard - Deep Learning with Python, TensorFlow and Keras p.4
HTML-код
- Опубликовано: 23 авг 2018
- Welcome to part 4 of the deep learning basics with Python, TensorFlow, and Keras tutorial series. In this part, what we're going to be talking about is TensorBoard. TensorBoard is a handy application that allows you to view aspects of your model, or models, in your browser.
Text tutorials and sample code: pythonprogramming.net/tensorb...
Discord: / discord
Support the content: pythonprogramming.net/support...
Twitter: / sentdex
Facebook: / pythonprogramming.net
Twitch: / sentdex
G+: plus.google.com/+sentdex
My day routine :
1) Open youtube
2) Check sentdex new tutorials !!
Thank you for this amazing work !!
Wow hitting CMD from file explorer path just saved me a huge amount of time, no more batch files. awesome shortcut. thanks for the tip!
Great video as always, Harrison. Thank you very much for taking the time to make such high-quality content. Cheers.
seriously, that was the best explanation for how to use tensorboard, thx
Thank you so much this part helped A LOT.
Was eagerly waiting for this, thank you @sentdex !!
Happy to share!
Thank You Sir, this tutorial helped me a lot!!! I really am a big fan of your videos.
Really really useful ,thank you Harrison, you're awesome.
The best tutorial ever! BTW, for 2020 mac user, if you cannot run the: tensorboard --logdir=logs/, use the pip install grpcio==1.24.3
That's incredible~
I'm waiting for ur next video.
Hey Sentdex, love you tutorials. Thank you for taking the time to put them up.
Will you cover any PyTorch tutorials?
This was great, Thank you!!
"I really hope that didnt kill my recording"... doesnt check :P This video series is great btw!
Can't check without hitting stop. Then I'd have to... *shudders* edit. Might as well just finish and hope for the best :D
up next teach charles to edit? that actually would be super cool
Thank you @sentdex you are really awesome and this tutorial🔥🔥🔥🔥🔥
if you get a "Failed to create a directory" error as a windows user i fixed it by changing "/" to "\\" in log_dir.its looks like this now = TensorBoard(log_dir=" C:\\logs\\{}".format(NAME))
thank you very much, your comment save my life
Thanks alot bro :)
thanks
That awesome share man, you saved the day
Also we can use without format
Name = f"tfModels-{int(time.time())}"
tensorboard = TensorBoard(log_dir=f"logs\\{Name}")
Keep going. it's very useful for me. Thanks a lot
Anh ơi, em bật cái tensorboard lên thì không thấy val_loss với val_acc, anh biết cách sửa ko ạ
Great work. Keep us educating @sentdex
Will do!
Thank u for this awesome video
7:42 "one more time" -> "un mas tiempo" LOL!
Nice tutorial!
una vez mas
are you planning on doing something about genetic/evolutionary algorithms? In future, maybe evolutionary neural nets?
I was reading Conv2d reference from TensorFlow page and I can see that it has stride=, activation= and many other parameters that can be set to it. So, I wonder if we can eliminate the Activation() layer and use the activation= param of Conv2D instead ? Thanks for the video, it is great.
Hey Sentdex,What's the theme of Sublime text editor that you are using? I really liked it..Anyway great tutorial series as always!!
Hi - great video. With the example given, my PC takes about 10 minutes per epoch, and wanted to know if you have any tips for speeding things up. I'm using a fairly dated Dell XPS8300, Intel Core i7-2600 CPU, 16 GB RAM, NVIDIA GeForce GT 545 display adapter. I'm using the CPU only version of Tensorflow. If I install the GPU version of tensorflow, will that help do you think? I'm trying to avoid buying a new PC!
do you also use the 1080ti for gaming or is it a pure workhorse?
awesome video man
I would like to ask one question. I am using the exact route that you used. In each run, I am taking different values in accuracy and loss. That is why, the plots are different every time compared to the previous ones in TensorBoard. Is the training of data necessary again? or there is something different that we should also insert. Thank you.
Hi ! long time fan. How is it possible that at the 11 minute mark you have validation loss and accuracy both increasing? Shouldn't they be 100% inversely correlated? Thanks!
hi!
thanks for your video
I just dont get something about using tensorboard, why dont we use matplotlib and draw our plots with that like always?
what is the difference?
Hi @sentdex, how likely are your tutorial series still "compatible" with TensorFlow 2.2 ?
very useful!
Could you make a segmentation cnn instead of a classification one afterwards? Im really interested in that
Hey Harrison, what's your opinion of the new Nvidia RTX graphics cards with the tensor cores for running deep neural networks in AI?
I am considering upgrading to a 2060 when it is released, would be interesting to hear your own stance on it.
Got tensorflow to work with that one line missing activation function in sublime. I was pulling my hair out trying to figure out why the code from ep. 3 was running only a fraction of the time. good work! I still don't know what is wrong with version tensorflow 1.9 on anaconda but ever since I updated from 1.8, tensorflow.keras stopped working.
Can I make a prediction with an R-CNN with that .model I trained by watching your previous videos? How do I do that? I want to see if I have two flowers in the same image. Thank you
I realized that you called the numbers on the x-axis epoch while Tensorboard has it labeled as step. So do in this case step is equivalent to epoch?
Nice Tutorial
"One more time" -> "Un maś tiempo" wrong -> "Una vez más" right
Awesome tutorial series man :D
So imma be prob still sayin un mas tiempo still xD. It's official Sentish language, sir!
This was very helpful. How can I show an ROC curve on TensorBoard? Thank you
if you use from keras.callbacks import TensorBoard you don not have to initialize it ;)
took me some time to figure that out
I have trained a custom model with 3 classes, using SSD MobileNet in TensorFlpw, Is there a way to find the average precision of these individual classes ?
If you get "ValueError: Failed to find data adapter that can handle input" use
import numpy as np
X = np.asarray(pickle.load(open("X.pickle", "rb")))
y = np.asarray(pickle.load(open("y.pickle", "rb")))
You are a lifesaver bro. Thanks for the help!
You effin Lifesaver !! THANK YOU!
Sweet fancy Moses...I can definitely tell that I don't have a dedicated GPU. Each epoch is averaging around 115s, which is leaps and bounds slower than yours. Makes trial and error quite a bit more tedious.
very useful
Is there a function that allows me to see the improvement in percentage?
Supposedly, that percentage is reduced but I can see somehow.
please what is the most recent way to do GPUOptions and Session? Apparently GPUOptions and Session are deprecated. I am getting errors that tensorflow does not have those as modules.
I have 1 question, How can I get the accuracy score for each class? I want to know from class 1 what accuracy I got, from class 2 what accuracy I got?
how many gpus you have, and what type of gpus you use? thanks.
I love these tutorials!!!!!!
I love keras!!!!!!!
Unlike many other stupid tutorials, everything is explained very well and the code actually works!
is the model created gradient descent? or is it SGD?
wonderful
Nice videos, keep up the good work. If 573K joins, you should be able to add roughly 1/2 a million mugs to your collection each month.
The dream!
Try using pycharm CE to make the tutorials even better!
when Sentdex runs this code it shows 17000 + samples but when I Run this it shows only 500 samples so how can I increase my samples no. please help me if anyone gets me. plzzzzzzzzzzzzz
@sentdex, is necessary to see your preview tutorial about deeplearning with tensorflow to follow this one?
if you know enough about deep learning already that wasnt in that video , then u shouldnt have a problem
If you mean in this series, then probably, yes...or have already an understanding of TF and keras.
Thank you for the great video . How can I plot accuracy for both train and validation set in one graph ?
import keras
from matplotlib import pyplot as plt
# history = model1.fit()
plt.plot(history.history['acc'])
plt.plot(history.history['val_acc'])
plt.title('model accuracy')
plt.ylabel('accuracy')
plt.xlabel('epoch')
plt.legend(['train', 'val'], loc='upper left')
plt.show()
plt.plot(history.history['loss'])
plt.plot(history.history['val_loss'])
plt.title('model loss')
plt.ylabel('loss')
plt.xlabel('epoch')
plt.legend(['train', 'val'], loc='upper left')
plt.show()
@sentdex at minute 10:59 is it overfitting?
if you get a AttributeError: module 'tensorflow' has no attribute 'Session'
/ or ConfigProto / or GPUOptions
then you must change it to : tf.compat.v1.GPUOptions /tf.compat.v1.Session/tf.compat.v1.ConfigProto
where I have to do this change
@@alokkr029 gpu_options = tf.compat.v1.GPUOptions(per_process_gpu_memory_fraction=0.333)
sess = tf.compat.v1.Session(config=tf.compat.v1.ConfigProto(gpu_options = gpu_options))
you are the best
i am new to deep learning and programming will is this the right way to start from here onward.Will i will be able to learn everything here??????
I know ML , n python i recently done this in 2 month program.
please help
what should i do if the val_acc is too low than the accuracy ?
Great Video man.I am implementing this same dataset completely in Tensorflow(tf.nn stuff).However after a few iterations my loss/cost value turns to nan.I have tried tinkering with the learning rate but its not helping.Any tips?
reduce the number of epochs and neurons in dense layer, use regularization and choose a different activation function
to get those graphs we can just simply use matplotlib library right???
Can I Also try this on Pycharm IDE? Or do I Really need to Install SUblime?
can you make a video on tensorboard debugger plugin & also embedding visualizer . Thank you
No dashboards are active for the current data set. Please help
I get an error saying that a cirectory could not be created in relation to logs/Tagged-vs-untagged-cnn-64x2-1563446211\plugins\profile\2019-07-18_11-36-52 (with tagged-vs-untagged etc being my version of cats and dogs file name). Any ideas how to fix? This error is related to tensorflow.
tensorboard=TensorBoard(log_dir='logs\{}'.format(NAME))
put a forward slash instead of backslash in logs, that solved the problem for me
when does the sc2 ai series come back? really liked it
I have a Question how did all the epochs ran simultaniously I get one epoch at a time
i can only see epoch_accuracy and epoch_loss on my tensorboard and not those graphs that are shown in your video. can anybody point out a solution for this. thanks a bunch
Did you find a solution? If you do, please let me know
Hello Dex, I am having the weirdest issue with this.
I will change nothing in my code except adding from tensorflow........ import tensorboard
The minute i add this my loss goes from .08 to 1.6 and nothing in the underlying code has changed? I am extremely confused
Hello when I'm using tensorboard i get this issue ProfilerNotRunningError: Cannot stop profiling. No profiler is running.
I actually screamed out “YESSS!” at my work office when I got the notification for this... I’ve reached new lows (highs)
Hi sentdex, I want to know the version of ur tf is tensorflow or tensorflow-gpu?
Tensorflow-GPU 1.10
NVIDIA 1080TI? or AMD?
hey. is it possible to do on google colab's GPU?
I have a question, I located my working directory and typed "tensorboard --logdir=logs/" as but i got this error "'tensorboard' is not recognized as an internal or external command, operable program or batch file." Can anyone help me?
for window user remove "/" for tensorflow directory path to tensorboard = TensorBoard(log_dir="logs{}".format(NAME)) . At the beginning kindly include log_dir = os.path.join(
"logs",
"fit",
datetime.datetime.now().strftime("%Y%m%d-%H%M%S"),
)
Hey sentdex, you haave sooo many deep learning videos I don't know where to start. Where should I start (I already have solid python and maths skills).
This series is meant to be a more gentle, yet not 5 year long intro to ML, so just the beginning of this series should be fine. pythonprogramming.net/introduction-deep-learning-python-tensorflow-keras/
Hi sir, I hope that u are fine.
When running in the (Anaconda) command prompt, correct environment, I get an error:
AttributeError: module 'tensorboard' has no attribute SessionRunHook.
Can you help me with this?
Thank u for every thing ^_^.
Use tensorflow.compat.v1 worked for me
ERROR:root:Internal Python error in the inspect module.
Below is the traceback from this internal error.
i cant find the error, please help upon it.
How do you delete log files from there? It doesn't let me delete old runs
Hey can you show how we can find two similar featured face and replace them with each other .... ?
Hey, insted of showing 4 graphs I am only able to see 2 (epoch_accuracy and epoch_loss) not like yours and also even after one run they showed up 2 (as train and validation)
how can i see separate 4 graphs
hey bro same , i guess it is due to update in 2020.
also i can not find the log file in my directory since i am using jupyter notebook (if you have the solution plzz tell)
i used
%load_ext tensorboard
import tensorflow as tf
import datetime, os
logs_base_dir = "./logs"
os.makedirs(logs_base_dir, exist_ok=True)
%tensorboard --logdir {logs_base_dir}
this to load tensorboard
@@amoghchavan6373 Sure, No it's not jupyter notebook's problem. You can do that with jupyter...
You don't need to use OS for making directory. log_dir(argument) in tensorboard, will create path you specify.
This is the code i'm using,
NAME = "{}-conv-{}-nodes-{}-dense-{}".format(conv_layer, layer_size, dense_layer, datetime.datetime.now().strftime("%Y%m%d-%H%M%S"))
tensorboard_callback = TensorBoard(log_dir="logs\\{}".format(NAME))
In my case i'm simply generating 'logs' folder(which is created by tensorboard) in jupyter notebook's folder where my code file is...
Please check your log_dir argument. Your logs might be at that place.
Hope this solves your problem. Ask if you still stuck there...
@@_spartian_ thank you for your help , also i have completed the entire model without any errors . if u need any help then let me know
'tensorboard' is not recognized as an internal or external command,
operable program or batch file.
i got this error could u help me ? Thank u:)
Same
got errors in cmd while running (tensorboard --logdir = logs/) then, use this that worked for me
(tensorboard --logdir logs)
Me to
But your help doesn't work doesn't work
Greetings from NZ~ I'm using colab to analyze this model in 2021. However, I could find where the "logs" folder is since I've got the directory to my Google Drive. Has anyone been through a similar situation when using colab to run this?
How can we use these pickle files for the Google Colab. Does anyone know?
hello, thank you
How to load tensorboard in colab please i find empty web page
AttributeError: module 'tensorflow.python.estimator.estimator_lib' has no attribute 'SessionRunHook' how to resolve this
Hello again, I have one problem. I tried this model on CPU and got 20s per epoch, then I moved it to my Tesla V100 machine and I also getting 20s per epoch :( Do you have any idea why? Tesla has been discovered properly and it's working with all drivers cudnn and all that jazz. HEEELP!!
When Im soppouse to write in my "cmd tensorboard --logdir=logs/" nothing but this shows up
ValueError: Not a TBLoader or TBPlugin subclass:
Can anyone help me?
not matching prediction for cats, did with many pictures but the result was [[4.1456 (something)]]. did your codes as well but the result was the same, for dogs though the results were good. please help!
The reason why the server stopped on first attemp was that you put carret in CMD line. In windows it pauses the running process)
My validation accuracy and validation loss are not showing in TensorBoard. Anyone know the solution?
logdir not work in command?Try below code
tensorboard --logdir logs/fit
i love how u say "un mas tiempo", im from mexico and you say here "Otra vez"
why do I only get epoch_accuracy and epoch_loss graphs? Any ideas? thanks.
hey my screen shows the same too...Any ideas how to make it appear similar to this tutorial?
I got the same too, can not find a solution
Many problems with the terminal tensorboard logdir command. Just get list of traceback errors, ending in "_pywrap_tensorflow_internal' has no attibute 'TF_ListPysicalDevices' ". Have tried Vinny V's fix below, numerous Github / stackoverflow fixes, but no solution. Reinstalled / upgraded TF to 1.14. No solution. If anyone can suggest any fix, or resource, it'd be appreciated...thx (Update-solved via fix on Stackoverflow-
Tensorboard: OSError: [Errno 22] Invalid argument when trying to run tensorflow from command prompt
Wouldn't it be clearer to systematically optimise hyper parameters for bias and variance separately, rather than conflate them like this?
And in the terminal have the next error:
it shows "tensorboard' is not recognized as an internal or external command,
operable program or batch file" , does anyone know how to solve it?
python -m tensorboard.main --logdir=[path]
in cmd..... python -m tensorboard.main --logdir=logs/ --host localhost --port 8088
@@gianistatie207 python -m tensorboard.main --logdir=logs/ worked for me
tensorboard part is not working at all, get the "No dashboards are active for the current data set." result
try alot ways still cant solve it, anyone hv any idea how to solve this issue? is the syntax outdated?