DeepExplain icon indicating copy to clipboard operation
DeepExplain copied to clipboard

add tf.compat.v1 for tf2 support

Open SuryaThiru opened this issue 4 years ago • 1 comments

SuryaThiru avatar Mar 29 '20 04:03 SuryaThiru

I've been using this fork and just wanted to note that in order to use the DeepExplain library with a model created with TF2 (without having to re-write existing compile and train code), I had to do the following steps first:

  1. Save the model weights
  2. Add the lines: tf.compat.v1.disable_v2_behavior() tf.compat.v1.disable_eager_execution()
  3. Build the model using tf.compat.v1
  4. Load the saved model weights

Might be worth adding to documentation as it might be useful to others...

itsmemala avatar Feb 16 '22 17:02 itsmemala