python - How to pad a irregular shape tensor in tensorflow with pure TF way? -
test_tensor = [[2], [1, 2, 3], [4, 5]] # irregular shape # dose there have tf (better, , faster?) function pad tensor dense tensor defult value? # this: test_tensor ==> dense tensor:[[2, -1, -1],[1, 2, 3], [4, 5, -1]]
ps. please not use pure python & numpy
because need add operation tf model graph, maybe need complete operation pure tf way?
Comments
Post a Comment