Open JinMengKang opened 6 years ago
Hi, in fact it is a trick to define the masked region in feature space. Always, the simplest way is directly resizing the mask. However, in fact the border of masked and unmasked region is blur as convolution makes information spread from outside into inside. As we use convolutions with 4*4 kernels. We process the mask with the similar operation(with 4*4 convs) as how we process the input image. So we need to fill them with '1/16'. In this case, if the window of the conv falls totally in the masked region, it gets '1' everywhere. If the window falls partly in the masked region, it gets a decimal number. A threshold is set to figure out the border.
Why is the maskModel weight = 1/16? Like this -> netG.modules[41].weight:fill(1/16) (train.lua Line 152) Thank you for your patient answer.