You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I created a script to run onnx checker functions on the LlamaV2_7B_float32.onnx model. Below is the script:
import onnx
def check_model(model_path):
model = onnx.load(model_path)
for i, node in enumerate(model.graph.node):
# Check the node for consistency
onnx.checker.check_node(node)
# Check attributes of each node
for attr in node.attribute:
onnx.checker.check_attribute(attr)
# Check tensor information in the model
for init_tensor in model.graph.initializer:
onnx.checker.check_tensor(init_tensor)
for value_info in model.graph.value_info:
onnx.checker.check_value_info(value_info)
# Check graph consistency
onnx.checker.check_model(model_path)
if __name__ == "__main__":
import argparse
parser = argparse.ArgumentParser(description="Check ONNX model for validation errors.")
parser.add_argument("model", type=str, help="Path to the ONNX model file.")
args = parser.parse_args()
check_model(args.model)
I created a script to run onnx checker functions on the
LlamaV2_7B_float32.onnx
model. Below is the script:Running
returns
The text was updated successfully, but these errors were encountered: