Linked Questions
11 questions linked to/from How do I print the model summary in PyTorch?
145
votes
8
answers
235k
views
How do I visualize a net in Pytorch?
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....
40
votes
9
answers
84k
views
How to get an output dimension for each layer of the Neural Network in Pytorch?
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(...
28
votes
4
answers
78k
views
PyTorch model input shape
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 ...
12
votes
2
answers
16k
views
pytorch model summary - forward func has more than one argument
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 ...
1
vote
2
answers
3k
views
Print Bert model summary using Pytorch
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 ...
1
vote
1
answer
2k
views
How to get weights shape for each layer?
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?
0
votes
0
answers
2k
views
Inputs and Outputs to PyTorch layers
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 ...
0
votes
1
answer
2k
views
Get Model Summary with `torchsummary` pip Package
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 ...
-1
votes
1
answer
2k
views
How can i know the architecture of pre-trained model in Pytorch?
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?
0
votes
0
answers
266
views
how to find the summary of my LSTM model?
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....
0
votes
0
answers
92
views
Save a block diagram of model in PyTorch [duplicate]
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 ...