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

Possible rounding issue in AveragePooling2DLayer #111

Open
serenegrace opened this issue Jun 20, 2020 · 0 comments
Open

Possible rounding issue in AveragePooling2DLayer #111

serenegrace opened this issue Jun 20, 2020 · 0 comments

Comments

@serenegrace
Copy link

Upon attempting to write a test for AveragePooling2DLayer, I have encountered the following flaw:

inputVol(:, :, 1) = [0 0 2 0 0; 1 2 0 2 0; 0 0 2 2 0; 0 2 2 2 2; 2 2 2 1 1]; % channel 1 input matrix
L = AveragePooling2DLayer([3 3], [2 2], [0 0 0 0]);
y = L.evaluate(inputVol);
a=y(1, 1, 1);
b=sum(inputVol(1:3, 1:3, 1), 'all')/9;
The values are extremely close, but not actually the same. Notably, a9=6.9999999 (etc), while b9=7.

I suspect that this level of precision is not relevant usually, but I thought I should mention it all the same

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