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

Popular posts from this blog

resizing Telegram inline keyboard -

command line - How can a Python program background itself? -

php - "cURL error 28: Resolving timed out" on Wordpress on Azure App Service on Linux -