フィルターのクリア

Define width for 'cell'

1 回表示 (過去 30 日間)
Maria Rasmussen
Maria Rasmussen 2018 年 1 月 1 日
コメント済み: Maria Rasmussen 2018 年 1 月 2 日
I am following a guide in mathworks for creating CNN, but I keep getting
Undefined function 'width' for input arguments of type 'cell'.
Error in CNN (line 34)
fullyConnectedLayer(width(varoaDataset))
I am using the following code:
%%Image input layer
inputLayer = imageInputLayer([19 19 3]);
%%Middle layer
% Layer parameters - related to input layer
filterSize = [3 3];
numFilters = 19;
% Creating middle layer
middleLayers = [
convolution2dLayer(filterSize, numFilters, 'Padding', 1)
reluLayer()
convolution2dLayer(filterSize, numFilters, 'Padding', 1)
reluLayer()
maxPooling2dLayer(3, 'Stride', 2)
];
%%Final layers
finalLayers = [
fullyConnectedLayer(64)
%ReLU
reluLayer()
%Messurement of image using loss layer
fullyConnectedLayer(width(varoaDataset))
% Softmax loss layer and classification layer
softmaxLayer()
classificationLayer()
];
%%Combine layers
layers = [
inputLayer
middleLayers
finalLayers
];
  2 件のコメント
the cyclist
the cyclist 2018 年 1 月 1 日
For anyone looking to help, it seems that the OP is trying to replicate the example from this documenation page. (OP, can you please confirm?)
Maria Rasmussen
Maria Rasmussen 2018 年 1 月 2 日
Yes, that is the one I am working from.

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

採用された回答

the cyclist
the cyclist 2018 年 1 月 1 日
編集済み: the cyclist 2018 年 1 月 1 日
My best guess, from the information that you have provided, is that you have stored your data in a cell array named varoaDataset, but the example in the documentation expects those data to be stored in a table.

その他の回答 (0 件)

カテゴリ

Help Center および File ExchangeImage Data Workflows についてさらに検索

Community Treasure Hunt

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

Start Hunting!

Translated by