I would like to have a 2d convolution with a filter which depends on the sample in the mini-batch in tensorflow. Any ideas how one could do that, especially if the number of
They way to go around it is adding an extra dimension using
tf.expand_dims(inp, 0)
to create a 'fake' batch size. Then use the
tf.nn.conv3d()
operation where the filter-depth matches the batch size. This will result in each filter convolving with only one sample in each batch.
Sadly, you will not solve the variable batch size problem this way, only the convolutions.