dora icon indicating copy to clipboard operation
dora copied to clipboard

The example notebook crashes

Open sofiia-chorna opened this issue 1 year ago • 0 comments

🐛 Bug Report

The example notebook doesn't work: Screenshot 2024-12-11 at 17 44 46

It crashes in the function generate_signals:

Subfolder for sAMS created at dora/sAMS
Experiment name: resnet18.avgpool
Generating s-AMS:   0%|          | 0/2560 [00:01<?, ?it/s]
---------------------------------------------------------------------------
IndexError                                Traceback (most recent call last)
[<ipython-input-6-aa1be0b48bbe>](https://localhost:8080/#) in <cell line: 6>()
      5 
      6 if generate_sams:
----> 7   d.generate_signals(
      8         neuron_idx=neuron_indices,
      9         num_samples = n,

3 frames
[/usr/local/lib/python3.10/dist-packages/dora/dora.py](https://localhost:8080/#) in custom_func(layer_outputs)
    270 
    271             def custom_func(layer_outputs):
--> 272                 loss = layer_outputs[layer_number][channel_number].mean()
    273                 return -constant * loss
    274 

IndexError: index 1 is out of bounds for dimension 0 with size 1

Your help would be greatly appreciated

sofiia-chorna avatar Dec 11 '24 16:12 sofiia-chorna