Skip to content

Commit

Permalink
Update doc_examples.md
Browse files Browse the repository at this point in the history
  • Loading branch information
smilesun authored Oct 9, 2023
1 parent d6b9127 commit 1d4ca1d
Showing 1 changed file with 0 additions and 121 deletions.
121 changes: 0 additions & 121 deletions docs/doc_examples.md
Original file line number Diff line number Diff line change
Expand Up @@ -37,125 +37,4 @@ python main_out.py --tr_d 0 --te_d 3 4 --bs=2 --task=mnistcolor10 --aname=hduva
```


## Larger images:

### model diva with implemented neural network
```shell
python main_out.py --te_d=caltech --task=mini_vlcs --debug --bs=2 --aname=diva --nname=alexnet --npath_dom=examples/nets/resnet.py --gamma_y=7e5 --gamma_d=1e5
```

### model diva with custom neural network
```shell
python main_out.py --te_d=caltech --task=mini_vlcs --debug --bs=2 --aname=diva --npath=examples/nets/resnet.py --npath_dom=examples/nets/resnet.py --gamma_y=7e5 --gamma_d=1e5
```

### model deepall with implemented neural network
```shell
python main_out.py --te_d=caltech --task=mini_vlcs --debug --bs=8 --aname=deepall --nname=alexnet
```

### model dann with implemented neural network
```shell
python main_out.py --te_d=caltech --task=mini_vlcs --debug --bs=8 --aname=dann --nname=alexnet
```

### model jigen with implemented neural network
```shell
python main_out.py --te_d=caltech --task=mini_vlcs --debug --bs=8 --aname=jigen --nname=alexnet --pperm=1 --nperm=100 --grid_len=3
```

### model matchdg with implemented neural network
```shell
python main_out.py --te_d=caltech --task=mini_vlcs --debug --bs=2 --aname=matchdg --epochs_ctr=3 --epos=6 --nname=alexnet
```

### hduva with implemented neural network
```shell
python main_out.py --te_d=caltech --bs=2 --task=mini_vlcs --aname=hduva --nname=conv_bn_pool_2 --gamma_y=7e5 --nname_topic_distrib_img2topic=conv_bn_pool_2 --nname_encoder_sandwich_layer_img2h4zd=conv_bn_pool_2
```

### hduva use alex net
```shell
python main_out.py --te_d=caltech --bs=2 --task=mini_vlcs --aname=hduva --nname=conv_bn_pool_2 --gamma_y=7e5 --nname_topic_distrib_img2topic=conv_bn_pool_2 --nname_encoder_sandwich_layer_img2h4zd=alexnet
```


## Custom Neural Network

### model deepall with custom neural network
```shell
python main_out.py --te_d=caltech --task=mini_vlcs --debug --bs=8 --aname=deepall --npath=examples/nets/resnet.py
```

### model matchdg with custom neural network
```shell
python main_out.py --te_d=caltech --task=mini_vlcs --bs=2 --aname=matchdg --epochs_ctr=3 --epos=6 --npath=examples/nets/resnet.py
```

### hduva use custom net for sandwich encoder
```shell
python main_out.py --te_d=caltech --bs=2 --task=mini_vlcs --aname=hduva --nname=conv_bn_pool_2 --gamma_y=7e5 --nname_topic_distrib_img2topic=conv_bn_pool_2 --npath_encoder_sandwich_layer_img2h4zd=examples/nets/resnet.py
```

### hduva use custom net for topic encoder
```shell
python main_out.py --te_d=caltech --bs=2 --task=mini_vlcs --aname=hduva --nname=conv_bn_pool_2 --gamma_y=7e5 --npath_topic_distrib_img2topic=examples/nets/resnet.py --nname_encoder_sandwich_layer_img2h4zd=conv_bn_pool_2
```

### hduva use custom net for classification encoder
```shell
python main_out.py --te_d=caltech --bs=2 --task=mini_vlcs --aname=hduva --npath=examples/nets/resnet.py --gamma_y=7e5 --nname_topic_distrib_img2topic=conv_bn_pool_2 --nname_encoder_sandwich_layer_img2h4zd=conv_bn_pool_2
```


## User defined tasks

### Folder Task
#### Folder Task with implemented neural network
```shell
python main_out.py --te_d=caltech --tpath=examples/tasks/task_vlcs.py --debug --bs=2 --nname=alexnet --aname=diva --nname_dom=alexnet --gamma_y=7e5 --gamma_d=1e5
```

#### Folder Task with externally user defined neural network
```shell
python main_out.py --te_d=caltech --tpath=examples/tasks/task_vlcs.py --debug --bs=2 --npath=examples/nets/resnet.py --aname=diva --npath_dom=examples/nets/resnet.py --gamma_y=7e5 --gamma_d=1e5
```

### ImagePath Task
#### ImagePath Task with implemented algorithm
```shell
python main_out.py --te_d=sketch --tpath=examples/tasks/demo_task_path_list_small.py --debug --bs=2 --nname=alexnet --aname=diva --nname_dom=alexnet --gamma_y=7e5 --gamma_d=1e5
```

#### ImagePath Task with externally user defined neural network
```shell
python main_out.py --te_d=sketch --tpath=examples/tasks/demo_task_path_list_small.py --debug --bs=2 --npath=examples/nets/resnet.py --aname=diva --npath_dom=examples/nets/resnet.py --gamma_y=7e5 --gamma_d=1e5
```

## Custom algorithm defined in external python file
```shell
python main_out.py --te_d=caltech --task=mini_vlcs --debug --bs=3 --apath=examples/models/demo_custom_model.py --aname=custom --nname_argna2val my_custom_arg_name --nname_argna2val alexnet
```

```shell
python main_out.py --te_d=caltech --task=mini_vlcs --debug --bs=3 --apath=examples/models/demo_custom_model.py --aname=custom --npath_argna2val my_custom_arg_name --npath_argna2val examples/nets/resnet.py
```

## Adversarial images training
```shell
python main_out.py --te_d=0 --task=mnistcolor10 --keep_model --aname=deepall --trainer=dial --nname=conv_bn_pool_2
```
### Train DIVA model with DIAL trainer

```shell
python main_out.py --te_d 0 1 2 --tr_d 3 7 --task=mnistcolor10 --aname=diva --nname=conv_bn_pool_2 --nname_dom=conv_bn_pool_2 --gamma_y=7e5 --gamma_d=1e5 --trainer=dial
```
### Set hyper-parameters for trainer as well
```shell
python main_out.py --te_d 0 1 2 --tr_d 3 7 --task=mnistcolor10 --aname=diva --nname=conv_bn_pool_2 --nname_dom=conv_bn_pool_2 --gamma_y=7e5 --gamma_d=1e5 --trainer=dial --dial_steps_perturb=1
```

## Meta Learning Domain Generalization
```shell
python main_out.py --te_d=caltech --task=mini_vlcs --debug --bs=8 --aname=deepall --trainer=mldg --nname=alexnet
```

0 comments on commit 1d4ca1d

Please sign in to comment.