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

请问ACON能用在全连接吗,怎么用 #10

Open
onlinehuazai opened this issue Jun 6, 2021 · 1 comment
Open

请问ACON能用在全连接吗,怎么用 #10

onlinehuazai opened this issue Jun 6, 2021 · 1 comment

Comments

@onlinehuazai
Copy link

No description provided.

@nmaac
Copy link
Owner

nmaac commented Jun 7, 2021

可以用在全连接层,比如你的tensor shape是 (batch, width),你可以简单修改 https://github.com/nmaac/acon/blob/main/acon.py#L13-15

    self.p1 = nn.Parameter(torch.randn(1, width)) 
    self.p2 = nn.Parameter(torch.randn(1, width))    
    self.beta = nn.Parameter(torch.ones(1, width))

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants