Python Deep Learning: PyTorch vs Tensorflow (Summary)
In this video course, you’ve had an introduction to PyTorch and TensorFlow, seen who uses them and what APIs they support, and learned how to choose PyTorch vs TensorFlow for your project. You’ve seen the different programming languages, tools, datasets, and models that each one supports, and learned how to pick which one is best for your unique style and project.
In this video course, you learned:
- What the differences are between PyTorch and TensorFlow
- How to use tensors to do computation in each
- Which platform is best for different kinds of projects
- What tools and data are supported by each
Now that you’ve decided which library to use, you’re ready to start building neural networks with them. Check out the links in Further Reading for ideas.
Further Reading
The following tutorials are a great way to get hands-on practice with PyTorch and TensorFlow:
- Practical Text Classification With Python and Keras teaches you to build a natural language processing application with PyTorch.
- Setting Up Python for Machine Learning on Windows has information on installing PyTorch and Keras on Windows.
- Pure Python vs NumPy vs TensorFlow Performance Comparison teaches you how to do gradient descent using TensorFlow and NumPy and how to benchmark your code.
- Python Context Managers and the “with” Statement will help you understand why you need to use
with tf.compat.v1.Session() as session
in TensorFlow 1.0. - Generative Adversarial Networks: Build Your First Models will walk you through using PyTorch to build a generative adversarial network to generate handwritten digits!
- The Machine Learning in Python series is a great source for more project ideas, like building a speech recognition engine or performing face recognition.
Congratulations, you made it to the end of the course! What’s your #1 takeaway or favorite thing you learned? How are you going to put your newfound skills to use? Leave a comment in the discussion section and let us know.
00:00 Congratulations, you’ve made it to the end. Let’s see what you accomplished.
00:05 In this course, you grasped the fundamentals of tensors. You understood they are special containers for multidimensional arrays, and both PyTorch and TensorFlow use them.
00:18 You explored the general features of TensorFlow and PyTorch. For example, now you know who built them and when they were released and what they’re good at.
00:28 You became familiar with their coding conventions. You saw a code snippet that took two arrays and turned them into tensors, and then multiplied them both in TensorFlow and PyTorch.
00:40 You delved into Torch and Keras. You now know Torch is the fast and powerful backend of PyTorch, and Keras is a framework that TensorFlow uses. It has some ready-to-use tools, so you don’t have to define every single function from scratch.
00:56 Finally, you acquainted yourself with their ecosystems. For instance, you know TensorFlow Hub that offers some pre-trained models and Torch Serve, which is a tool that’s designed for serving PyTorch models in production environments.
01:12 Now, you might be wondering what’s next. Here are three courses and tutorials that you can explore now. The first one is a basic Python setup for machine learning on Windows, which is a great tutorial on how to install PyTorch and TensorFlow on your local device.
01:29 You can also check out Practical Text Classification with Python and Keras. This one is both a tutorial and a video course. It’s a great course to start NLP or Natural Language Processing.
01:43 And finally, you can check out Real Python’s machine learning series. It has an awesome collection of tutorials and video courses that help you build amazing machine learning models.
01:56 Okay, I hope you had fun learning about PyTorch and TensorFlow. This has been Nagar with Real Python, and I hope to see you again. Stay awesome.
ole088 on Nov. 16, 2024
This course is very helpful. I have a better understanding of ML with Python. I’ll definitely be viewing more courses and tutorials on this subject.
Become a Member to join the conversation.
Will Dennis on April 6, 2024
Great overview course! I work supporting researchers who are all using deep learning with GPU acceleration, and now I know why they are now mainly using PyTorch instead of TF, which I know was popular at our lab some years ago. Fun fact, two of our former researchers (Ronan Collobert, Koray Kavukcuoglu) are the inventors and maintainers of Torch.