Quiz collegato alla guida · Medio Livello
Imparare PyTorch: un quiz sulla tabella di marcia
Costruisci competenze PyTorch in sequenza da tensori e autograd a moduli, formazione, valutazione, checkpoint e ottimizzazione misurata.
Domanda 1 di 8
Cosa calcola l'autograd di PyTorch per le operazioni sui tensori differenziabili?
Anteprima di ogni domanda8 domande
Le risposte e le spiegazioni vengono visualizzate mentre rispondi al quiz.
- Cosa calcola l'autograd di PyTorch per le operazioni sui tensori differenziabili?
- Predictions and class labels only
- Parameter updates performed by the optimizer
- Gradients of tracked differentiable operations
- DataLoader batch order
- Perché svuotare i gradienti tra gli aggiornamenti dell'ottimizzatore in un tipico ciclo di addestramento?
- 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
- Cosa cambia model.eval() per i moduli dipendenti dalla modalità?
- 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
- Qual è la corretta divisione di responsabilità tra Dataset e DataLoader?
- 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
- Cosa contiene un dizionario di stato del modello?
- 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
- 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
- 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
- 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