mirror of
https://github.com/hpcaitech/ColossalAI.git
synced 2025-11-02 06:54:14 +00:00
[feature] new zero implementation (#1623)
This commit is contained in:
@@ -54,8 +54,8 @@ class ZeROHookV2(ParamOpHook):
|
||||
|
||||
@contextmanager
|
||||
def switch_training_phase(self, training_phase: TrainingPhase = TrainingPhase.BACKWARD):
|
||||
old_training_phase = self._training_phase
|
||||
try:
|
||||
old_training_phase = self._training_phase
|
||||
self._training_phase = training_phase
|
||||
yield
|
||||
finally:
|
||||
|
||||
Reference in New Issue
Block a user