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

Get correct layers of Faster-rcnn with inception resnet v2 to visualise. #147

Closed chunchet-ng closed 5 years ago

chunchet-ng commented 5 years ago

Hi there,

How do i make use of lucid/scratch/scripts/get_model_layers.py to get the layer name, which can further assist me to decide what layers to visualize. I tried to run the code with my model as input, but it will hit:

ValueError: Shapes must be equal rank, but are 5 and 4 for 'PlaceholderWithDefault' (op: 'PlaceholderWithDefault') with input shapes: [1,1,224,224,3].

at

T = render.import_model(model, t_input, t_input)

of

propose_layers_with_shapes(model) function.

ludwigschubert commented 5 years ago

Please use the Stack Overflow tags tensorflow & lucid to ask for help. Stack Overflow provides a better collaborative forum: lots of related questions have been asked there, and some answers may be relevant to you.

When asking for help with a suspected bug, please include a link to demonstrate the issue, preferably as a Colab notebook. It is often impossible to debug from code snippets alone, let alone from error messages or stack traces. Isolate the issue and reduce your code as much as possible before asking for help. Please try to reproduce the bug on one of the models included in lucid.modelzoo. The less code you post, the easier it is for someone to debug, and the more likely you are to get a helpful response.

If you have a question about Lucid’s behavior and want to discuss it with other users, also consider the #proj-lucid channel on the Distill Community Slack Workspace which you may join here.

Lucid is alpha-status research code, and we appreciate your understanding that this can sometimes mean we will not have the resources to resolve your specific issue—even if it may be an entirely reasonable request in a more mature codebase. Thank you! 🤗