PyTorch Tutorial 16 - How To Use The TensorBoard

  Рет қаралды 86,879

Patrick Loeber

Patrick Loeber

Күн бұрын

Пікірлер: 71
@flamboyantperson5936
@flamboyantperson5936 4 жыл бұрын
Finally my search on youtube ends here. I wanted someone who uses OOPS in python to solve machine learning problems and you are the only person on youtube who does this. Thank you so much. I request you please please please make more videos and more frequently on ML using OOPS
@patloeber
@patloeber 4 жыл бұрын
Thank you for watching! Glad you like it :)
@AshishVerma-hl9il
@AshishVerma-hl9il Жыл бұрын
Pytorch is more pythonic and easy to learn
@starblasters8
@starblasters8 Жыл бұрын
Haven't finished the video yet so I apologize if you already fixed this / went over it. But I noticed around the 9 minute mark we're told to use "writer.add_graph(model, example_data.reshape(-1, 28*28))" which works, but only if you're using the CPU. As example_data is currently on the CPU (unless I did something wrong which is very possible). I'm using a GPU and all that was needed for me to fix it was change that to "writer.add_graph(model, example_data.reshape(-1, 28*28).to(device))" and boom problem solved. Anyways, awesome tutorials!!!
@skymanaditya
@skymanaditya 3 жыл бұрын
Nice tutorial, I just have one concern. Suppose that your batch_size is 64, in that case, you would have a total of 938 batches, with the first 937 batches having 64 examples, and the last batch having 32 examples. If we specify, (i+1)%100 == 0, then we are computing the average loss and accuracy for the 100 steps. But when the value of i exceeds 900, you would accumulate the loss and correct predictions for the remaining 38 batches, and then add them in the next epoch when the number of steps becomes a factor of 100 again (in this case 100). So, essentially, you would be computing the loss as [loss (38 steps from the last epoch) + loss (100 steps from the current epoch)] / (100) which would increase your loss and also increase the accuracy. Just wanted to highlight this. A good idea would be to add another variable called steps_seen, which is incremented every time a batch/step is processed and set that to 0 similar to running loss and correct predictions. In this way, even when you compute the loss when the current step is not an absolute factor of 100, you would still compute the loss and accuracy as -> [loss (38 steps from the previous epoch) + loss (100 steps from the current epoch)] / (38 + 100).
@raminessalat9803
@raminessalat9803 4 жыл бұрын
Great Vid! I think you shouln't have appended predicted to your labels because that not the ground truth (correct label) and it is the estimated/predicted label, thats why you get a perfect PR curve
@anonim5052
@anonim5052 8 ай бұрын
ty man. You are right, it should be labels.append(labels1)
@mudloc3745
@mudloc3745 3 жыл бұрын
very helpful! thanks. please keep uploading more tutorial for pytorch
@patloeber
@patloeber 3 жыл бұрын
Thanks, will do!
@garrettf245
@garrettf245 3 жыл бұрын
This was really helpful, thank you!
@seyeeet8063
@seyeeet8063 4 жыл бұрын
@2:57 do you know how I can change the localhost address if I wish to?
@MKim-nc7gr
@MKim-nc7gr Жыл бұрын
This helped me a lot. Thanks for your kind explanation!
@SurajSubbarao
@SurajSubbarao 4 жыл бұрын
Just finished the pytorch playlist. Loved your content. Will you making tutorials on RNN and LSTM with pytorch?
@patloeber
@patloeber 4 жыл бұрын
Thanks for watching! Hopefully in the near future :)
@sumithhh9379
@sumithhh9379 4 жыл бұрын
@@patloeber Waiting for LSTM and RNN.
@miscelanea5351
@miscelanea5351 4 жыл бұрын
Excelent explanation! extremely useful, thanks
@patloeber
@patloeber 4 жыл бұрын
Glad you like it!
@xinqiaozhao5154
@xinqiaozhao5154 4 жыл бұрын
Hello, there is one issue in the line writer.add_graph, example_data should add a .to(device) function. And I have a question about the use of torch.stack, is the aim of this operation is transforming the data type of per batch from list to tensor? I'm a little confused
@patloeber
@patloeber 4 жыл бұрын
Thanks for pointing this out. Yes we want to convert a list to a tensor because writer.add_pr_curve() needs tensors or numpy arrays. (You can check the size with labels.shape and preds.shape. Maybe then it gets a little clearer
@helloansuman
@helloansuman 7 ай бұрын
can you able to add a pretrained object detection code?
@nougatschnitte8403
@nougatschnitte8403 2 жыл бұрын
Hello, why do you append the predicted data, when the documentation says that it needs to be ground truth? I find that a bit confusing :(
@elise8619
@elise8619 2 ай бұрын
For people using this with Jupyter notebooks/labs in a virtual environment, I had problems getting TensorBoard to connect. I had to run TensorBoard within the Jupyter notebook with: %load_ext tensorboard %tensorboard --logdir runs Which also opens the tensorboard within a jupyter cell.
@saleemjamali3521
@saleemjamali3521 3 жыл бұрын
sir could you upload videos on audio dataset by using pytorch?
@anonim5052
@anonim5052 8 ай бұрын
Why we see two lines on the graph for training and accuracy graphs in tensorboard?
@sumithhh9379
@sumithhh9379 4 жыл бұрын
Please make more videos on Pytorch concepts
@patloeber
@patloeber 4 жыл бұрын
I try :)
@hazemahmed8333
@hazemahmed8333 4 жыл бұрын
thank you so much!! this really amazing
@patloeber
@patloeber 4 жыл бұрын
Glad you like it :)
@dinamoses4893
@dinamoses4893 3 жыл бұрын
Another great tutorial, thanks a lot! I have a small question: how can I clear TensorBoard?
@fkeyvan
@fkeyvan 2 жыл бұрын
rm -rf ./logs/
@sarahjamal86
@sarahjamal86 4 жыл бұрын
Very well done! I am watching your videos to revise my info. :D
@patloeber
@patloeber 4 жыл бұрын
Great 👍🏻
@fatemehbehrad7161
@fatemehbehrad7161 2 жыл бұрын
Thank you so much for this helpful tutorial. 🍀🙏
@abhilash.s
@abhilash.s 4 жыл бұрын
Can please make a tutorial on "How to use Weights and Biases"
@kaviyarasanpr
@kaviyarasanpr 5 ай бұрын
what is the advantage of using tensorboard? we could just use matplot lib to visualise it right?
@seyeeet8063
@seyeeet8063 4 жыл бұрын
Hmmm shouldnot the last line of the code in line 157 the writer.close() be out of the for loop? what does the writer.close() do basically?
@anirudhgangadhar6158
@anirudhgangadhar6158 Жыл бұрын
Hi Patrick, I followed this tutorial but when I run the code and refresh the url, TensorBoard is not showing any images for me. Nothing happens, it just shows - "No dashboards are active for the current data set." NOTE: I am running the program in Jupyter Notebook.
@HassamBaig-p1w
@HassamBaig-p1w Жыл бұрын
same is happening with me on anaconda vscode
@sumitvaise5452
@sumitvaise5452 4 жыл бұрын
Very clear. Thanks
@patloeber
@patloeber 3 жыл бұрын
Glad you like it!
@ashwinshetgaonkar6329
@ashwinshetgaonkar6329 2 жыл бұрын
For running acc computation formula should be correct_count/(100*batch_size)
@ea005-i7j
@ea005-i7j 4 жыл бұрын
Hello Python Engineer, thank you for this video, I relly found it helpful. I am having one challenge though, how can I run the visualisation on a gpu server (nvidia gou) that I want to use for my training?
@krishnachauhan2822
@krishnachauhan2822 3 жыл бұрын
This tensorboard --logdir run is giving syntax error. What to do ??
@cindinishimoto9528
@cindinishimoto9528 4 жыл бұрын
Hey, Patrick, thanks for the great Pytorch series. I hope you can keep making it and please send my special hugs to your single (and handsome) German friends... haha
@patloeber
@patloeber 4 жыл бұрын
Haha glad you like it :) Thank you and greetings back to Brazil :)
@ShahabShokouhi
@ShahabShokouhi 10 ай бұрын
Why are dividing running loss by 100?
@abderrahmanebououden5173
@abderrahmanebououden5173 4 жыл бұрын
Hi sir, I have a problem in tensorboard with pytorch. the writer object can't be detected by tensorboard . "No dashboards are active for the current data set."
@patloeber
@patloeber 4 жыл бұрын
hmm. maybe uninstall torch and tensorboard, and make a clean re-installation
@yi-yunhsieh1330
@yi-yunhsieh1330 3 жыл бұрын
May I ask ur VScode theme? Thank u
@patloeber
@patloeber 3 жыл бұрын
I've used different ones over time. I think in this video it's Monokai. I also like Night Owl and Dracula
@yi-yunhsieh1330
@yi-yunhsieh1330 3 жыл бұрын
@@patloeber Thank you very much!
@henningschopper2264
@henningschopper2264 2 жыл бұрын
Maybe a little late to the party. Nice Tutorial. The code for deriving a pr curve is particularly helpful. However, there is something wrong with the results. A "perfect" pr-curve (step function at "1") makes no sense. The curve should "fall off" as it approaches "1". Secondly: If you had built in a global step over several evaluation runs, then you could also have glided over the different PR curves in the tensor board, which is nice to see how the model learns.
@user-or7ji5hv8y
@user-or7ji5hv8y 4 жыл бұрын
ImportError: cannot import name 'SummaryWriter' from 'torch.utils.tensorboard' do we need to update to tensorboardX? github.com/lanpa/tensorboardX/issues/19
@patloeber
@patloeber 4 жыл бұрын
Hmm I had some issues too in the past, and for me an uninstall and clean new install of pytorch and tensorboard solved the problem
@pakhomovviktor3149
@pakhomovviktor3149 4 жыл бұрын
line 82 of your github code. You probably should .to(device) reshaped data?
@patloeber
@patloeber 4 жыл бұрын
if you mean this line writer.add_graph(model, example_data.reshape(-1, 28*28)), then no, this is just for the tensorboard. no need to put it on the gpu
@YouKnowWhoIAm118
@YouKnowWhoIAm118 3 жыл бұрын
Are you from Germany? :)
@patloeber
@patloeber 3 жыл бұрын
Yes I am :)
@fkeyvan
@fkeyvan 2 жыл бұрын
German ingenuity again.
@razi_official
@razi_official 4 жыл бұрын
hello python engineer! i am facing an issue, I have successfully installed tensorboard and it is running fine as well, whenever I try to run my code file and then refresh the tensorboard browser but it doesn't show any thing like images and graphs etc, one thing is very strange it is not showing any error too. but why I am not getting all images and graphs on the tensorboard browser.. please give me any solution, I am using your given code to practice
@patloeber
@patloeber 4 жыл бұрын
Did you specify the correct log directory?
@razi_official
@razi_official 4 жыл бұрын
@@patloeber yes i specified. i got printed the images on terminal it is showing but not showing on tensorboard
@jdpalaciob
@jdpalaciob 4 жыл бұрын
@@razi_official greetings. I had the same problem. My code pointed to the correct directory, but I was executing tensorboard --logdir in the terminal standing in another directory. To be clear, I was one directory level above my code, therefore I had to call the specific directory in which I had the code and then start the "server" of tensorboard standing in that same directory
@Zebbie86
@Zebbie86 3 жыл бұрын
@@jdpalaciob Thanks a lot!
@favremirko6031
@favremirko6031 2 жыл бұрын
0
@favremirko6031
@favremirko6031 2 жыл бұрын
0000
@texwiller7577
@texwiller7577 3 ай бұрын
This is not the way you should make videos. Monotonic voice etc....
PyTorch Tutorial 17 - Saving and Loading Models
18:24
Patrick Loeber
Рет қаралды 71 М.
黑天使只对C罗有感觉#short #angel #clown
00:39
Super Beauty team
Рет қаралды 36 МЛН
Арыстанның айқасы, Тәуіржанның шайқасы!
25:51
QosLike / ҚосЛайк / Косылайық
Рет қаралды 700 М.
99.9% IMPOSSIBLE
00:24
STORROR
Рет қаралды 31 МЛН
Мен атып көрмегенмін ! | Qalam | 5 серия
25:41
Pytorch TensorBoard Tutorial
30:17
Aladdin Persson
Рет қаралды 36 М.
Build Your First Pytorch Model In Minutes! [Tutorial + Code]
31:32
157 - What is TensorBoard and how to launch it in a browser?
18:53
DigitalSreeni
Рет қаралды 30 М.
TensorBoard with PyTorch - Visualize Deep Learning Metrics
19:53
7 PyTorch Tips You Should Know
17:12
Edan Meyer
Рет қаралды 21 М.
PYTORCH COMMON MISTAKES - How To Save Time 🕒
19:12
Aladdin Persson
Рет қаралды 56 М.
GraphRAG: The Marriage of Knowledge Graphs and RAG: Emil Eifrem
19:15
TensorFlow Tutorial 17 - Complete TensorBoard Guide
1:22:55
Aladdin Persson
Рет қаралды 56 М.
Building a Neural Network with PyTorch in 15 Minutes | Coding Challenge
20:34
黑天使只对C罗有感觉#short #angel #clown
00:39
Super Beauty team
Рет қаралды 36 МЛН