None of the MLIR Optimization passes are enabled

I am training an object detection model with Tensorflow Object Detection API following this tutorial, But during training the model, it always gets stuck at these warning and it never updates, even after hours, how to avoid this!?

 2021-06-22 05:03:36.742721: I tensorflow/compiler/mlir/mlir_graph_optimization_pass.cc:176] None of the MLIR Optimization Passes are enabled (registered 2)
    2021-06-22 05:03:36.752083: I tensorflow/core/platform/profile_utils/cpu_utils.cc:114] CPU Frequency: 2299995000 Hz
1 Like

Are you in the same case as:

Yes, the same case but restarting won’t work

What Is your TF version?

I have solved this issue, the problem was in my TFRecord format, Thanks

I am having the same issue, how did you fix it?

can you please specify, how exactly you resolved this issue ?

Ensure that TFRecords can be created without issues.

Run
!python {SCRIPTS_PATH + ‘/generate_tfrecord.py’} -x {IMAGE_PATH + ‘/train’} -l {ANNOTATION_PATH + ‘/label_map.pbtxt’} -o {ANNOTATION_PATH + ‘/train.record’}
!python {SCRIPTS_PATH + ‘/generate_tfrecord.py’} -x{IMAGE_PATH + ‘/test’} -l {ANNOTATION_PATH + ‘/label_map.pbtxt’} -o {ANNOTATION_PATH + ‘/test.record’}

Try checking train/test folders and labels information all correct.

I am also facing the same issue, I double-checked my tfrecord before the model training but nothing is wrong with tfrecord.

Please check the dimensionality of output of convolutional layers. I spent a whole day to figure out it. I used Tensorflow 2.4.0 on my PC, and Tensorflow 2.5.0 on Colab, and there were no issue. However, after I updated Tensorflow 2.4 to 2.5 on my PC, this error occurs for the same codes, and I don’t know why. I reinstalled Tensorflow 2.4 and Tensorflow 2.5 more than 20 times following several tutorials on different CUDA versions and CDNN versions but still has this error. I change the data reader method (not Keras, solo Tensorflow) but still give me this error. Then I train different part of my neural network, but still the error. But thanks to God, I deleted the ZeroPadding layer, and get out of the error. Thus, I think Tensorflow 2.5 changes the way to calculate the output dimensions of CNN. Hope it help!
FK Tf.2.5

1 Like

None of the MLIR Optimization Passes are enabled is a bit misleading as it refers to very particular workflow. But it is benign and has no effect - it just means a user didn’t opt in to a specific pass (which is not enabled by default), so it doesn’t indicate any error and was rather used as signal for developers. But seeing this, it is causing more confusion. I’ll go and update the message.

1 Like

Hey! I faced exactly the same situation and freeze at the same point with same messages. Here is a one reason. There is room some other reasons as well.

  1. this is because of a problem with your .record file
  2. check both train.record and test.record contain some capacity(megabytes)
    (in my case i have misspelled the name of the training folder. but the .record generation program managed to produce an empty file. I didn’t noticed)
    simple fix.

thank you!strong text