I am trying to gather slices of a tensor in terms of the last dimension for partial connection between layers. Because the output tensor\'s shape is [batch_size, h, w,
[batch_size, h, w,
As of TensorFlow 1.3 tf.gather has an axis parameter, so the various workarounds here are no longer necessary.
tf.gather
axis
https://www.tensorflow.org/versions/r1.3/api_docs/python/tf/gather https://github.com/tensorflow/tensorflow/issues/11223