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

Method __init__

caffe2/python/core.py:2884–2894  ·  view source on GitHub ↗
(self, name_or_step)

Source from the content-addressed store, hash-verified

2882class Plan:
2883
2884 def __init__(self, name_or_step):
2885 self._plan = caffe2_pb2.PlanDef()
2886 self._net_dict = OrderedDict()
2887 self._steps = [] # A list of ExecutionStep
2888 if isinstance(name_or_step, ExecutionStep):
2889 self._plan.name = name_or_step.Name()
2890 self.AddStep(name_or_step)
2891 elif isinstance(name_or_step, basestring):
2892 self._plan.name = name_or_step
2893 else:
2894 raise ValueError('name_or_step must be a string or ExecutionStep')
2895
2896 def __str__(self):
2897 return self._plan.name

Callers

nothing calls this directly

Calls 3

AddStepMethod · 0.95
isinstanceFunction · 0.85
NameMethod · 0.45

Tested by

no test coverage detected