GlobalMaxPooling1D

Applies global max pooling for temporal data

class liqfit.modeling.pooling.GlobalMaxPooling1D

forward(x: torch.Tensor)

Parameters:

  • x (torch.Tensor): Input tensor to apply pooling on. Expected shape: (B, T, E).

Using GlobalMaxPooling1D

from liqfit.modeling.pooling import GlobalMaxPooling1D
import torch

x = torch.randn((1, 10, 20))
pooler = GlobalMaxPooling1D()
out = pooler(x)

Last updated