AttributeError: 'Function' object has no attribute 'fn' [in caffe]

版权声明:本文为博主原创文章,未经博主允许不得转载。 https://blog.csdn.net/xuluhui123/article/details/83615033
n.global_pool_prob3 = L.Sigmoid(n.global_pool_up3,name='global_pool_prob3',ntop=0,top='global_pool_up3')
 n.att_repmat3 = L.Tile(n.global_pool_prob3,tile_param={'axis':1,'tiles':256})

报错产生的原因是,下一层使用的不是上一层top的名字,而是等式最左边的名字,修改为如下即可:

n.global_pool_prob3 = L.Sigmoid(n.global_pool_up3,name='global_pool_prob3',ntop=0,top='global_pool_up3')
 n.att_repmat3 = L.Tile(n.global_pool_up3,tile_param={'axis':1,'tiles':256})

猜你喜欢

转载自blog.csdn.net/xuluhui123/article/details/83615033