- Deep Learning for Beginners
- Dr. Pablo Rivas Laura Montoya
- 212字
- 2021-06-11 18:20:15
Introduction to PyTorch
At the time of writing this book, PyTorch is the third most popular overall deep learning framework. Its popularity has been increasing in spite of being relatively new in the world compared to TensorFlow. One of the interesting things about PyTorch is that it allows some customizations that TensorFlow does not. Furthermore, PyTorch has the support of Facebook?.
Although this book covers TensorFlow and Keras, I think it is important for all of us to remember that PyTorch is a good alternative and it looks very similar to Keras. As a mere reference, here is how the exact same shallow neural network we showed earlier would look if coded in PyTorch:
import torch
device = torch.device('cpu')
model = torch.nn.Sequential(
torch.nn.Linear(10, 10),
torch.nn.ReLU(),
torch.nn.Linear(10, 8),
torch.nn.ReLU(),
torch.nn.Linear(8, 2),
torch.nn.Softmax(2)
).to(device)
The similarities are many. Also, the transition from Keras to PyTorch should not be too difficult for the motivated reader, and it could be a nice skill to have in the future. However, for now, most of the interest of the community is on TensorFlow and all its derivatives, especially Keras. If you want to know more about the beginnings and basic principles of PyTorch, you might find this reading useful (Paszke, A., et.al., 2017).
- FPGA從入門到精通(實戰(zhàn)篇)
- BeagleBone By Example
- Unity 5.x Game Development Blueprints
- 平衡掌控者:游戲數(shù)值經(jīng)濟設計
- 計算機維修與維護技術速成
- Learning Stencyl 3.x Game Development Beginner's Guide
- Apple Motion 5 Cookbook
- 微服務分布式架構基礎與實戰(zhàn):基于Spring Boot + Spring Cloud
- 深入理解序列化與反序列化
- Hands-On Artificial Intelligence for Banking
- FL Studio Cookbook
- 可編程邏輯器件項目開發(fā)設計
- Blender for Video Production Quick Start Guide
- Advanced Machine Learning with R
- 主板維修實踐技術