import torch
import torch.nn as nn
import torch.nn.functional as F


class Model(nn.Module):
    def __init__(self, n=0.0):
        super().__init__()
        self.n = n

    def forward(self, x: torch.Tensor) -> torch.Tensor:
        y_neg = x * torch.sigmoid(x)

        y_pos = (self.n + 0.5) * x + (1.0 - torch.exp(-x))

        return torch.where(x > 0, y_pos, y_neg)


batch_size = 128
feature_dim = 512


def get_inputs():
    x = torch.randn(batch_size, feature_dim, dtype=torch.float32)
    return [x]


def get_init_inputs():
    return [0.0]