kundajelab / deeplift

Public facing deeplift repo

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

RuntimeError: You set the target layer to an activation layer

MayurDivate opened this issue · comments

Hi,

I trying to implement DeepLIFT to interpret CNN model.
However, I am not able get through following error.

   target_layer_idx=-1)
  File "/Users/n10337547/PycharmProjects/Bitbucket/ModelInterpretation/venv/lib/python3.6/site-packages/deeplift/models.py", line 113, in get_target_contribs_func
    return self._get_func(*args, func_type=FuncType.contribs, **kwargs)
  File "/Users/n10337547/PycharmProjects/Bitbucket/ModelInterpretation/venv/lib/python3.6/site-packages/deeplift/models.py", line 234, in _get_func
    **kwargs) 
  File "/Users/n10337547/PycharmProjects/Bitbucket/ModelInterpretation/venv/lib/python3.6/site-packages/deeplift/models.py", line 47, in _get_func
    self._set_scoring_mode_for_target_layer(target_layer)
  File "/Users/n10337547/PycharmProjects/Bitbucket/ModelInterpretation/venv/lib/python3.6/site-packages/deeplift/models.py", line 133, in _set_scoring_mode_for_target_layer
    +" classification)")
RuntimeError: You set the target layer to an activation layer, which is unusual so I am throwing an error - did you mean to set the target layer to the layer *before* the activation layer instead? (recommended for  classification)

Process finished with exit code 1

My activation layer is softmax layer.
I was wondering whether DeepLIFT supports multi-class classification model?

Thanks,
Mayur

Sorry, I just realized that.
Wait I will try that.
Mayur

Hey, it worked!
Thanks,
Mayur