-
Notifications
You must be signed in to change notification settings - Fork 1.8k
New issue
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
ModelSpeedup error: assert len(set(num_channels_list)) == 1, possible incorrect layers in dependency set #5736
Comments
The error is thrown specifically when the output channels of the last layer is 1, even when there are 2 successive conv blocks: class ConvNet(nn.Module):
def __init__(self):
super().__init__()
self.relu = nn.ReLU(inplace=True)
self.conv1 = nn.Conv2d(3, 6, kernel_size=3, padding=1)
self.bn1 = nn.BatchNorm2d(6)
self.conv2 = nn.Conv2d(6, 1, kernel_size=3, padding=1)
self.bn2 = nn.BatchNorm2d(1)
def forward(self, x):
x = self.conv1(x)
x = self.bn1(x)
x = self.relu(x)
x = self.conv2(x)
x = self.bn2(x)
return x |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
ModelSpeedup does not alter the model successfully for a model with 3 successive conv blocks.
Environment:
Reproduce the problem
sparsity_ratio
L1NormPruner
ModelSpeedup
withbatch_size
parameterMinimal Code
Error:
Assertion error: number of channels in same set should be identical
Error Trace
The same code works fine without
self.conv3
andself.bn3
.The text was updated successfully, but these errors were encountered: