question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

What exactly are `steps` in the Convolution1D layer?

See original GitHub issue

Let’s say I wanted to train a 1D Convnet. I use 100K examples for training, where each training example is 1000 samples from a 2 channel audio file. I assume for this example that nb_samples=1000 and input_dim=2.

What would steps represent in this case? My input tensor to model.fit is size (n_examples, nb_samples, input_dim)

Issue Analytics

  • State:closed
  • Created 8 years ago
  • Reactions:4
  • Comments:5 (2 by maintainers)

github_iconTop GitHub Comments

24reactions
fcholletcommented, Aug 16, 2015

Convolution1D is usually applied to temporal data, like yours (assuming that you “samples” are in the temporal space, not the frequency space). In Keras, temporal data is understood as a tensor of shape (nb_samples, steps, input_dim). The meaning of “sample” here is different from the one your are using, it simply means example / data point.

nb_samples = examples, steps = time dimension, input_dim = features at each time step.

1reaction
pjadzinskycommented, Aug 14, 2015

Not sure I understand your question. The docs says “Input shape: 3D tensor with shape: (nb_samples, steps, input_dim).” Isn’t steps what you are calling nb_samples? why do you rename it to something else?

Read more comments on GitHub >

github_iconTop Results From Across the Web

Conv1D layer - Keras
This layer creates a convolution kernel that is convolved with the layer input over a single spatial (or temporal) dimension to produce a...
Read more >
tf.keras.layers.Conv1D | TensorFlow
This layer creates a convolution kernel that is convolved with the layer input over a single spatial (or temporal) dimension to produce a...
Read more >
1D Convolutional Neural Network Models for Human Activity ...
The first step is to load the raw dataset into memory. ... We will define the model as having two 1D CNN layers,...
Read more >
Understanding 1D and 3D Convolution Neural Network | Keras
The first dimension is time-steps and other is the values of the acceleration in 3 axes. Following plot illustrate how the kernel will...
Read more >
tf.keras.layers.Conv1D | TensorFlow v2.11.0
1D convolution layer (e.g. temporal convolution). ... 3+D tensor with shape: batch_shape + (new_steps, filters) steps value might have ...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found