multiplicationLayer - multiply by a constant
2 ビュー (過去 30 日間)
古いコメントを表示
I'm trying to implement a neural net in which a layer multiplies every input by a constant. There is a multiplicationLayer net in the Deep Learning Toolbox which can have any number of inputs, but I cannot connect one of those inputs to a constant of any type.
TIA!
0 件のコメント
回答 (1 件)
Harsh
2025 年 1 月 30 日
Hi Jeffrey,
A “multiplicationLayer” multiplies inputs from multiple neural network layers elementwise. You can create a custom layer using “nnet.layer.Layer” and in the “predict” function for that layer you can multiply the input by a constant. For more information regarding how to create a custom layer please check the following documentation - https://www.mathworks.com/help/deeplearning/ug/define-custom-deep-learning-layers.html
Hope this resolves your query!