Error messages correcting in MO extractor (#15783)
* Error messages correcting. * Error messages correcting. * Small corrections.
This commit is contained in:
parent
bc8d0ec71e
commit
c8c4503672
@ -236,11 +236,13 @@ def fe_input_user_data_repack(
|
|||||||
# NOTE: the logic relies on parameters with the single name
|
# NOTE: the logic relies on parameters with the single name
|
||||||
model_inputs = input_model.get_inputs()
|
model_inputs = input_model.get_inputs()
|
||||||
frozen_names = freeze_placeholder.keys()
|
frozen_names = freeze_placeholder.keys()
|
||||||
assert len(model_inputs) == len(frozen_names) + 1, "Please check the conversion command-line. " \
|
assert len(model_inputs) == len(frozen_names) + 1, \
|
||||||
"Total number of model inputs must match to a number " \
|
"Please check the conversion command-line. Total number of model inputs ({} detected) " \
|
||||||
"of input shapes along with frozen inputs."
|
"must match to a number of input shapes along with frozen inputs ({} in total).".format(
|
||||||
|
len(model_inputs),
|
||||||
|
len(frozen_names) + 1)
|
||||||
for node in model_inputs:
|
for node in model_inputs:
|
||||||
assert len(node.get_names()) > 0, "Original input models must have names."
|
assert len(node.get_names()) > 0, "Original model inputs must have tensor names."
|
||||||
input_name = node.get_names()[0]
|
input_name = node.get_names()[0]
|
||||||
if input_name not in frozen_names:
|
if input_name not in frozen_names:
|
||||||
_input_shapes.append(
|
_input_shapes.append(
|
||||||
@ -258,7 +260,7 @@ def fe_input_user_data_repack(
|
|||||||
# NOTE: the logic relies on parameters with the single name
|
# NOTE: the logic relies on parameters with the single name
|
||||||
assert input_user_shapes is None
|
assert input_user_shapes is None
|
||||||
for node in input_model.get_inputs():
|
for node in input_model.get_inputs():
|
||||||
assert len(node.get_names()) > 0, "Original input models must have names."
|
assert len(node.get_names()) > 0, "Original model inputs must have tensor names."
|
||||||
input_name = node.get_names()[0]
|
input_name = node.get_names()[0]
|
||||||
_input_shapes.append(
|
_input_shapes.append(
|
||||||
{
|
{
|
||||||
|
Loading…
Reference in New Issue
Block a user