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

Method __repr__

imperative/python/megengine/traced_module/expr.py:503–518  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

501 )
502
503 def __repr__(self):
504 args = ", ".join(str(i) for i in self.args[1:])
505 kwargs = ", ".join("{}={}".format(k, v) for k, v in self.kwargs.items())
506 outputs = self.outputs
507 if self.out_def:
508 outputs = self.out_def.unflatten(outputs)
509 method = ".%s" % self.method
510 if method == ".__call__":
511 method = ""
512 return "%{}:\t{}{}{}({})".format(
513 self._id,
514 str(outputs) + " = " if outputs else "",
515 self.args[0],
516 method,
517 ", ".join([args, kwargs]),
518 )
519
520 def __getstate__(self):
521 state = {

Callers

nothing calls this directly

Calls 5

strFunction · 0.85
joinMethod · 0.80
itemsMethod · 0.80
formatMethod · 0.45
unflattenMethod · 0.45

Tested by

no test coverage detected