Matrix multiplication of a dlarray object in a custom loss function
조회 수: 7 (최근 30일)
이전 댓글 표시
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!