Tensorflow (python): “ValueError: setting an array element with a sequence” in train_step.run(…)

后端 未结 2 968
情歌与酒
情歌与酒 2020-12-10 12:09

I\'m trying to implement a simple logistic regression model trained with my own set of images, but I am getting this error when I try to train the model:

Trac         


        
2条回答
  •  暗喜
    暗喜 (楼主)
    2020-12-10 12:32

    This particular error is coming out of numpy. Calling np.array on a sequence with a inconsistant dimensions can throw it.

    >>> np.array([1,2,3,[4,5,6]])
    
    ValueError: setting an array element with a sequence.
    

    It looks like it's failing at the point where tf ensures that all the elements of the feed_dict are numpy.arrays.

    Check your feed_dict.

提交回复
热议问题