-
Notifications
You must be signed in to change notification settings - Fork 2.1k
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
A bug in dla.py #140
Comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
This is something wrong in the Tree class.
class Tree(nn.Module):
def init(self, block, in_channels, out_channels, level=1, stride=1):
super(Tree, self).init()
self.level = level
if level == 1:
self.root = Root(2*out_channels, out_channels)
self.left_node = block(in_channels, out_channels, stride=stride)
self.right_node = block(out_channels, out_channels, stride=1)
else:
self.root = Root((level+2)*out_channels, out_channels)
for i in reversed(range(1, level)):
subtree = Tree(block, in_channels, out_channels,
level=i, stride=stride)
self.setattr('level_%d' % i, subtree)
self.prev_root = block(in_channels, out_channels, stride=stride)
self.left_node = block(out_channels, out_channels, stride=1)
self.right_node = block(out_channels, out_channels, stride=1)
If a Tree is with level 3, then the output channels of the former subtree will not match the latter's in channels. What's more, the stride of the latter subtree will also be 2.
The text was updated successfully, but these errors were encountered: