Effacer les filtres
Effacer les filtres

Where can I find a good example of using tied weights in nested layers?

28 vues (au cours des 30 derniers jours)
Joseph Conroy
Joseph Conroy le 10 Juil 2024 à 19:34
Commenté : Matt J le 11 Juil 2024 à 16:51
I could use some guidance on how to use tied weights for an autoencoder. The example provided in the documentation throws several errors within the dlnetwork object it uses. I would appreciate an-up-to-date example of weight tying or guidance on how to update the MathWorks example to function again.
  3 commentaires
Joseph Conroy
Joseph Conroy le 11 Juil 2024 à 16:18
1. First, the `dlnetwork` object is improperly initialized:
"Error using dlnetwork
Invalid argument list. Function requires 1 more input(s).
Error in weightTyingAutoEncoderLayer (line 31)
net = dlnetwork;"
2. If you attempt to resolve this issue by setting `net = dlnetwork(encoderLayers);`, you encounter a different error.
"Error using dlnetwork/initialize
Invalid network.
Error in dlnetwork (line 210)
net = initialize(net, dlX{:});
Error in weightTyingAutoEncoderLayer (line 31)
net = dlnetwork(encoderLayers);
Caused by:
Example inputs: Incorrect number of example network inputs. 0 example network inputs provided but network has 1 inputs including 1 unconnected layer inputs.
Layer 'fc_1': Unconnected input. Each input must be connected to input data or to the output of another layer."
Matt J
Matt J le 11 Juil 2024 à 16:51
Did you try my code below?

Connectez-vous pour commenter.

Réponse acceptée

Matt J
Matt J le 10 Juil 2024 à 22:43
The example at your link is for R2024a, but the version of Matlab you are running is only R2023b.
  1 commentaire
Matt J
Matt J le 10 Juil 2024 à 23:14
Modifié(e) : Matt J le 10 Juil 2024 à 23:16
Here are downgraded versions of the code files compatible with R2023b.

Connectez-vous pour commenter.

Plus de réponses (0)

Catégories

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

Produits


Version

R2023b

Community Treasure Hunt

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

Start Hunting!

Translated by