mirror of
https://github.com/opencv/opencv.git
synced 2025-08-06 14:36:36 +08:00
Allow a different input order for Mul+Maximum.
Squashed : ReLU operand order tests.
This commit is contained in:
parent
05f0cb16de
commit
9eb79926df
@ -1260,7 +1260,13 @@ void TFImporter::populateNet(Net dstNet)
|
||||
if (!next_layers.empty())
|
||||
{
|
||||
int maximumLayerIdx = next_layers[0].second;
|
||||
ExcludeLayer(net, maximumLayerIdx, 0, false);
|
||||
|
||||
CV_Assert(net.node(maximumLayerIdx).input_size() == 2);
|
||||
|
||||
// The input from the Mul layer can also be at index 1.
|
||||
int mulInputIdx = (net.node(maximumLayerIdx).input(0) == name) ? 0 : 1;
|
||||
|
||||
ExcludeLayer(net, maximumLayerIdx, mulInputIdx, false);
|
||||
layers_to_ignore.insert(next_layers[0].first);
|
||||
|
||||
layerParams.set("negative_slope", scaleMat.at<float>(0));
|
||||
|
@ -230,6 +230,13 @@ TEST_P(Test_TensorFlow_layers, flatten)
|
||||
runTensorFlowNet("unfused_flatten_unknown_batch");
|
||||
}
|
||||
|
||||
TEST_P(Test_TensorFlow_layers, leaky_relu)
|
||||
{
|
||||
runTensorFlowNet("leaky_relu_order1");
|
||||
runTensorFlowNet("leaky_relu_order2");
|
||||
runTensorFlowNet("leaky_relu_order3");
|
||||
}
|
||||
|
||||
TEST_P(Test_TensorFlow_layers, l2_normalize)
|
||||
{
|
||||
runTensorFlowNet("l2_normalize");
|
||||
|
Loading…
Reference in New Issue
Block a user