主要内容

view

Class: Autoencoder

(To be removed) View autoencoder

view will be removed in a future release. For more information, see Transition Legacy Neural Network Code to dlnetwork Workflows.

For advice on updating your code, see Version History.

Description

view(autoenc) returns a diagram of the autoencoder, autoenc.

example

Input Arguments

expand all

Trained autoencoder, specified as an Autoencoder object.

Examples

expand all

Load the training data.

X = iris_dataset;

Train an autoencoder with a hidden layer of size 5 and a linear transfer function for the decoder. Set the L2 weight regularizer to 0.001, sparsity regularizer to 4 and sparsity proportion to 0.05.

hiddenSize = 5;
autoenc = trainAutoencoder(X, hiddenSize, ...
    'L2WeightRegularization',0.001, ...
    'SparsityRegularization',4, ...
    'SparsityProportion',0.05, ...
    'DecoderTransferFunction','purelin');

Figure Neural Network Training (24-Jan-2026 18:21:57) contains an object of type uigridlayout.

View the autoencoder.

view(autoenc)