carrenD/Medical-Cross-Modality-Domain-Adaptation

ValueError: At least two variables have the same name: BatchNorm/beta

ljc1231 opened this issue · 4 comments

when run source_segmenter.py,
"if last_ckpt and last_ckpt.model_checkpoint_path:
self.net.restore(sess, last_ckpt.model_checkpoint_path)"
showed the error"saver = tf.train.Saver(tf.contrib.framework.get_variables() + tf.get_collection_ref("internal_batchnorm_variables") )",
and i find the following code in restore lead this problem
"saver = tf.train.Saver(tf.contrib.framework.get_variables() + tf.get_collection_ref("internal_batchnorm_variables") )"

Hi, could you please let me know which version of Tensorflow are you using? The code is based on 1.4.0 and a higher version might lead to this problem.

Hi, could you please let me know which version of Tensorflow are you using? The code is based on 1.4.0 and a higher version might lead to this problem.

my tensorflow version is 1.14, i have solved this problem, thx!
can you provide the preprocess code like how to read .nii profile ,slice it into 2D slice and augmentation. I want to do the same process to the other dataset, but it maybe some difficult for me.

#12 Please see the process shown here. For 2D augmentation, we basically applied slight 2D random affine transforms.

Hi, could you please let me know which version of Tensorflow are you using? The code is based on 1.4.0 and a higher version might lead to this problem.

my tensorflow version is 1.14, i have solved this problem, thx! can you provide the preprocess code like how to read .nii profile ,slice it into 2D slice and augmentation. I want to do the same process to the other dataset, but it maybe some difficult for me.

Excuse me,how did you solve the problem 'variables have the same name'