In order to use torchsummary type: from torchsummary import summary Install it first if you don't have it. pip install torchsummary And then you can try it, but note for some reason it is not working unless I set model to cuda alexnet.cuda:
Model summary in PyTorch, based off of the original torchsummary. ... LSTM(embed_dim, hidden_dim, num_layers=num_layers, batch_first=True) self.decoder = nn ...
11.03.2019 · Hi Puyu, Thank you. But nn.LSTM(batch_first=True) still returns a tuple. File "C:\Users\simon\Desktop\DeepRL.old\deep_rl\agent\PPO_agent.py", line 25, in init torchsummary.summary(self.network,(100, 2, 11))
23.10.2020 · I think this is a known issue in torchsummary, which doesn’t seem to support RNNs as seen here. Also, there is a fork in torch-summary which has apparently fixed this issue.
LSTM cannot be used. ... If a model has an LSTM, this fails. ... -dev/lib/python3.6/site-packages/torchsummary/torchsummary.py in summary(model, input_size, ...
25.10.2019 · I’ve been trying to use torchsummary to print the summary of an LSTM model. However, it shows an error: “tuple’ object has no attribute 'size”. Is there a way to print the summary of an LSTM model using torchsummary?
Here, it visualizes kernel size, output shape, # params, and Mult-Adds. Also the torchsummaryX can handle RNN, Recursive NN, or model with multiple inputs.