필터 지우기
필터 지우기

The output size of the last layer doesn't match the number of classes

조회 수: 1 (최근 30일)
Mihai Mihaela
Mihai Mihaela 2019년 12월 1일
Hello,
I used one pretrained network (vgg16) for my set of images. Vgg16 is trainned with 11 classes.
I want to redefine the number of classes to be 6. The problem appear at the last layer: the number of classes from the last Layer is 11, not 6.
I tried something like:
layersMine(2,1).ClassWeights = length(classNames);
layerMine(2,1).ClassNames(1:6) = classNames
How can I change the number of classes from the last layer to 6?
Can I redefine the last layer (classificationLayer)? How?

답변 (0개)

카테고리

Help CenterFile Exchange에서 Image Data Workflows에 대해 자세히 알아보기

Community Treasure Hunt

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

Start Hunting!

Translated by