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

Function _IsNets

caffe2/python/control.py:58–62  ·  view source on GitHub ↗
(nets_or_steps)

Source from the content-addressed store, hash-verified

56
57
58def _IsNets(nets_or_steps):
59 if isinstance(nets_or_steps, list):
60 return all(isinstance(n, core.Net) for n in nets_or_steps)
61 else:
62 return isinstance(nets_or_steps, core.Net)
63
64
65def _PrependNets(nets_or_steps, *nets):

Callers 4

_PrependNetsFunction · 0.85
_AppendNetsFunction · 0.85
_RunOnceIfFunction · 0.85
WhileFunction · 0.85

Calls 2

isinstanceFunction · 0.85
allFunction · 0.50

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…