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

Maybe MEM allocation issue of the function "TestIm2FlavorConvLayer()" in "src/main.c" #1

Open
chayitw opened this issue Oct 16, 2021 · 0 comments

Comments

@chayitw
Copy link

chayitw commented Oct 16, 2021

hi,
Thank you for kindly sharing this excellent code.
I find a little issue about MEM allocation about the array "spad" in the function "TestIm2FlavorConvLayer()" of "src/main.c":
(original)
float *spad = malloc(out_dim.h * out_dim.w * in_dim.c *
filt_dim.w * filt_dim.h);

I think that maybe you want write it as below:
float *spad = malloc(out_dim.h * out_dim.w * in_dim.c *
filt_dim.w * filt_dim.h * sizeof(float) );

It's maybe better to add "sizeof(float)",
thanks^ ^

--chayi

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