You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When using a model in the GPU, when no cav vectors are precomputed (i.e. the ./cav folder has not been created), and when using the default classifier for TCAV() (i.e. passing classifier=None), running tcav.compute_cavs() throws a wrong-device error.
To Reproduce
Steps to reproduce the behavior:
Remove precomputed cav vectors (if any), i.e. the ./cav folder
馃悰 Bug
When using a model in the GPU, when no cav vectors are precomputed (i.e. the
./cav
folder has not been created), and when using the default classifier forTCAV()
(i.e. passingclassifier=None
), runningtcav.compute_cavs()
throws a wrong-device error.To Reproduce
Steps to reproduce the behavior:
./cav
foldertcav.compute_cavs(...)
line throws:See the full stack here
Expected behavior
The method
compute_cavs()
should run without errors, in any of CPU or GPU (or the docs should state that only CPU is supported?)Environment
Describe the environment used for Captum
conda
,pip
, source): sourcepip install -e ~/software/captum
Additional context
DEVICE = 'cpu'
in the code above) the code runs without error, and saves the CAV vectors to the./cav
folderPossible culprit
SkLearnSGDClassifier
model and how it handles devicesDefaultClassifier().train_and_eval()
method:Btw, TCAV is an awesome feature! 馃殌
The text was updated successfully, but these errors were encountered: