def attr_onnx(self): onnx_attrs = {} for a in self._attr.values(): schema = get_schema(self.type, self.graph.opset) if schema: if schema.has_attribute(a.name): onnx_attrs[a.name] = a return onnx_attrs
def attr_onnx(self): """Return onnx valid attributes""" schema = get_schema(self.type, self.graph.opset, self.domain) if schema is None and not (self.is_const() or self.is_graph_input()): logger.debug("Node %s uses non-stardard onnx op <%s, %s>, skip attribute check", self.name, self.domain, self.type) onnx_attrs = {} for a in self._attr.values(): if schema is None or schema.has_attribute(a.name): onnx_attrs[a.name] = a return onnx_attrs