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)
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?
I was under the impression that when you called model.fit
that the function fed batches of examples to the actual network. So the network would take in one example only for the actual forward pass.
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.
nb_samples = examples, steps = time dimension, input_dim = features at each time step.
that I can use it like for :
1000 audios and each auio is 30 seconds and it's sampling rate is 16kHz .
I get the audio data 1000*480000
so I can reshape the audio data to (nb_samples = 1000,steps=300,input_dim=1600) for Convolutional1D ?
What exactly does it mean by 'steps' within the input shape formate of the conv1D.
Input shape
3D tensor with shape: (batch_size, steps, input_dim)
Most helpful comment
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.