Rate this Page
★ ★ ★ ★ ★

SimplicialNormalization#

class torchrl.modules.SimplicialNormalization(dim: int)[source]#

Apply softmax independently to fixed-size feature simplices.

Parameters:

dim (int) – Number of features in each simplex. The last input dimension must be divisible by dim.

forward(x: Tensor) → Tensor[source]#

Normalize the last dimension of x in groups of dim.