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

What does the mlp and Mish function in modules.py do #4

Closed
Dyongh613 opened this issue Apr 19, 2022 · 2 comments
Closed

What does the mlp and Mish function in modules.py do #4

Dyongh613 opened this issue Apr 19, 2022 · 2 comments

Comments

@Dyongh613
Copy link

self.mlp = nn.Sequential(
LinearNorm(residual_channels, residual_channels * 4),
Mish(), # return x * torch.tanh(F.softplus(x))
LinearNorm(residual_channels * 4, residual_channels)
)

class Mish(nn.Module):
def forward(self, x):
return x * torch.tanh(F.softplus(x))

@keonlee9420
Copy link
Owner

Hi @qw1260497397 , it is for the embedding of diffusion time steps as described in the paper.

@keonlee9420
Copy link
Owner

Close due to inactivity.

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