tensorflow / lucid

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

PyTorch Support #138

Closed jarednielsen closed 5 years ago

jarednielsen commented 5 years ago

Is there PyTorch support for Lucid, or a similar library anyone could recommend?

ludwigschubert commented 5 years ago

I'm afraid there isn't any support for Pytorch. All the concepts should transfer, though, if you plan to build it!

I do know of https://github.com/sunalbert/lucid.pytorch, but I'm unsure what state this project is in. It does link to a bunch of projects in the readme, though I can't vouch for any of them. If you find one you'd recommend, please comment here and we may add it to our Readme.

colah commented 5 years ago

One thing to note is that you may be able to convert your trained PyTorch model to TensorFlow using one of the model conversion libraries. If you do that, you could use lucid to visualize it. :)

jarednielsen commented 5 years ago

Thanks, model conversion definitely seems like the route to go!

krishvishal commented 5 years ago

Did the model conversion route work ?

andrewschreiber commented 4 years ago

OpenAI announced a move to pytorch: https://openai.com/blog/openai-pytorch.

Any change of plans here?

colah commented 4 years ago

Not presently for Lucid. PyTorch has several interpretability projects already who we've been talking to and sharing some of our (not very mature) PyTorch code with. Captum seems to have dedicated engineers working on user-ready infrastructure.

These projects are much better positioned than the lucid maintainers for maintaining a pytorch interpretability library. I'm hopeful they'll support many of the same features eventually.

greentfrapp commented 4 years ago

Since this is a top hit when Googling "lucid pytorch", just wanted to spread the word about the Lucent library! Essentially Lucid for PyTorch and works with torchvision.models. Check out the Colab notebooks at Lucent that reproduces the results from Lucid!