2 Star 2 Fork 0

独钓寒江雪/CrossSentiment

加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
文件
该仓库未声明开源许可证文件(LICENSE),使用请关注具体项目描述及其代码上游依赖。
克隆/下载
run_sentiment_experiments.sh 5.64 KB
一键复制 编辑 原始数据 按行查看 历史
独钓寒江雪 提交于 2021-06-11 19:12 . up
#!/bin/bash
# . activate xformer-multisource-domain-adaptation
# . setenv.sh
run_name="(emnlp-sentiment)"
model_dir="./emnlp_sentiment_experiments"
tags="emnlp sentiment experiments"
# for i in 1000,1 1001,2 666,3 7,4 50,5; do IFS=","; set -- $i;
# 1) Basic
python emnlp_final_experiments/sentiment-analysis/train_basic.py \
--dataset_loc data/sentiment-dataset \
--train_pct 0.9 \
--n_gpu 1 \
--n_epochs 5 \
--domains books dvd electronics kitchen_\&_housewares \
--seed 1 \
--run_name "basic-distilbert-${2}" \
--model_dir ${model_dir}/basic_distilbert \
--tags ${tags} \
--batch_size 8 \
--lr 0.00003
# indices_dir=`ls -d -t ${model_dir}/basic_distilbert/*/ | head -1`
# 2) Adv-6
# python emnlp_final_experiments/sentiment-analysis/train_basic_domain_adversarial.py \
# --dataset_loc data/sentiment-dataset \
# --train_pct 0.9 \
# --n_gpu 1 \
# --n_epochs 5 \
# --domains books dvd electronics kitchen_\&_housewares \
# --seed ${1} \
# --run_name "distilbert-adversarial-6-${2}" \
# --model_dir ${model_dir}/distilbert_adversarial_6 \
# --tags ${tags} \
# --batch_size 8 \
# --lr 0.00003 \
# --supervision_layer 6 \
# --indices_dir ${indices_dir}
# # 3) Adv-3
# python emnlp_final_experiments/sentiment-analysis/train_basic_domain_adversarial.py \
# --dataset_loc data/sentiment-dataset \
# --train_pct 0.9 \
# --n_gpu 1 \
# --n_epochs 5 \
# --domains books dvd electronics kitchen_\&_housewares \
# --seed ${1} \
# --run_name "distilbert-adversarial-3-${2}" \
# --model_dir ${model_dir}/distilbert_adversarial_3 \
# --tags ${tags} \
# --batch_size 8 \
# --lr 0.00003 \
# --supervision_layer 3 \
# --indices_dir ${indices_dir}
# # 4) Independent-Avg
# python emnlp_final_experiments/sentiment-analysis/train_multi_view_averaging_individuals.py \
# --dataset_loc data/sentiment-dataset \
# --train_pct 0.9 \
# --n_gpu 1 \
# --n_epochs 5 \
# --domains books dvd electronics kitchen_\&_housewares \
# --seed ${1} \
# --run_name "distilbert-ensemble-averaging-individuals-${2}" \
# --model_dir ${model_dir}/distilbert_ensemble_averaging_individuals \
# --tags ${tags} \
# --batch_size 8 \
# --lr 0.00003 \
# --indices_dir ${indices_dir}
# avg_model=`ls -d -t ${model_dir}/distilbert_ensemble_averaging_individuals/*/ | head -1`
# # 5) Independent-Ft
# python emnlp_final_experiments/sentiment-analysis/train_multi_view_selective_weighting.py \
# --dataset_loc data/sentiment-dataset \
# --train_pct 0.9 \
# --n_gpu 1 \
# --n_epochs 30 \
# --domains books dvd electronics kitchen_\&_housewares \
# --seed ${1} \
# --run_name "distilbert-ensemble-selective-attention-${2}" \
# --model_dir ${model_dir}/distilbert_ensemble_selective_attention \
# --tags ${tags} \
# --pretrained_model ${avg_model} \
# --indices_dir ${indices_dir}
# # 6) MoE-DC
# python emnlp_final_experiments/sentiment-analysis/train_multi_view_domainclassifier_individuals.py \
# --dataset_loc data/sentiment-dataset \
# --train_pct 0.9 \
# --n_gpu 1 \
# --n_epochs 5 \
# --domains books dvd electronics kitchen_\&_housewares \
# --seed ${1} \
# --run_name "distilbert-ensemble-domainclassifier-individuals-${2}" \
# --model_dir ${model_dir}/distilbert_ensemble_domainclassifier_individuals \
# --tags ${tags} \
# --batch_size 8 \
# --lr 0.00003 \
# --indices_dir ${indices_dir} \
# --pretrained_model ${avg_model}
# # 7) MoE-Avg
# python emnlp_final_experiments/sentiment-analysis/train_multi_view.py \
# --dataset_loc data/sentiment-dataset \
# --train_pct 0.9 \
# --n_gpu 1 \
# --n_epochs 5 \
# --domains books dvd electronics kitchen_\&_housewares \
# --seed ${1} \
# --run_name "distilbert-ensemble-averaging-${2}" \
# --model_dir ${model_dir}/distilbert_ensemble_averaging \
# --tags ${tags} \
# --batch_size 8 \
# --lr 0.00003 \
# --ensemble_basic \
# --indices_dir ${indices_dir}
# # 8) MoE-Att
# python emnlp_final_experiments/sentiment-analysis/train_multi_view.py \
# --dataset_loc data/sentiment-dataset \
# --train_pct 0.9 \
# --n_gpu 1 \
# --n_epochs 5 \
# --domains books dvd electronics kitchen_\&_housewares \
# --seed ${1} \
# --run_name "distilbert-ensemble-attention-${2}" \
# --model_dir ${model_dir}/distilbert_ensemble_attention \
# --tags ${tags} \
# --batch_size 8 \
# --lr 0.00003 \
# --indices_dir ${indices_dir}
# # 9) MoE-Att-Adv-6
# python emnlp_final_experiments/sentiment-analysis/train_multi_view_domain_adversarial.py \
# --dataset_loc data/sentiment-dataset \
# --train_pct 0.9 \
# --n_gpu 1 \
# --n_epochs 5 \
# --domains books dvd electronics kitchen_\&_housewares \
# --seed ${1} \
# --run_name "distilbert-ensemble-attention-adversarial-6-${2}" \
# --model_dir ${model_dir}/distilbert_ensemble_attention_adversarial_6 \
# --tags ${tags} \
# --batch_size 8 \
# --lr 0.00003 \
# --supervision_layer 6 \
# --indices_dir ${indices_dir}
# # 10) MoE-Att-Adv-3
# python emnlp_final_experiments/sentiment-analysis/train_multi_view_domain_adversarial.py \
# --dataset_loc data/sentiment-dataset \
# --train_pct 0.9 \
# --n_gpu 1 \
# --n_epochs 5 \
# --domains books dvd electronics kitchen_\&_housewares \
# --seed ${1} \
# --run_name "distilbert-ensemble-attention-adversarial-3-${2}" \
# --model_dir ${model_dir}/distilbert_ensemble_attention_adversarial_4 \
# --tags ${tags} \
# --batch_size 8 \
# --lr 0.00003 \
# --supervision_layer 3 \
# --indices_dir ${indices_dir}
# done
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
Python
1
https://gitee.com/MenglongLu/cross-sentiment.git
git@gitee.com:MenglongLu/cross-sentiment.git
MenglongLu
cross-sentiment
CrossSentiment
master

搜索帮助