TannerGilbert / Tensorflow-Object-Detection-API-Train-Model

Train a object detection model with the Tensorflow Object Detection API and Tensorflow 2.
https://gilberttanner.com/blog/creating-your-own-objectdetector
MIT License
192 stars 103 forks source link

Getting Error 'Function call stack: _dummy_computation_fn' after step 6 of your tutorial "Training the model" #27

Closed rrsc1234 closed 3 years ago

rrsc1234 commented 3 years ago

Hi. I have followed the steps what you have mentioned in your tutorial on my windows 10 machine with tensorflow version 2.4.1. My image size (train + test images) is 750p x 750p and hence I have used "ssd_efficientdet_d2_768x768_coco17_tpu-8.config" model instead of "ssd_efficientdet_d0_512x512_coco17_tpu-8.config". Everything else remain the same as mentioned in your tutorial. But after running the final training the model command, I am getting the following error as attached in the text file.

error.txt

Can you please tell me what is the issue and how to solve it.

rrsc1234 commented 3 years ago

Hi @TannerGilbert . After doing some searching in internet I added following lines in my model_main_tf2.py and after this the above error message has gone.

try:
    tf_gpus = tf.config.list_physical_devices('GPU')
    for gpu in tf_gpus:
        tf.config.experimental.set_memory_growth(gpu, True)
except:
    pass

But after this I am getting the error as shown in the file.

error_gpu_memory.txt

Kindly help me in resolving this matter.

rrsc1234 commented 3 years ago

After doing some search on internet, I found that both CPU & GPU versions were installed in my system environment and hence I was getting above error. Uninstalling one solved my issue.