Skip To Main Content
Support Knowledge Base

Encountered “RuntimeError: Can Not Constant Fold Eltwise Node” Error When Inferencing with OpenVINO™

Content Type: Error Messages   |   Article ID: 000094244   |   Last Reviewed: 06/16/2023

Description

  • Converted custom Keras model into Intermediate Representation (IR) with Model Optimizer:
    mo --use_new_frontend --framework tf --input_shape --saved_model_dir --output_dir
  • Received "RuntimeError: Can not constant fold eltwise node" error when inferencing with the IR file.

Resolution

The error is due to the missing proper support for the 64-bit type of transformation.

  1. Change the precision of the model into 32-bit:
    # set precision to 64 bit
    - tf.keras.backend.set_floatx('float64')
    + tf.keras.backend.set_floatx('float32')
  2. Generate the IR file where 64-bit is replaced with 32-bit.

Related Products

This article applies to 1 products.