Convert a variable sized numpy array to Tensorflow Tensors

前端 未结 2 1007
悲哀的现实
悲哀的现实 2021-01-19 01:26

I am trying Tensorflow 2.0 alpha preview and was testing the Eager execution . My doubt is that if you have a numpy array of variable size in middle like

in         


        
2条回答
  •  执笔经年
    2021-01-19 01:55

    This was happening to me in eager as well. Looking at the docs here , I ended up trying

    tf.convert_to_tensor(input, dtype=tf.float32)
    

    And that worked for me.

提交回复
热议问题