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

k2c_maxpool2d in time_distributed gives segmentation fault #13

Open
leonardopaffi opened this issue Jul 25, 2022 · 1 comment
Open

k2c_maxpool2d in time_distributed gives segmentation fault #13

leonardopaffi opened this issue Jul 25, 2022 · 1 comment

Comments

@leonardopaffi
Copy link

The code generated by keras2c is the following:

for (size_t i = 0; i < time_distributed_1_timesteps; ++i)
{
    max_pooling2d_timeslice_input.array = &time_distributed_output.array[i * time_distributed_1_in_offset];
    max_pooling2d_timeslice_output.array = &time_distributed_1_output.array[i * time_distributed_1_out_offset];
    k2c_maxpool2d(&max_pooling2d_timeslice_output, &max_pooling2d_timeslice_input, max_pooling2d_pool_size,
					    max_pooling2d_stride);
}

It compiles fine, but when in execution, it raises an error (SIGSEGV) when calling k2c_maxpool2d()

@leonardopaffi
Copy link
Author

More precisely the problem appears to be here:

Thread 1 received signal SIGSEGV, Segmentation fault.
k2c_maxpool2d (output=0x907b1fdb30, input=0x907b1fdc90, pool_size=0x907b1fe3b0, stride=0x907b1fe3c0) at keras2c/include/k2c_pooling_layers.c:105
105	                output->array[l+j+i] = input->array[m+k+i];

image

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