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. 49.react中使用less

    1.安装less:npm install less less-loader --save 2.webpack.config.js中配置: oneOf: [ {   test: /\.less$/,   ...

  2. 纯css无js实现点击事件

    <input id="A" type="checkbox"><label for="A"> <span cla ...

  3. AI工程师基础知识100题

    100道AI基础面试题 1.协方差和相关性有什么区别? 解析: 相关性是协方差的标准化格式.协方差本身很难做比较.例如:如果我们计算工资($)和年龄(岁)的协方差,因为这两个变量有不同的度量,所以我们 ...

  4. adb shell get/setprop, setenforce...

    adb shell getprop <key> 获取设备参数信息adb shell setprop <key> <value> 设置设备参数信息 例子1:>C ...

  5. spring中WebApplicationContext、DispatcherServlet与web容器的ServletContext关系梳理

    学习源码过程中,对各种context(上下文)表示很懵逼.特地留此一篇. 1.要了解各个上下文之间的关系.首先走一遍spring在web容器(tomcat)中的启动过程 a) ServletConte ...

  6. mysql 的逻辑架构 与 存储引擎的介绍

    mysql 的逻辑架构分为三层: 最上层的服务大多数基于网络的客户端.服务器的工具或者服务都有类似的架构,比如连接处理,授权认证.安全等 第二层架构:mysql的核心服务功能都在这一层,包括查询解析, ...

  7. 【Netty】初识Netty

    一.为什么会出现Netty 之前我们使用通用的应用程序或库来相互通信.例如,我们经常使用HTTP客户机库从web服务器检索信息,并通过web服务调用远程过程调用.然而,通用协议或其实现有时伸缩性不是很 ...

  8. Odoo采购模块

    转载请注明原文地址:https://www.cnblogs.com/ygj0930/p/10825976.html 一:采购过程 采购业务可以分为以下几个流程: 1)建立供应商信息 企业需要与供应商建 ...

  9. 使用kubeadm安装Kubernetes 1.15.3 并开启 ipvs

    一.安装前准备 机器列表 主机名 IP node-1(master) 1.1.1.101 node-2(node) 1.1.1.102 node-3(node) 1.1.1.103 设置时区 cp / ...

  10. maven nexus 私服搭建 Linux版

    准备工作 已安装jdk 已安装maven 下载Nexus Repository OSS:https://www.sonatype.com/download-oss-sonatype 如果无法下载成功, ...