필터 지우기
필터 지우기

Can we plot the output of in-between layers in deep neural network?

조회 수: 8 (최근 30일)
I have a deep neural network having 297 layers. I want to visualize the output of some of the layers that are in-between this network for analysis purpose. Is it possible way to do that? Or should I create the network upto the layer where I want to take the output and plot the output using the 'plot' command?

채택된 답변

Antoni Woss
Antoni Woss 2023년 9월 14일
You can access the intermediate activations of a network by setting the name-value argument, Outputs, in the predict call. See the following documentation page for examples on this syntax: https://uk.mathworks.com/help/deeplearning/ref/dlnetwork.predict.html#d126e63879. You can select 1 or many layers for which to extract these intermediate activations using this name-value argument.
  댓글 수: 2
BIPIN SAMUEL
BIPIN SAMUEL 2023년 9월 19일
편집: BIPIN SAMUEL 2023년 9월 19일
Thank You @Antoni Woss, do we have to train again the network upto the layer where we want to get the output? or can we directly use "predict" command with argument 'Outputs' in the %Testing% session after %Training% the whole network?
Also, in function shown below what does "using any of the previous syntaxes" (in the comment session) means?
[Y1,...,YK] = predict(___,Outputs=layerNames) %returns the outputs Y1, …, YK during inference for the specified layers using any of the previous syntaxes.
Antoni Woss
Antoni Woss 2023년 9월 19일
No, you do not need to retrain the network. The command will just returned the intermediate activations of the network passed to the function on the layer specified. If the network is a trained network, then the activations will be that of the trained network.
The "using any of the previous syntaxes" refers to the positional argument syntaxes in the documentation page. It means that you can use the name-value arguments with any of the previously defined syntaxes.

댓글을 달려면 로그인하십시오.

추가 답변 (0개)

카테고리

Help CenterFile Exchange에서 Pattern Recognition and Classification에 대해 자세히 알아보기

Community Treasure Hunt

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

Start Hunting!

Translated by