error
60_ConvTranspose3d_Swish_GroupNorm_HardSwish.py
started
2026-05-02T22:22:47Z
reference PyTorch source (the prompt the agent sees)
import torch
import torch.nn as nn
class Model(nn.Module):
"""
Model that performs a 3D transposed convolution, applies Swish activation,
group normalization, and then HardSwish activation.
"""
def __init__(self, in_channels, out_channels, kernel_size, stride, padding, groups, eps, bias=True):
super(Model, self).__init__()
self.conv_transpose = nn.ConvTranspose3d(in_channels, out_channels, kernel_size, stride=stride, padding=padding, bias=bias)
self.group_norm = nn.GroupNorm(num_groups=groups, num_channels=out_channels, eps=eps)
def forward(self, x):
x = self.conv_transpose(x)
x = torch.sigmoid(x) * x # Swish activation
x = self.group_norm(x)
x = torch.nn.functional.hardswish(x) # HardSwish activation
return x
batch_size = 128
in_channels = 3
out_channels = 16
depth, height, width = 16, 32, 32
kernel_size = 3
stride = 2
padding = 1
groups = 4
eps = 1e-5
def get_inputs():
return [torch.rand(batch_size, in_channels, depth, height, width)]
def get_init_inputs():
return [in_channels, out_channels, kernel_size, stride, padding, groups, eps]turn 07200.0s turn · 7200.0s LLM · 0.0s tools
feedbackLLM call failed: _WorkItemTimeout: work item exceeded soft timeout budget