Search icon CANCEL
Subscription
0
Cart icon
Your Cart (0 item)
Close icon
You have no products in your basket yet
Arrow left icon
Explore Products
Best Sellers
New Releases
Books
Videos
Audiobooks
Learning Hub
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

Computer vision with PyTorch

PyTorch provides several convenient functions for computer vision, which includes convolutional layers and pooling layers. PyTorch provides Conv1d, Conv2d, and Conv3d under the torch.nn package. As it sounds, Conv1d handles one-dimensional convolution, while Conv2d works with two-dimensional convolution with inputs like images, and Conv3d operates a three-dimensional convolution on inputs like videos. Obviously, this is confusing since the dimension specified never considered the depth of the input. For instance, Conv2d handles four-dimensional input among which the first dimension would be batch size, the second dimension would be the depth of the image (in RGB channels), and the last two dimensions would be the height and width of the image.

Apart from the higher-layer functions for computer vision, torchvision has some handy utility functions for setting up the network. We'll explore some of those in this chapter.

This chapter explains PyTorch...

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
Banner background image