title: Spatial separable convolution
body: <p>How can I efficiently implement an 1x1 convolution which has separate filers along spatial dimension in Tensorflow? There is a <a href="https://www.tensorflow.org/versions/r0.9/api_docs/python/nn.html#depthwise_conv2d" rel="nofollow">tf.nn.depthwise_conv2d</a> which is similar to my problem, but it has separate filters across <em>depth</em> (i.e. 3rd dimension).</p>
  
  <p>In the simplest case out_channels = 1 this convolution can be written as:</p>
  
  <pre><code>def spatial_conv(input, filter):
    return tf.reduce_sum(tf.mul(input, filter), [3], keep_dims=True)
  </code></pre>
  
  <p>where <code>input.dim=[batch_size, input_width, input_height, channels]</code> and <code>filter.dim=[input_width, input_height, channels]</code>. I want to generalize this convolution by concatenating the outputs from the same input and different (but the same shape) filters.</p>