Main Content

next

minibatchqueue에서 데이터의 다음 미니 배치 가져오기

R2020b 이후

    설명

    [x1,...,xN] = next(mbq)minibatchqueue 객체 mbq를 사용하여 준비된 데이터의 미니 배치를 반환합니다. 이 함수는 mbq의 출력값 개수만큼의 변수를 반환합니다.

    예제

    모두 축소

    minibatchqueue 객체를 만들고 미니 배치를 가져옵니다.

    데이터저장소에서 minibatchqueue 객체를 만듭니다. MiniBatchSize 속성을 2로 설정합니다.

    auimds = augmentedImageDatastore([100 100],digitDatastore);
    mbq = minibatchqueue(auimds,MiniBatchSize=2,MiniBatchFormat={'SSBC','BC'})
    mbq = 
    minibatchqueue with 2 outputs and properties:
    
       Mini-batch creation:
                   MiniBatchSize: 2
                PartialMiniBatch: 'return'
                    MiniBatchFcn: 'collate'
        PreprocessingEnvironment: 'serial'
    
       Outputs:
                      OutputCast: {'single'  'single'}
                 OutputAsDlarray: [1 1]
                 MiniBatchFormat: {'SSBC'  'BC'}
               OutputEnvironment: {'auto'  'auto'}
    

    next를 사용하여 미니 배치를 가져옵니다. mbq에는 두 개의 출력값이 있습니다.

    [X,Y] = next(mbq);

    X는 데이터저장소의 영상 두 개를 포함하는 미니 배치입니다. Y에는 이 두 영상의 분류 레이블이 포함되어 있습니다. 미니 배치 변수의 크기와 데이터 형식을 확인합니다.

    size(X)
    dims(X)
    size(Y)
    dims(Y)
    ans = 1×4    
       100   100     1     2
    ans = 'SSCB'
    ans = 1×2    
         1     2
    ans = 'CB'

    입력 인수

    모두 축소

    미니 배치 대기열로, minibatchqueue 객체로 지정됩니다.

    출력 인수

    모두 축소

    미니 배치로, 숫자형 배열 또는 셀형 배열로 반환됩니다.

    next에서 반환되는 변수의 개수와 유형은 mbq의 구성에 따라 다릅니다. 이 함수는 mbq의 출력값 개수만큼의 변수를 반환합니다.

    버전 내역

    R2020b에 개발됨