Skip to content
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 pixelshufflev2 module #5383

Merged
merged 9 commits into from
Jul 8, 2021
Merged

Conversation

YongtaoShi
Copy link
Contributor

@YongtaoShi YongtaoShi commented Jul 5, 2021

image

@YongtaoShi YongtaoShi marked this pull request as ready for review July 7, 2021 06:31

.. math::
H_{out} = H_{in} \times \text{upscale_factor}
H_{out} = H_{in} \times \text{h_upscale_factor}
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

好像截图的docs上公示显示格式有点问题

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

是这一行有问题吗?我还没找到。。

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

我看.. math::写了3次,要不试试只写一次?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

哦哦,好

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

已修改

@@ -36,20 +38,21 @@ class PixelShuffle(Module):
by Shi et. al (2016) for more details.

Args:
upscale_factor (int): factor to increase spatial resolution by
h_upscale_factor (int): factor to increase height spatial resolution by
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

upscale_factor参数不应该去掉吧,这个PixelShufflev2功能是PixelShufflev的超集,应该保留upscale_factor,默认和pytorch对齐,h_upscale_factor、w_upscale_factor可以设置optianal,都传了,表示使用v2版本

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

意思是总共3个参数吗?但是使用v2版本需要传3个参数,就有点奇怪了。
现在的逻辑是如果只传入h_upscale_factor,默认w_upscale_factor=h_upscale_factor,对于用户来讲是对齐的,只是变量名字有点区别。

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

嗯,我感觉已有的变量名字需要完全对齐,多出来的增量的是可以接受的

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

意思是upscale_factor参数至少不应该去掉

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

好的

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

已修改

@oneflow-ci-bot oneflow-ci-bot self-requested a review July 8, 2021 10:23
@oneflow-ci-bot oneflow-ci-bot removed their request for review July 8, 2021 10:54
@oneflow-ci-bot oneflow-ci-bot self-requested a review July 8, 2021 10:54
@oneflow-ci-bot oneflow-ci-bot merged commit 915a988 into master Jul 8, 2021
@oneflow-ci-bot oneflow-ci-bot deleted the shiyongtao/dev_pixelshufflev2 branch July 8, 2021 12:31
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants