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