# ECH

## Dependency
- `pip install -r requirement.txt`

## Command lines
- Training with evaluation
    - ECH: `python main.py --dataset cifar10 --arch resnet34 --head ep`
    - LinH: `python main.py --dataset cifar10 --arch resnet34 --head lin`
    - CosH: `python main.py --dataset cifar10 --arch resnet34 --head cos`
    - GPH: `python DUE/train_due2.py --dataset cifar10 --resnet34`

- Adv. detect
    - adv attack: `python adv_attack.py --arch resnet34 --exp_load checkpoint_path --head lin --dataset cifar10 --method evaluate` 
    - adv_analysis: `python adv_analysis.py --arch resnet34 --exp_load checkpoint_path --head lin --dataset cifar10 --method evaluate`


## Visualization
- To draw Fig. 2:
    - theorem_visualization.ipynb

- Appendix. Figure10
    - analysis.ipynb

