文档首页> AI开发平台ModelArts> 故障排除> 训练作业> 业务代码问题> 分布式Tensorflow无法使用“tf.variable”
更新时间:2024-04-30 GMT+08:00
分享

分布式Tensorflow无法使用“tf.variable”

问题现象

多机或多卡使用“tf.variable”会造成以下错误: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.

图1 分布式Tensorflow无法使用

原因分析

分布式Tensorflow不能使用“tf.variable”要使用“tf.get_variable”

处理方法

请您将“启动文件”中的“tf.variable”替换为“tf.get_variable”

分享:

    相关文档

    相关产品