Skip to content

Commit

Permalink
notebook update
Browse files Browse the repository at this point in the history
  • Loading branch information
jameswex committed Nov 20, 2018
1 parent 1b2364c commit 42ee7ed
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions Run TCAV.ipynb
Expand Up @@ -14,7 +14,7 @@
" * images for the class/labels of interest\n",
" * random images that will be negative examples when learning CAVs (images that probably don't belong to any concepts)\n",
"2. **model wrapper**: an instance of ModelWrapper abstract class (in model.py). This tells TCAV class (tcav.py) how to communicate with your model (e.g., getting internal tensors)\n",
"3. **act_generator**: an instance of ActivationGeneratorInterface that tells TCAV class how to get activations from the model\n",
"3. **act_generator**: an instance of ActivationGeneratorInterface that tells TCAV class how to load example data and how to get activations from the model\n",
"\n",
"\n",
"\n",
Expand Down Expand Up @@ -210,7 +210,7 @@
"source": [
"## Step 3. Implement a class that returns activations (maybe with caching!)\n",
"\n",
"Lastly, you will implement a class of the ActivationGenerationInterface which TCAV uses to call into your model wrapper and return activations. I pulled out this function outside of mymodel because this step often takes the longest. By making it modular, you can cache your activations and/or parallelize your computations, as I have done in `ActivationGeneratorBase.process_and_load_activations` in `activation_generator.py`.\n",
"Lastly, you will implement a class of the ActivationGenerationInterface which TCAV uses to load example data for a given concept or target, call into your model wrapper and return activations. I pulled out this logic outside of mymodel because this step often takes the longest. By making it modular, you can cache your activations and/or parallelize your computations, as I have done in `ActivationGeneratorBase.process_and_load_activations` in `activation_generator.py`.\n",
"\n",
"\n",
"The `process_and_load_activations` method of the activation generator must return a dictionary of activations that has concept or target name as a first key, and the bottleneck name as a second key. So something like:\n",
Expand Down

0 comments on commit 42ee7ed

Please sign in to comment.