- Видео 120
- Просмотров 358 819
Mike Saint-Antoine
США
Добавлен 29 ноя 2020
PyTorch Speed Comparison: NVIDIA 3070 GPU vs Apple M3 CPU vs Apple GPU
Hi everyone! This video is a speed comparison to see how fast a simple PyTorch neural network training script runs on:
1.) Apple M3 chip CPU
2.) Apple built-in GPU (using the MPS framework)
3.) NVIDIA RTX 3070 GPU
Here's the PyTorch script that I used:
github.com/mikesaint-antoine/Comp_Bio_Tutorials/blob/main/pytorch_speed_comparison/speed_test.py
Thanks for watching!
1.) Apple M3 chip CPU
2.) Apple built-in GPU (using the MPS framework)
3.) NVIDIA RTX 3070 GPU
Here's the PyTorch script that I used:
github.com/mikesaint-antoine/Comp_Bio_Tutorials/blob/main/pytorch_speed_comparison/speed_test.py
Thanks for watching!
Просмотров: 2 417
Видео
Python Basics 10: Functions
Просмотров 893 месяца назад
Hi everyone! This video series is meant to give a very basic introduction to Python, and is intended for beginners who are completely new to computer programming. Let me know if you have any questions! 🙂
Python Basics 9: Boolean Logic (AND / OR / NOT)
Просмотров 363 месяца назад
Hi everyone! This video series is meant to give a very basic introduction to Python, and is intended for beginners who are completely new to computer programming. Let me know if you have any questions! 🙂
Python Basics 8: While Loops
Просмотров 794 месяца назад
Hi everyone! This video series is meant to give a very basic introduction to Python, and is intended for beginners who are completely new to computer programming. Let me know if you have any questions! 🙂
Python Basics 7: For Loops
Просмотров 834 месяца назад
Hi everyone! This video series is meant to give a very basic introduction to Python, and is intended for beginners who are completely new to computer programming. Let me know if you have any questions! 🙂
Python Basics 6: Lists
Просмотров 234 месяца назад
Hi everyone! This video series is meant to give a very basic introduction to Python, and is intended for beginners who are completely new to computer programming. Let me know if you have any questions! 🙂
Python Basics 5: User Input
Просмотров 724 месяца назад
Hi everyone! This video series is meant to give a very basic introduction to Python, and is intended for beginners who are completely new to computer programming. Let me know if you have any questions! 🙂
Python Basics 4: If Statements
Просмотров 584 месяца назад
Hi everyone! This video series is meant to give a very basic introduction to Python, and is intended for beginners who are completely new to computer programming. Let me know if you have any questions! 🙂
Python Basics 3: Data Types
Просмотров 764 месяца назад
Hi everyone! This video series is meant to give a very basic introduction to Python, and is intended for beginners who are completely new to computer programming. Let me know if you have any questions! 🙂
Basic Python 2: Variables
Просмотров 874 месяца назад
Hi everyone! This video series is meant to give a very basic introduction to Python, and is intended for beginners who are completely new to computer programming. Let me know if you have any questions! 🙂
Basic Python 1: Installing Python and Writing Our First Program
Просмотров 1844 месяца назад
Hi everyone! This video series is meant to give a very basic introduction to Python, and is intended for beginners who are completely new to computer programming. Let me know if you have any questions! 🙂
Neural Nets from Scratch in Julia [PART 18]: Solving MNIST
Просмотров 1416 месяцев назад
Hi everyone! This tutorial series is about how to make a neural network from scratch in Julia. All the code from this series is available here: github.com/mikesaint-antoine/Comp_Bio_Tutorials/tree/main/neural_nets_from_scratch Also, this tutorial series is largely based on SimpleGrad.jl, a real Julia package that I wrote: mikesaint-antoine.github.io/SimpleGrad.jl/ Thanks for watching and let me...
Neural Nets from Scratch in Julia [PART 17]: Softmax Activation / Crossentropy Loss (2)
Просмотров 806 месяцев назад
Hi everyone! This tutorial series is about how to make a neural network from scratch in Julia. All the code from this series is available here: github.com/mikesaint-antoine/Comp_Bio_Tutorials/tree/main/neural_nets_from_scratch Also, this tutorial series is largely based on SimpleGrad.jl, a real Julia package that I wrote: mikesaint-antoine.github.io/SimpleGrad.jl/ Thanks for watching and let me...
Neural Nets from Scratch in Julia [PART 16]: Softmax Activation / Crossentropy Loss
Просмотров 546 месяцев назад
Hi everyone! This tutorial series is about how to make a neural network from scratch in Julia. All the code from this series is available here: github.com/mikesaint-antoine/Comp_Bio_Tutorials/tree/main/neural_nets_from_scratch Also, this tutorial series is largely based on SimpleGrad.jl, a real Julia package that I wrote: mikesaint-antoine.github.io/SimpleGrad.jl/ Thanks for watching and let me...
Neural Nets from Scratch in Julia [PART 15]: Tensor ReLU Function
Просмотров 646 месяцев назад
Hi everyone! This tutorial series is about how to make a neural network from scratch in Julia. All the code from this series is available here: github.com/mikesaint-antoine/Comp_Bio_Tutorials/tree/main/neural_nets_from_scratch Also, this tutorial series is largely based on SimpleGrad.jl, a real Julia package that I wrote: mikesaint-antoine.github.io/SimpleGrad.jl/ Thanks for watching and let me...
Neural Nets from Scratch in Julia [PART 14]: Tensor Addition
Просмотров 656 месяцев назад
Neural Nets from Scratch in Julia [PART 14]: Tensor Addition
Neural Nets from Scratch in Julia [PART 13]: Tensor Matrix Multiplication
Просмотров 446 месяцев назад
Neural Nets from Scratch in Julia [PART 13]: Tensor Matrix Multiplication
Neural Nets from Scratch in Julia [PART 12]: Adding Tensor Functionality
Просмотров 706 месяцев назад
Neural Nets from Scratch in Julia [PART 12]: Adding Tensor Functionality
Neural Nets from Scratch in Julia [PART 11]: Defining Tensor Type
Просмотров 786 месяцев назад
Neural Nets from Scratch in Julia [PART 11]: Defining Tensor Type
Neural Nets from Scratch in Julia [PART 10]: Value Tanh Function
Просмотров 636 месяцев назад
Neural Nets from Scratch in Julia [PART 10]: Value Tanh Function
Neural Nets from Scratch in Julia [PART 9]: Value Inversion and Division
Просмотров 476 месяцев назад
Neural Nets from Scratch in Julia [PART 9]: Value Inversion and Division
Neural Nets from Scratch in Julia [PART 8]: Value Negation and Subtraction
Просмотров 676 месяцев назад
Neural Nets from Scratch in Julia [PART 8]: Value Negation and Subtraction
Neural Nets from Scratch in Julia [PART 7]: Value Multiplication
Просмотров 556 месяцев назад
Neural Nets from Scratch in Julia [PART 7]: Value Multiplication
Neural Nets from Scratch in Julia [PART 6]: Adding Robustness
Просмотров 836 месяцев назад
Neural Nets from Scratch in Julia [PART 6]: Adding Robustness
Neural Nets from Scratch in Julia [PART 5]: Backpropagation for Addition (2)
Просмотров 877 месяцев назад
Neural Nets from Scratch in Julia [PART 5]: Backpropagation for Addition (2)
Neural Nets from Scratch in Julia [PART 4]: Backpropagation for Addition
Просмотров 987 месяцев назад
Neural Nets from Scratch in Julia [PART 4]: Backpropagation for Addition
Neural Nets from Scratch in Julia [PART 3]: Value Addition
Просмотров 1007 месяцев назад
Neural Nets from Scratch in Julia [PART 3]: Value Addition
Neural Nets from Scratch in Julia [PART 2]: Defining "Value" Type
Просмотров 1737 месяцев назад
Neural Nets from Scratch in Julia [PART 2]: Defining "Value" Type
Neural Nets from Scratch in Julia [PART 1]: Introduction
Просмотров 8077 месяцев назад
Neural Nets from Scratch in Julia [PART 1]: Introduction
How to Make a Job History Timeline with Python/Matplotlib
Просмотров 4919 месяцев назад
How to Make a Job History Timeline with Python/Matplotlib
Hi sir, can you please make a video about downloading scRNA seq data set from GEO as well. Some datasets have csv files and some .tsv.gz and some have txt files.
it didn't match the data at all... its so over
Hello mike. Thanks a lot for sharing. I have watched all videos from the oldest one to the parameter estimation and it was really helped me (a molecular biologist) to understand the basics of mathematical modeling. I am working on circadian molecular clock genes and i' d like to add a new gene into the previously reported mathematical model of circadian clock. So i need parameter estimation for negative feedback model. Can I use the method of this video?
omg this looks so neat. Will definitevely start these next week! thank you
This is a very great series. Hoping for more videos or series where ML is applied to biological data (esp omics and image data)
hello, am Vamshikrishna, did my master in data science . Now when i try for bio informatician job , professors are not that interested as they are looking for biology background , what would you recommmend projects that makes my profile more suitable for the position. what courses you would recommend that would makes me good fit
how did you make the graph?
Well well, my Macbook pro M1 Max gives me 16 seconds while burning a few watts compared to the System76 beast.
These videos are so very helpful, especially the discussions that draw from your work. Thanks -- and looking forward to more in the coming year. Best wishes for 2025.
This was a great series on the Melanoma Classifier 🎗 and PyTorch is excellent; I rate it 100 out of 100! 🌟
Thank you! 🙂 and let me know if you have any questions
Thank you so much for creating this video. Also, can you please check khan academy links are not working, it says the playlist has been removed.
Thanks for pointing that out! Ok I have fixed those links.
@@MikeSaintAntoine Its still not working. Khan Academy, all links are not working. Please check it again.
@@traveller_of_lyf I think your browser is probably displaying the non-updated version because it's saved in the cache. Can you try either hard-refreshing or clearing the browser cache? Either that or maybe it's just taking awhile to update, so maybe try again in a couple hours.
@@MikeSaintAntoineGot the updated list now! Thank you so much.!!
@@traveller_of_lyf No problem!
Hello, first of all thank you very much for these informative and great videos. How to find the equilibrium points of 4 nonlinear differential equations in Python? Also, can you make a code video on how to draw a bifurcation diagram?
Hi! To find the equilibrium point, you need to set all the ODEs equal to 0 and solve. You could attempt to do this with a pencil and paper, but if it's a complicated system that might not be feasible so you could also do it with a numerical solver in Python. For example, I think the fsolve() function in scipy.optimize could be used for this: docs.scipy.org/doc/scipy/reference/generated/scipy.optimize.fsolve.html If you need any help with the code, please feel free to email me at mikest@udel.edu and I can try to help. And yeah a lot of people have requested a video on how to make a bifurcation diagram so I'm going to try to make that once I have some time. Thanks for watching! 🙂
@MikeSaintAntoine Hi! Thank you very much for your response and guidance. You are very gentle. I will try to do it based on the example you gave, but I will contact you when I need help. Thanks. 🌸 Well, after finding the equilibrium point of the 1st differential equation, should I substitute it in the 2nd differential equation and so on, substituting the 2nd in the 3rd and finally the 3rd in the 4th?
@@cigdemyalcn7665 No problem! The thing is, you need to find the parameters that make ALL of the differential equations equal 0. So if it's an easy system (like the predator prey model) then doing them one at a time like that could possibly work. But if it's more complicated, then the numerican methods like scipy.optimize.fsolve() will just do them all at the same time automatically. Anyway yeah feel free to send me an email if you run into any problems and need help. And happy new year!
@@MikeSaintAntoine Happy New Year to you! I understand, thank you very much again. See you. ☺️
Hello, I am doing the same kind of graph, however, I al not getting oscillations as you did when running the code. Only one oscillation on both graphs show up and fade out even though I have the same code, I was wondering if there was a reason?
Hi! Can you please email me your code and I'll take a look to see if I can figure it out? My email is mikest@udel.edu
Hi Mike, I really appreciate your content! I’m an aspiring computational biologist with one semester remaining to complete my undergraduate degree in genetics and two semesters left for my master’s in computational biology. Do you have any advice on starting a career in research?
Hey, thanks for watching! Yeah I can definitely try to give some advice. It really depends on what you're trying to do. If you're looking for a job in industry, like a pharma or biotech company, then it sounds like you're already in a good position to start applying for jobs and start working once you finish the master's degree. However if you're looking for a career in academic research, like becoming a professor/PI at a university, then the next step would be to apply to PhD programs, and it sounds like with your background you're in a good position to do that too. So I think it's a matter of just deciding which career path to go down. Or really my advice would be to apply to BOTH jobs and PhD programs, to see what opportunities you get and keep all your options open. Anyway good luck! If you have any specific questions or specific topics you want advice on, feel free to email me at mikest@udel.edu and we can talk further. 🙂
Did you enable CUDA support in PyTorch because that NVIDIA run looks slow. My old cheap refurbed NVIDIA Quadro running Topaz just beat a brand new MacBook Pro by minutes upscaling the same images because they support CUDA fine tuning.
Nice video. For those Apple Fan bois, just be aware Nvidia GPUs can be clustered very efficiently, remember that.
The gpu on the Mac is fully integrated with the cpu. You’re testing an apu’s integrated graphics against a top of the line gpu. Laptops are great at what they do, but they aren’t made for what you’re testing.
I'd love to see it on a M4 Max
I seriously appreciate this type of content, really wonder if AMD GPUs can at least touch that level of performance
The m3’s graphics card is integrated into the cpu. It’s not an actual gpu. Only an integrated gpu which is not comparable to an actual gpu. Amd is a very close competitor with NVIDIA. I think that amd is going to push past NVIDIA soon, because NVIDIA is adopting the intel model of just shoving as much power as you can through it. That being said NVIDIA have a new line of gpus rumored for 2026 so maybe they’ll shock us.
But you have said 0 about what type of M3 you have, not even the number of CPU or GPU cores… And yes, you’re comparing a laptop with a desktop, why don’t you use RTX 3070 Mobile which is NVIDIA GPU for laptops?
Because this isn't an Apple bubble marketing ad, but an eyeopener what the right tool for the job can do.
nice work bro i am learning nn too and wanted to buy a machine u cleared the doubt which one is faster so thankyou
my gpu rtx 3070 ti laptop got 11.02 sec
M3 has weak GPU and bandwidth. It is like mobile version of 3050. You should compare M4 Pro to 3070. Plus, 3070 eats way more energy, and form factor is not the same.
Thanks for your videos, they are very good to learn :D
Thanks for watching! 🙂
that is an insane difference! question though, why didn't you opt for a RTX 40 series GPU...pretty sure that would have been even faster :p
I think its unfair to compare a pc with a laptop. They really shrunk that GPU to fit
You can use any windows laptop with mobile gpu and it will be a massacre
Yea it’s not even an actual gpu. It’s an Integrated gpu.
Thanks for your video! It was useful :D
Thanks for watching! 🙂
That's such a mind blowing difference! 🤯🤯🤯🤯
thank you so much for posting this series. its been extremely helpful
No problem, thanks for watching and let me know if you have any questions 🙂
Came here to understand that ncert line of EVOLUTION This video was really helpful, thanks 👍🏻
No problem, and let me know if you have any questions! 🙂
Great lecture !
Thanks and let me know if you have any questions! 🙂
I am watching all of your videos. Thank you for existing! You're playing a big role in my own undergraduate experience.
No problem and let me know if you have any questions! 🙂
Please make more videos about proteomics. Thanks.
Ok, I'll try to make some more in the future!
Hi, if the data file does not mention treatments given, rather name it as samples 1-10, how can I get the treatment conditions of samples?
Hi Harsha, sorry about the late reply! Unfortunately I don't really have a good answer to this question. Usually you have to kinda look around the other files they have posted, and try to find the one that has the relationship between sample labels and treatments. Or if you can't find it, try reading through the methods section of the paper to see if it's there. I purposely picked a nice and easy dataset to work with for this video series, but unfortunately sometimes it's not so easy to find all the information you need for the analysis. Good luck with your research!
Great video. Really helpful!
Thanks for watching 🙂
the population status of the predator is 1, that's a bit strange, will it reproduce? I'm asking seriously
Hi, sorry about the confusion! I put on the plot axis label that the unit here is in the hundreds, so the predator population was starting at 1 (hundred) and the prey population was starting at 10 (hundred). But I forgot to actually say this! So good point, yes if it was just one predator then it wouldn't make sense because they would't be able to reproduce.
@@MikeSaintAntoine if x=initial number of predators and y=initial number of prey do we always start by getting to a situation where x=1? it seems that this makes the calculations easier because x*y=y, am I thinking correctly?
@@ciferusbux Note that the values of x and y in this model are not necessarily integers. For example, x could be 327.61325.... The model isn't meant to provide an exact number of predator/prey at a certain time, it is meant to demonstrate the overall trends in the population change over time. Hopefully that helps.
Love this tutorial. getting an error on saving the .npy ValueError: setting an array element with a sequence. The requested array has an inhomogeneous shape after 2 dimensions. The detected shape was (9210, 2) + inhomogeneous part.
Hi, off the top of my head I'm not sure what the error could be. If you've copied the exact same code I used and are still getting an error, that could be because we're using different versions of the same package, like maybe you have an older version, or maybe you have a newer version and they changed something so that my original code no longer works. Could you send me your code to take a look at? My email is mikest@udel.edu. Then maybe I'll be able to reproduce the error and fix it. Thanks!
Thank you for the helpful content you’ve shared on bioinformatics topics. Could you consider making a tutorial on GSEA - gene set enrichment analysis? It would be great to see a step-by-step guide on how to perform and interpret GSEA results, especially with practical examples. Thanks so much.
Hi, yeah that's a good idea, I'll try to make a video on GSEA in the future!
Hi, it maybe a silly thing to ask but I can’t seem to wrap my head around on the IF statement block for production and decaying event. I don’t understand how those conditions were set for production and degradation event from the mathematical conditions we saw in the previous video. I’d appreciate if u can shed some light into it even though it’s kinda old video. Thanks
Hey Zubair, good question and definitely not silly to ask! Yeah that part is a bit difficult to understand and it took me awhile to wrap my brain around it myself. I think a good first step is to understand exactly what we're trying to do when we randomly pick the next event. So basically we want to randomly pick the next event with a random draw, but with probabilities weighted according to the rates (also called "propensities"). And these rates change because they depend on the current level of X, so we need to calculate them again each time. So let's say that we're choosing the next event, and and we calculate that the rate for production is 2 (actually it will always be 2 in this example because it doesn't depend on X), and the rate for degradation is 1 (0.1 * X where X=10, for example). So knowing that the rate of production is 2 and the rate of degradation is 1, we want to randomly pick which event will happen next. So basically we convert these into probabilities by dividing the rate of each reaction by the sum of all the rates. So the probability that the next event will be production is 2 / (2+1) = 0.67. And the probability that the next event will be degradation is 1 / (2+1) = 0.33. So basically we want to choose the next event with a random choice, weighted according to these probabilities. The for-loops are just a way of doing that -- randomly picking a next event, weighted according to the appropriate probabilities. It's a little tricky to understand, but if you work your way through it, maybe on paper with the simple example, then you'll see that the first if-statement turns out to be true 67% of the time for the example I just gave, and the elif-statement turns out to be true 33% of the time. Note also that in this simulation with only 2 events we don't even really need the elif-statement. We could have just said "else" and left it at that. But I put the elif statement to show the general pattern, because it we had more than 2 events we'd need to put an elif-statements that follow that general pattern. Anyway, very good question. Yeah wrapping your head around the if-statement checks here can be a little tricky, but I think they key takeaway is that they're just picking the next event randomly, with probabilities that come from the relative rates of the reactions at this point in the simulation.
@@MikeSaintAntoine Ahhh I see. I think now I'm getting the gist of it. After playing around with different values for rand product on paper just like you said, I started to see how the value is weighted within the scope of probabilities of each reaction event. It's a bit tricky indeed but now I'm actually getting hang of it. Thank you so much for taking the time to break it down for me. As someone from medical biotech field it's not so very often for me to deal with such mathematical concepts. But you're making it digestible for us 😄. Please keep doing the good work!
@@zubairhasan9434 No problem, and let me know if you have any more questions! 🙂
Hi there! Does this still apply if we are in the early stages of the diffusion process (in the case of an innovation)? That is, we do not have all data (the overall picture) of the process but just the early data.
Hi! Sorry but I don't think I really understand your question. Could you give me some more details on what you're trying to model? But generally a good way to see if this model applies to a dataset is to just plot the data and check it visually -- does it look like the population is increasing exponentially at first, but then leveling off at a carrying capacity?
The stochastic indicator on stock charts makes more sense to me now, thanks.
Yeah there's a actually a hypothesis in economics that stock prices tend to follow a random walk: en.wikipedia.org/wiki/Random_walk_hypothesis so good observation! Thanks for watching 🙂
There are multiple IDEs for Python. Just thinking about Spyder, VSCode, PYCharm, and many more
Thanks Mike. Could you teach how to use an IDE for python. Anything similar to R studio? Also looking forward to seeing omics dataframe analysis 😊
I'm not really in a good position to make an IDE video because I actually just use VSCode for writing Python, and don't really use any of the fancy extra features. I just use it like a text editor really. I know there are some pretty advanced IDEs for Python with built-in debuggers and stuff, but I don't really use them. But yeah in the future I can try to make some videos on dataframes / Pandas library. Thanks for watching! 🙂
Hey Mike, I did same exact thing as you did in your code, but my testing model is taking a lot of time and showing the result. would you mind taking a look on the error or code if you get time?
Hey Arpit, yeah sure just email your code to me at mikest@udel.edu and I'll take a look!
Illustrate download, install, setup, and configuration on windows and Linux also.
Hi! Unfortunately I don't have a Windows or Linux computer so I won't be able to actually make a video on that. But my guess is that it's probably the same -- you should be able to install Python from python.org, and when you download and install it should give you the IDLE application automatically.
Hi Mike, these video series are great resource to learn Python. Coming from wetlab, I always struggle to learn coding 😅. Could I ask a favor. Is it possible to do a video lesson with real life data set. Imagine you received a Metabolomics / transcriptomics data matrix. Could you demostrate how you upload the data to downstream exploratory data analysis. 😊
Yes, I'll try to make something like that in the future! I've actually already made a series like that in R, but I'd like to make one for Python too.
where does sample appear, it is not describe before in the script. or is it part of R commands
Hi, very sorry about the late response! Are you talking about "sample" in this block of code? for(sample in samples){ tmp <- unlist(strsplit(sample,"_")) classes <- append(classes, tmp[1]) } If so, "sample" is just the temporary variable we're using to iterate through the items in the "samples" vector. So basically it's getting assigned to each item in "samples" with each pass of the for loop. Does that make sense? I hope I understood your question correctly, but please let me know if you're still confused and I can try to explain further. Thanks for watching! 🙂
After doing some research, it turns out a lot of these predatory conferences are real events that actually take place. However, they're usually very chaotic and unprofessional, with no real organisation as talks are swapped around and cancelled last-minute. Also, when you see many conferences all taking place on the same date and location, chances are they're all pointing to the same event, mashing together many unrelated fields into a single conference.
Yeah, good point!
thank you
Thanks for watching! 🙂
Maybe I did something wrong but I needed to implement these methods (suggested by ChatGPT) to avoid errors using the Tensor constructor: # Implementing required methods for AbstractArray interface Base.size(t::Tensor) = size(t.data) # size method for Tensor Base.getindex(t::Tensor, i::Int, j::Int) = getindex(t.data, i, j) # getindex method to access elements Base.setindex!(t::Tensor, v, i::Int, j::Int) = setindex!(t.data, v, i, j) # setindex! for setting elements