moboehle / b-cos Goto Github PK
View Code? Open in Web Editor NEWB-cos Networks: Alignment is All we Need for Interpretability
License: Other
B-cos Networks: Alignment is All we Need for Interpretability
License: Other
Hello,
thanks for your fascinating work. I am trying to use the B-cos network (the densenet121 named “densenet_121_cossched”) in my research but I struggle with having it transfer effectively to smaller datasets, e.g. CUB2011. In fact, it overfits much more ( much worse final test acc) and improves a lot slower than the conventional densenet (In fact, only retraining the final layer leads to no learning whatsoever across a range of hyperparameters that all work for the conventional one). Since you have experience with training this network, I figure I might just ask you:
Any answers would be greatly appreciated :)
Greetings
Hello,
I attempting to run one of the basic experiments with the TinyImagenet dataset. Below are the steps I've taken and the issues I am running into. I would very much appreciate any help.
I've downloaded the tiny-imagenet-200 dataset from the following locations: http://cs231n.stanford.edu/tiny-imagenet-200.zip
I unzipped to the ./data folder where I then resorted the data into the expected format for the train and val folders. The directory structure is as follows:
tiny-imagenet-200
train/
class1/
sample1.jpg
sample2.jpg
...
class2/
sample1.jpg
sample2.jpg
...
val/
class1/
sample1.jpg
sample2.jpg
...
class2/
sample1.jpg
sample2.jpg
...
I then tried to run the experiment for Imagenet on this dataset with the following command:
py experiments/Imagenet/bcos/model.py --single_epoch=true --experiment_name=resnet_34 --dataset_name=TinyImagenet --model_config=bcos
It seems like it loads up the data but errors out with the following:
I then assumed that there may be something wrong with the data loader so I then attempted to simply load the data and iterate through the Dataloader. This is the result:
Not sure if I am doing anything wrong. Any input would be appreciated.
Thanks
Hi all,
Thanks for the great contribution. I was wondering if there is a 3D version
of BcosConv3D
? or if there is any limitation to scale from 2D to 3D. I would like to apply it for tumor lesion segmentation in 3D MRI.
Best,
Sulaiman
Thank you for your nice work!
I am a beginner in interpretability and would like some quantitative metrics assessing the "interpretability." I found the "localization metric" in your paper really interesting but unfortunately could find the definition for it.
I am wondering if you could point me to some repositories/papers, or suggest some other promising metrics.
Thank you so much!
Hi all, I was trying to run the code but I faced multiple issues:
I am running the experiments/Imagenet/bcos/model.py, the save_path in the code is still trying to reach the CIFAR10 dataset.
In model.py, get_optimizer():
"the_model" does not have an attribute called "opti"
Hi, Thanks for your interesting paper.
I'm trying to train your model but only I can find is Trainer class in training folder and not the training loop code.
Can you please add your code for training loop code OR
give some guidelines for reproducing your implementation?
Thanks a lot.
Hi , thanks for your work. It really open my mind for the interpretable of DNN with a replacement of linenar transform .
But when reading the paper ,i have some point not understanding well as below, so if you can help to answear it ?
1.What kind of metric is the 'localisation metric',what 's the physical meaning? (Fig 6)
2.What's the meaning of baseline 'orcale attribution' and 'uniform attribution' ?(Fig 6)
3.Is there some parameter refer to the area in red ? Or just for better visual ? (Fig 2)
Hello
I have a few questions regarding the contents of the result folder:
1- How have you calculated the logit.np? the shape of this array is [50000,2]. 50000 is the number of images in the ImageNet validation set, but I cannot understand where 2 comes from. Is there any way that I can (re)produce it?
2- Could you please provide more information to help me better understand the contents of the feature_layer_x.json? How are the neurons indexed? What do the values of each neuron represent?
3- How have you generated feature_layer_x_neurons_sorted.txt?
Thanks
By following the README of Training,an error happens when run the code as below.
Could you help to check it ,thanks !
Traceback (most recent call last):
File "D:/1.Study/PycharmProjects/Reproduce/B-cos-main/experiments/Imagenet/bcos/model.py", line 93, in
start_training(cmd_args, get_model, get_optimizer)
File "D:\1.Study\PycharmProjects\Reproduce\B-cos-main\training\training_utils.py", line 17, in start_training
training_loop(params, get_model, get_optimizer)
File "D:\1.Study\PycharmProjects\Reproduce\B-cos-main\training\training_utils.py", line 83, in training_loop
data_handler = Data(params.dataset_name, rank=ddp_rank,
File "D:\1.Study\PycharmProjects\Reproduce\B-cos-main\data\data_handler.py", line 82, in init
self.train_data_loader = self.init_data_loader(train=True,
File "D:\1.Study\PycharmProjects\Reproduce\B-cos-main\data\data_handler.py", line 105, in init_data_loader
data = Data.datasets[self.dataset_name](self.data_path, train=train, download=False,
File "D:\1.Study\PycharmProjects\Reproduce\B-cos-main\data\datasets.py", line 34, in init
path = os.path.join(root, self.base_folder, "train" if train else "val")
File "D:\Software\anaconda3\lib\ntpath.py", line 78, in join
path = os.fspath(path)
TypeError: expected str, bytes or os.PathLike object, not NoneType
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.