Skip to content
This repository has been archived by the owner on Jul 10, 2021. It is now read-only.

Wrongly reshaping image stack array #223

Open
tsierens opened this issue Nov 28, 2016 · 0 comments
Open

Wrongly reshaping image stack array #223

tsierens opened this issue Nov 28, 2016 · 0 comments

Comments

@tsierens
Copy link

tsierens commented Nov 28, 2016

Hello, I am trying to use a convolutional neural network regressor in a dataset of 6x7 images that have four stacks (the input array is (25000,4,6,7)).

But whenever I run the .fit function I get a warning that the input array is being reshaped:

WARNING:sknn: - Reshaping input array from (25000L, 4L, 6L, 7L) to (25000L, 7L, 4L, 6L).

If I attempt to fit again with the same command I get an error:

ValueError: The hardcoded shape for the image stack size (7) isn't the run time shape (4).

I believe the initial reshaping to be the culprit, has anybody had any similar issues?

Here are some snippets of my code:

net = Regressor( layers = [Convolution("Rectifier", channels = 12 , kernel_shape = (4,4)),
Layer("Rectifier", units = 75,dropout=0.2),
Layer("Rectifier", units = 50,dropout=0.2),
Layer("Rectifier", units = 25,dropout=0.2),
Layer("Tanh", units = 1)],
batch_size = 32,
learning_rate = 0.0001,
learning_rule = 'nesterov',
n_iter = 1)

net.fit(X_train,y_train)

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant