-
Notifications
You must be signed in to change notification settings - Fork 13
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
Question about Keras version #3
Comments
Hi Tan, Thank you for opening the issue and your interest in our work.
After publishing the paper, I reconsider this term in the loss function, I do not think it is necessary to have it, but it might help.
This is a standard approach, since we need to have one number to calculate the loss.
it is a hyper-parameter, you have to find the best one for your dataset and model. } Hope this helps! |
Hi Dr Vadim, Thank you very much for your replies. I have some other questions:
Thank you and hope to hear from you soon |
Hi Dr. Vadim,
In your Keras example, the CancelOut loss does not contain the variance term
def call(self, inputs):
if self.cancelout_loss:
self.add_loss( self.lambda_1 * tf.norm(self.w, ord=1) + self.lambda_2 * tf.norm(self.w, ord=2))
return tf.math.multiply(inputs, self.activation(self.w))
May I ask why we need to sum up the L1-norm and L2-norm of the weight here?
Also, in your Pytorch notebook, it is mentioned that the variance term is optional. So we can set that term to 0?
Regards,
Tan
The text was updated successfully, but these errors were encountered: