tensorflow
memory_error
ai_generated
true
ResourceExhaustedError: OOM when allocating tensor
ID: tensorflow/oom-gpu
80%Fix Rate
85%Confidence
3Evidence
2023-01-01First Seen
Version Compatibility
| Version | Status | Introduced | Deprecated | Notes |
|---|---|---|---|---|
| 2 | active | — | — | — |
Root Cause
GPU memory exhausted during training or inference.
genericWorkarounds
-
90% success Enable memory growth: tf.config.experimental.set_memory_growth(gpu,True)
-
88% success Reduce batch size or model size
Dead Ends
Common approaches that don't work:
-
Set allow_growth=False with pre-allocated 100%
75% fail
Other processes cant use GPU
-
Move to CPU entirely
70% fail
Orders of magnitude slower