1
我正在嘗試使用max_pool_with_argmax和sparse_to_dense來執行取消泊車,如http://www.cv-foundation.org/openaccess/content_iccv_2015/html/Noh_Learning_Deconvolution_Network_ICCV_2015_paper.html中所述。但是sparse_to_dense函數似乎只將標量值作爲output_shape。 例如,我寫這個劇本:tensorflow sparse_to_dense函數,output_shape參數
import tensorflow as tf
import numpy as np
unpooled=tf.sparse_to_dense(sparse_indices=[0,1,3],output_shape=[3,4],sparse_values=[4,5,6])
sess=tf.Session()
[unpol]=sess.run([unpooled])
print(unpol)
它會引發錯誤御所: 養型(E)(node_def,運算,消息)
tensorflow.python.framework.errors.InvalidArgumentError:output_shape有不正確的元素數量:2應該是:1
那麼這是一個錯誤還是我使用它錯了?