Questions tagged [conv1d]

38 questions
0
votes
1 answer

How to perform channel wise convolution

I have an input tensor of shape (10,3,4,6). The 6 is the channel dimension. If I need to perform convolution (1D and 2D both) channel-wise ( each channel should have different weights and bias) using Pytorch, how can I implement it? Please give me…
0
votes
1 answer

Is there any difference between Conv1d(in, out, kernel_size=1) and Conv2d(in, out, kernel_size=1)?

Are these two Conv operator the same for serial data? I want to know how to select from these two Conv operator
WYYAHYT
  • 15
  • 3
0
votes
1 answer

TensorFlow/Keras CONV1D cannot train

I am trying to train a network to recognize gestures with an accelerometer in a wristband. I am no expert in deep learning, either python programming. The data below is the original data that I was trying to train but had no luck with anything on…
0
votes
0 answers

Sizes of tensors must match except in dimension 1. In Unet architecture when concatenating the data I am getting error

Below is my code I have to go with the same channels but when concatenating the data while upsampling, I am getting an error. class Unet(nn.Module): def __init__(self): super(Unet,self).__init__() …
0
votes
0 answers

Mutli variate time series prediction - Conv1D and loss function - pytorch

I have a couple of questions. I have data of the following shape: (32, 64, 11) where 32 is the batch size, 64 is a sequence length and 11 is the number of features. each sample of mine is 64X11, and has a label of 0 or 1. I’d like to predict when…
Tom
  • 89
  • 8
0
votes
0 answers

Connecting a 1D CNN layer to a LSTM layer in keras

I have a model build which is shown below: def og_build_model_5layer(n_rows,n_cols): input = Input(shape=(n_cols,n_rows),NAME='INP') print('model_input shape:' , input.shape) c1 = Conv1D(50, 3,name =…
Kathan Vyas
  • 355
  • 3
  • 16
0
votes
0 answers

How to apply conv1d to timeseries data

I have the data of shape (32, 10, 140), where 32 is batch_size, 10 is time window and 140 is feature dimensions. I want to apply conv1d only on features across all time dimensionns. How to do it using keras?
0
votes
0 answers

Variational AutoEncoder inference question

I made VAE model referred to Keras VAE Tutorials(https://keras.io/examples/generative/vae/) from Conv2D to Conv1D and I fitted the model successfully. After fitting the model, I used 'predict' method to calculate train_mse_loss. x_train_pred =…
mace
  • 1
0
votes
0 answers

Build HRCNN with tensorflow

I'm currently trying to build a Hybrid Convolutional Recurrent Neural Network to analyze time series.The network is described in this image The basic idea is to take a historical series and run the network on it. At each iteration laconv1D takes M…
0
votes
1 answer

model.fit() error message when trying to train 1D CNN

I am trying to train a 1D-CNN on tabular data to then use LRP on it (as it has been done here). I am stuck at the model.fit() part of the implementation. Up to that point everything seems to work. Here is the error I get: model_history =…
user19534996
0
votes
2 answers

Using conv1d Layer in Tensorflow Sequential Model

i am very new to Tensorflow and just cannot figure out the problem. I am trying to build a CNN, but I keep having issues with the conv1d layer (specifically the input): expected min_ndim=3, found ndim=2 tensorflow sequential I already tried:…
Max
  • 61
  • 7
0
votes
1 answer

Input Layer for Conv1D in Keras

Let me explain my problem and the dataset a bit. In my dataset, i have hourly measurements of a variable x and 7 more columns representing the day of the week that that measurment was taken as dummy variables. So, it is something like this: DateTime…
Murilo
  • 533
  • 3
  • 15
0
votes
0 answers

problem while giving input to the model and saving the output to a file

I have a numpy array having the 512 data points, I want to consider this as the input to my 1d convolutional model. After training the model in unsupervised way I want to predict the same input data from the model and want to save to a file inp_data…
0
votes
1 answer

How to feed new vectors into recurrent and convolutional keras model for real-time/streaming/live inference?

I have successfully trained a Keras/TensorFlow model consisting of layers SimpleRNN→Conv1D→GRU→Dense. The model is meant to run on an Apple Watch for real time inference, which means I want to feed it with a new feature vector and predict a new…
jerha202
  • 187
  • 1
  • 9
0
votes
0 answers

Tensorflow keras Conv1d input_shape problem?

i have function that creates a ann model def create_model(input_dim, n_action): """ A multi-layer perceptron """ model = tf.keras.Sequential() model.add(tf.keras.layers.Conv1D( 128, kernel_size=5, padding='same', …