Am trying to train the japanese vowels data in matlab.....
3 次查看(过去 30 天)
显示 更早的评论
Hi, am trying to train the example data, 'japanese vowels data'. Upon previewing the fdsLabelTrain i get the following error. Am attaching the code and error alongwith... plz help me to get out from it....
filename = "japaneseVowels.zip";
outputFolder = fullfile(tempdir,"japaneseVowels");
unzip(filename,outputFolder);
folderTrain = fullfile(outputFolder,"Train");
fdsPredictorTrain = fileDatastore(folderTrain, ...
'ReadFcn',@load, ...
'IncludeSubfolders',true);
preview(fdsPredictorTrain)
classNames = string(1:9);
fdsLabelTrain = fileDatastore(folderTrain, ...
'ReadFcn',@(folderTrain) readLabel(folderTrain,classNames), ...
'IncludeSubfolders',true);
preview(fdsLabelTrain)
0 个评论
回答(1 个)
T.Nikhil kumar
2023-9-29
Hey Emimal,
I understand that you are facing an error with the “readLabel” function while creating a “fileDatastore” type object to store the “Japanese vowels data” folder.
The error message shown points out that the function “readLabel” is undefined for input arguments of type 'string'. This tells that MATLAB is not able to locate the custom “read” function (readLabel) you are trying to use for your “fileDatastore”.
I would suggest you to recheck if you have created a function called “readLabel” in the same folder as your current script or the folder containing the function is added to the MATLAB path. Also, ensure that the “readLabel” function can accept arguments of the type “string”.
You can refer to the “@fcn” input argument section in following documentation to know more about defining a custom read function for “fileDatastore”.
I hope this helps!
0 个评论
另请参阅
类别
在 Help Center 和 File Exchange 中查找有关 Language Support 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!