Article ID: 000091303 Content Type: Troubleshooting Last Reviewed: 08/05/2022

Encountered Inconsistent Shapes Error When Converting a TensorFlow* Model into Intermediate Representation (IR)

BUILT IN - ARTICLE INTRO SECOND COMPONENT
Summary

Model Optimizer command to disable layout change.

Description
  • Converted a Tensorflow* model using the command: mo --input_model ../models/middlebury_d400.pb --input_shape [1,352,704,6]
  • Encountered error: Shapes {1,96,192,400} and {1,1,96,192} are not consistent.
Resolution

Run Model Optimizer with additional parameter, --disable_nhwc_to_nchw that disables the default translation from NHWC to NCHW during the TensorFlow* model conversion.

Additional information

Refer to NHWC to NCHW Layout Change

Related Products

This article applies to 1 products