가이드 연계 퀴즈 · 중간 레벨

그라디언트 누적 퀴즈

마이크로 배치 기울기 합계, 효과적인 배치 크기, 손실 크기 조정, 최적화 타이밍, 정규화 제한 및 조기 재설정 오류를 테스트합니다.

관련 가이드 경로그라데이션 누적
질문 1 의 8

그래디언트 축적을 통해 주로 무엇을 할 수 있나요?

모든 질문 미리보기8 질문

퀴즈를 풀면 정답과 설명이 나타납니다.

  1. 그래디언트 축적을 통해 주로 무엇을 할 수 있나요?
    • GPU 없이 훈련
    • 역방향 패스 건너뛰기
    • 제한된 메모리에서 더 큰 유효 배치 크기를 시뮬레이션합니다.
    • 옵티마이저를 완전히 제거
  2. 마이크로 배치 크기 4 및 8 축적 단계의 경우 효과적인 배치 크기는 다음과 같습니다.
    • 32
    • 4
    • 8
    • 12
  3. With an accumulation factor N, when should optimizer.step() and zero_grad() occur?
    • 모든 마이크로 배치 이후
    • 절대로
    • 포워드 패스 전
    • Call optimizer.step() after N micro-batches, then clear gradients before the next accumulation window
  4. 효과적인 학습률을 정확하게 유지하기 위한 마이크로 배치당 손실은 일반적으로 다음과 같습니다.
    • N을 곱함
    • 누적 단계 수 N으로 나눈 값
    • 0으로 설정
    • 정확도로 대체됨
  5. 어떤 정규화 레이어가 그래디언트 누적과 더 명확하게 결합됩니까?
    • 배치 통계에 의존하지 않으므로 레이어 또는 그룹 정규화
    • 배치 정규화(작은 배치를 좋아하므로)
    • 정규화가 작동하지 않습니다.
    • 탈락자만
  6. 그래디언트 누적을 사용하는 데 드는 주요 비용은 다음과 같습니다.
    • 피크 시 더 많은 GPU 메모리 사용
    • 모든 그라데이션 손실
    • 효과적인 업데이트당 더 긴 벽시계 시간
    • 옵티마이저를 사용할 수 없음
  7. A training loop clears gradients after every micro-batch but steps the optimizer every fourth batch. What is lost?
    • The model weights are deleted
    • The earlier micro-batch contributions to the accumulated update
    • The effective batch becomes four times larger
    • The loss automatically becomes zero
  8. Why may four micro-batches with BatchNorm behave differently from one physical batch of the same total size?
    • The optimizer cannot accept four backward passes
    • Gradient addition is forbidden in BatchNorm
    • The number of training examples changes
    • BatchNorm uses statistics from each micro-batch rather than the combined batch