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
244e506e
Commit
244e506e
authored
Mar 10, 2022
by
xuchen
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix the bug of circular import
parent
5fb50cc3
显示空白字符变更
内嵌
并排
正在显示
11 个修改的文件
包含
31 行增加
和
14 行删除
+31
-14
egs/mustc/mt/conf/inter.yaml
+15
-0
egs/mustc/st/conf/inter.yaml
+6
-5
fairseq/models/speech_to_text/modules/__init__.py
+1
-2
fairseq/models/speech_to_text/pdss2t_transformer.py
+1
-1
fairseq/models/speech_to_text/s2t_dual.py
+1
-1
fairseq/models/speech_to_text/s2t_sate.py
+2
-2
fairseq/models/speech_to_text/s2t_transformer.py
+1
-1
fairseq/models/transformer.py
+1
-1
fairseq/modules/speech_to_text/__init__.py
+3
-0
fairseq/modules/speech_to_text/adapter.py
+0
-1
fairseq/modules/speech_to_text/ctc.py
+0
-0
没有找到文件。
egs/mustc/mt/conf/inter.yaml
0 → 100644
查看文件 @
244e506e
ctc-weight
:
0.2
intermedia-ctc-weight
:
0.1
intermedia-ctc-layers
:
2,4
#target-ctc-weight: 0.3
#target-ctc-layer: 6
#target-intermedia-ctc-weight: 0.1
#target-intermedia-ctc-layers: 2,4
intermedia-adapter
:
league
#intermedia-drop-prob: 0.2
#intermedia-temperature: 5
post-process
:
sentencepiece
\ No newline at end of file
egs/mustc/st/conf/inter.yaml
查看文件 @
244e506e
ctc-weight
:
0.2
ctc-weight
:
0.2
intermedia-ctc-weight
:
0.1
intermedia-ctc-layers
:
6,9
intermedia-ctc-layers
:
6,9
#target-ctc-weight: 0.3
#target-ctc-layer: 6
#target-intermedia-ctc-weight: 0.1
#target-intermedia-ctc-layers: 2,4
intermedia-adapter
:
league
intermedia-adapter
:
league
intermedia-ctc-weight
:
0.1
#intermedia-drop-prob: 0.2
#intermedia-drop-prob: 0.2
#intermedia-temperature: 5
#intermedia-temperature: 5
#target-ctc-weight: 0.5
#target-ctc-layers: 2,4,6
ctc-self-distill-weight
:
0
ctc-self-distill-weight
:
0
post-process
:
sentencepiece
post-process
:
sentencepiece
\ No newline at end of file
fairseq/models/speech_to_text/modules/__init__.py
查看文件 @
244e506e
from
.adapter
import
*
from
.ctc
import
*
fairseq/models/speech_to_text/pdss2t_transformer.py
查看文件 @
244e506e
...
@@ -14,7 +14,7 @@ from fairseq.models import (
...
@@ -14,7 +14,7 @@ from fairseq.models import (
register_model_architecture
,
register_model_architecture
,
)
)
from
fairseq.models.speech_to_text
import
S2TTransformerModel
from
fairseq.models.speech_to_text
import
S2TTransformerModel
from
fairseq.mod
els.speech_to_text.modules
import
CTC
,
Adapter
from
fairseq.mod
ules.speech_to_text
import
CTC
,
Adapter
from
fairseq.modules
import
(
from
fairseq.modules
import
(
FairseqDropout
,
FairseqDropout
,
...
...
fairseq/models/speech_to_text/s2t_dual.py
查看文件 @
244e506e
...
@@ -28,7 +28,7 @@ from fairseq.models.speech_to_text import (
...
@@ -28,7 +28,7 @@ from fairseq.models.speech_to_text import (
PDSS2TTransformerEncoder
,
PDSS2TTransformerEncoder
,
S2TSATEEncoder
,
S2TSATEEncoder
,
)
)
from
fairseq.mod
els.speech_to_text.modules
import
Adapter
,
CTC
from
fairseq.mod
ules.speech_to_text
import
Adapter
,
CTC
from
fairseq.models.transformer_s2
import
(
from
fairseq.models.transformer_s2
import
(
Embedding
,
Embedding
,
TransformerS2Encoder
,
TransformerS2Encoder
,
...
...
fairseq/models/speech_to_text/s2t_sate.py
查看文件 @
244e506e
...
@@ -16,7 +16,7 @@ from fairseq.models.speech_to_text import (
...
@@ -16,7 +16,7 @@ from fairseq.models.speech_to_text import (
PDSS2TTransformerModel
,
PDSS2TTransformerModel
,
PDSS2TTransformerEncoder
,
PDSS2TTransformerEncoder
,
)
)
from
fairseq.mod
els.speech_to_text.modules
import
Adapter
,
CTC
from
fairseq.mod
ules.speech_to_text
import
Adapter
,
CTC
from
fairseq.modules
import
(
from
fairseq.modules
import
(
FairseqDropout
,
FairseqDropout
,
LayerNorm
,
LayerNorm
,
...
@@ -184,7 +184,7 @@ class TextEncoder(FairseqEncoder):
...
@@ -184,7 +184,7 @@ class TextEncoder(FairseqEncoder):
# CTC
# CTC
self
.
use_ctc
=
getattr
(
args
,
"target_ctc_weight"
,
0
)
>
0
self
.
use_ctc
=
getattr
(
args
,
"target_ctc_weight"
,
0
)
>
0
if
self
.
use_ctc
:
if
self
.
use_ctc
:
self
.
ctc_layer
=
args
.
target_ctc_layer
self
.
ctc_layer
=
getattr
(
args
,
"target_ctc_layer"
,
layer_num
)
self
.
inter_ctc
=
True
if
self
.
ctc_layer
!=
args
.
encoder_layers
else
False
self
.
inter_ctc
=
True
if
self
.
ctc_layer
!=
args
.
encoder_layers
else
False
if
self
.
inter_ctc
:
if
self
.
inter_ctc
:
logger
.
info
(
"Target CTC loss in layer
%
d"
%
self
.
ctc_layer
)
logger
.
info
(
"Target CTC loss in layer
%
d"
%
self
.
ctc_layer
)
...
...
fairseq/models/speech_to_text/s2t_transformer.py
查看文件 @
244e506e
...
@@ -14,7 +14,7 @@ from fairseq.models import (
...
@@ -14,7 +14,7 @@ from fairseq.models import (
register_model
,
register_model
,
register_model_architecture
,
register_model_architecture
,
)
)
from
fairseq.mod
els.speech_to_text.modules
import
Adapter
,
CTC
from
fairseq.mod
ules.speech_to_text
import
Adapter
,
CTC
from
fairseq.models.transformer
import
Embedding
,
TransformerDecoder
from
fairseq.models.transformer
import
Embedding
,
TransformerDecoder
from
fairseq.modules
import
(
from
fairseq.modules
import
(
FairseqDropout
,
FairseqDropout
,
...
...
fairseq/models/transformer.py
查看文件 @
244e506e
...
@@ -18,7 +18,7 @@ from fairseq.models import (
...
@@ -18,7 +18,7 @@ from fairseq.models import (
register_model
,
register_model
,
register_model_architecture
,
register_model_architecture
,
)
)
from
fairseq.mod
els.speech_to_text.modules
import
Adapter
,
CTC
from
fairseq.mod
ules.speech_to_text
import
Adapter
,
CTC
from
fairseq.modules
import
(
from
fairseq.modules
import
(
AdaptiveSoftmax
,
AdaptiveSoftmax
,
FairseqDropout
,
FairseqDropout
,
...
...
fairseq/modules/speech_to_text/__init__.py
查看文件 @
244e506e
from
.subsampling
import
*
from
.subsampling
import
*
from
.ctc
import
*
from
.adapter
import
*
\ No newline at end of file
fairseq/mod
els/speech_to_text/modules
/adapter.py
→
fairseq/mod
ules/speech_to_text
/adapter.py
查看文件 @
244e506e
import
logging
import
logging
import
math
import
torch
import
torch
import
torch.nn
as
nn
import
torch.nn
as
nn
...
...
fairseq/mod
els/speech_to_text/modules
/ctc.py
→
fairseq/mod
ules/speech_to_text
/ctc.py
查看文件 @
244e506e
File moved
编写
预览
Markdown
格式
0%
重试
或
添加新文件
添加附件
取消
您添加了
0
人
到此讨论。请谨慎行事。
请先完成此评论的编辑!
取消
请
注册
或者
登录
后发表评论