-
Notifications
You must be signed in to change notification settings - Fork 756
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
Add test for convtranspose2d #5239
Conversation
oneflow/python/nn/modules/deconv.py
Outdated
self.weight = flow.nn.Parameter( | ||
flow.Tensor(in_channels, out_channels // groups, *kernel_size) | ||
flow.Tensor(out_channels // groups, in_channels, *kernel_size) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
flow.Tensor(in_channels, out_channels // groups, *kernel_size) 应该是这样
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
已修正
oneflow/python/nn/modules/deconv.py
Outdated
out_list = [] | ||
for i in range(len(in_split_list)): | ||
out_list.append( | ||
self._op(in_split_list[i], self.weight[:, i : i + 1, :, :])[0] |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
这里 weight 取错了?应该是 self.weight[i * groups : (i+1) * groups, :, :, :])[0]
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
这个地方应该是是没有取错的,上面权重的shape已经是flow.Tensor(in_channels, out_channels // groups, *kernel_size)
,相当于这个通道已经除了groups了。
oneflow/python/nn/modules/deconv.py
Outdated
out_list = [] | ||
for i in range(len(in_split_list)): | ||
out_list.append( | ||
self._op(in_split_list[i], self.weight[i : (i + 1), :, :, :])[0] |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
这里还是有问题,你测试用例里面 输入通道没有大于2的,测不出来问题
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
已改。
…flow-Inc/oneflow into add_test_for_convtranspose2d
实现group convtranspose2d功能。