如何用纯TF方式填充张量流中的不规则形状张量?

时间:2017-09-10 13:05:02

标签: python tensorflow tensorflow-serving

test_tensor = [[2], [1, 2, 3], [4, 5]] # irregular shape
# dose there have a tf (better, and faster?) function to pad this tensor to a dense tensor with a defult value?
# like this: test_tensor ==> dense tensor:[[2, -1, -1],[1, 2, 3], [4, 5, -1]]

聚苯乙烯。请不要使用纯python& numpy

因为我需要将此操作添加到我的TF模型图中,所以可能需要用纯TF方式完成操作?

0 个答案:

没有答案