Skip to content

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

Description

@mu-triv

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];
            }
        }

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions