Linked Questions

145 votes
8 answers
235k views

Consider: import torch import torch.nn as nn import torch.optim as optim import torch.utils.data as data import torchvision.models as models import torchvision.datasets as dset import torchvision....
raaj's user avatar
  • 3,499
40 votes
9 answers
84k views

class Model(nn.Module): def __init__(self): super(Model, self).__init__() self.net = nn.Sequential( nn.Conv2d(in_channels = 3, out_channels = 16), nn.ReLU(), nn.MaxPool2d(...
Dawn17's user avatar
  • 8,307
28 votes
4 answers
78k views

I loaded a custom PyTorch model and I want to find out its input shape. Something like this: model.input_shape Is it possible to get this information? Update: print() and summary() don't show this ...
Scott's user avatar
  • 5,976
12 votes
2 answers
16k views

I am using torch summary from torchsummary import summary I want to pass more than one argument when printing the model summary, but the examples mentioned here: Model summary in pytorch taken only ...
PixelPioneer's user avatar
  • 4,200
1 vote
2 answers
3k views

Hi I would like to print the model summary of my BERT model for text classification. I am using command print(summary(model, inputsize=(channels, height, width)). I would like to know what would be ...
Flash's user avatar
  • 75
1 vote
1 answer
2k views

There is a good question how to get model summary in pytorch Model summary in pytorch but it doesn't output shape of weights. Is it possible also to output shape of weights for each layer?
mrgloom's user avatar
  • 21.9k
0 votes
0 answers
2k views

How can I know which are the input node's or layer's name for a layer in PyTorch? Say if I have a torch.cat, how can I know the tensors or layers's name from where it is getting the input? For this ...
Sanjiban Sengupta's user avatar
0 votes
1 answer
2k views

I am trying to get a good summary of my deep learning model like Keras summary function (can be found in here). For that, what I have found is torch-summary pip package (details can be found here) is ...
S M Abrar Jahin's user avatar
-1 votes
1 answer
2k views

I have downloaded this pre-trained model "model_ir_se50.pth" for face recognition. It is giving very good results. How can i know its architecture?
kritika Garg's user avatar
0 votes
0 answers
266 views

class LSTMModel(nn.Module): def __init__(self,hidden_dim=80, input_dim=99, n_layers=1): super(LSTMModel, self).__init__() self.input_dim = input_dim self.n_layers = n_layers self....
Bibek Chalise's user avatar
0 votes
0 answers
92 views

Keras has a nice functionality to save the model architecture as a block diagram keras.utils.plot_model(self.model, plot_filepath.as_posix(), show_shapes=True) Can this be achieved in PyTorch? This ...
Nagabhushan S N's user avatar