Is it possible to get the ouput values of a convolutional layer for a given input?
13 visualizaciones (últimos 30 días)
Mostrar comentarios más antiguos
I am currently in the process of implementing a convolutional-autoencoder using layers from the MATLAB Deep Learning toolbox. I have a series of convolutional layers after the encoder portion of the autoencoder to convert the output to an NxN grid. In order to test this network on real data, I need to feed the outputs of this layer into an NxN pixel grid, and in order to do this I need to be able to view the output of the first half of my network. Below is my layer structure. Does anyone have any recommendations as to how I might get the information that I want from this network?
layers = [
imageInputLayer([inputSize 1], 'Normalization','none')
fullyConnectedLayer(16*N^2)
reluLayer
convert1d2dLayer % convert from fully connected to usable by convolution layers
convolution2dLayer(3, inputSize, 'Padding', 1)
batchNormalizationLayer
reluLayer
maxPooling2dLayer(2, 'Stride', 2)
convolution2dLayer(3, 2*inputSize, 'Padding', 1)
batchNormalizationLayer
reluLayer
maxPooling2dLayer(2, 'Stride', 2)
convolution2dLayer(3, 1, 'Padding', 1)
sigmoidLayer('sigmoid') % custom sigmoid activation layer
% ---end of encoder--- %
transposedConv2dLayer(16, inputSize, 'Stride', 16) % upsampling
% ---start of decoder--- %
convolution2dLayer(5, 2*inputSize, 'Padding', 2)
batchNormalizationLayer
reluLayer
maxPooling2dLayer(2, 'Stride', 2)
convolution2dLayer(3, inputSize, 'Padding', 1)
batchNormalizationLayer
reluLayer
maxPooling2dLayer(2, 'Stride', 2)
fullyConnectedLayer(inputSize)
fullyConnectedLayer(inputSize)
softmaxLayer
classificationLayer];
0 comentarios
Respuestas (1)
Jayanti
el 22 de Ag. de 2025
Hi Ian,
I understand that you want to obtain the output values of an intermediate layer for a given input.
The recommended approach is to use "minibatchpredict" function. This allows you to directly extract the results from any layer in your network.
I am also attaching offical MathWorks documentation link on "minibatchpredict" for your reference:
Hope this help!
0 comentarios
Ver también
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!