is there a substraction operation between Deep Learning layers?

Hi guys,
I'm trying to build a DeepLearning network which contains a subtraction operation between two layers, and I can't find a way to do that while MATLAB has just an addition operation (additionLayer)?
for more clarification, the equation below discribes the step that I should do:
C = X - AvgPooling(X)
any suggestions guys?

2 件のコメント

Ullah Nadeem
Ullah Nadeem 2024 年 6 月 13 日
Hello ihssane houhou, had you resolved this issue? If yes, how please I need to do it as well.
ihssane houhou
ihssane houhou 2024 年 6 月 13 日
At that time I didn't find a solution so I switched to Python (TensorFlow) witch what I recommand you to do (and it's better if you go for Pytorch instead of TensorFlow)
BTW I just checked again for a subtruction layer in Matlab 2024 and it seems they didn't add it till now
Good luck

サインインしてコメントする。

回答 (1 件)

Hao You
Hao You 2020 年 10 月 10 日

0 投票

I think maybe you can define a custom layer that implement a layer multiplicated by -1, then use additionLayer to get what you want.

カテゴリ

ヘルプ センター および File ExchangeDeep Learning Toolbox についてさらに検索

質問済み:

2019 年 6 月 22 日

コメント済み:

2024 年 6 月 13 日

Community Treasure Hunt

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

Start Hunting!

Translated by