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

tf.ruduce_sum #37

Open
yunshanbai opened this issue Apr 2, 2022 · 1 comment
Open

tf.ruduce_sum #37

yunshanbai opened this issue Apr 2, 2022 · 1 comment

Comments

@yunshanbai
Copy link

Hi, thank you for your excellent work! May I ask you a question? In model.py(the specific location is shown below), here you choose to use ‘’cross_entropy‘’ to get loss. Is this Code missing ‘’tf. reduce_sum‘’ before ''tf.reduce_mean''? It is inconsistent with the formula H (p, q)_ in the paper. I didn't understand it. Please give me some advice. Thank you.

Bai

https://github.com/wayneweiqiang/PhaseNet/blob/c2f41b39b233a1ec14e95965faee5bcde8615cda/phasenet/model.py#L328

@wayneweiqiang
Copy link
Collaborator

Hi Bai, the "softmax_cross_entropy_with_logits" function already sums over the three classes of P, S and noise. Here the reduce_mean is to calculate the mean loss for each data. Let me know if you have any other questions.

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