MCPcopy Create free account
hub / github.com/dbolya/yolact / CustomDataParallel

Class CustomDataParallel

eval.py:630–634  ·  view source on GitHub ↗

A Custom Data Parallel class that properly gathers lists of dictionaries.

Source from the content-addressed store, hash-verified

628from queue import Queue
629
630class CustomDataParallel(torch.nn.DataParallel):
631 """ A Custom Data Parallel class that properly gathers lists of dictionaries. """
632 def gather(self, outputs, output_device):
633 # Note that I don't actually want to convert everything to the output_device
634 return sum(outputs, [])
635
636def evalvideo(net:Yolact, path:str, out_path:str=None):
637 # If the path is a digit, parse it as a webcam index

Callers 1

evalvideoFunction · 0.70

Calls

no outgoing calls

Tested by

no test coverage detected