- Trending Categories
Data Structure
Networking
RDBMS
Operating System
Java
MS Excel
iOS
HTML
CSS
Android
Python
C Programming
C++
C#
MongoDB
MySQL
Javascript
PHP
Physics
Chemistry
Biology
Mathematics
English
Economics
Psychology
Social Studies
Fashion Studies
Legal Studies
- Selected Reading
- UPSC IAS Exams Notes
- Developer's Best Practices
- Questions and Answers
- Effective Resume Writing
- HR Interview Questions
- Computer Glossary
- Who is Who
Shahid Akhtar Khan has Published 216 Articles
![Shahid Akhtar Khan](https://www.tutorialspoint.com/assets/profiles/394091/profile/60_2508042-1636180991.jpg)
Shahid Akhtar Khan
762 Views
We apply RandomVerticalFlip() transform to flip an image vertically at a random angle with a given probability. It's one of the transforms provided by the torchvision.transforms module. This module contains many important transformations that can be used to perform different types of manipulations on the image data.RandomVerticalFlip() accepts both PIL ... Read More
![Shahid Akhtar Khan](https://www.tutorialspoint.com/assets/profiles/394091/profile/60_2508042-1636180991.jpg)
Shahid Akhtar Khan
2K+ Views
RandomResizedCrop() transform crops a random area of the original input image. This crop size is randomly selected and finally the cropped image is resized to the given size. RandomResizedCrop() transform is one of the transforms provided by the torchvision.transforms module. This module contains many important transforms that can be used ... Read More
![Shahid Akhtar Khan](https://www.tutorialspoint.com/assets/profiles/394091/profile/60_2508042-1636180991.jpg)
Shahid Akhtar Khan
2K+ Views
To flip an image horizontally in a random fashion with a given probability, we apply RandomHorizontalFlip() transform. It's one of the transforms provided by the torchvision.transforms module. This module contains many important transformations that can be used to perform different types of manipulations on the image data.RandomHorizontalFlip() accepts both PIL ... Read More
![Shahid Akhtar Khan](https://www.tutorialspoint.com/assets/profiles/394091/profile/60_2508042-1636180991.jpg)
Shahid Akhtar Khan
386 Views
To randomly convert an image to grayscale with a probability, we apply RandomGrayscale() transformation. It's one of the transforms provided by the torchvision.transforms module. This module contains many important transformations that can be used to perform different manipulations on the image data.RandomGrayscale() accepts both PIL and tensor images or a ... Read More
![Shahid Akhtar Khan](https://www.tutorialspoint.com/assets/profiles/394091/profile/60_2508042-1636180991.jpg)
Shahid Akhtar Khan
3K+ Views
To crop an image at a random location, we apply RandomCrop() transformation. It's one of the many important transforms provided by the torchvision.transforms module.The RandomCrop() transformation accepts both PIL and tensor images. A tensor image is a torch tensor with shape [C, H, W], where C is the number of ... Read More
![Shahid Akhtar Khan](https://www.tutorialspoint.com/assets/profiles/394091/profile/60_2508042-1636180991.jpg)
Shahid Akhtar Khan
7K+ Views
To convert an image to grayscale, we apply Grayscale() transformation. It's one of the transforms provided by the torchvision.transforms module. This module contains many important transformations that can be used to perform different types manipulations on the image data.Grayscale() transformation accepts both PIL and tensor images or a batch of ... Read More
![Shahid Akhtar Khan](https://www.tutorialspoint.com/assets/profiles/394091/profile/60_2508042-1636180991.jpg)
Shahid Akhtar Khan
677 Views
To crop a given image into four corners and the central crop, we apply FiveCrop() transformation. It's one of the transformations provided by the torchvision.transforms module. This module contains many important transformations that can be used to perform different types of manipulations on the image data.FiveCrop() transformation accepts both PIL ... Read More
![Shahid Akhtar Khan](https://www.tutorialspoint.com/assets/profiles/394091/profile/60_2508042-1636180991.jpg)
Shahid Akhtar Khan
6K+ Views
To randomly change the brightness, contrast, saturation and hue of an image, we apply ColorJitter(). It's one of the transforms provided by the torchvision.transforms module. This module contains many important transformations that can be used to manipulate the image data.ColorJitter() transformation accepts both PIL and tensor images. A tensor image ... Read More
![Shahid Akhtar Khan](https://www.tutorialspoint.com/assets/profiles/394091/profile/60_2508042-1636180991.jpg)
Shahid Akhtar Khan
4K+ Views
To crop an image at its center, we apply CenterCrop(). It's one of the transforms provided by the torchvision.transforms module. This module contains many important transformations that can be used to perform manipulation on the image data.CenterCrop() transformation accepts both PIL and tensor images. A tensor image is a PyTorch ... Read More
![Shahid Akhtar Khan](https://www.tutorialspoint.com/assets/profiles/394091/profile/60_2508042-1636180991.jpg)
Shahid Akhtar Khan
5K+ Views
To convert a Torch tensor with gradient to a Numpy array, first we have to detach the tensor from the current computing graph. To do it, we use the Tensor.detach() operation. This operation detaches the tensor from the current computational graph. Now we cannot compute the gradient with respect to ... Read More