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:UsersadminAnaconda3libsite-packagesspyderutilssitesitecustomize.py", line 710, in runfile execfile(filename, namespace) File "C:UsersadminAnaconda3libsite-packagesspyderutilssitesitecustomize.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:experimentpaper1hsi_net.py", line 115, in FDSSC model=Model([input_data],pred) File "C:UsersadminAnaconda3libsite-packageskeraslegacyinterfaces.py", line 91, in wrapper return func(*args, **kwargs) File "C:UsersadminAnaconda3libsite-packageskerasengine etwork.py", line 91, in __init__ self._init_graph_network(*args, **kwargs) File "C:UsersadminAnaconda3libsite-packageskerasengine etwork.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变成了别的变量,所以在运行时会出现如下错误。