import torch
import torch.nn as nn

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

    def forward(self, logits: torch.Tensor, targets: torch.Tensor) -> torch.Tensor:
        x = logits
        t = targets
        ax = torch.abs(x)
        loss = torch.maximum(x, torch.zeros_like(x)) - x * t + torch.log1p(torch.exp(-ax))
        return loss.mean(dim=1)

batch_size = 16
dim = 16384

def get_inputs():
    logits = torch.randn(batch_size, dim)
    targets = torch.rand(batch_size, dim).round()
    return [logits, targets]

def get_init_inputs():
    return []

