MCPcopy
hub / github.com/JaidedAI/EasyOCR / parallelize

Function parallelize

easyocr/DBNet/model/model.py:24–32  ·  view source on GitHub ↗
(model, distributed, local_rank)

Source from the content-addressed store, hash-verified

22
23
24def parallelize(model, distributed, local_rank):
25 if distributed:
26 return nn.parallel.DistributedDataParallel(
27 model,
28 device_ids=[local_rank],
29 output_device=[local_rank],
30 find_unused_parameters=True)
31 else:
32 return nn.DataParallel(model)
33
34class SegDetectorModel(nn.Module):
35 def __init__(self, args, device, distributed: bool = False, local_rank: int = 0):

Callers 1

__init__Method · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…