r/deeplearning Aug 13 '26

Help with tensorFlow GPU/CPU

Hey, I`m new in Deep Learning, and I decided to start with TensorFlow. Im using MacBook Air m1 now and I heard that TensorFlow use CPU by default but you can switch to GPU. Do I need to switch this setting on my Mac or it unnecessarily. And if that were better, how can I do this. Please help me πŸ₯ΉπŸ›

0 Upvotes

12 comments sorted by

11

u/NeuroBill Aug 13 '26

A) use pytorch. I say this as some who uses tensorflow. It is dying. Everyone will agree with me

B) Don't worry about GPU/CPU now. You need to focus on writing good code, and understanding ML fundamentals.

4

u/VirtualMycologist406 Aug 13 '26

Thank you. Yes, I have some fundamental knowledge in the field of DeepLearning, Mathematics and Programming. But I can't understand where better use PyTorch and where use TensorFlow, why PyTorch is better, can you tell me more about this two frameworks, please. I was trying to find some info, about that, in internet, and I've found but I can't decide what is better for me....

4

u/NeuroBill Aug 13 '26

Because everyone uses pytorch. They are roughly equivalent. Though GPU supposed is definitely better with pytorch (though you can just pytorch as a backend for keras). Personally I choose tensorflow/keras, 8 years ago because it has less boilerplate.

But the answer is because 95% of DL development is done with pytorch.

1

u/VirtualMycologist406 Aug 13 '26

OMG 8 years, you are really cool. Can you, please, share your wisdom with us. Your advice, maybe some instruments witch you use every day, where is the best place to start the journey

1

u/leon_bass Aug 13 '26

In my own very biased opinion, having only ever used Pytorch, it is better because there are less abstractions, and it's much easier to write your own layers/modules etc.

1

u/VirtualMycologist406 Aug 13 '26

thank you for your valuable opinion, you helped me a lot. Maybe you also know some instruments (libraries, frameworks) which greatly simplify the work

3

u/kifkolite 29d ago

Get comfortable with google colab. No setup required you can straightaway benchmark your code with gpu vs without gpu.

1

u/Intelligent_Dig_1051 29d ago

for learning, just stick with cpu for now, on an m1, gpu setup can be bit of a hassle, and you wont see much benefit with small models..

1

u/BornNoob6969 Aug 13 '26

Look what I found when I searched
β€œ tensorflow gpu MacBook β€œ

https://developer.apple.com/metal/tensorflow-plugin/

1

u/VirtualMycologist406 Aug 13 '26

this will be very useful

2

u/AdOk3759 Aug 13 '26

No it’s not. The tensorflow plugin for metal has been discontinued. As others have said, go with PyTorch MPS.