Compute how many gradient accumulation steps you need to reach a target effective batch size when a single device batch is limited by memory.
累積步數越多視訊記憶體佔用越低。