moboehle / B-cos

B-cos Networks: Alignment is All we Need for Interpretability
Other
104 stars 10 forks source link

Issues in path and possible memory leak #3

Closed pooyanrg closed 1 year ago

pooyanrg commented 1 year ago

Hi all, I was trying to run the code but I faced multiple issues:

  1. I am running the experiments/Imagenet/bcos/model.py​, the save_path in the code is still trying to reach the CIFAR10 dataset.

  2. In model.py, get_optimizer():

"the_model" does not have an attribute called "opti"

  1. after spending some time I managed to solve above issues (not sure if it is gonna harm the functionality), but when I run the code the GPU runs out of memory! I played with the batch_size, but no luck. I guess that is due to a memory leak somewhere. Can anyone verify that?
moboehle commented 1 year ago

Hi Pooyan, thanks for pointing this out. I updated the readme, it should have contained the following additional arguments --dataset_name=Imagenet --model_config=bcos, sorry for the confusion. I further updated the model.py so the reported error should not occur anymore.

Apart from that, I cannot reproduce your memory errors, with the updated command prompt the training starts without a problem for me.

Hope this helps.

Best Moritz

pooyanrg commented 1 year ago

Thanks.