BioroboticsLab / IBA

Information Bottlenecks for Attribution
MIT License
74 stars 9 forks source link

Unneeded closure argument in example notebook #53

Open berleon opened 1 year ago

berleon commented 1 year ago

In the Readout example, a closure is handed into the analyze function: https://github.com/BioroboticsLab/IBA/blob/master/notebooks/pytorch_IBA_train_readout.ipynb

model_loss_closure = lambda x: -torch.log_softmax(model(x), 1)[:, target].mean()
heatmap = iba.analyze(img[None].to(dev), model_loss_closure) 

This is probably not needed