提交 386be97c 编写于 作者: Z zihaomu

fix bug in layer fusion

上级 de2f7666
......@@ -247,7 +247,7 @@ void Net::Impl::fuseLayers(const std::vector<LayerPin>& blobsToKeep_)
{
// fuse naryEltwise layer
// bias must already be computed to fuse => bias layer must appear before convolution
if (biasLayerData->id < ld.id)
if (biasLayerData->id < ld.id && biasLayerData->consumers.size() == 1)
{
// conv + naryEltwise.
CV_Assert_N(biasLayerData->outputBlobs.size() == 1, ld.inputBlobs.size() == 1);
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册