MCPcopy Create free account
hub / github.com/VisionRush/DeepFakeDefenders / __init__

Method __init__

core/mengine.py:32–42  ·  view source on GitHub ↗
(self, local_rank, world_size=0, DDP=False, SyncBatchNorm=False)

Source from the content-addressed store, hash-verified

30
31class TrainEngine(object):
32 def __init__(self, local_rank, world_size=0, DDP=False, SyncBatchNorm=False):
33 # init setting
34 self.local_rank = local_rank
35 self.world_size = world_size
36 self.device_ = f'cuda:{local_rank}'
37 # create tool
38 self.cls_meter_ = MultilabelClassificationMetric()
39 self.loss_meter_ = MultiClassificationMetric()
40 self.top1_meter_ = MultiClassificationMetric()
41 self.DDP = DDP
42 self.SyncBN = SyncBatchNorm
43
44 def create_env(self, cfg):
45 # create network

Callers

nothing calls this directly

Tested by

no test coverage detected