GradScaler
From Dontopedia, the open, paraconsistent wiki. (Last updated 2026-06-10.)
GradScaler has 19 facts recorded in Dontopedia across 6 references, with 2 live disagreements.
Mostly:rdf:type(6), parent module(1), is instance(1)
Maturity scale
raw canonical shape-checked rule-derived certifiedInbound mentions (10)
Other subjects in dontopedia point AT this entity as a value. These are inverse relationships — e.g. "X motherOf this subject" — and answer questions the forward facts can't. Grouped by predicate.
requiresRequires(3)
- Backward Pass
ex:backward-pass - Optimizer Step
ex:optimizer-step - Scaler Update
ex:scaler-update
scaledByScaled by(2)
- Backward Pass
ex:backward-pass - Loss
ex:loss
executedByExecuted by(1)
- Scaler Update
ex:scaler-update
isHandledByIs Handled by(1)
- Loss Scaling
ex:loss-scaling
providesProvides(1)
- Torch Cuda Amp
ex:torch-cuda-amp
steppedByStepped by(1)
- Optimizer
ex:optimizer
usesComponentUses Component(1)
- Mixed Precision Training
ex:mixed-precision-training
Other facts (14)
The long tail: predicates that appear too rarely to warrant their own section. Filter or scroll to find a specific one. Each row links to its source.
| Predicate | Value | Ref |
|---|---|---|
| Rdf:type | Python Class | [1] |
| Rdf:type | Py Torch Module | [2] |
| Rdf:type | Gradient Scaler | [3] |
| Rdf:type | Gradient Scaler | [4] |
| Rdf:type | Component | [5] |
| Rdf:type | Py Torch Component | [6] |
| Parent Module | Torch.cuda.amp | [1] |
| Is Instance | Grad Scaler | [3] |
| Prevents | Gradient Underflow | [4] |
| Purpose | Gradient Stability | [4] |
| Function | handle loss scaling | [5] |
| Handles Specifically | loss scaling | [5] |
| Handles | Loss Scaling | [5] |
| Used for | Loss Scaling | [6] |
Timeline
Timeline axis is valid_time — when each source says the fact was true in the world, not when Dontopedia learned about it. Retracted rows are kept for provenance; coloured stripes indicate the context kind.
References (6)
ctx:claims/beam/4d47005b-a1e7-4757-82f3-77722798dfecctx:claims/beam/306fcc63-e538-42c9-94cf-04adb22089e6- full textbeam-chunktext/plain1 KB
doc:beam/306fcc63-e538-42c9-94cf-04adb22089e6Show excerpt
1. **StepLR**: Decreases the learning rate by a factor of `gamma` every `step_size` epochs. 2. **ReduceLROnPlateau**: Reduces the learning rate when a metric has stopped improving. This is particularly useful for metrics like validation los…
ctx:claims/beam/d722ad53-d442-458e-b561-cab7e12fcbbf- full textbeam-chunktext/plain1 KB
doc:beam/d722ad53-d442-458e-b561-cab7e12fcbbfShow excerpt
optimizer = optim.Adam(model.parameters(), lr=0.001) # Using Adam optimizer scheduler = ReduceLROnPlateau(optimizer, mode='min', factor=0.1, patience=5, verbose=True) scaler = GradScaler() try: for epoch in range(100): running…
ctx:claims/beam/d37ddcd2-e87b-45fe-94fd-23a99f3a695e- full textbeam-chunktext/plain1 KB
doc:beam/d37ddcd2-e87b-45fe-94fd-23a99f3a695eShow excerpt
# Calculate average loss for the epoch avg_loss = running_loss / len(data_loader) print(f'Epoch [{epoch + 1}/100], Loss: {avg_loss:.4f}, LR: {optimizer.param_groups[0]["lr"]}') # Step the scheduler s…
ctx:claims/beam/2df912fc-b46d-41ca-98bb-edfd119741f7- full textbeam-chunktext/plain1 KB
doc:beam/2df912fc-b46d-41ca-98bb-edfd119741f7Show excerpt
[Turn 9560] User: Sure, that looks good! Adding mixed precision training and periodic cache clearing definitely helps with memory management. And profiling the code to find bottlenecks is a great idea too. Let's move forward with this appro…
ctx:claims/beam/a9c9c9fc-6777-4587-af29-1f0af774097b- full textbeam-chunktext/plain1 KB
doc:beam/a9c9c9fc-6777-4587-af29-1f0af774097bShow excerpt
- Use `torch.cuda.amp` to enable mixed precision training, which can reduce memory usage and improve performance. - Utilize `GradScaler` to handle loss scaling and `autocast` to automatically cast operations to FP16. 2. **Gradient Ac…
See also
Keep researching
Missing something or suspicious of what's here? Kick off a research session — a Claude agent will investigate, cite its sources, and file new facts into a dedicated context you can review before accepting into the shared view.