| 88 | |
| 89 | |
| 90 | class 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 | |
| 110 | class NodePyOP(NodePy): |
no outgoing calls
no test coverage detected
searching dependent graphs…