microsoft / Recursive-Cascaded-Networks

[ICCV 2019] Recursive Cascaded Networks for Unsupervised Medical Image Registration
https://arxiv.org/abs/1907.12353
MIT License
362 stars 87 forks source link

when I set aug = 'identity' or aug is None, the validation results using your model is exeactly the same #6

Closed Dongshengjiang closed 4 years ago

Dongshengjiang commented 4 years ago

when I set aug = 'identity' or aug is None, the validation results using your model is exeactly the same. is the augmentation not work rightly?

zsyzzsoft commented 4 years ago

The augmentation only affects the training phase. We're not doing augmentation in validation.

Dongshengjiang commented 4 years ago

But I indeed found that the below code is still running in validate phase, and I did not find any code distincting training and validating phase.

"control_fields = transform.sample_power( -0.4, 0.4, 3, tf.stack([bs, 5, 5, 5, 3])) * (np.array(imgs) // 4) augFlow = transform.free_form_fields(imgs, control_fields)"

zsyzzsoft commented 4 years ago

Yes, it's expected to run once when building TF graph, but the actual operation is conditioning on the training mode (see framework.py, line 57 and 67).

Dongshengjiang commented 4 years ago

o, I see. Thank you very much for your help!