A
を使用テンソルからサブテンソルを取得するには、私はA
次のindixesから新しいテンソルを取得したい形状(2261,)
TensorFlow:インデックス
とtensorflow.tensor
です:[10,20,30]
私はすべて以下のことを試してみました何もできません:
A[[10,20,30]]
# *** ValueError: Index out of range using input dim 1; input has only 1 dims for 'strided_slice' (op: 'StridedSlice') with input shapes: [2261], [3], [3], [3].
A[10,20,30]
# same error as above
A[numpy.array([10,20,30])]
# *** ValueError: Shape must be rank 1 but is rank 2 for 'strided_slice' (op: 'StridedSlice') with input shapes: [2261], [1,3], [1,3], [1].
A[10]
# <tf.Tensor 'strided_slice:0' shape=() dtype=float32> - not an error but a shapeless tensor
A[tensorflow.constant(10)]
# same problem as above
なぜこれらは機能しません。どうすればよいですか?