Convolutional autoencoder layers and training options

32 visualizaciones (últimos 30 días)
Kenneth Afebu
Kenneth Afebu el 16 de Oct. de 2020
Comentada: Artem Lensky el 30 de Mayo de 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.

Respuestas (1)

Chidvi Modala
Chidvi Modala el 27 de Oct. de 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 comentario
Artem Lensky
Artem Lensky el 30 de Mayo de 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?

Iniciar sesión para comentar.

Categorías

Más información sobre Image Data Workflows en Help Center y File Exchange.

Community Treasure Hunt

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

Start Hunting!

Translated by