MCPcopy Create free account
hub / github.com/pytorch/pytorch / NodePyIO

Class NodePyIO

torch/utils/tensorboard/_pytorch_graph.py:90–107  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

88
89
90class NodePyIO(NodePy):
91 def __init__(self, node_cpp, input_or_output=None):
92 super().__init__(node_cpp, methods_IO)
93 try:
94 tensor_size = node_cpp.type().sizes()
95 except RuntimeError:
96 tensor_size = [
97 1,
98 ] # fail when constant model is used.
99 self.tensor_size = tensor_size
100 # Kind attribute string is purely descriptive and will be shown
101 # in detailed information for the node in TensorBoard's graph plugin.
102 #
103 # NodePyOP nodes get this from their kind() method.
104 self.kind = "Parameter"
105 if input_or_output:
106 self.input_or_output = input_or_output
107 self.kind = "IO Node"
108
109
110class NodePyOP(NodePy):

Callers 1

parseFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…