필터 지우기
필터 지우기

The example 'Solve Partial Differential Equation with LBFGS Method and Deep Learning' doesn't work because the supporting file 'paramsStructToVector' function.

조회 수: 1 (최근 30일)
parametersV = zeros(numParamsTotal,1,'like',parameters.(parameterNames{1}));
The main reason is this code.'parameters.(parameterNames{1})' is a struct lead to the zeros function input specification is not met
  댓글 수: 1
富坤 陈
富坤 陈 2022년 10월 23일
https://www.mathworks.com/help/deeplearning/ug/solve-partial-differential-equations-with-lbfgs-method-and-deep-learning.html

댓글을 달려면 로그인하십시오.

채택된 답변

James Gross
James Gross 2022년 10월 24일
Hello,
The paramsStructToVector helper function converts a struct of learnable parameters to a vector. However, it looks like you have specified parametersV as a vector using zeros.
You will need to specify this variable as a struct before you can use this helper function. The parameterVectorToStruct helper function can be used to convert a vector of parameters with specified names and sizes to a struct.
I hope this information helps! If you need more assistance, could you please confirm if the example as written (i.e. without modification) works on your machine and if you have modified the example in any way? If so, could you please provide additional information as to how you have modified the example (perhaps some example code)?
  댓글 수: 1
富坤 陈
富坤 陈 2022년 10월 25일
Hello! Dear James Gross,
Thank you very much for your help. I have found the problems and I have solved them.
The main question is that I copied the wrong codes from the other example 'Solve Partial Differential Equations Using Deep Learning'. I think these two examples in the first half using the same codes.
Thanks again!

댓글을 달려면 로그인하십시오.

추가 답변 (0개)

카테고리

Help CenterFile Exchange에서 Signal Integrity Kits for Industry Standards에 대해 자세히 알아보기

Community Treasure Hunt

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

Start Hunting!

Translated by