typeError:The value of a feed cannot be a tf.Tensor object.Acceptable feed values include Python scalars,strings,lists.numpy ndarrays,or TensorHandles.For reference.the tensor object was Tensor...

As posted above: error message and error code.

This problem has troubled me for two days. The error is probably that the input data is different from the accepted format and cannot be used as a tensor.

Later, I asked the great god, the reason is tf.reshape(), because the input format is defined by placeholder during network training, so the input cannot use tensor, and the return result of tf.reshape() is a tensor, so the input will report an error.

So changed to this format

At a whim, they all use the methods in numpy to provide format conversion, so that tensor-shaped variables will not be generated. After the modification, it runs successfully

 

Guess you like

Origin http://43.154.161.224:23101/article/api/json?id=324854560&siteId=291194637