原文:Keras (Tensor conversion requested dtype int32 for Tensor with dtype float32: 'Tensor("embedding_1/random_uniform:0", shape=(20000, 100), dtype=float32)')

这个问题出现根本原因是keras以及tensorflow的版本 服务器与本地 不一致 通过 Python import keras,tensorflow keras. version tensorflow. version 查看版本 然后通过 pip uninstall XXXX pip install install XXX版本号指定安装版本使得服务器与本机版本一致 本以为这个操作就可以解决问题 ...

2017-09-10 19:34 0 1304 推荐指数:

查看详情

tensorflow TypeError: Can not convert a float32 into a Tensor or Operation

遇到这种情况可能是你的程序中有和你定义的tensor 变量重名的其他变量名字,jishi在for循环中使用了这个名字的作为临时变量也不行.tenor 变量很娇气.坑了我一晚上的时间. 比如:x = tf.placeholder(tf.float32,[None,512]) 那么在程序中就 ...

Thu May 09 04:52:00 CST 2019 0 556
 
粤ICP备18138465号  © 2018-2025 CODEPRJ.COM