We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
The test is come from the user guide, https://pypi.org/project/torch-summary
import torch import torch.nn as nn import torch.nn.functional as F from torchsummary import summary class LSTMNet(nn.Module): """ Batch-first LSTM model. """ def __init__(self, vocab_size=20, embed_dim=300, hidden_dim=512, num_layers=2): super().__init__() self.hidden_dim = hidden_dim self.embedding = nn.Embedding(vocab_size, embed_dim) self.encoder = nn.LSTM(embed_dim, hidden_dim, num_layers=num_layers, batch_first=True) self.decoder = nn.Linear(hidden_dim, vocab_size) def forward(self, x): embed = self.embedding(x) out, hidden = self.encoder(embed) out = self.decoder(out) out = out.view(-1, out.size(2)) return out, hidden summary( LSTMNet(), (100,), dtypes=[torch.long], branching=False, verbose=2, col_width=16, col_names=["kernel_size", "output_size", "num_params", "mult_adds"], )
and my local error information:
[root@huawei-pc mytest]# python test3.py Traceback (most recent call last): File "/home/zhongyunde/mytest/test3.py", line 22, in <module> summary( TypeError: summary() got an unexpected keyword argument 'dtypes'
similar to ##193, but with detail test
The text was updated successfully, but these errors were encountered:
pip uninstall torchsummary # 卸载原来的torchsummary库 pip install torch-summary==1.4.4 # 安装升级版本torch-summary
Sorry, something went wrong.
No branches or pull requests
The test is come from the user guide, https://pypi.org/project/torch-summary
and my local error information:
similar to ##193, but with detail test
The text was updated successfully, but these errors were encountered: