Skip to content
项目
群组
代码片段
帮助
当前项目
正在载入...
登录 / 注册
切换导航面板
F
Fairseq-S2T
概览
Overview
Details
Activity
Cycle Analytics
版本库
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
问题
0
Issues
0
列表
Board
标记
里程碑
合并请求
0
Merge Requests
0
CI / CD
CI / CD
流水线
作业
日程表
图表
维基
Wiki
代码片段
Snippets
成员
Collapse sidebar
Close sidebar
活动
图像
聊天
创建新问题
作业
提交
Issue Boards
Open sidebar
xuchen
Fairseq-S2T
Commits
c4f60362
Commit
c4f60362
authored
Mar 16, 2021
by
xuchen
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Modify the egs scripts
parent
f006cf77
显示空白字符变更
内嵌
并排
正在显示
6 个修改的文件
包含
53 行增加
和
13 行删除
+53
-13
egs/librispeech/asr/decode.sh
+5
-3
egs/librispeech/asr/run.sh
+11
-1
egs/mustc/asr/decode.sh
+7
-5
egs/mustc/asr/run.sh
+15
-1
egs/mustc/st/decode.sh
+5
-3
egs/mustc/st/run.sh
+10
-0
没有找到文件。
egs/librispeech/asr/decode.sh
查看文件 @
c4f60362
#! /bin/bash
#! /bin/bash
# training the model
gpu_num
=
1
gpu_num
=
1
test_subset
=(
test-clean test-other
)
test_subset
=(
test-clean test-other
)
exp_name
=
test
exp_name
=
if
[
"$#"
-eq
1
]
;
then
exp_name
=
$1
fi
n_average
=
10
n_average
=
10
beam_size
=
5
beam_size
=
5
...
...
egs/librispeech/asr/run.sh
查看文件 @
c4f60362
...
@@ -204,13 +204,23 @@ if [ ${stage} -le 2 ] && [ ${stop_stage} -ge 2 ]; then
...
@@ -204,13 +204,23 @@ if [ ${stage} -le 2 ] && [ ${stop_stage} -ge 2 ]; then
dec_model
=
checkpoint_best.pt
dec_model
=
checkpoint_best.pt
fi
fi
if
[[
-z
${
device
}
||
${#
device
[@]
}
-eq
0
]]
;
then
if
[[
${
gpu_num
}
-eq
0
]]
;
then
device
=()
else
source
./local/utils.sh
device
=
$(
get_devices
$gpu_num
0
)
fi
fi
export
CUDA_VISIBLE_DEVICES
=
${
device
}
#tmp_file=$(mktemp ${model_dir}/tmp-XXXXX)
#tmp_file=$(mktemp ${model_dir}/tmp-XXXXX)
#trap 'rm -rf ${tmp_file}' EXIT
#trap 'rm -rf ${tmp_file}' EXIT
result_file
=
${
model_dir
}
/decode_result
result_file
=
${
model_dir
}
/decode_result
[[
-f
${
result_file
}
]]
&&
rm
${
result_file
}
[[
-f
${
result_file
}
]]
&&
rm
${
result_file
}
for
subset
in
${
test_subset
[@]
}
;
do
for
subset
in
${
test_subset
[@]
}
;
do
subset
=
${
subset
}
_asr
subset
=
${
subset
}
cmd
=
"python
${
root_dir
}
/fairseq_cli/generate.py
cmd
=
"python
${
root_dir
}
/fairseq_cli/generate.py
${
data_dir
}
/
$lang
${
data_dir
}
/
$lang
--config-yaml
${
data_config
}
--config-yaml
${
data_config
}
...
...
egs/mustc/asr/decode.sh
查看文件 @
c4f60362
#! /bin/bash
#! /bin/bash
# training the model
gpu_num
=
1
gpu_num
=
1
test_subset
=(
tst-COMMON
)
test_subset
=(
tst-COMMON
)
exp_name
=
test
exp_name
=
if
[
"$#"
-eq
1
]
;
then
exp_name
=
$1
fi
n_average
=
10
n_average
=
10
beam_size
=
5
beam_size
=
5
max_tokens
=
40000
max_tokens
=
40000
cmd
=
"./run.sh
cmd
=
"./run.sh
--stage
3
--stage
2
--stop_stage
3
--stop_stage
2
--gpu_num
${
gpu_num
}
--gpu_num
${
gpu_num
}
--exp_name
${
exp_name
}
--exp_name
${
exp_name
}
--test_subset
${
test_subset
}
--test_subset
${
test_subset
}
...
...
egs/mustc/asr/run.sh
查看文件 @
c4f60362
...
@@ -205,6 +205,16 @@ if [ ${stage} -le 2 ] && [ ${stop_stage} -ge 2 ]; then
...
@@ -205,6 +205,16 @@ if [ ${stage} -le 2 ] && [ ${stop_stage} -ge 2 ]; then
dec_model
=
checkpoint_best.pt
dec_model
=
checkpoint_best.pt
fi
fi
if
[[
-z
${
device
}
||
${#
device
[@]
}
-eq
0
]]
;
then
if
[[
${
gpu_num
}
-eq
0
]]
;
then
device
=()
else
source
./local/utils.sh
device
=
$(
get_devices
$gpu_num
0
)
fi
fi
export
CUDA_VISIBLE_DEVICES
=
${
device
}
#tmp_file=$(mktemp ${model_dir}/tmp-XXXXX)
#tmp_file=$(mktemp ${model_dir}/tmp-XXXXX)
#trap 'rm -rf ${tmp_file}' EXIT
#trap 'rm -rf ${tmp_file}' EXIT
result_file
=
${
model_dir
}
/decode_result
result_file
=
${
model_dir
}
/decode_result
...
@@ -221,7 +231,11 @@ if [ ${stage} -le 2 ] && [ ${stop_stage} -ge 2 ]; then
...
@@ -221,7 +231,11 @@ if [ ${stage} -le 2 ] && [ ${stop_stage} -ge 2 ]; then
--results-path
${
model_dir
}
--results-path
${
model_dir
}
--max-tokens
${
max_tokens
}
--max-tokens
${
max_tokens
}
--beam
${
beam_size
}
--beam
${
beam_size
}
--scoring wer"
--scoring wer
--wer-tokenizer 13a
--wer-lowercase
--wer-remove-punct
"
echo
-e
"
\0
33[34mRun command:
\n
${
cmd
}
\0
33[0m"
echo
-e
"
\0
33[34mRun command:
\n
${
cmd
}
\0
33[0m"
if
[[
$eval
-eq
1
]]
;
then
if
[[
$eval
-eq
1
]]
;
then
...
...
egs/mustc/st/decode.sh
查看文件 @
c4f60362
#! /bin/bash
#! /bin/bash
# training the model
gpu_num
=
1
gpu_num
=
1
test_subset
=(
tst-COMMON
)
test_subset
=(
tst-COMMON
)
exp_name
=
test
exp_name
=
if
[
"$#"
-eq
1
]
;
then
exp_name
=
$1
fi
n_average
=
10
n_average
=
10
beam_size
=
5
beam_size
=
5
...
...
egs/mustc/st/run.sh
查看文件 @
c4f60362
...
@@ -242,6 +242,16 @@ if [ ${stage} -le 2 ] && [ ${stop_stage} -ge 2 ]; then
...
@@ -242,6 +242,16 @@ if [ ${stage} -le 2 ] && [ ${stop_stage} -ge 2 ]; then
dec_model
=
checkpoint_best.pt
dec_model
=
checkpoint_best.pt
fi
fi
if
[[
-z
${
device
}
||
${#
device
[@]
}
-eq
0
]]
;
then
if
[[
${
gpu_num
}
-eq
0
]]
;
then
device
=()
else
source
./local/utils.sh
device
=
$(
get_devices
$gpu_num
0
)
fi
fi
export
CUDA_VISIBLE_DEVICES
=
${
device
}
#tmp_file=$(mktemp ${model_dir}/tmp-XXXXX)
#tmp_file=$(mktemp ${model_dir}/tmp-XXXXX)
#trap 'rm -rf ${tmp_file}' EXIT
#trap 'rm -rf ${tmp_file}' EXIT
result_file
=
${
model_dir
}
/decode_result
result_file
=
${
model_dir
}
/decode_result
...
...
编写
预览
Markdown
格式
0%
重试
或
添加新文件
添加附件
取消
您添加了
0
人
到此讨论。请谨慎行事。
请先完成此评论的编辑!
取消
请
注册
或者
登录
后发表评论