def forward(self, X):
        """Execute sparse linear layer

        Args:
            X: an [n, h] torch.LongTensor containing up to h indices of features
                whose weights should be looked up and used in a sparse linear
                multiplication.
        """
        return self.W(X).sum(dim=1) + self.b
def forward ( self , X ) : return self . W ( X ) . sum ( dim = 1 ) + self . b
Execute sparse linear layer

        Args:
            X: an [n, h] torch.LongTensor containing up to h indices of features
                whose weights should be looked up and used in a sparse linear
                multiplication.