minibatchqueue without shuffling by default

조회 수: 1 (최근 30일)
robinho robinho
robinho robinho 2022년 7월 11일
댓글: robinho robinho 2022년 8월 5일
mbq = minibatchqueue(ads,MiniBatchSize=miniBatchSize,MiniBatchFormat="BC");
If without mbq.shuffle, mbq retains the original sequence in ads? That is, minibatchqueue just cuts ads into length(ads)/miniBatchSize*portions?
e.g. ads=arrayDatastore(linspace(0,2,1000),IterationDimension=1) and if miniBatchSize=100, then the 1st batch of mbq is just [0, ..., 0.2]?

채택된 답변

Ben
Ben 2022년 7월 12일
I think you need to use IterationDimension=2 to read out [0, ..., 0.2] in one mini-batch:
ads=arrayDatastore(linspace(0,2,1000),IterationDimension=2);
miniBatchSize=100;
mbq = minibatchqueue(ads,MiniBatchSize=miniBatchSize,MiniBatchFormat="BC");
batch = next(mbq);
This will read out a batch of 100 observations, first [0, ..., 0.1982], then [0.2002,...,0.3984] etc. These will be output as 1x100 dlarray with "CB" labels - i.e. a batch of 100 observations.
  댓글 수: 6
robinho robinho
robinho robinho 2022년 7월 21일
right, but what impact would no-shuffling make?
robinho robinho
robinho robinho 2022년 8월 5일
?

댓글을 달려면 로그인하십시오.

추가 답변 (0개)

카테고리

Help CenterFile Exchange에서 Custom Training Loops에 대해 자세히 알아보기

태그

Community Treasure Hunt

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

Start Hunting!

Translated by