In Tensorflow, how to use tf.gather() for the last dimension?

后端 未结 8 1903
余生分开走
余生分开走 2021-01-04 02:54

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,

8条回答
  •  走了就别回头了
    2021-01-04 03:08

    As of TensorFlow 1.3 tf.gather has an axis parameter, so the various workarounds here are no longer necessary.

    https://www.tensorflow.org/versions/r1.3/api_docs/python/tf/gather https://github.com/tensorflow/tensorflow/issues/11223

提交回复
热议问题