Error Network: Missing output layer
조회 수: 14 (최근 30일)
이전 댓글 표시
I am creating an autoencoder where I want to use the Alexnet network for the encoder part (removing the last layers), and when I try to train the autoencoder, I get the error:
"Error using trainNetwork
Invalid network.
Caused by:
Network: Missing output layer. The network must have at least one output layer.
Layer 'output': Unconnected output. Each layer output must be connected to the input of another layer."
However, I do see the output layer of the decoder connected when I visualize the network graph before training.

Please, your help on how to solve the problem. Thank you.
댓글 수: 3
Cris LaPierre
2023년 12월 28일
이동: Matt J
2023년 12월 28일
What do you want the output of your network to be? The output options can be viewed here:
답변 (1개)
Matt J
2023년 12월 28일
편집: Matt J
2023년 12월 29일
The "output layer" referred to by the error message doesn't refer to the final decoder in the network. An output layer is a specific type of layers that implements a loss function for the purpose of training,
You must have one of these as the final layer in your network, so that trainNetwork knows what loss function to use.
댓글 수: 0
참고 항목
카테고리
Help Center 및 File Exchange에서 Deep Learning Toolbox에 대해 자세히 알아보기
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!