python求助

为什么图一的代码能够运行,改成图二的就会报错?
AttributeError: 'NoneType' object has no attribute '_inbound_nodes'
错误信息:
Keras AttributeError 'NoneType' object has no attribute '_inbound_nodes'
原因:
只要使用Model,就必须保证该函数内全为layer而不能有其他函数,如果有其他函数必须用Lambda封装为layer。
我该怎么修改了
全部评论

相关推荐

点赞 收藏 评论
分享
牛客网
牛客企业服务