sicara / tf-explain

Interpretability Methods for tf.keras models with Tensorflow 2.x
https://tf-explain.readthedocs.io
MIT License
1.02k stars 111 forks source link

Do I necessarily tell the class index #110

Open xgxofdream opened 4 years ago

xgxofdream commented 4 years ago

Hi Thanks for this nice code.

I have to tell the code:

CAT_CLASS_INDEX = 281

is there any way that the code get the class-index automatically?

Many thanks.

RaphaelMeudec commented 4 years ago

I'm thinking about auto-infering the target index to the index with max confidence, but it's not sure as of today. For now, you should provide the target index.

juniorpires commented 4 years ago

One question: if I use callbacks it will apply GRAD CAM (for example) in different images classes, but in the constructor I'll put only one class_index (class_index=0, for example). How this work?

RaphaelMeudec commented 4 years ago

@juniorpires The trick for now is to build datasets subsets by class (which is not optimal). I'm working on it atm to:

juniorpires commented 4 years ago

@RaphaelMeudec Thank you for the explanation.