I want to apply a ConvNet
on my one dimensional data retrieved from 13 sensors. So, each of my samples consists of 13 channels (of 51 values)
I am using 'conv1d' to apply a ConvNet on my data. The network works nicely, but I wonder how 'conv1d' determines the number of channels for it's filters... To my knowledge, a filter should have an equal number of channels as its input data, which makes it a $5x13$ filter. I set the filter to have a width of 5, but don't need to set the number of channels anywhere.
My question is: how does layer 'conv1' determine it's number of channels?
Below is a portion of my code:
# We have 13 1D channels of 51 points each
# Note that we've indicated -1 for batch size, which specifies that this dimension should be dynamically computed
# based on the number of input values in features["x"], holding the size of all other dimensions constant.
input_layer = tf.reshape(features["x"], [-1, 51, 13])
# Convolutional Layer #1
# Shouldn't this filter also need to number of channels?
This should match the input number of channels
conv1 = tf.layers.conv1d(inputs=input_layer, filters=32, kernel_size=5, padding="same", activation=tf.nn.relu)
# Pooling Layer #1
pool1 = tf.layers.max_pooling1d(inputs=conv1, pool_size=2, strides=2)