| | |
| | | valid_set=dev |
| | | test_sets="dev test" |
| | | |
| | | config=paraformer_conformer_12e_6d_2048_256.yaml |
| | | config=transformer_12e_6d_2048_256.yaml |
| | | model_dir="baseline_$(basename "${config}" .yaml)_${lang}_${token_type}_${tag}" |
| | | |
| | | |
| | |
| | | log_file="${exp_dir}/exp/${model_dir}/train.log.txt.${current_time}" |
| | | echo "log_file: ${log_file}" |
| | | |
| | | export CUDA_VISIBLE_DEVICES=$CUDA_VISIBLE_DEVICES |
| | | gpu_num=$(echo $CUDA_VISIBLE_DEVICES | awk -F "," '{print NF}') |
| | | torchrun \ |
| | | --nnodes 1 \ |
| | |
| | | if [ ${stage} -le 5 ] && [ ${stop_stage} -ge 5 ]; then |
| | | echo "stage 5: Inference" |
| | | |
| | | if ${inference_device} == "cuda"; then |
| | | if [ ${inference_device} == "cuda" ]; then |
| | | nj=$(echo $CUDA_VISIBLE_DEVICES | awk -F "," '{print NF}') |
| | | else |
| | | inference_batch_size=1 |
| | |
| | | |
| | | for dset in ${test_sets}; do |
| | | |
| | | inference_dir="${exp_dir}/exp/${model_dir}/${inference_checkpoint}/${dset}" |
| | | inference_dir="${exp_dir}/exp/${model_dir}/infer-${inference_checkpoint}/${dset}" |
| | | _logdir="${inference_dir}/logdir" |
| | | |
| | | mkdir -p "${_logdir}" |
| | |
| | | done |
| | | utils/split_scp.pl "${key_file}" ${split_scps} |
| | | |
| | | gpuid_list_array=(${gpuid_list//,/ }) |
| | | gpuid_list_array=(${CUDA_VISIBLE_DEVICES//,/ }) |
| | | for JOB in $(seq ${nj}); do |
| | | { |
| | | id=$((JOB-1)) |