forked from ccf-ai-infra/GPUCodeForces
20 lines
403 B
Python
20 lines
403 B
Python
import torch
|
|
import torch.nn as nn
|
|
|
|
class Model(nn.Module):
|
|
def __init__(self):
|
|
super().__init__()
|
|
self.act = nn.LogSigmoid()
|
|
|
|
def forward(self, x: torch.Tensor) -> torch.Tensor:
|
|
return self.act(x)
|
|
|
|
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 [] |