greentfrapp / lucent

Lucid library adapted for PyTorch
Apache License 2.0
597 stars 89 forks source link

Q: Do you use the same architecture and weights as Clarity does? #17

Closed gergopool closed 3 years ago

gergopool commented 3 years ago

Hi,

I am looking for a trainable InceptionV1 model which shares the same weights with the ones Clarity team uses. Reading your code, I've found these lines:

model_urls = {
    # InceptionV1 model used in Lucid examples, converted by ProGamerGov
    'inceptionv1': 'https://github.com/ProGamerGov/pytorch-old-tensorflow-models/raw/master/inception5h.pth',
}

Does it mean you're using exactly the same architecture and weights, so your render_vis function can reproduce the same pictures that Clarity has published?

Thanks!

greentfrapp commented 3 years ago

Yup that's true for the InceptionV1 model. The model weights provided by @ProGamerGov are the same ones used by the Clarity team in their Lucid examples and also OpenAI Microscope.

ProGamerGov commented 3 years ago

@gergopool The team that created the InceptionV1 had some confusion with version naming and thus listed the model as inception5h in some places. To add to that confusion, InceptionV1 is also known as GoogleNet in some places.

https://stackoverflow.com/questions/43463587/inception5h-vs-inception-v4-what-is-5h

https://github.com/tensorflow/tensorflow/pull/16304

gergopool commented 3 years ago

Thanks! I've just double-checked it on two neurons, the visualizations are nearly the same as the ones I got with the lucid repo.

Great work! :)