1
0
mirror of https://github.com/opencv/opencv.git synced 2026-07-29 07:13:02 +04:00

Untrainable version of Scale layer from Caffe

This commit is contained in:
Dmitry Kurtaev
2018-01-12 11:59:05 +03:00
parent 57dc28fe99
commit 1f4fdfd599
5 changed files with 137 additions and 24 deletions
+3 -1
View File
@@ -268,6 +268,8 @@ public:
bool setScale(const Ptr<ScaleLayer>& layer)
{
if (layer.empty() || layer->blobs.empty())
return false;
scaleLayer = layer;
// we will need to re-compute the weights with the scaling
// coefficients taken into account
@@ -276,7 +278,7 @@ public:
newWeightAndBias = true;
fusedBias = false;
#endif
return !scaleLayer.empty();
return true;
}
virtual Ptr<BackendNode> initHalide(const std::vector<Ptr<BackendWrapper> > &inputs)