Convert a custom neural network to a dlnetwork or a layer of dlnetwork
45 Ansichten (letzte 30 Tage)
Ältere Kommentare anzeigen
SHC
am 2 Dez. 2024 um 16:41
Beantwortet: Angelo Yeo
am 3 Dez. 2024 um 11:12
Hi,
Is there a way to a convert a custom neural network to a dlnetwork or as a layer of a dlnetwork?
For example, I want to convert a simple custom neural network like below
net = network(1, 1, [0],[1],[0],[1]); % the number of input feature is 2.
to a dlnetwork or a layer of a dlnetwork.
I want this because I need a not-fully-connected-layer for dlnetworks.
I could make a not-fully-connected-layer easily using custom neural networks, but I could not use a custom loss function with custom neural networks.
I know that I can set all initial weights to 0, and disable updating all weights of a layer in dlnetwork by setting setLearnRateFactor of weghts to 0, but I could not set it for individual weights.
Thanks in advance.
0 Kommentare
Akzeptierte Antwort
Angelo Yeo
am 3 Dez. 2024 um 11:12
The ability to convert shallow neural network to dlnetwork is not available in Deep Learning Toolbox.
FYI, check out the linked doc to learn how to define custom deep learning layers: Define Custom Deep Learning Layers
0 Kommentare
Weitere Antworten (0)
Siehe auch
Kategorien
Mehr zu Image Data Workflows finden Sie in Help Center und File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!