当前位置: 首页>>代码示例>>Python>>正文


Python transformer.transformer_big方法代码示例

本文整理汇总了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 
开发者ID:akzaidi,项目名称:fine-lm,代码行数:12,代码来源:transformer_revnet.py

示例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 
开发者ID:akzaidi,项目名称:fine-lm,代码行数:6,代码来源:universal_transformer.py

示例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 
开发者ID:akzaidi,项目名称:fine-lm,代码行数:8,代码来源:universal_transformer.py

示例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 
开发者ID:tensorflow,项目名称:tensor2tensor,代码行数:6,代码来源:transformer_parallel.py

示例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()) 
开发者ID:tensorflow,项目名称:tensor2tensor,代码行数:5,代码来源:evolved_transformer.py

示例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 
开发者ID:tensorflow,项目名称:tensor2tensor,代码行数:9,代码来源:evolved_transformer.py

示例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 
开发者ID:daiquocnguyen,项目名称:Graph-Transformer,代码行数:6,代码来源:universal_transformer_modified.py

示例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 
开发者ID:daiquocnguyen,项目名称:Graph-Transformer,代码行数:8,代码来源:universal_transformer_modified.py


注:本文中的tensor2tensor.models.transformer.transformer_big方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。