import torch
import torch.nn as nn

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

    def forward(self, new_log_probs, old_log_probs, advantages):
        ratio = torch.exp(new_log_probs - old_log_probs)
        surr1 = ratio * advantages
        surr2 = torch.clamp(ratio, 1.0 - self.clip_param, 1.0 + self.clip_param) * advantages
        return -torch.min(surr1, surr2).mean()

batch_size = 1024

def get_inputs():
    new_log_probs = torch.randn(batch_size, requires_grad=True)
    old_log_probs = torch.randn(batch_size)
    advantages = torch.randn(batch_size)
    return [new_log_probs, old_log_probs, advantages]

def get_init_inputs():
    return [0.2]
