Top "Torchvision" questions

Use this tag for questions, concepts, and issues related to the PyTorch computer vision library

What does "unsqueeze" do in Pytorch?

I'm looking at the documentation, and here is their example. I cannot understand how this example corresponds to their explanation: "…

python pytorch torch torchvision
How can I generate and display a grid of images in PyTorch with plt.imshow and torchvision.utils.make_grid?

I am trying to understand how torchvision interacts with mathplotlib to produce a grid of images. It's easy to generate …

python matplotlib pytorch imshow torchvision
Is there any way I can download the pre-trained models available in PyTorch to a specific path?

I am referring to the models that can be found here: https://pytorch.org/docs/stable/torchvision/models.html#torchvision-models

python deep-learning pytorch pre-trained-model torchvision
How to run matlab .m files in google colab

I am currently trying to run this repo https://github.com/Fanziapril/mvfnet which requires a step: "Run the Matlab/…

python-2.7 matlab pytorch google-colaboratory torchvision
PyTorch - Getting the 'TypeError: pic should be PIL Image or ndarray. Got <class 'numpy.ndarray'>' error

I am getting the error TypeError: pic should be PIL Image or ndarray. Got <class 'numpy.ndarray'> when …

python deep-learning pytorch torch torchvision
How to get the filename of a sample from a DataLoader?

I need to write a file with the result of the data test of a Convolutional Neural Network that I …

python machine-learning pytorch torchvision
How to use torchvision.transforms for data augmentation of segmentation task in Pytorch?

I am a little bit confused about the data augmentation performed in PyTorch. Because we are dealing with segmentation tasks, …

python pytorch transformation torchvision
size mismatch, m1: [3584 x 28], m2: [784 x 128] at /pytorch/aten/src/TH/generic/THTensorMath.cpp:940

I have executed the following code and getting the error shown at extreme bottom. I would like to know how …

python-3.x pytorch torchvision
PyTorch Datasets: Converting entire Dataset to NumPy

I'm trying to convert the Torchvision MNIST train and test datasets into NumPy arrays but can't find documentation to actually …

python numpy pytorch torchvision