How to manage NaNs in responses training a convolutional neural network?

4 ビュー (過去 30 日間)
Leo Pio D'Adderio
Leo Pio D'Adderio 2022 年 10 月 17 日
コメント済み: KSSV 2022 年 10 月 17 日
Hello,
I am training a UNET for regression. I am facing the issue of managing the NaNs in the responses (reference) data. My input data is a 4-D matrix (48x48x9xN), while the reference is always a 4-D matrix (48x48xx1xN). A number of the reference images (i.e. some of the N 48x48 images) are partially filled, it means that some values are NaN.
When I start the trining process I get the following error message:
"Invalid training data. Responses must not contain NaNs."
Is there a way to manage NaNs? It is important to highlight that the input pixels corresponding to reference NaN pixel, are not NaN but have reliable values.
Thanks.
Leo Pio

回答 (1 件)

KSSV
KSSV 2022 年 10 月 17 日
You can fill NaN's using either fillmissing, interp2. Also have a look on the fileexchange: https://in.mathworks.com/matlabcentral/fileexchange/15590-fillnans
  2 件のコメント
Leo Pio D'Adderio
Leo Pio D'Adderio 2022 年 10 月 17 日
I cannot replace NaN's with anything. Consider a 48x48 image, supposing that the upper triangle of reference data is all NaN, while the lower triangle has reliable values. I would that the network trained only on the lower triangle, but the image size must be always 48x48.
KSSV
KSSV 2022 年 10 月 17 日
Replace NaN's with zeros then.
A(isnan(A))=0 ;

サインインしてコメントする。

カテゴリ

Help Center および File ExchangeStatistics and Machine Learning Toolbox についてさらに検索

タグ

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by