Corrected layout parsing error message. (#10651)
* Corrected error message. * Corrected message. * Small correction * Corrected error message for source and target layout.
This commit is contained in:
parent
9eca8515b8
commit
3f941e3c5f
@ -1000,8 +1000,14 @@ def parse_layouts_by_destination(s: str, parsed: dict, dest: str = None) -> None
|
|||||||
elif m2:
|
elif m2:
|
||||||
found_g = m2.groups()
|
found_g = m2.groups()
|
||||||
else:
|
else:
|
||||||
raise Error("More then one layout provided for --{}layout without providing name.".format(
|
error_msg = "Invalid usage of --{}layout parameter. Please use following syntax for each tensor " \
|
||||||
dest + '_' if dest else ''))
|
"or operation name:" \
|
||||||
|
"\n name(nchw)" \
|
||||||
|
"\n name[n,c,h,w]".format(dest + '_' if dest else '')
|
||||||
|
if dest is None:
|
||||||
|
error_msg += "\n name(nhwc->[n,h,w,c])" \
|
||||||
|
"\n name[n,h,w,c]->[n,c,h,w]"
|
||||||
|
raise Error(error_msg)
|
||||||
write_found_layout(found_g[0], found_g[1], parsed, dest)
|
write_found_layout(found_g[0], found_g[1], parsed, dest)
|
||||||
|
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user