AttributeError: 'Model' object has no attribute 'name'
Traceback (most recent call last): File "<ipython-input-15-7fa9988e38ef>", line 1, in <module>
runfile('E:/experiment/paper1/train.py', wdir='E:/experiment/paper1') File "C:\Users\admin\Anaconda3\lib\site-packages\spyder\utils\site\sitecustomize.py", line 710, in runfile
execfile(filename, namespace) File "C:\Users\admin\Anaconda3\lib\site-packages\spyder\utils\site\sitecustomize.py", line 101, in execfile
exec(compile(f.read(), filename, 'exec'), namespace) File "E:/experiment/paper1/train.py", line 44, in <module>
model=hsi_net.FDSSC() File "E:\experiment\paper1\hsi_net.py", line 115, in FDSSC
model=Model([input_data],pred) File "C:\Users\admin\Anaconda3\lib\site-packages\keras\legacy\interfaces.py", line 91, in wrapper
return func(*args, **kwargs) File "C:\Users\admin\Anaconda3\lib\site-packages\keras\engine\network.py", line 91, in __init__
self._init_graph_network(*args, **kwargs) File "C:\Users\admin\Anaconda3\lib\site-packages\keras\engine\network.py", line 183, in _init_graph_network
'The tensor that caused the issue was: ' + AttributeError: 'Model' object has no attribute 'name'
进入hsi_net.py文件找到FDSSC函数。

红圈画的input_data应该是模型的输入,但是由于reshape时变量命名的问题,导致input_data变成了别的变量,所以在运行时会出现如下错误。
AttributeError: 'Model' object has no attribute 'name'的更多相关文章
- AttributeError: 'module' object has no attribute 'gfile'
While running TensorFlow's classify_image, getting AttributeError: 'module' object has no attribute ...
- Keras AttributeError 'NoneType' object has no attribute '_inbound_nodes'
问题说明: 首先呢,报这个错误的代码是这行代码: model = Model(inputs=input, outputs=output) 报错: AttributeError 'NoneType' o ...
- pyspark AttributeError: 'NoneType' object has no attribute 'setCallSite'
pyspark: AttributeError: 'NoneType' object has no attribute 'setCallSite' 我草,是pyspark的bug.解决方法: prin ...
- tensorboardX使用中 AttributeError: 'function' object has no attribute 'graph'
最近在使用tensorboardX可视化网络结构,因为tensorboardX并非pytorch原生的可视化工具,所以版本之间并不兼容 在使用的过程中会遇到,AttributeError: 'func ...
- Python脚本报错AttributeError: ‘module’ object has no attribute’xxx’解决方法
最近在编写Python脚本过程中遇到一个问题比较奇怪:Python脚本完全正常没问题,但执行总报错"AttributeError: 'module' object has no attrib ...
- AttributeError: 'list' object has no attribute 'write_pdf'
我在可视化决策树,运行以下代码时报错:AttributeError: 'list' object has no attribute 'write_pdf' 我使用的是python3.4 from sk ...
- attributeError:'module' object has no attribute ** 解决办法
写了一个小脚本,执行的时候报错: Traceback (most recent call last): File "F:/test/qrcode.py", line 109, in ...
- AttributeError: 'module' object has no attribute 'TornadoAsyncNotifier'
/*************************************************************************** * AttributeError: 'modu ...
- AttributeError: 'dict_values' object has no attribute 'translate'
/***************************************************************************************** * Attribu ...
随机推荐
- java开发中,一些小的JS应用
js中打开一个新窗口的方法: 1.window.location.href=“url” 2.jbox.win(); 3.window.open(); js无任何提示的关闭弹出的页面: window.o ...
- Top命令数据分析
一.top命令详解 当前时间 20:27:12 当前系统运行时间 3:18秒 1个用户 系统负载平均长度为 0.00,0.00,0.00(分别为1分钟.5分钟.15分钟前到现在的平均值) 第二行为进程 ...
- jQuery遍历之find()
/**案例说明: *首先理清楚find()函数同children()函数之间的区别 * 1. find()会遍历给定节点下的所有的元素节点. * 2. children()之后遍历给定节点下的单一层级 ...
- H3C STA>PC的数据转发
- rest framework 之解析器
一.示例 1.api/urls.py from django.urls import path, re_path from api.views import UserView, ParserView ...
- 如何将Android的AOSP仓库放置到自己的gitlab服务器上?
平台 Ubuntu 18.04 GitLab Community Edition 11.11.0 参考 https://source.android.google.cn/ 概述 git ...
- Python 关于列表字典的键值修改
list (修改列表的索引值) 循环一个列表时,最好不要对原列表有改变大小的操作,这样会影响你的最终结果. #使用负索引进行修改列表 print('First') lis = [11, 22, 33, ...
- Httpd服务入门知识-Httpd服务常见配置案例之实现用户家目录的http共享
Httpd服务入门知识-Httpd服务常见配置案例之实现用户家目录的http共享 作者:尹正杰 版权声明:原创作品,谢绝转载!否则将追究法律责任. 一.实现用户家目录的http共享前提 在配置家目录共 ...
- 利用tcpdump抓取网络包
1.下载并安装tcpdump 下载地址:tcpdump 安装tcpdump,连接adb adb push tcpdump /data/local/tcpdump adb shell chmod 675 ...
- IDisposable 接口
提供一种用于释放非托管资源的机制. 地址:https://docs.microsoft.com/zh-cn/dotnet/api/system.idisposable?view=netframewor ...