BaiShuanghao / Prompt-based-Distribution-Alignment

[AAAI 2024] Prompt-based Distribution Alignment for Unsupervised Domain Adaptation
39 stars 2 forks source link

About train.py #1

Open leejq666 opened 6 months ago

leejq666 commented 6 months ago

Hi! When I tried to train the model through "bash scripts/pda/main_pda.sh officehome b32_ep10_officehome PDA ViT-B/16 2 a-c 0", I found that there are many parameters in train.py that need to be set by myself. Can you provide an example because I am not sure about the capitalization of some model names or the specific location of files.Thanks!

leejq666 commented 6 months ago

Always prompt "train.py: error: argument --root: expected one argument" error

BaiShuanghao commented 6 months ago

You need to modify the value of --root to your own directory of data.

leejq666 commented 6 months ago

非常感谢您的回复!我已经修改了train.py中的 --root路径:parser.add_argument("--root", type=str, default="/home/leejq/leejqsave/Prompt/Prompt-based-Distribution-Alignment/datasets/office_home", help="path to dataset"),但仍然提示:train.py: error: argument --root: expected one argument

leejq666 commented 6 months ago

此外,argparse.ArgumentParser()中还有很多参数值需要自己设置,里面包含了模型名称以及数据集名称,大小写并没有明确说明。比较疑惑

BaiShuanghao commented 6 months ago

If you use .sh file to start the program, you need to modify the value of --root on . sh file. These argument of the model is referred to the name of the trainer. The dataset name is referred to the dataset config file name.

leejq666 commented 6 months ago

非常感谢!已经成功运行!

BaiShuanghao commented 6 months ago

That's great! Hope the code could help you.