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'的更多相关文章

  1. AttributeError: 'module' object has no attribute 'gfile'

    While running TensorFlow's classify_image, getting AttributeError: 'module' object has no attribute ...

  2. Keras AttributeError 'NoneType' object has no attribute '_inbound_nodes'

    问题说明: 首先呢,报这个错误的代码是这行代码: model = Model(inputs=input, outputs=output) 报错: AttributeError 'NoneType' o ...

  3. pyspark AttributeError: 'NoneType' object has no attribute 'setCallSite'

    pyspark: AttributeError: 'NoneType' object has no attribute 'setCallSite' 我草,是pyspark的bug.解决方法: prin ...

  4. tensorboardX使用中 AttributeError: 'function' object has no attribute 'graph'

    最近在使用tensorboardX可视化网络结构,因为tensorboardX并非pytorch原生的可视化工具,所以版本之间并不兼容 在使用的过程中会遇到,AttributeError: 'func ...

  5. Python脚本报错AttributeError: ‘module’ object has no attribute’xxx’解决方法

    最近在编写Python脚本过程中遇到一个问题比较奇怪:Python脚本完全正常没问题,但执行总报错"AttributeError: 'module' object has no attrib ...

  6. AttributeError: 'list' object has no attribute 'write_pdf'

    我在可视化决策树,运行以下代码时报错:AttributeError: 'list' object has no attribute 'write_pdf' 我使用的是python3.4 from sk ...

  7. attributeError:'module' object has no attribute ** 解决办法

    写了一个小脚本,执行的时候报错: Traceback (most recent call last): File "F:/test/qrcode.py", line 109, in ...

  8. AttributeError: 'module' object has no attribute 'TornadoAsyncNotifier'

    /*************************************************************************** * AttributeError: 'modu ...

  9. AttributeError: 'dict_values' object has no attribute 'translate'

    /***************************************************************************************** * Attribu ...

随机推荐

  1. 使用node写爬虫入门

    最近看了node能做爬虫,所以就试了一下,一下是整个过程的记录 1.新建文件夹baidunews 2.在上边新建的文件夹下输入npm init进行初始化 3.初始化完成后下载需要的依赖包 npm in ...

  2. 剑指前端(前端入门笔记系列)——DOM(基本组成与操作)

    DOM——基本组成与操作 DOM是针对HTML和XML文档的一个API(应用程序编程接口).DOM描绘了一个层次化的节点树,允许开发人员添加.移除和修改页面的某一部分.他给文档提供了一种结构化的表达方 ...

  3. Spring+SpringMVC+Hibernate 与 shiro 整合步骤

    目录 1. 业务需求分析 2. 创建数据库 3. 创建 maven webapp 工程 4. 创建实体类(POJO) 5. 配置 Hibernate 和 Mapping 5.1 Hibernate 主 ...

  4. DTC配置

    在A和B上配置DTC(控制面板→管理工具→组件服务),配置参数如下: 使防火墙里的3个规则enable

  5. MFC For循环中实时更新显示Edit内容

    在for(){}循环中如果有处理函数,然后需要显示的时候,简单的UpdateData(false);是不行的: for (int i=0;i<10000;i++) { m_nT1.Format( ...

  6. zabbix3.4中报错解:telnet service is down on决方法

    当新添加的监控主机报telnet service is down on的时候,大家不要惊慌,这个是属于模板中添加了一项监控参数,监控被监控机的telnet服务,有两种解决办法,第一呢就是找到对应的监控 ...

  7. (05节)快速搭建SSM项目

    1.1  快速搭建Web项目 注意点:name:archetypeCatalog,value:internal 原因:Intellij IDEA根据maven archetype的本质,执行mvn a ...

  8. X509Store 类

    标题:X509Store 类 地址:https://docs.microsoft.com/zh-cn/dotnet/api/system.security.cryptography.x509certi ...

  9. MVC开发中自定义返回类型

    在做项目web的MVC中,会用到返回值的问题,我们一般使用AjaxResult的返回值,根据自己的需要进行自定义,如下参考: using System; using System.Collection ...

  10. Spring Boot 之:接口参数校验

    Spring Boot 之:接口参数校验,学习资料 网址 SpringBoot(八) JSR-303 数据验证(写的比较好) https://qq343509740.gitee.io/2018/07/ ...