Questions tagged [conv1d]
38 questions
6
votes
2 answers
How is the Keras Conv1D input specified? I seem to be lacking a dimension
My input is a array of 64 integers.
model = Sequential()
model.add( Input(shape=(68,), name="input"))
model.add(Conv1D(64, 2, activation="relu", padding="same", name="convLayer"))
I have 10,000 of these arrays in my training set. And I supposed to…

Tony Ennis
- 12,000
- 7
- 52
- 73
2
votes
1 answer
ValueError: Input 0 of layer conv1d is incompatible with the layer: : expected min_ndim=3, found ndim=2
So I was tinkering with some code for time series forecasting. I have dealt with this error before (the formatting of my data was wrong). But in this case I can't figure out what I've done wrong.
Here is the source of the problem
monk=…

Ulto 4
- 368
- 4
- 16
2
votes
0 answers
How to use GradCAM for multichannel 1D CNN models
I have some multi-channel time series data which I want to use as input to a 1D Convolutional Neural Network classifier. Furthermore, I want to test the model and provide an activation map for these test data.
I have already implemented a solution…

bjornsing
- 322
- 6
- 25
2
votes
1 answer
ValueError: Input 0 of layer "sequential" is incompatible with the layer: expected shape=(None, 223461, 5), found shape=(None, 5)
I use a model with a combinaison of GRu and Conv1D. When I want to fit the model I get an error in:
ValueError: Input 0 of layer "sequential_8" is incompatible with the layer: expected shape=(None, 223461, 5), found shape=(None, 5)
The shape of…

MexcelsiorB
- 29
- 1
- 5
2
votes
2 answers
Tensorflow conv1d/Keras Conv1D strange performance variation
I am getting somewhat unexpected results when measuring the processing runtime of the Conv1D layer and wonder if anybody understands the results. Before going on I note that the observation is not only linked to the Conv1D layer but can be observed…

A Roebel
- 289
- 2
- 7
2
votes
1 answer
PyTorch Conv1d parameters
I am trying to use 1D convolution in order to classify a set of time signals.
Every data unit I need to classify is made out of 65 different time series, each one contains 50 time samples, so if I write:
dataset =…

NetFre
- 33
- 6
1
vote
1 answer
Torch Conv 1-D Layer outputs the same value repeated
I have a torch tensors of shape (768, 8, 22), procesed by a Conv Layer 1-D Layer. The data is already standarized. The tensor is processed by the next layer:
nn.Conv1d(input_chanels = 8, output_chanels = 1, kernel_size = 3)
The output of the layer…

FAZ
- 31
- 3
1
vote
1 answer
How to implement a given model to Keras?
I am currently trying to reproduce a 1D-CNN approach I have found in the literature (Ullah et al., 2022)
In that publication the following baseline modelstructure is given:.
For testing purposes I want to use that model for my data as well. Yet, I…
user19534996
1
vote
1 answer
Keras Conv1D input for a very large number of samples
I have a dataset containing a huge amount of samples 1686663 and 107 features (1686663, 107). I'm building a neural network using keras, and wanted to apply a 1D convolution Conv1D.
The input for the Conv1D is (batch size, number_features,…

Nadjib Bendaoud
- 546
- 1
- 8
- 19
1
vote
1 answer
1D-CNN Keras Dilation Toy Example InvalidArgumentError
I am having a InvalidArgumentError with shapes using a toy dilation 1D-CNN example. My input
train_generator has the shape TensorShape([128, 1]) with 128 values and 1 expanded dimension to fit the convolutional features in.
def model():
return…

Slayahh
- 373
- 4
- 14
1
vote
1 answer
Merge multiple CNN models
I am trying to implement the paper Sarcasm Detection Using Deep Learning With Contextual Features.
This is the CNN architecture I'm trying to implement here:
This text is from the Paper itself that describes the layers:
The CNN architecture in…

Fatin Faiaz Isty
- 37
- 3
1
vote
1 answer
Why do I get a Conv2D error trying to run Conv1D layer?
I am trying to write a simple 1 dimensional convolution with a regression (1 dimensional float) output.
model = Sequential()
model.add(Conv1D(filters=1, kernel_size=8, activation='relu'))
model.add(Dense(1,…

Brad
- 1,360
- 4
- 18
- 27
1
vote
0 answers
How to replace the input layer of a pre-trained tensorflow model with our own input layer...?
I have a pre-trained model with input shape of shape=(None,4096, 12). I want to use this trained model with my own input layer having shape=(None, 1250, 5). i have tried the solution posted here. but i got error
enter ValueError …

Wiqi Khan
- 25
- 4
1
vote
1 answer
How to prepare data for a 1d CNN
I was wondering if someone could clear up my confusion. I have this code:
ef create_data(df):
logits = []
labels = []
for x in range(df.shape[0]):
current = df.iloc[x]
…

DevDog
- 111
- 2
- 9
0
votes
1 answer
keras input dimensions compatibility
I have a data of shape (4,34):
print(X_train)
array([[[0., 1., 0., ..., 0., 1., 0.],
[0., 0., 1., ..., 0., 0., 0.],
[1., 0., 0., ..., 0., 0., 0.],
[0., 0., 0., ..., 1., 0., 1.]],
............
[[0.,…

kati adler
- 15
- 3