本文整理汇总了Python中wavenet.WaveNetModel方法的典型用法代码示例。如果您正苦于以下问题:Python wavenet.WaveNetModel方法的具体用法?Python wavenet.WaveNetModel怎么用?Python wavenet.WaveNetModel使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类wavenet
的用法示例。
在下文中一共展示了wavenet.WaveNetModel方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。
示例1: create_network
# 需要导入模块: import wavenet [as 别名]
# 或者: from wavenet import WaveNetModel [as 别名]
def create_network(hp,batch_size,num_speakers,is_training):
net = WaveNetModel(
batch_size=batch_size,
dilations=hp.dilations,
filter_width=hp.filter_width,
residual_channels=hp.residual_channels,
dilation_channels=hp.dilation_channels,
quantization_channels=hp.quantization_channels,
out_channels =hp.out_channels,
skip_channels=hp.skip_channels,
use_biases=hp.use_biases, # True
scalar_input=hp.scalar_input,
global_condition_channels=hp.gc_channels,
global_condition_cardinality=num_speakers,
local_condition_channels=hp.num_mels,
upsample_factor=hp.upsample_factor,
legacy = hp.legacy,
residual_legacy = hp.residual_legacy,
drop_rate = hp.wavenet_dropout,
train_mode=is_training)
return net
示例2: setUp
# 需要导入模块: import wavenet [as 别名]
# 或者: from wavenet import WaveNetModel [as 别名]
def setUp(self):
self.net = WaveNetModel(batch_size=1,
dilations=[1, 2, 4, 8, 16, 32, 64, 128, 256],
filter_width=2,
residual_channels=16,
dilation_channels=16,
quantization_channels=128,
skip_channels=32)