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

3 views (last 30 days)
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 Comments
Joseph Conroy
Joseph Conroy on 11 Jul 2024
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."

Sign in to comment.

Accepted Answer

Matt J
Matt J on 10 Jul 2024
The example at your link is for R2024a, but the version of Matlab you are running is only R2023b.

More Answers (0)

Categories

Find more on Image Data Workflows in Help Center and File Exchange

Products


Release

R2023b

Community Treasure Hunt

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

Start Hunting!