本文整理汇总了Python中gin.external_configurable方法的典型用法代码示例。如果您正苦于以下问题:Python gin.external_configurable方法的具体用法?Python gin.external_configurable怎么用?Python gin.external_configurable使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类gin
的用法示例。
在下文中一共展示了gin.external_configurable方法的8个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。
示例1: opt_configure
# 需要导入模块: import gin [as 别名]
# 或者: from gin import external_configurable [as 别名]
def opt_configure(*args, **kwargs):
kwargs["module"] = "trax.optimizers"
return gin.external_configurable(*args, **kwargs)
# Optimizers (using upper-case names).
# pylint: disable=invalid-name
示例2: configure_and_register_env
# 需要导入模块: import gin [as 别名]
# 或者: from gin import external_configurable [as 别名]
def configure_and_register_env(env_class):
register(
id="{}-v0".format(env_class.__name__),
entry_point="tensor2tensor.trax.rlax.envs:{}".format(env_class.__name__),
)
return gin.external_configurable(env_class, module="trax.rlax.envs")
# pylint: disable=invalid-name
示例3: model_configure
# 需要导入模块: import gin [as 别名]
# 或者: from gin import external_configurable [as 别名]
def model_configure(*args, **kwargs):
kwargs["module"] = "trax.models"
return gin.external_configurable(*args, **kwargs)
# pylint: disable=invalid-name
示例4: layer_configure
# 需要导入模块: import gin [as 别名]
# 或者: from gin import external_configurable [as 别名]
def layer_configure(*args, **kwargs):
kwargs["module"] = "trax.layers"
return gin.external_configurable(*args, **kwargs)
# pylint: disable=used-before-assignment
# pylint: disable=invalid-name
示例5: configure_rl
# 需要导入模块: import gin [as 别名]
# 或者: from gin import external_configurable [as 别名]
def configure_rl(*args, **kwargs):
kwargs['module'] = 'trax.rl'
return gin.external_configurable(*args, **kwargs)
示例6: opt_configure
# 需要导入模块: import gin [as 别名]
# 或者: from gin import external_configurable [as 别名]
def opt_configure(*args, **kwargs):
kwargs['module'] = 'trax.optimizers'
return gin.external_configurable(*args, **kwargs)
# Optimizers (using upper-case names).
# pylint: disable=invalid-name
示例7: model_configure
# 需要导入模块: import gin [as 别名]
# 或者: from gin import external_configurable [as 别名]
def model_configure(*args, **kwargs):
kwargs['module'] = 'trax.models'
return gin.external_configurable(*args, **kwargs)
# pylint: disable=invalid-name
示例8: layer_configure
# 需要导入模块: import gin [as 别名]
# 或者: from gin import external_configurable [as 别名]
def layer_configure(*args, **kwargs):
kwargs['module'] = 'trax.layers'
return gin.external_configurable(*args, **kwargs)
# pylint: disable=used-before-assignment
# pylint: disable=invalid-name