【KERAS】报错 AttributeError: 'Tensor' object has no attribute '_keras_shape'

@【KERAS】报错 AttributeError: ‘Tensor’ object has no attribute ‘_keras_shape’

【KERAS】 AttributeError: ‘Tensor’ object has no attribute ‘_keras_shape’ ——解决方案

在用keras编写了Mish激活函数,构造BN_mish()函数,带入网络之后,出现AttributeError: ‘Tensor’ object has no attribute ‘_keras_shape’ 的问题。查了keras 官方文档后,解决了该问题。

问题的解决需要引入lamda函数
在这里插入图片描述

发布了34 篇原创文章 · 获赞 17 · 访问量 2万+

猜你喜欢

转载自blog.csdn.net/weixin_39393430/article/details/104836131
今日推荐