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
Below is a simple and reproducible example. I have only seen this with Conv1D and Conv2D layers where L != inp_channels.
torch 2.0.1 thop 0.1.1
import torch from thop import profile inp_channels = 32 L = 128 model = torch.nn.Conv1d( in_channels=inp_channels, out_channels=32, kernel_size=3, padding=4, stride=2, bias=True, ) batch_size = 1 inp = torch.ones(batch_size, inp_channels, L) macs, params = profile(model, inputs=(inp,)) print("macs: ", macs) # 205824.0 correct inp = torch.ones(inp_channels, L) macs, params = profile(model, inputs=(inp,)) print("macs: ", macs) # 823296.0 incorrect
The text was updated successfully, but these errors were encountered:
No branches or pull requests
Below is a simple and reproducible example. I have only seen this with Conv1D and Conv2D layers where L != inp_channels.
torch 2.0.1
thop 0.1.1
The text was updated successfully, but these errors were encountered: