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

About _cross_l_loss(self, hparams) #11

Open
Woooosz opened this issue Jan 16, 2019 · 0 comments
Open

About _cross_l_loss(self, hparams) #11

Woooosz opened this issue Jan 16, 2019 · 0 comments

Comments

@Woooosz
Copy link

Woooosz commented Jan 16, 2019

In base_model.py
def _cross_l_loss(self, hparams):
cross_l_loss = tf.zeros([1], dtype=tf.float32)
for param in self.cross_params:
cross_l_loss = tf.add(cross_l_loss, tf.multiply(hparams.cross_l1, tf.norm(param, ord=1)))
cross_l_loss = tf.add(cross_l_loss, tf.multiply(hparams.cross_l2, tf.norm(param, ord=1)))
return cross_l_loss

I wonder on Why hparams.cross_l2 doesn't multiply with tf.norm(param, ord=2)?

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

1 participant