(self, node)
| 994 | """ |
| 995 | |
| 996 | def __init__(self, node): |
| 997 | self.name = str(node.name).replace(".", "_") |
| 998 | self.op_type = str(node.op_type) |
| 999 | self.attrs = OnnxAttributes.from_onnx(node.attribute) |
| 1000 | # inputs as attributes in singa |
| 1001 | self.attr_inputs = {} |
| 1002 | # inputs as weights in singa |
| 1003 | self.weight_inputs = {} |
| 1004 | self.inputs = list(node.input) |
| 1005 | self.outputs = list(node.output) |
| 1006 | |
| 1007 | def getattr(self, key, default=None): |
| 1008 | return self.attrs[key] if key in self.attrs else default |