pythonlessons / TensorFlow-2.x-YOLOv3

YOLOv3 implementation in TensorFlow 2.3.1
https://pylessons.com/
MIT License
607 stars 327 forks source link

Converted Model (SavedModel) works only on CPU #194

Closed ktobah closed 1 year ago

ktobah commented 1 year ago

If you converted the model to the SavedModel format and you noticed your model predicts fine on the CPU, but only predicts the first image/frame on the GPU, then when converting:

  1. Run the script on a machine with a GPU (os.environ["CUDA_VISIBLE_DEVICES"] = '0')
  2. Use the docker image tensorflow/tensorflow:2.3.0rc0-gpu (you need to use tensorflow 2.3.0rc0-gpu)

After that the prediction worked both on CPU and GPU and for all images/frames (not only the first one).