필터 지우기
필터 지우기

DispatchIn​Background​Datastore

조회 수: 2 (최근 30일)
Nursara Ain Harzany
Nursara Ain Harzany 2022년 12월 26일
답변: Amey Waghmare 2023년 1월 3일
I am following a documentation of Gesture Recognition using Videos and Deep Learning. Currently stuck at creating minibatches because of this error "Undefined function 'DispatchInBackgroundDatastore' for input arguments of type 'matlab.io.datastore.FileDatastore'."
The line is
datastore = DispatchInBackgroundDatastore(datastore, p.NumWorkers);
Tried looking up DispatchInBackgroundDatastore() function in matlab help, it seems like it nonexistent except in the video classification documentation. Where does this function come from?
function mbq = createMiniBatchQueue(datastore, numOutputs, params)
if params.DispatchInBackground && isempty(gcp('nocreate'))
% Start a parallel pool, if DispatchInBackground is true, to dispatch
% data i n the background using the parallel pool.
c = parcluster('local');
c.NumWorkers = params.NumWorkers;
parpool('local',params.NumWorkers);
end
p = gcp('nocreate');
if ~isempty(p)
datastore = DispatchInBackgroundDatastore(datastore, p.NumWorkers);
end

답변 (1개)

Amey Waghmare
Amey Waghmare 2023년 1월 3일
Hi,
As per my understanding, you are facing an undefined function error for DispatchInBackgroundDatastore while following the example Gesture Recognition using Videos and Deep Learning.
‘DispatchInBackgroundDatastore’ is not a MATLAB function, but is provided as a part of this example, as mentioned in ‘Specify Training Options’ subsection of ‘Train a Video Classifier for Gesture Recognition’ section. In order to avoid the undefined function error, you can open the example in MATLAB by typing the following in the Command Window,
openExample('deeplearning_shared/GestureRecognitionUsingSlowFastVideoClassificationExample')
This will add the ‘DispatchInBackgroundDatastore’ to the path.

Community Treasure Hunt

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

Start Hunting!

Translated by