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 Conv1D and Max1D Issue #6

Open
gcmike opened this issue Sep 11, 2017 · 3 comments
Open

Possible Conv1D and Max1D Issue #6

gcmike opened this issue Sep 11, 2017 · 3 comments

Comments

@gcmike
Copy link

gcmike commented Sep 11, 2017

Hi there.
I am dealing with 1D signal and hence I have modified the mnist-cnn.c example and changed the model like shown below:

kad_node_t *t;
t = kann_layer_input(200);
t = kad_relu(kann_layer_conv1d(t, n_h_flt, 5, 1, 2));
t = kad_max1d(t, 2, 1, 1);
t = kad_relu(kann_layer_conv1d(t, n_h_flt, 5, 1, 2));
t = kad_max1d(t, 2, 1, 1);
t = kann_layer_dense(t, 200);
t = kad_relu(t);
t = kann_layer_dense(t, 100);
t = kad_relu(t);
t = kann_layer_dense(t, 50);
t = kad_relu(t);
ann = kann_new(kann_layer_cost(t, 2, KANN_C_CEB), 0);

I added the padding so as to keep the length. My input is 200 in length and output is a simple true/false.
However, when I compile and run training on this, the terminal immediately shows "Segmentation fault: 11." I believe the model to be correct, so I suspect the issue is from 1d-related function?

Thanks in advance!

@attractivechaos
Copy link
Owner

Did you program segfault before training, or segfault during training?

@gcmike
Copy link
Author

gcmike commented Sep 12, 2017

Segfault happened before training. Error popped up right after command execution.

@gcmike
Copy link
Author

gcmike commented Sep 16, 2017

I've done a bit more testing, and found that the segfault happens after the first conv1d and before the first relu. Does this help?

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

2 participants