Skip to content
Snippets Groups Projects
Commit 5dcc89cb authored by Le Blevec's avatar Le Blevec
Browse files

[Streamline] Updating the transformation to check if the input is in the expected format.

parent 1a93bbda
No related branches found
No related tags found
No related merge requests found
......@@ -735,6 +735,12 @@ class MakeScaleResizeNHWC(Transformation):
for n in graph.node:
node_ind += 1
if n.op_type == "Upsample" or n.op_type == "Resize":
if model.get_tensor_layout(n.input[0]) != DataLayout.NCHW:
warnings.warn(
"%s: Input not NCHW. Can't operate transformation on node."
% n.name
)
continue
consumer = model.find_consumer(n.output[0])
producer = model.find_producer(n.input[0])
if n.op_type == "Upsample":
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment