Error using classreg.l​earning.Fu​llClassifi​cationRegr​essionMode​l.prepareD​ataCR (line 192) X must be a numeric matrix.

I just downloded matlab 2017 trial version .and alexnet too. I have some images of indian coastal fishes to identify. So I created ImageDataStore object and started preparing training and testing images. and the error comes here..
"Error using classreg.learning.FullClassificationRegressionModel.prepareDataCR (line 192)
X must be a numeric matrix." _italic_
this is the error it shows. What may be the reason for it?

3 件のコメント

Your X is not a numeric matrix. What data type is your X?
Hridya PI
Hridya PI 2017 年 12 月 29 日
thank you.... It was mainly because some of my images exceeded the input layer size, 227×227×3. So activation function was not giving a matrix as required. Now the problem s fixed
Now, I completed the Alexnet Training with my dataset. How I can input an image and make the network predict it? I tried the code below.Butb it takes tha classnames of the pretrained network.Not the classnames that I newly created.
I = imread('D:\as.jpg');
img = imresize(I,[227 227]);
label = classify(net,img)
figure
imshow(img)
title(char(label))
and also the code
net.Layers(end).ClassNames(1:6)
gives the classnames of pretrained network only.What should I do to give an input to the net.Please help

サインインしてコメントする。

回答 (0 件)

カテゴリ

ヘルプ センター および File ExchangeDeep Learning Toolbox についてさらに検索

質問済み:

2017 年 12 月 29 日

コメント済み:

2017 年 12 月 30 日

Community Treasure Hunt

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

Start Hunting!

Translated by