ValueError: Can't convert non-rectangular Python sequence to Tensor

前端 未结 2 831
轻奢々
轻奢々 2021-01-17 12:13

I want to change list to tensor with tf.convert_to_tensor, data is following:

data=[

array([0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0.,         


        
2条回答
  •  有刺的猬
    2021-01-17 13:07

    You can't. Like the error message says, TensorFlow arrays can not have different sizes along one dimension. Try to use a list of TensorFlow arrays instead or the dataset api.

提交回复
热议问题