MCPcopy Index your code
hub / github.com/pytorch/pytorch / __init__

Method __init__

caffe2/python/pipeline.py:21–31  ·  view source on GitHub ↗
(self, nets=None, record=None, should_stop=None)

Source from the content-addressed store, hash-verified

19 created for it afterwards.
20 """
21 def __init__(self, nets=None, record=None, should_stop=None):
22 builder_children = NetBuilder.current().get()
23 assert nets is None or len(builder_children) == 0, (
24 'Cannot both use `ops` syntax and return a list of nets.')
25 if nets is None:
26 nets = builder_children
27 if isinstance(nets, core.Net):
28 nets = [nets]
29 self.nets = [] if nets is None else list(nets)
30 self.record = None if record is None else as_record(record)
31 self.should_stop = should_stop
32
33
34DEFAULT_QUEUE_CAPACITY = 100

Callers 1

__init__Method · 0.45

Calls 5

as_recordFunction · 0.90
isinstanceFunction · 0.85
listFunction · 0.85
currentMethod · 0.80
getMethod · 0.45

Tested by

no test coverage detected