the error appears in defining weightedAdditionLayer

1 vue (au cours des 30 derniers jours)
li
li le 20 Juin 2019
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?

Réponses (1)

Gabija Marsalkaite
Gabija Marsalkaite le 2 Juil 2019
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?

Catégories

En savoir plus sur Image Data Workflows dans Help Center et File Exchange

Community Treasure Hunt

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

Start Hunting!

Translated by