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

Error in calculating mean_max #10

Open
foldy-lab opened this issue Jun 10, 2021 · 1 comment
Open

Error in calculating mean_max #10

foldy-lab opened this issue Jun 10, 2021 · 1 comment

Comments

@foldy-lab
Copy link

Not sure if this is the right place to put it, but I think you have a small error when calculating mean_max

Line 107 reads:
if K.get_value(K.mean(K.max(K.softmax(self.concrete_select.logits, axis = -1)))) >= stopper_callback.mean_max_target:
Line 52 reads:
monitor_value = K.get_value(K.mean(K.max(K.softmax(self.model.get_layer('concrete_select').logits), axis = -1)))

The difference is that in Line 107 you have axis=-1 in the K.softmax function, while in Line 52 you have it in the K.max function. From what I can tell, K.max, without axis specified takes the maximum of the entire matrix, instead of the row-wise maximum. For this reason, I have been seeing the program finish and exit when the monitoring value is still only ~0.15

@mfbalin mfbalin self-assigned this May 24, 2022
@mfbalin
Copy link
Owner

mfbalin commented Sep 17, 2023

Feel free to open a PR to fix this issue.

@mfbalin mfbalin removed their assignment Sep 17, 2023
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