필터 지우기
필터 지우기

set labels for classifier deep learning toolbox

조회 수: 8 (최근 30일)
jg
jg 2020년 5월 10일
댓글: Wiktor 2024년 3월 20일
Where do i set the labels for supervised training?
[XTrain,YTrain] = digitTrain4DArrayData;
idx = randperm(size(XTrain,4),1000);
XValidation = XTrain(:,:,:,idx);
XTrain(:,:,:,idx) = [];
YValidation = YTrain(idx);
YTrain(idx) = [];
layers = [
fullyConnectedLayer(4096,"Name","fc6","BiasInitializer","ones","WeightsInitializer","ones")
reluLayer("Name","relu6")
dropoutLayer(0.5,"Name","dropout6")
fullyConnectedLayer(4096,"Name","fc7")
reluLayer("Name","relu7")
dropoutLayer(0.5,"Name","dropout7")
fullyConnectedLayer(4096,"Name","fc8")
softmaxLayer("Name","softmax")
classificationLayer("Name","classoutput")];
plot(layerGraph(layers));
net = trainNetwork(XTrain,YTrain,layers,options);

답변 (1개)

Ankriti Sachan
Ankriti Sachan 2020년 5월 13일
By setting the labels for supervised training, I am assuming that you want to ask how to train the dataset with the labeled data.
I guess you are already following this documentation - https://www.mathworks.com/help/deeplearning/ref/trainnetwork.html
For the function,
net = trainNetwork(X,Y,layers,options), it is mentioned that
X = Training data
Y = Labels of the data that you are training the model with
layers = Neural network layers
option = Training options.
So I guess ‘Y’ is the variable that you are looking for.
  댓글 수: 1
Wiktor
Wiktor 2024년 3월 20일
Hi! If I have augmentedImageDatastore created from imageDatadtore with defined Labels to every element, can I skip "Y" in trainNetwork function?

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

카테고리

Help CenterFile Exchange에서 Deep Learning Toolbox에 대해 자세히 알아보기

태그

제품


릴리스

R2020a

Community Treasure Hunt

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

Start Hunting!

Translated by