-
Notifications
You must be signed in to change notification settings - Fork 45.8k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Unable to use "mixed_float16" in Object detect API #11215
Labels
Comments
tq3940
added
models:research
models that come under research directory
type:bug
Bug in the code
labels
Jun 2, 2024
I am training the pre-trained model: centernet_hg104_512x512_coco17_tpu-8 |
I repeated my first attempt again that adding
HOWEVER! The same error appeared again!!
WHY??? 😭😭😭 Who can help me?? I need your help! |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Labels
Prerequisites
Please answer the following questions for yourself before submitting an issue.
1. The entire URL of the file you are using
https://github.com/tensorflow/models/tree/master/research/object_detection
2. Describe the bug
I'm trying to use "mixed_float16" to speed up my training on RTX 4090. Following the guide of official document of mixed_precision , I add the code:
mixed_precision.set_global_policy('mixed_float16')
in front oftf.compat.v1.app.run()
in my train_tf2.py. However, the tensorflow reborted the following error:I also tried to add this code:
tf.compat.v2.keras.mixed_precision.set_global_policy('mixed_float16')
, which I modified on the basis oftf.compat.v2.keras.mixed_precision.set_global_policy('mixed_bfloat16')
found in the file model_lib_v2.pyor add Environment variables by
os.environ['TF_ENABLE_AUTO_MIXED_PRECISION'] = '1'
, which was suggesd in this answerBut all of my attempt have failed with above error. I want to know how to solve this issue.
3. Steps to reproduce
add the code:
mixed_precision.set_global_policy('mixed_float16')
in front oftf.compat.v1.app.run()
in my train_tf2.py.4. Expected behavior
The model can be trained in "mixed precision" mode.
5. Additional context
None
6. System information
The text was updated successfully, but these errors were encountered: