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

out-of-range bias in affine.c #59

Open
mu-triv opened this issue Nov 24, 2020 · 0 comments
Open

out-of-range bias in affine.c #59

mu-triv opened this issue Nov 24, 2020 · 0 comments

Comments

@mu-triv
Copy link

mu-triv commented Nov 24, 2020

In this block of the code:
https://github.com/sonydevworld/spresense/blob/master/sdk/modules/dnnrt/src/functions/affine.c#L210

The pointer b points outside of the valid bias, when p->base_loop_size > 1 and p->bias is not NULL. This will cause affine's wrong computations.

This code block should be:

      if (bias)
        {
          float *b = bias;
          for (i = 0; i < output_loop_size; i++)
            {
              y[i] += b[i];
            }
        }
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