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

Function node_proto

imperative/python/megengine/utils/tensorboard.py:57–72  ·  view source on GitHub ↗

Creates an object matching https://github.com/tensorflow/tensorboard/blob/master/tensorboard/compat/proto/node_def.proto

(
    name, op="UnSpecified", input=None, outputshape=None, dtype=None, attributes={}
)

Source from the content-addressed store, hash-verified

55
56
57def node_proto(
58 name, op="UnSpecified", input=None, outputshape=None, dtype=None, attributes={}
59):
60 """Creates an object matching
61 https://github.com/tensorflow/tensorboard/blob/master/tensorboard/compat/proto/node_def.proto
62 """
63 if input is None:
64 input = []
65 if not isinstance(input, list):
66 input = [input]
67 return NodeDef(
68 name=name.encode(encoding="utf_8"),
69 op=op,
70 input=input,
71 attr=attr_value_proto(outputshape, dtype, attributes),
72 )
73
74
75def node(

Callers 1

nodeFunction · 0.85

Calls 2

attr_value_protoFunction · 0.85
encodeMethod · 0.45

Tested by

no test coverage detected