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

How to get regularizer loss in Eager Mode? #4

Open
Johnson-yue opened this issue Jul 30, 2018 · 0 comments
Open

How to get regularizer loss in Eager Mode? #4

Johnson-yue opened this issue Jul 30, 2018 · 0 comments

Comments

@Johnson-yue
Copy link

Hi, this me again.

I have an question about reg_loss .

The total_loss should be equal to reg_loss + softmax_loss ,but I do not know how to get reg_loss .

I have configure parameter of Conv2D(kernel_regularizer= tf.keras.regularizers.l2) like this demo but when the compute the loss of this mode compute loss . loss only compute softmax_loss, where is reg_loss , and how to get it for computing gradients??

I also use tf.get_total_loss() API but I do not know useful or not?

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