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

TransGAN code has some error #55

Closed
zlwangustc opened this issue Nov 18, 2021 · 2 comments
Closed

TransGAN code has some error #55

zlwangustc opened this issue Nov 18, 2021 · 2 comments
Labels
bug Something isn't working

Comments

@zlwangustc
Copy link

Describe the bug
I found that the code was copied from the source author's code and some pytorch's code was transformed to paddle error.

To Reproduce
1:
VIT_custom.py line59

return input * paddle.rsqrt(paddle.mean(input ** 2, dim=2, keepdim=True) + 1e-8)

should be

return input * paddle.rsqrt(paddle.mean(input ** 2, axis=2, keepdim=True) + 1e-8)

2:
VIT_custom.py line88

class CustomAct(nn.Layer):
    """ CustomAct layer
    Custom act method set, defalut "gelu"
    """
    def __init__(self, act_layer):
        super().__init__()
        if act_layer == "gelu":
            self.act_layer = gelu
        elif act_layer == "leakyrelu":
            self.act_layer = leakyrelu
        else:
            self.act_layer = gelu

which

leakyrelu has not been defined
@lmk123568
Copy link
Collaborator

感谢关注PPViT,已经给rd反馈

@xperzy xperzy added the bug Something isn't working label Nov 29, 2021
DDXDaniel added a commit to DDXDaniel/PaddleViT that referenced this issue Dec 20, 2021
@xperzy
Copy link
Collaborator

xperzy commented Dec 22, 2021

PR #55 has been merged. So I close this issue.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

3 participants