博客
关于我
强烈建议你试试无所不能的chatGPT,快点击我
【DL】——code = marshal.loads(raw_code) ValueError: bad marshal data (unknown type code)
阅读量:4304 次
发布时间:2019-05-27

本文共 613 字,大约阅读时间需要 2 分钟。

Keras, 模型载入

code

from keras.models import model_from_jsonimport layers_builder as layersfrom keras.utils.generic_utils import CustomObjectScopepath = "/home/darknet/CM/23_SLAM/Semantic_SLAM/Third_Part/PSPNet_Keras_tensorflow/weights/keras/pspnet101_cityscapes.json"with CustomObjectScope({
'Interp': layers.Interp}): with open(path, 'r') as file_handle: tmp = file_handle.read()model = model_from_json(tmp)

报错

keras模型载入时报错:code = marshal.loads(raw_code),ValueError: bad marshal data (unknown type code)

再用python3.6配置了一个环境,报错信息为:SystemError: unknown opcode

分析

这是由于python版本问题引起的,再配置一个python3.5的环境。就ok了。

转载地址:http://nuhws.baihongyu.com/

你可能感兴趣的文章
第一天上班没精神
查看>>
启动eclipse报错:Failed to load the JNI shared library
查看>>
eclipse安装插件的两种方式在线和离线
查看>>
linux下源的相关笔记(suse)
查看>>
linux系统分区文件系统划分札记
查看>>
Linux(SUSE 12)安装Tomcat
查看>>
Linux(SUSE 12)安装jboss4并实现远程访问
查看>>
Neutron在给虚拟机分配网络时,底层是如何实现的?
查看>>
netfilter/iptables全攻略
查看>>
Overlay之VXLAN架构
查看>>
Eclipse : An error occurred while filtering resources(Maven错误提示)
查看>>
在eclipse上用tomcat部署项目404解决方案
查看>>
web.xml 配置中classpath: 与classpath*:的区别
查看>>
suse如何修改ssh端口为2222?
查看>>
详细理解“>/dev/null 2>&1”
查看>>
suse如何创建定时任务?
查看>>
suse搭建ftp服务器方法
查看>>
centos虚拟机设置共享文件夹并通过我的电脑访问[增加smbd端口修改]
查看>>
文件拷贝(IFileOperation::CopyItem)
查看>>
MapReduce的 Speculative Execution机制
查看>>