tensorflow报错Can not squeeze dim[1], expected a dimension of 1, got n for解决办法

Posted Lenskit

tags:

篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了tensorflow报错Can not squeeze dim[1], expected a dimension of 1, got n for解决办法相关的知识,希望对你有一定的参考价值。

这是因为tf的文档要求label必须是一个单独的值,而不是一个one-hot编码后像[1,0,0], [0,1,0], [0,0,1].的值。

 

以上是关于tensorflow报错Can not squeeze dim[1], expected a dimension of 1, got n for解决办法的主要内容,如果未能解决你的问题,请参考以下文章

import tensorflow 报错: tf.estimator package not installed.

TensorFlow报错:tf.placeholder() is not compatible with eager execution.

TensorFlow报错:tf.placeholder() is not compatible with eager execution.

elasticsearch启动报错:can not run elasticsearch as root

pip install报错Can't roll back cryptography; was not uninstalled

Ubuntu下TensorFlow报错:Could not load dynamic library ‘libcudnn.so.8‘; dlerror: libcudnn.so.8: cannot..