Hujun / blog

post in issues
7 stars 0 forks source link

Review of Deep Learning with PyTorch #8

Open Hujun opened 4 years ago

Hujun commented 4 years ago

屏幕快照 2019-11-22 下午5 21 18

Issued by PyTorch official team, free download on PyTorch official site. this book is still recommended for the green hands who are trying to step in the machine learning world. Compared with the official tutorial and documents which are already very good, this book is relatively more systematic. I take it as a pre-tutorial with all necessary basic ML knowledge and operation guides for the new PyTorch users before they dive into detailed examples.

Chapter 1 is a very general and shallow introduction, can be easily skipped. Chapter 2 is focused on basic Tensor operations. Examples are very easy to understand. Chapter 3 is about data import. The book gives some simple example as CSV, txt and image. Not in detail, it's better to look at related chapters in PyTorch document instead.

Chapter 4 introduce easy linear regression example using PyTorch autograd and demonstrates how to do basic BP. 屏幕快照 2019-11-22 下午5 23 37 Though the example is very easy, it still highlights the most important concept and operation of autograd option of tensor. 屏幕快照 2019-11-22 下午5 24 53 The book does not explain too much how PyTorch does the BP and form the graph. It puts more focus on necessary basic operation and some important tips e.g. zero gradation after backward, switch off unnecessary autograd etc. 屏幕快照 2019-11-22 下午5 31 03

Chapter 5 introduces torch.nn module, and replace the hand made model in chapter 4 with a simple network using torch.nn.Sequential. Nothing special for neural network definition. Some basic ML concepts are mentioned, including why neural network can be used to approach any function (not very clear...) and why need activation functions.

To summarize, this book is a very book starting point for those who are new to PyTorch (even better than the official tutorial). The content is sequential and easy to understand, also thanks to the simplicity of PyTorch itself, a reader with no any ML background can easily understand all necessary basis knowledge and immediately start simply tasks. Highly recommended for 101 class.