Skip to content

ValueError: colocate_vars_with must only be passed a variable created in this tf.distribute.Strategy.scope() #4

@XJX777

Description

@XJX777

您好,我在使用您arcface tf2.0版本完成了tfrecord的转换,在使用train_mutigpus训练的时候出现了报错,错误如下:
train_multigpu.py:92 train_step
step_fn, args=(_images, _labels, _regCoef,))
train_multigpu.py:87 step_fn
zip(gradients, model.trainable_variables))
ValueError: colocate_vars_with must only be passed a variable created in this tf.distribute.Strategy.scope(), not: <tf.Variable 'train_model/arcfacelayer/kernel:0' shape=(512, 85742) dtype=float32, numpy=array......................................................................., dtype=float32)>
请问您知道这是什么问题吗?我目前查下来不知道怎样去解决,感谢您的分享!

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions