keras 报错 ValueError: Tensor conversion requested dtype int32 for Tensor with dtype float32: 'Tensor("embedding_1/random_uniform:0", shape=(5001, 128), dtype=float32)'
在服务器上训练并保存模型,复制到本地之后load_model()报错:
ValueError: Tensor conversion requested dtype int32 for Tensor with dtype float32: 'Tensor("embedding_1/random_uniform:0", shape=(5001, 128), dtype=float32)'
原因:服务器和本地的运行环境配置不同
查看本地keras版本:
In [1]: import keras
Using TensorFlow backend. In [2]: keras.__version__
Out[2]: '2.0.6'
(或者,用pip freeze列出所有包的版本信息)
而服务器上的keras版本是2.0.3
本地pip install 指定版本安装:
$ sudo pip install Keras==2.0.
keras 报错 ValueError: Tensor conversion requested dtype int32 for Tensor with dtype float32: 'Tensor("embedding_1/random_uniform:0", shape=(5001, 128), dtype=float32)'的更多相关文章
- tensorflow models api:ValueError: Tensor conversion requested dtype string for Tensor with dtype float32: 'Tensor("arg0:0", shape=(), dtype=float32, device=/device:CPU:0)'
tensorflow models api:ValueError: Tensor conversion requested dtype string for Tensor with dtype flo ...
- matplotlib.pyplot import报错: ValueError: _getfullpathname: embedded null character in path
Environment: Windows 10, Anaconda 3.6 matplotlib 2.0 import matplotlib.pyplot 报错: ValueError: _getfu ...
- dbfread报错ValueError错误解决方法
问题 我在用dbfread处理.dbf数据的时候出现了报错 ValueError("could not convert string to float: b'.'",) 然后查找. ...
- moviepy音视频剪辑VideoClip类fl_image方法image_func报错ValueError: assignment destination is read-only解决办法
☞ ░ 前往老猿Python博文目录 ░ moviepy音视频剪辑模块的视频剪辑基类VideoClip的fl_image方法用于进行对剪辑帧数据进行变换. 调用语法:fl_image(self, im ...
- 【问题】报错[CRITICAL] Rendering SLS 'base:minions.install' failed: Jinja variable 'list' object has no element 0
1.报错[CRITICAL] Rendering SLS 'base:minions.install' failed: Jinja variable 'list' object has no elem ...
- Django整合Keras报错:ValueError: Tensor Tensor("Placeholder:0", shape=(3, 3, 1, 32), dtype=float32) is not an element of this graph.解决方法
本人在写Django RESful API时,碰到一个难题,老出现,整合Keras,报如下错误:很纠结,探索找资料近一个星期,皇天不负有心人,解决了 Internal Server Error: /p ...
- h5py报错:FutureWarning: Conversion of the second argument of issubdtype from `float` to `np.floating` is deprecated. In future, it will be treated as `np.float64 == np.dtype(float).type`.
导入h5py的时候,报错: /home/harris/anaconda3/lib/python3.6/site-packages/h5py/__init__.py:36: FutureWarning: ...
- tensorflow-TFRecord报错ValueError: Protocol message Feature has no "feature" field.
编写代码用TFRecord数据结构存储数据集信息是报错:ValueError: Protocol message Feature has no "feature" field.或和 ...
- datetime.strptime格式转换报错ValueError
今天遇到一个报错:ValueError: time data '2018-10-10(Wednesday) AM0:50' does not match format '%Y-%m-%d(%A) %p ...
随机推荐
- yield生成器函数
生成器有主要有四种方法: next() 执行函数,直到遇到下一个yield为止,并返回值 send(value) 为生成器发送一个数值,next()方法就相当于send(None) close() 终 ...
- 教你如何挑选深度学习GPU【转】
本文转载自:https://blog.csdn.net/qq_38906523/article/details/78730158 即将进入 2018 年,随着硬件的更新换代,越来越多的机器学习从业者又 ...
- SpringCloud Feign报错:Method has too many Body parameters
1.feign多参数问题 1.1GET方式 错误写法 @RequestMapping(value="/test", method=RequestMethod.GET) Model ...
- pagehelper的使用
知识点:使用pagehelper实现分页功能 参考资料github上:https://github.com/pagehelper/Mybatis-PageHelper/blob/master/wiki ...
- 解题报告:hdu1003 Max Sum - 最大连续区间和 - 计算开头和结尾
2017-09-06 21:32:22 writer:pprp 可以作为一个模板 /* @theme: hdu1003 Max Sum @writer:pprp @end:21:26 @declare ...
- JAVA初学者(一)
2015-12-15 21:26:17 刚学的java 做个总结: 1.构造函数没有返回值. 2.A对象调用Q的方法,Q方法里的变量就是A的变量 Fraction add(Fraction f) 在 ...
- web.config文件配置解决网站上传大文件限制
Asp.Net网站对上传文件的大小,请求执行的时间都做了限制,上传的文件如果超过限制或者执行上传时间超出, 文件上传都将失败. 因此,需要配置web.config来增加最大文件上传的大小和执行超时时间 ...
- Ubuntu14.04安装CUDA6.5
机器配置: 双系统:win10 64bit+ ubuntu14.04 LTS 64bit 显卡: GeForce 405 cuda版本: cuda 6.5 参考: http://m.blog.csdn ...
- 【Windows】Python脚本随机启动
Python脚本的管理在linux系统上市非常方便的,在windows则不是很方面.但是由于之前对于Windows这块的内容不是很了解,其实计划任务也是不错的,但和linux相比起来还是欠缺了那么点. ...
- [Android]如何减小APK的大小
能不引用的外部包就不用,删除没用的图片.xml,优化代码去掉没用的部分,能异步下载的资源就运行时从网络上下载.