Change Deep Learning classifier layer?

2 Ansichten (letzte 30 Tage)
Hamid Salimi
Hamid Salimi am 29 Okt. 2020
Beantwortet: Avadhoot am 24 Jan. 2024
How can I use my own classifier instead of default Deed classifier in the last layer of CNN? In fact, I want to design my CNN with my own classifer method to force CNN to extract features appropriate with my classifer!
I do not want to use the activation function to extract the last layer features after training CNN. Is it a possible way?
Best,
Hamid

Antworten (1)

Avadhoot
Avadhoot am 24 Jan. 2024
Hi Hamid,
I understand that you need to implement your own classification layer in your network. You can write your own classification output layer in MATLAB. For that you will need to provide the following details while defining the layer:
  1. Name: A suitable name for the layer.
  2. Layer properties: Define the properties of the layer which can be used in the functions.
  3. Constructor (optional) : Define a constructor to execute initialization code.
  4. Forward loss function : Define the loss function for forward pass.
  5. Backward loss function (optional) : Define the derivative of the loss function for back propagation.
You can refer to the following documentation for more details on how to create and include a custom classification layer in a neural network:
I hope it helps.

Kategorien

Mehr zu Deep Learning Toolbox finden Sie in Help Center und File Exchange

Produkte


Version

R2018b

Community Treasure Hunt

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

Start Hunting!

Translated by