1
$\begingroup$

I was wondering if there was a way that I can get my CNN encoder-decoder neural network to completely ignore certain values in my data (2d images).

There are some pixel values of 0 that never change from the input to the target. They are meant to be ignored. I've tried some self attention layers and I even multiply the 'mask' image at the end of the encoder-decoder network, but it still does not ignore these values, causing a lot of unnecessary noise and inaccuracy in my results.

How can I ensure these values are being ignored at every convolutional layer?

$\endgroup$
2
  • 2
    $\begingroup$ How do you know that these pixels are the cause of the inaccuracy? What do you mean by "noise"? Is your network an autoencoder? $\endgroup$
    – noe
    Apr 27, 2021 at 6:28
  • $\begingroup$ If the input value is zero in every image, I’m having trouble imagining how it isn’t ignored. Every filter applied to that pixel finds up multiplying by zero in every image. $\endgroup$
    – Dave
    Nov 11, 2021 at 20:25

2 Answers 2

0
$\begingroup$

CNNs work because of those zeros (the zeros create the boundary on which the change is values is the highest i.e. what networks learn). They are not the problem. Look at your regularizing your network (use dropout, reduce filters if overfitting or increase if underfitting).

$\endgroup$
0
$\begingroup$

My experience - I struggled with a similar issue some time ago in a different problem, where I wanted my network to ignore part of the input data. I tried a few approaches: setting a constant small number in an ignored place, setting a constant big number in an ignored place or setting a mask with random numbers. As far as I remember, setting big numbers in these places worked best and random masks surprisingly badly, but you might experiment with each of these approaches.

$\endgroup$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.