Skip to content
This repository has been archived by the owner on Mar 17, 2021. It is now read-only.

Float comparison in histogram normalisation layer #472

Open
fepegar opened this issue Jan 10, 2020 · 0 comments
Open

Float comparison in histogram normalisation layer #472

fepegar opened this issue Jan 10, 2020 · 0 comments

Comments

@fepegar
Copy link
Collaborator

fepegar commented Jan 10, 2020

This float comparison can be problematic.

diff_perc[diff_perc == 0] = np.inf

I was getting -inf in the output of the function because 1.6e-41 == 0 was returning False. I think an epsilon should be used instead: diff_perc[diff_perc < epsilon] = np.inf.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant