https://github.com/chenliu-1996/mahalanobis
Science Score: 13.0%
This score indicates how likely this project is to be science-related based on various indicators:
-
○CITATION.cff file
-
✓codemeta.json file
Found codemeta.json file -
○.zenodo.json file
-
○DOI references
-
○Academic publication links
-
○Academic email domains
-
○Institutional organization owner
-
○JOSS paper metadata
-
○Scientific vocabulary similarity
Low similarity (10.7%) to scientific vocabulary
Repository
Basic Info
- Host: GitHub
- Owner: ChenLiu-1996
- Language: Python
- Default Branch: main
- Size: 31.3 KB
Statistics
- Stars: 2
- Watchers: 1
- Forks: 0
- Open Issues: 0
- Releases: 0
Metadata Files
README.md
Name To Be Determined
Reproducing Results.
Train with and without full-gradient
Using (CIFAR-10 + SimCLR + ResNet) as an example.
cd src
python main.py --dataset cifar10 --model resnet --learning-method simclr --random-seed 1 --full-grad
python main.py --dataset cifar10 --model resnet --learning-method simclr --random-seed 1
Preparation
Environment
We developed the codebase in a miniconda environment.
Tested on Python 3.9.13 + PyTorch 1.12.1.
How we created the conda environment:
conda create --name BetterCosine pytorch==1.12.1 torchvision==0.13.1 torchaudio==0.12.1 cudatoolkit=11.3 -c pytorch -y
conda activate BetterCosine
conda install scikit-image scikit-learn pillow matplotlib seaborn tqdm -c anaconda -y
python -m pip install tinyimagenet
python -m pip install natsort
python -m pip install phate
python -m pip install timm
Dataset
Most datasets
Most datasets (MNIST, CIFAR-10, CIFAR-100, STL-10) can be directly downloaded via the torchvision API as you run the training code. However, for the following datasets, additional effort is required.
ImageNet data
NOTE: In order to download the images using wget, you need to first request access from http://image-net.org/download-images. ``` cd data/ mkdir imagenet && cd imagenet wget https://image-net.org/data/ILSVRC/2012/ILSVRC2012imgtrain.tar wget https://image-net.org/data/ILSVRC/2012/ILSVRC2012imgval.tar wget https://image-net.org/data/ILSVRC/2012/ILSVRC2012devkitt12.tar.gz
The following lines are instructions from Facebook Research. https://github.com/facebookarchive/fb.resnet.torch/blob/master/INSTALL.md#download-the-imagenet-dataset.
mkdir train && mv ILSVRC2012imgtrain.tar train/ && cd train tar -xvf ILSVRC2012imgtrain.tar find . -name "*.tar" | while read NAME ; do mkdir -p "${NAME%.tar}"; tar -xvf "${NAME}" -C "${NAME%.tar}"; rm -f "${NAME}"; done cd ..
mkdir val && mv ILSVRC2012imgval.tar val/ && cd val && tar -xvf ILSVRC2012imgval.tar wget -qO- https://raw.githubusercontent.com/soumith/imagenetloader.torch/master/valprep.sh | bash
```
Owner
- Name: Chen Liu
- Login: ChenLiu-1996
- Kind: user
- Location: New Haven
- Company: Yale University
- Website: https://chenliu-1996.github.io/
- Twitter: ChenLiu_1996
- Repositories: 5
- Profile: https://github.com/ChenLiu-1996
CS PhD student at @KrishnaswamyLab, @YaleUniversity. Reviewing Committee member at NeurIPS, ICLR, ICML.
GitHub Events
Total
- Watch event: 2
- Push event: 15
- Create event: 2
Last Year
- Watch event: 2
- Push event: 15
- Create event: 2