Cannot load Tensorflow model with batch-normalization
Hello, i am trying to load my custom tensorflow model with help a dnn module of opencv. Step by step:
- I create a neural network
- I trained it
- I use freeze_graph.py
- After that I use optimize_for_inference.py
- And i use transform_graph.exe
- Load last model in opencv dnn
But when i did't use a
layer = tf.layers.batch_normalization(layer, training=True)
i didn't get a error from opencv:
cv2.error: OpenCV(3.4.2) C:\projects\opencv-python\opencv\modules\dnn\src\tensorflow\tf_importer.cpp:1388: error: (-213:The function/feature is not implemented) Cannot determine number of parameters for batch normalization layer. in function 'cv::dnn::experimental_dnn_v5::`anonymous-namespace'::TFImporter::populateNet'
If I set
"training = False"
then I don't get error but my model don't teach like early