tensorflow / lucid

A collection of infrastructure and tools for research in neural network interpretability.
Apache License 2.0
4.65k stars 655 forks source link

Not able to use GPU #157

Closed madnavs closed 5 years ago

madnavs commented 5 years ago

I have tied lucid with a bunch of tensoflow-gpu versions and most of them were giving errors like this NodeDef mentions attr 'Truncate' not in Op<name=Cast; signature=x:SrcT -> y:DstT; attr=SrcT:type; attr=DstT:type>; NodeDef: import/ToFloat = Cast[DstT=DT_FLOAT, SrcT=DT_UINT8, Truncate=false] or too old that some ops are not defined

The only way that works for me was pip install lucid[tf] which works but only CPU version

Can I get more precise compatibility instructions?

ludwigschubert commented 5 years ago

@madnavs sorry you're running into compatibility issues. I think this is unlikely to be an issue with lucid, though—the error you describe afaik happens when you try to import a saved graph from a newer TF version in an older one. I can't help with setting up tensorflow in general, but ensure you're using a new-ish version by inspecting the version of TF your actual code loads:

import tensorflow as tf
print(tf.__version__)

(We run the tests on r1.13, but anything above ~1.11 should mostly work.)

If you're installing a modern version and still running into these import issues with models from our modelzoo, please reopen—and in that case if you could add a reproduction that would be awesome; preferably in a colab notebook. :-)