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

1D has 2D kernels #60

Open
wrrogers opened this issue Sep 12, 2019 · 10 comments
Open

1D has 2D kernels #60

wrrogers opened this issue Sep 12, 2019 · 10 comments

Comments

@wrrogers
Copy link

Seems 1D models are set to use 2D kernels. I went to use a 1D model and got the error:

ValueError: The kernel_size argument must be a tuple of 1 integers. Received: (7, 7)

@gitergreat
Copy link

Yeah, it also confuse me a lot.

@vincenzodentamaro
Copy link

same error here

@andresdigiovanni
Copy link

Same error.

In keras_resnet/models/_id.py

x = keras.layers.Conv1D(64, (7, 7), strides=(2, 2), use_bias=False, name="conv1")(x)
and
x = keras.layers.MaxPooling1D((3, 3), strides=(2, 2), padding="same", name="pool1")(x)

should be:

x = keras.layers.Conv1D(64, 7, strides=2, use_bias=False, name="conv1")(x)
and
x = keras.layers.MaxPooling1D(3, strides=2, padding="same", name="pool1")(x)

@vincenzodentamaro
Copy link

I have proposed a fix by uploading the code I have modified to work with 1D time series.

@unnir
Copy link

unnir commented Apr 28, 2020

so, this is the issue.

@aadnesd
Copy link

aadnesd commented Apr 15, 2021

I have a dataset with 1600 rows and 103 columns, when I used Conv1D in a sequential model I reshaped my data to (1600,103,1) and put the input_shape=(103,1) it worked fine. But when I use this model, after adding the fix in regards to kernel and strides, and shape (103,1) I get this error:
ValueError: Input 0 of layer conv1 is incompatible with the layer: : expected min_ndim=4, found ndim=3. Full shape received: (None, 103, 1)

@tackoo

@aadnesd
Copy link

aadnesd commented Apr 16, 2021

@tackoo there is still the dimension problem after the fixes

@vincenzodentamaro
Copy link

vincenzodentamaro commented Apr 16, 2021 via email

@aadnesd
Copy link

aadnesd commented Apr 16, 2021

Is it possible to install this fork?

@vincenzodentamaro
Copy link

vincenzodentamaro commented Apr 16, 2021 via email

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

6 participants