How can I rename the IR input / output nodes? #19509
-
Hi, given the IR .xml and .bin file, how can I rename the inputs and outputs using Python api? Thanks |
Beta Was this translation helpful? Give feedback.
Answered by
jiwaszki
Sep 11, 2023
Replies: 1 comment
-
# assuming that model is read with core.read_model function
model = core.read_model(model=test_net_xml, weights=test_net_bin)
model.inputs[0].tensor.set_names({"abc"}) # first method with set_names
model.inputs[0].tensor.names = {"abc"} # using property
model.inputs[0].tensor.add_names({"abc"}) # appending to existing names
model.outputs[0].tensor.add_names({"my_results"}) # works similar with outputs
print(model) # validate with example print, the names are now available @yujiepan-work let me know if you need anything else! |
Beta Was this translation helpful? Give feedback.
0 replies
Answer selected by
yujiepan-work
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
@yujiepan-work let me know if you need anything else!