- 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).
- 24小時(shí)學(xué)會(huì)電腦組裝與維護(hù)
- 圖解西門(mén)子S7-200系列PLC入門(mén)
- 深入淺出SSD:固態(tài)存儲(chǔ)核心技術(shù)、原理與實(shí)戰(zhàn)
- 電腦常見(jiàn)故障現(xiàn)場(chǎng)處理
- 電腦維護(hù)365問(wèn)
- 計(jì)算機(jī)組裝維修與外設(shè)配置(高等職業(yè)院校教改示范教材·計(jì)算機(jī)系列)
- 筆記本電腦維修300問(wèn)
- 龍芯自主可信計(jì)算及應(yīng)用
- Intel Edison智能硬件開(kāi)發(fā)指南:基于Yocto Project
- LPC1100系列處理器原理及應(yīng)用
- 數(shù)字媒體專業(yè)英語(yǔ)(第2版)
- 電腦組裝與維護(hù)即時(shí)通
- 單片機(jī)原理與技能訓(xùn)練
- 微控制器的應(yīng)用
- 可編程邏輯器件項(xiàng)目開(kāi)發(fā)設(shè)計(jì)