Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
PaddlePaddle
Parakeet
提交
1db01ccc
P
Parakeet
项目概览
PaddlePaddle
/
Parakeet
通知
14
Star
3
Fork
0
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
19
列表
看板
标记
里程碑
合并请求
0
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
P
Parakeet
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
19
Issue
19
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
提交
Issue看板
未验证
提交
1db01ccc
编写于
8月 25, 2020
作者:
L
Li Fuchen
提交者:
GitHub
8月 25, 2020
浏览文件
操作
浏览文件
下载
差异文件
Merge pull request #35 from ShenYuhan/fix_bug
fix bugs of vdl
上级
3879b5ec
bb5f4452
变更
1
隐藏空白更改
内联
并排
Showing
1 changed file
with
10 addition
and
10 deletion
+10
-10
examples/deepvoice3/train.py
examples/deepvoice3/train.py
+10
-10
未找到文件。
examples/deepvoice3/train.py
浏览文件 @
1db01ccc
...
...
@@ -114,9 +114,9 @@ def train(args, config):
loss
.
numpy
()[
0
],
causal_mel_loss
.
numpy
()[
0
],
non_causal_mel_loss
.
numpy
()[
0
]))
writer
.
add_scalar
(
"loss/causal_mel_loss"
,
causal_mel_loss
.
numpy
()[
0
],
global_
step
=
global_step
)
writer
.
add_scalar
(
"loss/non_causal_mel_loss"
,
non_causal_mel_loss
.
numpy
()[
0
],
global_
step
=
global_step
)
writer
.
add_scalar
(
"loss/loss"
,
loss
.
numpy
()[
0
],
global_
step
=
global_step
)
writer
.
add_scalar
(
"loss/causal_mel_loss"
,
causal_mel_loss
.
numpy
()[
0
],
step
=
global_step
)
writer
.
add_scalar
(
"loss/non_causal_mel_loss"
,
non_causal_mel_loss
.
numpy
()[
0
],
step
=
global_step
)
writer
.
add_scalar
(
"loss/loss"
,
loss
.
numpy
()[
0
],
step
=
global_step
)
if
global_step
%
config
[
"report_interval"
]
==
0
:
text_length
=
int
(
text_lengths
.
numpy
()[
0
])
...
...
@@ -124,37 +124,37 @@ def train(args, config):
tag
=
"train_mel/ground-truth"
img
=
cm
.
viridis
(
normalize
(
mels
.
numpy
()[
0
,
:
num_frame
].
T
))
writer
.
add_image
(
tag
,
img
,
global_step
=
global_step
,
dataformats
=
"HWC"
)
writer
.
add_image
(
tag
,
img
,
step
=
global_step
)
tag
=
"train_mel/decoded"
img
=
cm
.
viridis
(
normalize
(
decoded
.
numpy
()[
0
,
:
num_frame
].
T
))
writer
.
add_image
(
tag
,
img
,
global_step
=
global_step
,
dataformats
=
"HWC"
)
writer
.
add_image
(
tag
,
img
,
step
=
global_step
)
tag
=
"train_mel/refined"
img
=
cm
.
viridis
(
normalize
(
refined
.
numpy
()[
0
,
:
num_frame
].
T
))
writer
.
add_image
(
tag
,
img
,
global_step
=
global_step
,
dataformats
=
"HWC"
)
writer
.
add_image
(
tag
,
img
,
step
=
global_step
)
vocoder
=
WaveflowVocoder
()
vocoder
.
model
.
eval
()
tag
=
"train_audio/ground-truth-waveflow"
wav
=
vocoder
(
F
.
transpose
(
mels
[
0
:
1
,
:
num_frame
,
:],
(
0
,
2
,
1
)))
writer
.
add_audio
(
tag
,
wav
.
numpy
()[
0
],
global_
step
=
global_step
,
sample_rate
=
22050
)
writer
.
add_audio
(
tag
,
wav
.
numpy
()[
0
],
step
=
global_step
,
sample_rate
=
22050
)
tag
=
"train_audio/decoded-waveflow"
wav
=
vocoder
(
F
.
transpose
(
decoded
[
0
:
1
,
:
num_frame
,
:],
(
0
,
2
,
1
)))
writer
.
add_audio
(
tag
,
wav
.
numpy
()[
0
],
global_
step
=
global_step
,
sample_rate
=
22050
)
writer
.
add_audio
(
tag
,
wav
.
numpy
()[
0
],
step
=
global_step
,
sample_rate
=
22050
)
tag
=
"train_audio/refined-waveflow"
wav
=
vocoder
(
F
.
transpose
(
refined
[
0
:
1
,
:
num_frame
,
:],
(
0
,
2
,
1
)))
writer
.
add_audio
(
tag
,
wav
.
numpy
()[
0
],
global_
step
=
global_step
,
sample_rate
=
22050
)
writer
.
add_audio
(
tag
,
wav
.
numpy
()[
0
],
step
=
global_step
,
sample_rate
=
22050
)
attentions_np
=
attentions
.
numpy
()
attentions_np
=
attentions_np
[:,
0
,
:
num_frame
//
4
,
:
text_length
]
for
i
,
attention_layer
in
enumerate
(
np
.
rot90
(
attentions_np
,
axes
=
(
1
,
2
))):
tag
=
"train_attention/layer_{}"
.
format
(
i
)
img
=
cm
.
viridis
(
normalize
(
attention_layer
))
writer
.
add_image
(
tag
,
img
,
global_
step
=
global_step
,
dataformats
=
"HWC"
)
writer
.
add_image
(
tag
,
img
,
step
=
global_step
,
dataformats
=
"HWC"
)
if
global_step
%
config
[
"save_interval"
]
==
0
:
save_parameters
(
writer
.
logdir
,
global_step
,
model
,
optim
)
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录