Top "Pytorch" questions

PyTorch is a deep learning framework that implements a dynamic computational graph, which allows you to change the way your neural network behaves on the fly and capable of performing backward automatic differentiation.

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 do I display a single image in PyTorch?

I want to display a single image. It was loaded using a ImageLoader and is stored in a PyTorch Tensor. …

python pytorch
Check the total number of parameters in a PyTorch model

How to count the total number of parameters in a PyTorch model? Something similar to model.count_params() in Keras.

deep-learning pytorch
Pytorch Change the learning rate based on number of epochs

When I set the learning rate and find the accuracy cannot increase after training few epochs optimizer = optim.Adam(model.…

optimization pytorch learning-rate
Data Augmentation in PyTorch

I am a little bit confused about the data augmentation performed in PyTorch. Now, as far as I know, when …

python image-processing dataset pytorch data-augmentation
PyTorch : predict single example

Following the example from: https://github.com/jcjohnson/pytorch-examples This code trains successfully: # Code in file tensor/two_layer_net_…

python machine-learning pytorch backpropagation
How to use torch.stack function

I have a question about torch.stack I have 2 tensors, a.shape=(2, 3, 4) and b.shape=(2, 3). How to stack them without …

python pytorch tensor
What does the gather function do in pytorch in layman terms?

I have been through the official doc and this but it is hard to understand what is going on. I …

pytorch
Pytorch Operation to detect NaNs

Is there a Pytorch-internal procedure to detect NaNs in Tensors? Tensorflow has the tf.is_nan and the tf.check_…

pytorch