本文整理匯總了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)