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

Activation functions on FC decoder layers #12

Closed
ygorcanalli opened this issue Jul 12, 2018 · 2 comments
Closed

Activation functions on FC decoder layers #12

ygorcanalli opened this issue Jul 12, 2018 · 2 comments

Comments

@ygorcanalli
Copy link

First, thanks for this very good code!

The original paper proposes a decoder with three fully connected layers:

FC+ReLU -> FC+ReLU -> FC+Sigmoid.

But your decoder code seens to do FC -> FC -> FC -> ReLU -> Sigmoid:

self.fc1 = nn.Linear(num_classes * output_unit_size, fc1_output_size) # input dim 10 * 16.
self.fc2 = nn.Linear(fc1_output_size, fc2_output_size)
self.fc3 = nn.Linear(fc2_output_size, self.fc3_output_size)
# Activation functions
self.relu = nn.ReLU(inplace=True)
self.sigmoid = nn.Sigmoid()

Would not be correct this way?

self.fc1 = nn.Linear(num_classes * output_unit_size, fc1_output_size) # input dim 10 * 16.
self.relu = nn.ReLU(inplace=True)
self.fc2 = nn.Linear(fc1_output_size, fc2_output_size)
self.relu = nn.ReLU(inplace=True)
self.fc3 = nn.Linear(fc2_output_size, self.fc3_output_size)
self.sigmoid = nn.Sigmoid()
@ygorcanalli
Copy link
Author

Sorry, dumb comment.

@cedrickchee
Copy link
Owner

No worries 🙂

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