本文整理汇总了Python中tensor2tensor.models.transformer.transformer_big方法的典型用法代码示例。如果您正苦于以下问题:Python transformer.transformer_big方法的具体用法?Python transformer.transformer_big怎么用?Python transformer.transformer_big使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类tensor2tensor.models.transformer
的用法示例。
在下文中一共展示了transformer.transformer_big方法的8个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。
示例1: transformer_revnet_base
# 需要导入模块: from tensor2tensor.models import transformer [as 别名]
# 或者: from tensor2tensor.models.transformer import transformer_big [as 别名]
def transformer_revnet_base():
"""Base hparams for TransformerRevnet."""
hparams = transformer.transformer_big()
# Use settings from transformer_n_da
hparams.layer_preprocess_sequence = "n"
hparams.layer_postprocess_sequence = "da"
hparams.learning_rate = 0.4
return hparams
示例2: universal_transformer_base
# 需要导入模块: from tensor2tensor.models import transformer [as 别名]
# 或者: from tensor2tensor.models.transformer import transformer_big [as 别名]
def universal_transformer_base():
hparams = transformer.transformer_big()
hparams = update_hparams_for_universal_transformer(hparams)
return hparams
示例3: universal_transformer_big
# 需要导入模块: from tensor2tensor.models import transformer [as 别名]
# 或者: from tensor2tensor.models.transformer import transformer_big [as 别名]
def universal_transformer_big():
hparams = transformer.transformer_big()
hparams = update_hparams_for_universal_transformer(hparams)
hparams.hidden_size = 2048
hparams.filter_size = 8192
return hparams
示例4: transformer_big_bs1
# 需要导入模块: from tensor2tensor.models import transformer [as 别名]
# 或者: from tensor2tensor.models.transformer import transformer_big [as 别名]
def transformer_big_bs1():
hparams = transformer.transformer_big()
hparams.add_hparam("block_size", 1)
return hparams
示例5: evolved_transformer_big
# 需要导入模块: from tensor2tensor.models import transformer [as 别名]
# 或者: from tensor2tensor.models.transformer import transformer_big [as 别名]
def evolved_transformer_big():
"""Big parameters for Evolved Transformer model on WMT."""
return add_evolved_transformer_hparams(transformer.transformer_big())
示例6: evolved_transformer_deep
# 需要导入模块: from tensor2tensor.models import transformer [as 别名]
# 或者: from tensor2tensor.models.transformer import transformer_big [as 别名]
def evolved_transformer_deep():
"""Deep parameters for Evolved Transformer model on WMT."""
hparams = add_evolved_transformer_hparams(transformer.transformer_big())
hparams.num_encoder_layers = 9
hparams.num_decoder_layers = 10
hparams.hidden_size = 640
return hparams
示例7: universal_transformer_base1
# 需要导入模块: from tensor2tensor.models import transformer [as 别名]
# 或者: from tensor2tensor.models.transformer import transformer_big [as 别名]
def universal_transformer_base1():
hparams = transformer.transformer_big()
hparams = update_hparams_for_universal_transformer(hparams)
return hparams
示例8: universal_transformer_big1
# 需要导入模块: from tensor2tensor.models import transformer [as 别名]
# 或者: from tensor2tensor.models.transformer import transformer_big [as 别名]
def universal_transformer_big1():
hparams = transformer.transformer_big()
hparams = update_hparams_for_universal_transformer(hparams)
hparams.hidden_size = 2048
hparams.filter_size = 8192
return hparams