Convolutional autoencoder layers and training options

26 vues (au cours des 30 derniers jours)
Kenneth Afebu
Kenneth Afebu le 16 Oct 2020
Commenté : Artem Lensky le 30 Mai 2021
Hi all;
Please can anyone help me with a typical convolutional autoencoder code including its "layers array" and "training options" execuitable on MATLAB while also pointing out the encoding and decoding parts of the layers.
I have been trying to do so but I have not been able as I am new to it.
Thanks in advance.

Réponses (1)

Chidvi Modala
Chidvi Modala le 27 Oct 2020
Hi Kenneth,
You can make use of Autoencoder object containing an autoencoder network, which consists of an encoder and a decoder.
  • To create an Autoencoder, you may use trainAutoEncoder(X), which returns an autoencoder trained using the training data X.
  • To specify the parameters that trainAutoEncoder uses for training the autoencoder, you may use TrainingParameters property.
  • For encoding, you may use encode(autoenc,Xnew) which returns the encoded data for the input data Xnew, using the autoencoder, autoenc.
  • For decoding, you may use decode(autoenc,Z) which returns the decoded data using the autoencoder, autoenc.
You can define custom architecture of autoencoder using deep learning layers. You can refer to this documentation for the list of deep learning layers supported in MATLAB. For example, a convolutional layer can be created as
layer = convolution2dLayer(11,96,'Stride',4)
% Includes a convolutional layer in a layers array
layers = [
imageInputLayer([28 28 1])
convolution2dLayer(5,20)
reluLayer
maxPooling2dLayer(2,'Stride',2)
fullyConnectedLayer(10)
softmaxLayer
classificationLayer];
You can use 2D / 3D conv layer/ any other layer as per your architecture. After defining the network, you can train the model. You can refer to this documentation .
Hope it helps!
  1 commentaire
Artem Lensky
Artem Lensky le 30 Mai 2021
You are referring to the toolbox that implements shallow networks, and it does not provide CNN layers. Can someone among the experienced staff please address this question?

Connectez-vous pour commenter.

Catégories

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

Community Treasure Hunt

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

Start Hunting!

Translated by