Change number of output classes in Squeezenet?
조회 수: 9 (최근 30일)
이전 댓글 표시
I want to retrain a slightly modified squeezenet on the CIFAR100 dataset. Here are the last few layers of Squeezenet:
![](https://www.mathworks.com/matlabcentral/answers/uploaded_files/523877/image.jpeg)
Usually, a fully connected layer is replaced to change the number of output classes, or the pooling layer is changed. However, MATLAB's Deep Network Designer doesn't give any options to adjust output size of the globalAveragePooling2dLayer. And Squeezenet doesn't have any fully connected layers.
My question is, how do I change the network output class size from 1000 (imagenet) to 100 (cifar100)?
댓글 수: 1
Manav Madan
2022년 6월 22일
First store the values set for different features in last 4 layer the "convolution2dLayer" then delete and select a new "convolution2dLayer" where copy rest of the values for parameters and change "NumFilters" to the number of classes you have.
답변 (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!