필터 지우기
필터 지우기

the error appears in defining weightedAdditionLayer

조회 수: 1 (최근 30일)
li
li 2019년 6월 20일
답변: Gabija Marsalkaite 2019년 7월 2일
hi, i have defined the weightedAdditionLayer according to the code provided in the help document, but a error'Incorrect number of input arguments for 'backward' in Layer weightedAdditionLayer. Expected to have 5, but instead it has 2.' appears, why?

답변 (1개)

Gabija Marsalkaite
Gabija Marsalkaite 2019년 7월 2일
Assuming you have a layer with two inputs (input1 and input2) and one output, 'backward' expects layer, input1, input2, output, dLdz, memory, but if any of them is not used, it can be replaced with ~ e.g. backward(~, ~,~,~,dLdz,~).
This documentation page may help you: https://www.mathworks.com/help/deeplearning/ug/define-custom-deep-learning-layers.html
If that does not solve your problem, could you share your code?

카테고리

Help CenterFile Exchange에서 Image Data Workflows에 대해 자세히 알아보기

Community Treasure Hunt

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

Start Hunting!

Translated by