Different behavior of 'activations' function of Neural Network Toolbox between 2017b and 2018a.
조회 수: 1 (최근 30일)
이전 댓글 표시
If I tried CNN sample code obtained here, I got error on 2018a and not on 2017a. Is it a bug or expected behavior? How can I fixed it on 2018a?
- Obtained sample code here.https://jp.mathworks.com/matlabcentral/fileexchange/57280-cnn---transfer-learning-example
- Run classifyFlowers.m
- Hit following error
Error: classifyFlowers (line 39)
classifier = fitcsvm(trainingFeatures, trainingSet.Labels);
Findings:
I found that the size of matrix of returned value from 'activations' function was different.
trainingFeatures = activations(convnet, trainingSet, featureLayer, 'MiniBatchSize', 1);
2017b (Expected):
>> size(trainingFeatures)
ans =
112 4096
2018a (Not Expected):
>> size(trainingFeatures)
ans =
1 1 4096 112
댓글 수: 0
채택된 답변
Johannes Bergstrom
2018년 5월 4일
This is the expected behavior. Please see the release notes under 'Functionality Being Removed or Changed', https://www.mathworks.com/help/nnet/release-notes.html
Default output format of activations: In R2018a, the new default output format of activations is a 4-D array. To reproduce the old default behavior, set the 'OutputAs' value to 'rows'.
추가 답변 (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!