High error when evaluate mode with importNetworkFromPyTorch

7 Ansichten (letzte 30 Tage)
Son Pham
Son Pham vor etwa 16 Stunden
Hi Matlab community,
I've built a simple regression model with pyTorch, and saved it to 'model.pt'. Then, I import it using importNetworkFromPyTorch and initialize with train data.
inputData = X_train';
dlX = dlarray(inputData, 'CB');
net = initialize(net, dlX);
After having the net file, I added it Predict Block in simulink here: Predict
The result for regression is not good compare to result that I validate with python. I don't know if I did anything wrong here.
What happens when we initialize the network? do we need to use train data to set correct weights? Looking forward to hearing from you

Antworten (0)

Produkte


Version

R2024a

Community Treasure Hunt

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

Start Hunting!

Translated by