Explorar o código

Update onnx.py (#989)

Lutz Roeder hai 3 meses
pai
achega
a709c11de6
Modificáronse 1 ficheiros con 1 adicións e 1 borrados
  1. 1 1
      source/onnx.py

+ 1 - 1
source/onnx.py

@@ -159,7 +159,7 @@ class _Graph:
             json_node_type = {}
             json_node_type["name"] = op_type
             type_metadata = self.metadata.type(op_type)
-            if type and "category" in type_metadata:
+            if type_metadata and "category" in type_metadata:
                 json_node_type["category"] = type_metadata["category"]
             json_node["type"] = json_node_type
             if node.name: