ML03: PyTorch vs. Tensorflow

PyTroch—a promising framework for DL

Read time: 3 min
This is a part my mid-term report of the course PyTorch and Machine Learning in NCCU. The original report:
https://drive.google.com/drive/u/2/folders/1Haknut4yGujlWP-QKpJnFWwRJE1xtf9Y

Outline
(1) Architecture of PyTorch & Tensorflow
(2) Performance of PyTorch & Tensorflow
(3) Popularity of PyTorch & Tensorflow
(4) Conclusion
(5) Reference

Artificial Intelligence Jobs

(1) Architecture of PyTorch & Tensorflow

Let’s check the architecture (or so-called anatomy) of PyTorch & Tensorflow.

Figure 1: Anatomy of PyTorch [1]
Figure 2: The layered TensorFlow architecture [2]

Figure 2: The layered TensorFlow architecture

The engine and low-level library of PyTorch and Tensorflow are pretty similar and they are basically built by C & C++, so theoretically they shall have similar speed. Then, Let’s shift our attention to the comparisons of PyTorch and Tensorflow in all dimensions.

Trending AI Articles:

1. 130 Machine Learning Projects Solved and Explained

2. The New Intelligent Sales Stack

3. Time Series and How to Detect Anomalies in Them — Part I

4. Beginners Guide -CNN Image Classifier | Part 1

(2) Performance of PyTorch & Tensorflow

Table 1: Comparisons of Keras, Tensorflow & PyTorch [3]

The green cells in table 1 represent the apparent superiority. Furthermore, since we know the dynamic computation graph of PyTorch would make it more flexible and easier to debug compared to Tensorflow, some of the facts in the figure are quite easy to guess.

However, just like Python have more flexibility and debugging capabilities than C/C++, but Python loses in speed. Would PyTorch have slower speed ? Surprisingly, PyTorch’s performances equal to Tensorflow in dimensions like speed and dataset compatibility !

(3) Popularity of PyTorch & Tensorflow

Figure 3: Percent of PyTorch papers of total Tensorflow / PyTorch papers [4]
Figure 4: Percent of framework mentioned by ML papers [5]
Figure 5: Google search results of Tensorflow & PyTorch [6]

Additionally, these 3 figures above show how popular PyTorch was lately, and the growing numbers of adopting PyTroch indicating the promising future of PyTroch.

(4) Conclusion

Whether evaluating PyTorch in architecture or performance, it’s at least equal to Tensorflow. Then, from popularity we found the skyrocketing growing number of PyTorch usage. Nevertheless, the history of PyTorch is too short so there’re few resources including books, codes, and discussions about PyTorch compared to those about Tensorflow.

(5) Reference

[1] Stevens, E., Antiga, L. & Thomas, V. (2020). Deep Learning with PyTorch. New York, NY: Manning.

[2] Abadi, M. et al. (2016, November). TensorFlow: A System for Large-Scale Machine Learning. Paper presented at the 12th USENIX Symposium on Operating Systems Design and Implementation (OSDI ’16), Savannah, GA. Abstract retrieved from https://www.usenix.org/system/files/conference/osdi16/osdi16-abadi.pdf

[3] Rao, C.S.J.(2020). Your First steps in Computer Vision: Using PyTorch with an example. Retrieved from

Using Pytorch with Examples in Computer Vision

[4] He, H.(2020). PyTorch vs TensorFlow. Retrieved from https://chillee.github.io/pytorch-vs-tensorflow/

[5] Migdal, P., & Jakubanis, R. (2018). Keras or PyTorch as your first deep learning framework. Retrieved from

Keras or PyTorch as your first deep learning framework – deepsense.ai

[6] Great Learning Team (2020). PyTorch vs TensorFlow — Explained | What is the difference between PyTorch and TensorFlow?. Retrieved from

Difference between PyTorch and TensorFlow | TensorFlow vs. PyTorch

Don’t forget to give us your ? !


ML03: PyTorch vs. Tensorflow was originally published in Becoming Human: Artificial Intelligence Magazine on Medium, where people are continuing the conversation by highlighting and responding to this story.

Via https://becominghuman.ai/ml03-9de2f0dbd62d?source=rss—-5e5bef33608a—4

source https://365datascience.weebly.com/the-best-data-science-blog-2020/ml03-pytorch-vs-tensorflow

Published by 365Data Science

365 Data Science is an online educational career website that offers the incredible opportunity to find your way into the data science world no matter your previous knowledge and experience. We have prepared numerous courses that suit the needs of aspiring BI analysts, Data analysts and Data scientists. We at 365 Data Science are committed educators who believe that curiosity should not be hindered by inability to access good learning resources. This is why we focus all our efforts on creating high-quality educational content which anyone can access online.

Leave a comment

This site uses Akismet to reduce spam. Learn how your comment data is processed.

Design a site like this with WordPress.com
Get started