How to mask an area (or NAN) in the input of a CNN model

Hi all,

I wonder if we can mask an area in the input fields of a convolutional network. The reason is that I want to see if there is any predictability out of this masked area. I was thinking fill in zeros in the masked area. Is there any better method other than that?

Thanks!

In my understanding, if the input is normalized to be zero-mean (either by subtracting mean, std from train set or ImageNet), you could fill it with zeros (the mean-value).

Hi,

Thanks for your reply and I filled it with zeros. The problem is the model focus on the edge of zeros and non-zeros, and I think that’s because of the sharp gradient of this area. Do you have any other ideas?

Thanks.

By focus, I mean the visualization with integrated gradient shows high attribution near the edge.