GlobalRMSPooling1D
Applies global rms pooling for temporal data
class liqfit.modeling.pooling.GlobalRMSPooling1D
forward(x: torch.Tensor, attention_mask: torch.Tensor)
Parameters:
x (torch.Tensor): Input tensor to apply pooling on. Expected shape: (B, T, E).
attention_mask (torch.Tensor): Mask tensor to mask out the padding while applying the pooling. Expected shape: (B, T)
Using GlobalMaxPooling1D
from liqfit.modeling.pooling import GlobalRMSPooling1D
import torch
x = torch.randn((1, 10, 20))
pooler = GlobalRMSPooling1D()
out = pooler(x)
Last updated