Qnn+keras demo: ignore warnings


Great demo with qnn+tf.keras. Is there a way to suppress the warnings below?

WARNING:tensorflow:You are casting an input of type complex128 to an incompatible dtype float32.  This will discard the imaginary part and may not be what you intended

I tried 3 different options but none worked:

  1. set verbose=0 in model.fit()
  2. set log level for tf:
import os
os.environ['TF_CPP_MIN_LOG_LEVEL'] = '3'
import tensorflow as tf
  1. using the warnings package:
import warnings

Instead use:

pip install tensorflow==2.8.1

nvm, found it:


Hey @Hayk_Tepanyan! Thanks for the feedback :slight_smile:. Glad you found a solution :+1: