Kuiz berkaitan panduan · Sederhana Tahap

Pembelajaran PyTorch: Kuiz Pelan Hala Tuju

Bina kemahiran PyTorch dalam urutan daripada tensor dan autograd kepada modul, latihan, penilaian, pusat pemeriksaan dan pengoptimuman yang diukur.

Laluan panduan yang berkaitanPelan Hala Tuju Pytorch
soalan 1 daripada 8

Apakah PyTorch autograd mengira untuk operasi tensor yang boleh dipbeza?

Pratonton setiap soalan8 soalan

Jawapan dan penjelasan muncul semasa anda mengambil kuiz.

  1. Apakah PyTorch autograd mengira untuk operasi tensor yang boleh dipbeza?
    • Predictions and class labels only
    • Parameter updates performed by the optimizer
    • Gradients of tracked differentiable operations
    • DataLoader batch order
  2. Mengapa mengosongkan gradien antara kemas kini pengoptimum dalam gelung latihan biasa?
    • Gradients are overwritten on every backward call
    • Gradients accumulate by default across backward calls
    • Gradients are cleared automatically by optimizer.step
    • Each parameter receives a gradient only once per epoch
  3. Apakah model.eval() mengubah untuk modul bergantung-mod?
    • It permanently freezes every parameter
    • It disables autograd for all code that follows
    • It resets optimizer state and gradients
    • It changes mode-dependent modules such as dropout and batch normalization to evaluation behavior
  4. Bahagian tanggungjawab antara Dataset dan DataLoader yang betul ialah?
    • Dataset defines per-example access; DataLoader batches and iterates over examples
    • Dataset defines model layers; DataLoader computes the loss
    • Dataset stores optimizer state; DataLoader updates gradients
    • Dataset selects a checkpoint; DataLoader changes evaluation mode
  5. Apakah yang terkandung dalam kamus keadaan model?
    • A serialized Python architecture and all source code
    • Parameter and buffer values to load into a recreated module
    • The entire training dataset and split definitions
    • The final test metric and evaluation report
  6. Why profile data loading and transfer along with GPU computation?
    • The pipeline may be limited by input preparation or transfer, not just model kernels
    • GPU time always dominates when the model is on a device
    • Data loading cannot affect end-to-end throughput
    • Only the number of layers determines request latency
  7. Which evaluation design is appropriate when tuning PyTorch checkpoints?
    • Choose the best checkpoint on final test data repeatedly
    • Train and report on the same batches only
    • Use test labels to set augmentation
    • Use validation data for selection and keep a final test separate
  8. What should precede advanced optimization such as mixed precision or compilation?
    • A correct baseline and profiling evidence
    • Compile before measuring a baseline
    • Enable mixed precision for every dtype
    • Increase batch size without checking memory