3
$\begingroup$

Currently, I am using a U-Net with skips to predict images. These images are based on data from 30 minutes prior. Most of the true image is filled with 0, with a range of approximately [0,50]. The network predicts low, non-zero values everywhere, since this apparently is not heavily penalized by the loss function. I am trying to figure out how to modify the network as to get around this problem, by creating a custom loss function. Or some other way?

Similar, but heavy shmearing in the prediction

I am also working on modifying the data, so that I can use a classification scheme instead of regression. However, I would really prefer to use regression here. I am also experimenting with normalizing the data between [0, 1].

Further info: For regression, I am using MSE as loss. The network appears to learn on the training data fairly well (as training loss falls), but reaches a limit on validation data. No form of regularization has caused the network to cease overfitting. I'ved used L2 reg, L1 reg, and dropout.

Model Summary

$\endgroup$
9
  • 1
    $\begingroup$ Have you tried scaling the targets to $[0,1]$ and using binary cross-entropy loss? Essentially, this makes the targets soft binary labels; this scheme can work better for some image tasks like this (canonically, MNIST autoencoders). $\endgroup$
    – Sycorax
    Commented Jul 8, 2021 at 15:48
  • $\begingroup$ That is one of the tasks I'm working on; pretty big dataset takes some time. However, this would turn into a binary classification problem that way, right? $\endgroup$
    – McM
    Commented Jul 8, 2021 at 15:51
  • $\begingroup$ I don't see it as binary classification. You can take many values in the interval $[0,1]$, not just the $0$ and $1$. $\endgroup$
    – Dave
    Commented Jul 8, 2021 at 15:52
  • 2
    $\begingroup$ Even in a binary classification task, accuracy is not very informative. stats.stackexchange.com/questions/312780/… You can still measure the MSE or MAE or whatnot, but they just wouldn't be used for the loss or backprop computations. $\endgroup$
    – Sycorax
    Commented Jul 8, 2021 at 16:01
  • 1
    $\begingroup$ And what @Sycorax writes is true, even for balanced classes. $\endgroup$
    – Dave
    Commented Jul 8, 2021 at 16:09

0

Your Answer

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