快捷方式

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 開發者文件

檢視文件

教程

為初學者和高階開發者提供深入的教程

檢視教程

資源

查詢開發資源並讓您的問題得到解答

檢視資源