Clear Filters
Clear Filters

Datastore is not PartitionableByIndex

3 views (last 30 days)
N/A
N/A on 15 Aug 2023
Answered: Divyanshu on 31 Aug 2023
Hello I am trying to train a CNN using Matlab 2023a.
I create a signal data store using the following code. The function @readData returns 2 variables. Variable 1 is 1xN time-series data, and Variable 2 is a categorical variable and is T1 or T2.
CODE for creating data store
for j = [1:i-i i+1:length(pts)] % For parsing patient folder exluding one patient
k = k + 1;
folder_train{1,2*k-1} = fullfile(data_folder,'T1',sprintf('T%.3d',pts(j))); %Rd data corresponding to Task 1
folder_train{1,2*k} = fullfile(data_folder,'T2',sprintf('T%.3d',pts(j))); %Rd data corresponding to Task 2
end
% CREATE data store
eds_train = signalDatastore(folder_train,'IncludeSubfolders',true,'FileExtensions','.mat','ReadFcn',@readData);
When I train the algorithm using parallel environment option it returns me an error
"Input datastore is not PartitionableByIndex and does not support parallel operations"
I tested whether my datastore is partiationable using isPartitionable and it returned 1. I am unsure what the issue is at this point. Can you please help me?
Thanks

Answers (1)

Divyanshu
Divyanshu on 31 Aug 2023
Hi N/A,
I understand that you are creating a data store for training a CNN model using MATLAB. You can go through the following pointers:
  • Though the function “isPartionable” outputs 1 for the datastore, a possible reason for the error is the way datastore is created.
  • As you have specified a custom Read function readData as an argument to “signalDataStore function it is possible that the read function does not support parallel processing.
  • Ensure that the “readData” function is implemented correctly to support reading data in chunks & subsets.
Refer the following documentation for examples & better understanding:

Categories

Find more on Measurements and Feature Extraction in Help Center and File Exchange

Community Treasure Hunt

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

Start Hunting!