title: Custom Spatial Convolution in TensorFlow
body: <p>I'd like to extend TensorFlow's <code>tf.nn.conv2d</code> function by having it threshold the input (with a sigmoid or ReLU function) in each receptive field before multiplying by the filter. The actual convolution operation is implemented in Eigen, and Eigen's convolution functionality is in a function called <a href="https://github.com/tensorflow/tensorflow/blob/master/third_party/eigen3/unsupported/Eigen/CXX11/src/NeuralNetworks/SpatialConvolutions.h#L768" rel="nofollow">choose</a>. However, I have not been able to find the implementation for the <code>choose</code> function.</p>
  
  <p>Where is the <code>choose</code> function located in the TensorFlow github repository, and is there any simple way to extend Eigen's convolution function to do input processing?</p>
  
  <p>Thanks!</p>