在使用带有Python绑定的Tensorflow时,如何将张量转换为numpy数组?
python numpy tensorflow
如果列表的元素是函数,如何在 TensorFlow 中索引 Python 列表?
我已阅读 @soloice 在How to index a list with a Tensorflow tensor 中的回答。但是,它假设列表可以转换为张量。
如果我有一个函数列表 L,则索引方法tf.gather(L,index)不起作用,因为L无法转换为张量。
tf.gather(L,index)
L
tensorflow
tensorflow ×2
numpy ×1
python ×1