Help Center/
ModelArts/
Troubleshooting/
Training Jobs/
Service Code Issues/
Distributed TensorFlow Cannot Use tf.variable
Updated on 2025-06-06 GMT+08:00
Distributed TensorFlow Cannot Use tf.variable
Symptom
The following error occurs when tf.variable is used across multiple machines or multiple cards:
WARNING:tensorflow:Gradient is None for variable:v0/tower_0/UNET_v7/sub_pixel/Variable:0.Make sure this variable is used in loss computation.
Possible Causes
Distributed TensorFlow needs to use tf.get_variable instead of tf.variable.
Solution
Replace tf.variable in the boot file with tf.get_variable.
Parent topic: Service Code Issues
Feedback
Was this page helpful?
Provide feedbackThank you very much for your feedback. We will continue working to improve the documentation.See the reply and handling status in My Cloud VOC.
The system is busy. Please try again later.
For any further questions, feel free to contact us through the chatbot.
Chatbot