Matrix multiplication of a dlarray object in a custom loss function
6 ビュー (過去 30 日間)
古いコメントを表示
Sebastian Rosier
2022 年 10 月 11 日
回答済み: Sebastian Rosier
2022 年 10 月 17 日
Hi,
I have written a deep learning training loop with a custom loss function. Within this loss function, the output of my basic feedforward network is a dlarray matrix ~50(C) x 2000(B). The 50 channels in this matrix are a condensed representation of my desired output, which is a larger ~1500(C) x 2000(B) matrix. The matrix product of the output of my feedforward network with another (known) matrix gets me to this desired matrix, and from this I would like to calculate the mse loss. Essentially I need to reverse the eigendecomposition and calculate loss for that larger matrix, followed by a call to dlgradient to train my network. From reading documentation it seems that mtimes is not fully supported with dlarray objects. Am I missing an obvious alternative way to do what I want? I can manually do the matrix multiplication using scalar multiplication within loops but this is hopelessly slow. I would have expected this to not be an unusual step within custom training loops... can anyone suggest a way to accomplish this?
Many thanks!
0 件のコメント
採用された回答
その他の回答 (0 件)
参考
カテゴリ
Help Center および File Exchange で Image Data Workflows についてさらに検索
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!