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={}
)
| 55 | |
| 56 | |
| 57 | def 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 | |
| 75 | def node( |
no test coverage detected