Search icon CANCEL
Subscription
0
Cart icon
Your Cart (0 item)
Close icon
You have no products in your basket yet
Save more on your purchases now! discount-offer-chevron-icon
Savings automatically calculated. No voucher code required.
Arrow left icon
Explore Products
Best Sellers
New Releases
Books
Videos
Audiobooks
Learning Hub
Conferences
Free Learning
Arrow right icon
Arrow up icon
GO TO TOP
PyTorch Deep Learning Hands-On

You're reading from   PyTorch Deep Learning Hands-On Build CNNs, RNNs, GANs, reinforcement learning, and more, quickly and easily

Arrow left icon
Product type Paperback
Published in Apr 2019
Publisher Packt
ISBN-13 9781788834131
Length 250 pages
Edition 1st Edition
Languages
Tools
Arrow right icon
Authors (2):
Arrow left icon
Sherin Thomas Sherin Thomas
Author Profile Icon Sherin Thomas
Sherin Thomas
Sudhanshu Passi Sudhanshu Passi
Author Profile Icon Sudhanshu Passi
Sudhanshu Passi
Arrow right icon
View More author details
Toc

Chapter 2. A Simple Neural Network

Learning the PyTorch way of building a neural network is really important. It is the most efficient and clean way of writing PyTorch code, and it also helps you to find tutorials and sample snippets easy to follow, since they have the same structure. More importantly, you'll end up with the efficient form of your code, which is also highly readable.

Don't worry, PyTorch is not trying to add another spike into your learning curve by implementing a brand-new methodology. If you know how to code in Python, you'll feel at home right away. However, we won't learn those building blocks as we did in the first chapter; in this chapter, we will build a simple network. Instead of choosing a typical entry-level neural network use case, we'll be teaching our network to do mathematics in the NumPy way. Then we'll convert that to a PyTorch network. By the end of this chapter, you will have the skills to become...

lock icon The rest of the chapter is locked
Register for a free Packt account to unlock a world of extra content!
A free Packt account unlocks extra newsletters, articles, discounted offers, and much more. Start advancing your knowledge today.
Unlock this book and the full library FREE for 7 days
Get unlimited access to 7000+ expert-authored eBooks and videos courses covering every tech area you can think of
Renews at $19.99/month. Cancel anytime