MCPcopy Create free account
hub / github.com/MegEngine/MegEngine / unflatten_args

Method unflatten_args

imperative/python/megengine/traced_module/expr.py:148–156  ·  view source on GitHub ↗
(self, inputs)

Source from the content-addressed store, hash-verified

146 current_graph._namespace.auto_naming_for_outputs(self)
147
148 def unflatten_args(self, inputs):
149 assert self.arg_def is not None, "{} expr doesn't have args/kwargs".format(
150 type(self).__name__
151 )
152 inputs = list(inputs)
153 for idx, val in self.const_val:
154 inputs.insert(idx, val)
155 args, kwargs = self.arg_def.unflatten(inputs)
156 return args, kwargs
157
158 def replace_inputs(self, repl_dict: Dict[Node, Node]):
159 r"""Replace the input Nodes of this Expr.

Callers 4

kwargsMethod · 0.95
argsMethod · 0.95
interpretMethod · 0.80
interpretMethod · 0.80

Calls 4

listFunction · 0.85
formatMethod · 0.45
insertMethod · 0.45
unflattenMethod · 0.45

Tested by

no test coverage detected