Joker316701882 / Deep-Image-Matting

This is tensorflow implementation for paper "Deep Image Matting"
626 stars 188 forks source link

UPDATE_OPS #18

Open Theophile88 opened 6 years ago

Theophile88 commented 6 years ago

The code isn't missing something like:

update_ops = tf.get_collection(tf.GraphKeys.UPDATE_OPS) with tf.control_dependencies(update_ops): train_op = tf.train.AdamOptimizer(learning_rate = 1e-5).minimize(total_loss,global_step = global_step)

to ensure correct statistics during BN at test time?

Joker316701882 commented 6 years ago

@Theophile88 Yeah that's right! Here the training_batch size is set as 1, so this can be considered as using local statistics instead of moving statistics. At testing time, BN is still in training mode, so local statistics are also applied. I tried using moving statistics of BN with batch size >1, there is no big difference according to experiment. And as other issues mentioned, one main problem for not good performance is that I should use 'original size image inference' at test time instead of resized image.