快捷方式

tensordict.nn.mappings

tensordict.nn.mappings(key: str) Callable

给定一个输入字符串,返回一个满射函数 f(x): R -> R^+。

参数:

key (str) – one of “softplus”, “exp”, “relu”, “expln”, “biased_softplus” or “none” (no mapping)。

注意

If the key begins with “biased_softplus”, then it needs to take the following form: `"biased_softplus_{bias}"` where `bias` can be converted to a floating point number that will be used to bias the softplus function. Alternatively, the `"biased_softplus_{bias}_{min_val}"` syntax can be used. In that case, the additional `min_val` term is a floating point number that will be used to encode the minimum value of the softplus transform. In practice, the equation used is softplus(x + bias) + min_val, where bias and min_val are values computed such that the conditions above are met.

注意

Custom mappings can be added through tensordict.nn.add_custom_mapping

返回:

a Callable

文档

访问全面的 PyTorch 开发者文档

查看文档

教程

为初学者和高级开发者提供深入的教程

查看教程

资源

查找开发资源并让您的问题得到解答

查看资源