Skip to content

Commit

Permalink
fix strategy
Browse files Browse the repository at this point in the history
  • Loading branch information
zhaoyingli committed Sep 20, 2022
1 parent 90f905e commit d0591e5
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions ppfleetx/core/engine/auto_engine.py
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,7 @@ def __init__(self, configs, module, optimizer=None, lr=None, mode='train'):
self._test_iters = self._configs['test_iters']
self._logging_freq = self._configs['logging_freq']
self._num_train_epochs = self._configs['num_train_epochs']
# self._strategy = self._configs['strategy']
self._strategy = self._configs['strategy']

# save & load
self._save_steps = self._configs['save_load']['save_steps']
Expand All @@ -84,7 +84,7 @@ def __init__(self, configs, module, optimizer=None, lr=None, mode='train'):
# init engine
optimizer = optimizer if mode == 'train' else None
self._auto_engine = auto.Engine(
module.model, module.loss_fn, optimizer, strategy=module.strategy)
module.model, module.loss_fn, optimizer, strategy=self._strategy)

def fit(self, epoch=1, train_dataset=None, valid_dataset=None):

Expand Down

0 comments on commit d0591e5

Please sign in to comment.