Semantic Segmentation without Data Store Object
이전 댓글 표시
Hi everyone, I have a problem using categorical response. I dont want to use data store object to prepare data. I have Itrn NxNx3XM image store and trn_gnd NxNx1xM pixel label matrix which each elements are 0 and 1; I translated numerical [0,1] to string "b","c" labels.
classNames = ["b","c"];
pxLayer = pixelClassificationLayer('Name','labels','ClassNames',classNames, 'ClassWeights', [1 20]);
lgraph = removeLayers(lgraph, 'pixelLabels');
lgraph = addLayers(lgraph, pxLayer);
lgraph = connectLayers(lgraph, 'softmax' ,'labels');
%%options specifications %%
trn_gnd_categ = categorical( trn_gnd,[0 1],{'b','c'});
net = trainNetwork(Itrn , trn_gnd_categ , lgraph, options)
But I get "Invalid training data. Y must be a vector of categorical responses. " error. I cant find where I'm wrong...
답변 (0개)
카테고리
도움말 센터 및 File Exchange에서 Get Started with Statistics and Machine Learning Toolbox에 대해 자세히 알아보기
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!