OperatorType kMerge error during tflite convert

I've got a model based on mobilenet. I want to convert it to tensorflow tflite, but I'm getting the following error

2019-04-02 12:47:05.291074: I tensorflow/lite/toco/graph_transformations/graph_transformations.cc:39] Before Removing unused ops: 1426 operators, 2302 arrays (0 quantized)
2019-04-02 12:47:05.354442: I tensorflow/lite/toco/graph_transformations/graph_transformations.cc:39] After Removing unused ops pass 1: 1330 operators, 2158 arrays (0 quantized)
2019-04-02 12:47:05.426755: I tensorflow/lite/toco/graph_transformations/graph_transformations.cc:39] Before general graph transformations: 1330 operators, 2158 arrays (0 quantized)
2019-04-02 12:47:05.427469: F tensorflow/lite/toco/graph_transformations/resolve_tensorflow_switch.cc:98] Check failed: other_op->type == OperatorType::kMerge Found BatchNormalization as non-selected output from Switch, but only Merge supported.

What's the problem? I've checked couple of times, my training phase is desabled and I'm using inference environment. Sometimes I get Mul in stead of BatchNormalization.

tensorflowmobilenettflitetoco
2 votesJO220.00
1 Answers
NN138.00
1

Make sure you pass the right argument for your training parameter of the layers. BatchNormalization, Dropout etc in tensorflow have argument called training, which is used to separate the learning and testing phases. if you use placeholder for that argument, try to remove it and write False instead.

Reply
Couldn't find what you were looking for?and we will find an expert to answer.
How helpful was this page?