フィルターのクリア

Question LSTM Experiment Manager

1 回表示 (過去 30 日間)
JESÚS MARÍA
JESÚS MARÍA 2024 年 2 月 16 日
コメント済み: JESÚS MARÍA 2024 年 2 月 27 日
Why do I get an error in this function if I put 'trainingData' as the first parameter. Do I need this parameter to collect it in Accuracy, function metricOutput = Accuracy(trialInfo)? It works if I put input-output values xval, yval, but I need in Accuracy the value that 'trainNetwork' returns and assigns to 'trainingData'.
function [trainingData,layers,options] = Experiment1_setup1(params)
Thank you

回答 (1 件)

Manikanta Aditya
Manikanta Aditya 2024 年 2 月 26 日
Hi Maria,
The error you are encountering is likely due to the mismatch between the expected parameters of the 'Accuracy' function and what you're trying to pass into it.
If your 'Accuracy' function is defined as 'metricOutput = Accuracy(trialInfo)', then it expects a single input parameter 'trialInfo. If you want to pass the 'trainingData' from the 'trainNetwork' function to 'Accuracy', you need to ensure that 'trainingData' is part of 'trialInfo' or redefine the 'Accuracy' function to accept 'trainingData' as an input.
Here’s an example of how you might modify the 'Accuracy' function:
function metricOutput = Accuracy(trainingData, trialInfo)
% Your code here
end
Hope it helps!
  1 件のコメント
JESÚS MARÍA
JESÚS MARÍA 2024 年 2 月 27 日
Thank you so much

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

カテゴリ

Help Center および File ExchangeDeep Learning with GPU Coder についてさらに検索

タグ

Community Treasure Hunt

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

Start Hunting!

Translated by