entry_point
stringlengths
1
65
original_triton_code
stringlengths
4.5k
619k
python_code
stringlengths
208
60.9k
triton_code
stringlengths
1.15k
275k
repo_name
stringlengths
7
115
module_name
stringlengths
1
65
synthetic
bool
1 class
uuid
int64
0
18.5k
licenses
listlengths
1
6
stars
int64
0
19.8k
sha
stringlengths
40
40
repo_link
stringlengths
72
180
AR
# AOT ID: ['0_forward'] from ctypes import c_void_p, c_long, c_int import torch import math import random import os import tempfile from math import inf, nan from torch._inductor.hooks import run_intermediate_hooks from torch._inductor.utils import maybe_profile from torch._inductor.codegen.memory_planning import _alig...
import torch import torch.nn as nn class AR(nn.Module): def __init__(self, window): super(AR, self).__init__() self.linear = nn.Linear(window, 1) def forward(self, x): x = torch.transpose(x, 1, 2) x = self.linear(x) x = torch.transpose(x, 1, 2) return x def ...
import torch from torch._inductor.select_algorithm import extern_kernels import triton import triton.language as tl from torch._inductor.runtime.triton_heuristics import grid from torch._C import _cuda_getCurrentRawStream as get_raw_stream import torch.nn as nn assert_size_stride = torch._C._dynamo.guards.assert_size_s...
chenghaoliu89/TSForecasting_FT
AR
false
9,990
[ "MIT" ]
0
e29227e67f754919672eab9002a1b37b13ed28a0
https://github.com/chenghaoliu89/TSForecasting_FT/tree/e29227e67f754919672eab9002a1b37b13ed28a0
MODEL
# AOT ID: ['0_forward'] from ctypes import c_void_p, c_long, c_int import torch import math import random import os import tempfile from math import inf, nan from torch._inductor.hooks import run_intermediate_hooks from torch._inductor.utils import maybe_profile from torch._inductor.codegen.memory_planning import _alig...
from _paritybench_helpers import _mock_config import torch import torch.nn as nn class MODEL(nn.Module): def __init__(self, args): super(MODEL, self).__init__() self.fc = nn.Linear(args.in_dim, 1) self.sigmoid = nn.Sigmoid() nn.init.constant_(self.fc.weight, 0) nn.init.con...
import torch from torch._inductor.select_algorithm import extern_kernels import triton import triton.language as tl from torch._inductor.runtime.triton_heuristics import grid from torch._C import _cuda_getCurrentRawStream as get_raw_stream import torch.nn as nn assert_size_stride = torch._C._dynamo.guards.assert_size_s...
cuis15/xorder
MODEL
false
9,991
[ "MIT" ]
0
6dde5a18552ffa07f29100038464a38c49495527
https://github.com/cuis15/xorder/tree/6dde5a18552ffa07f29100038464a38c49495527
AmdimNCELoss
# AOT ID: ['0_inference'] from ctypes import c_void_p, c_long, c_int import torch import math import random import os import tempfile from math import inf, nan from torch._inductor.hooks import run_intermediate_hooks from torch._inductor.utils import maybe_profile from torch._inductor.codegen.memory_planning import _al...
import torch import torch.nn as nn def tanh_clip(x, clip_val=10.0): """ soft clip values to the range [-clip_val, +clip_val] """ if clip_val is not None: x_clip = clip_val * torch.tanh(1.0 / clip_val * x) else: x_clip = x return x_clip class AmdimNCELoss(nn.Module): """ ...
import torch from torch._inductor.select_algorithm import extern_kernels import triton import triton.language as tl from torch._inductor.runtime.triton_heuristics import grid from torch._C import _cuda_getCurrentRawStream as get_raw_stream from torch._inductor.runtime import triton_helpers from torch._inductor.runtime....
bartolkaruza/pytorch-lightning-bolts
AmdimNCELoss
false
9,992
[ "Apache-2.0" ]
0
2e903c333c37ea83394c7da2ce826de1b82fb356
https://github.com/bartolkaruza/pytorch-lightning-bolts/tree/2e903c333c37ea83394c7da2ce826de1b82fb356
Net5
# AOT ID: ['0_forward'] from ctypes import c_void_p, c_long, c_int import torch import math import random import os import tempfile from math import inf, nan from torch._inductor.hooks import run_intermediate_hooks from torch._inductor.utils import maybe_profile from torch._inductor.codegen.memory_planning import _alig...
import torch import numpy as np import torch.nn as nn import torch.nn.functional as F class Net5(nn.Module): def __init__(self, n_in, n_out, dropout_p=0.0): super(Net5, self).__init__() self.insize = n_in self.outsize = n_out self.drop = dropout_p if self.drop != 0.0: ...
import torch from torch._inductor.select_algorithm import extern_kernels import triton import triton.language as tl from torch._inductor.runtime.triton_heuristics import grid from torch._C import _cuda_getCurrentRawStream as get_raw_stream from torch._inductor.runtime import triton_helpers import numpy as np import tor...
derangedhk417/ML-Lessons
Net5
false
9,993
[ "MIT" ]
0
3433e3fa6324791b74771fcfd8a6c5361ba69c53
https://github.com/derangedhk417/ML-Lessons/tree/3433e3fa6324791b74771fcfd8a6c5361ba69c53
Conv2dBlock
# AOT ID: ['0_forward'] from ctypes import c_void_p, c_long, c_int import torch import math import random import os import tempfile from math import inf, nan from torch._inductor.hooks import run_intermediate_hooks from torch._inductor.utils import maybe_profile from torch._inductor.codegen.memory_planning import _alig...
import torch import torch.nn as nn import torch.nn.functional as F class AdaptiveInstanceLayerNorm2d(nn.Module): def __init__(self, num_features, eps=1e-05, momentum=0.9, using_moving_average=True, using_bn=False): super(AdaptiveInstanceLayerNorm2d, self).__init__() self.eps = eps ...
import torch from torch._inductor.select_algorithm import extern_kernels import triton import triton.language as tl from torch._inductor.runtime.triton_heuristics import grid from torch._C import _cuda_getCurrentRawStream as get_raw_stream from torch._inductor.runtime import triton_helpers import torch.nn as nn import ...
belphegor2211/khoa_luan
Conv2dBlock
false
9,994
[ "MIT" ]
0
c9c163ebf3aff3005639ce7e4020e510295d1c75
https://github.com/belphegor2211/khoa_luan/tree/c9c163ebf3aff3005639ce7e4020e510295d1c75
PositionwiseFeedForward
# AOT ID: ['0_forward'] from ctypes import c_void_p, c_long, c_int import torch import math import random import os import tempfile from math import inf, nan from torch._inductor.hooks import run_intermediate_hooks from torch._inductor.utils import maybe_profile from torch._inductor.codegen.memory_planning import _alig...
import torch import torch.nn as nn import torch.nn.functional as F class PositionwiseFeedForward(nn.Module): """ A two-feed-forward-layer module """ def __init__(self, d_in, d_hid, dropout=0.1): super().__init__() self.w_1 = nn.Conv1d(d_in, d_hid, 1) self.w_2 = nn.Conv1d(d_hid, d_in, ...
import torch from torch._inductor.select_algorithm import extern_kernels import triton import triton.language as tl from torch._inductor.runtime.triton_heuristics import grid from torch._C import _cuda_getCurrentRawStream as get_raw_stream from torch._inductor.runtime import triton_helpers from torch._inductor.runtime....
chenghaoliu89/TSForecasting_FT
PositionwiseFeedForward
false
9,995
[ "MIT" ]
0
e29227e67f754919672eab9002a1b37b13ed28a0
https://github.com/chenghaoliu89/TSForecasting_FT/tree/e29227e67f754919672eab9002a1b37b13ed28a0
CNNCifar
# AOT ID: ['0_forward'] from ctypes import c_void_p, c_long, c_int import torch import math import random import os import tempfile from math import inf, nan from torch._inductor.hooks import run_intermediate_hooks from torch._inductor.utils import maybe_profile from torch._inductor.codegen.memory_planning import _alig...
from _paritybench_helpers import _mock_config import torch import torch.nn as nn import torch.nn.functional as F class CNNCifar(nn.Module): def __init__(self, args): super(CNNCifar, self).__init__() self.conv1 = nn.Conv2d(3, 6, 5) self.pool = nn.MaxPool2d(2, 2) self.conv2 = nn.Con...
import torch from torch._inductor.select_algorithm import extern_kernels import triton import triton.language as tl from torch._inductor.runtime.triton_heuristics import grid from torch._C import _cuda_getCurrentRawStream as get_raw_stream from torch._inductor.runtime import triton_helpers import torch.nn as nn assert_...
C3atUofU/Hierarchical-SGD
CNNCifar
false
9,996
[ "MIT" ]
0
ecc0f25065f78e70ed8deff7dfc9809331e19f21
https://github.com/C3atUofU/Hierarchical-SGD/tree/ecc0f25065f78e70ed8deff7dfc9809331e19f21
FakeRKHSConvNet
# AOT ID: ['0_forward'] from ctypes import c_void_p, c_long, c_int import torch import math import random import os import tempfile from math import inf, nan from torch._inductor.hooks import run_intermediate_hooks from torch._inductor.utils import maybe_profile from torch._inductor.codegen.memory_planning import _alig...
import math import torch import numpy as np import torch.nn as nn class MaybeBatchNorm2d(nn.Module): def __init__(self, n_ftr, affine, use_bn): super(MaybeBatchNorm2d, self).__init__() self.bn = nn.BatchNorm2d(n_ftr, affine=affine) self.use_bn = use_bn def forward(self, x): i...
import torch from torch._inductor.select_algorithm import extern_kernels import triton import triton.language as tl from torch._inductor.runtime.triton_heuristics import grid from torch._C import _cuda_getCurrentRawStream as get_raw_stream from torch._inductor.runtime import triton_helpers from torch._inductor.runtime....
bartolkaruza/pytorch-lightning-bolts
FakeRKHSConvNet
false
9,997
[ "Apache-2.0" ]
0
2e903c333c37ea83394c7da2ce826de1b82fb356
https://github.com/bartolkaruza/pytorch-lightning-bolts/tree/2e903c333c37ea83394c7da2ce826de1b82fb356
UNet
# AOT ID: ['0_forward'] from ctypes import c_void_p, c_long, c_int import torch import math import random import os import tempfile from math import inf, nan from torch._inductor.hooks import run_intermediate_hooks from torch._inductor.utils import maybe_profile from torch._inductor.codegen.memory_planning import _alig...
import torch import torch.nn as nn import torch.nn.functional as F class down(nn.Module): def __init__(self, inChannels, outChannels, filterSize): super(down, self).__init__() self.conv1 = nn.Conv2d(inChannels, outChannels, filterSize, stride= 1, padding=int((filterSize - 1) / 2)) ...
import torch from torch._inductor.select_algorithm import extern_kernels import triton import triton.language as tl from torch._inductor.runtime.triton_heuristics import grid from torch._C import _cuda_getCurrentRawStream as get_raw_stream from torch._inductor.runtime import triton_helpers import torch.nn as nn import ...
brainma/ASRNet
UNet
false
9,998
[ "MIT" ]
0
b88edbcfbcee2cc77f7f4b2a8d139ced303a4f14
https://github.com/brainma/ASRNet/tree/b88edbcfbcee2cc77f7f4b2a8d139ced303a4f14
SchedulerTestNet
# AOT ID: ['0_forward'] from ctypes import c_void_p, c_long, c_int import torch import math import random import os import tempfile from math import inf, nan from torch._inductor.hooks import run_intermediate_hooks from torch._inductor.utils import maybe_profile from torch._inductor.codegen.memory_planning import _alig...
import torch from torch.nn import functional as F class SchedulerTestNet(torch.nn.Module): """ adapted from: https://github.com/pytorch/pytorch/blob/master/test/test_optim.py """ def __init__(self): super(SchedulerTestNet, self).__init__() self.conv1 = torch.nn.Conv2d(1, 1, 1) ...
import torch from torch._inductor.select_algorithm import extern_kernels import triton import triton.language as tl from torch._inductor.runtime.triton_heuristics import grid from torch._C import _cuda_getCurrentRawStream as get_raw_stream from torch._inductor.runtime import triton_helpers assert_size_stride = torch._C...
bartolkaruza/pytorch-lightning-bolts
SchedulerTestNet
false
9,999
[ "Apache-2.0" ]
0
2e903c333c37ea83394c7da2ce826de1b82fb356
https://github.com/bartolkaruza/pytorch-lightning-bolts/tree/2e903c333c37ea83394c7da2ce826de1b82fb356
BasicBlock
# AOT ID: ['0_forward'] from ctypes import c_void_p, c_long, c_int import torch import math import random import os import tempfile from math import inf, nan from torch._inductor.hooks import run_intermediate_hooks from torch._inductor.utils import maybe_profile from torch._inductor.codegen.memory_planning import _alig...
import torch import torch.nn as nn import torch.nn.functional as F class BasicBlock(nn.Module): expansion = 1 def __init__(self, in_planes, planes, stride=1, norm='instancenorm'): super(BasicBlock, self).__init__() self.norm = norm self.conv1 = nn.Conv2d(in_planes, planes, kernel_size...
import torch from torch._inductor.select_algorithm import extern_kernels import triton import triton.language as tl from torch._inductor.runtime.triton_heuristics import grid from torch._C import _cuda_getCurrentRawStream as get_raw_stream from torch._inductor.runtime import triton_helpers from torch._inductor.runtime....
cuijiaxing/DatasetCondensation
BasicBlock
false
10,000
[ "MIT" ]
0
aec1f7bf08d10d0f9e5d2fd5c2e4193d9687fefd
https://github.com/cuijiaxing/DatasetCondensation/tree/aec1f7bf08d10d0f9e5d2fd5c2e4193d9687fefd
ParsingRelationLoss
# AOT ID: ['0_inference'] from ctypes import c_void_p, c_long, c_int import torch import math import random import os import tempfile from math import inf, nan from torch._inductor.hooks import run_intermediate_hooks from torch._inductor.utils import maybe_profile from torch._inductor.codegen.memory_planning import _al...
import torch import torch.nn.modules import torch.nn as nn class ParsingRelationLoss(nn.Module): def __init__(self): super(ParsingRelationLoss, self).__init__() def forward(self, logits): _n, _c, h, _w = logits.shape loss_all = [] for i in range(0, h - 1): loss_al...
import torch import triton import triton.language as tl from torch._inductor.runtime.triton_heuristics import grid from torch._C import _cuda_getCurrentRawStream as get_raw_stream from torch._inductor.runtime.triton_helpers import math as tl_math import torch.nn.modules import torch.nn as nn assert_size_stride = torch....
daveMcelf/Ultra-Fast-Lane-Detection
ParsingRelationLoss
false
10,001
[ "MIT" ]
0
357f1f0f4538a125e9a9c1509e5f72ce2321f078
https://github.com/daveMcelf/Ultra-Fast-Lane-Detection/tree/357f1f0f4538a125e9a9c1509e5f72ce2321f078
Bottleneck_nobn
# AOT ID: ['0_forward'] from ctypes import c_void_p, c_long, c_int import torch import math import random import os import tempfile from math import inf, nan from torch._inductor.hooks import run_intermediate_hooks from torch._inductor.utils import maybe_profile from torch._inductor.codegen.memory_planning import _alig...
import torch import torch.nn as nn import torch.nn.functional as F class Bottleneck_nobn(nn.Module): def __init__(self, in_planes, growth_rate): super(Bottleneck_nobn, self).__init__() self.conv1 = nn.Conv2d(in_planes, 4 * growth_rate, kernel_size=1, bias=False) self.conv2 = n...
import torch from torch._inductor.select_algorithm import extern_kernels import triton import triton.language as tl from torch._inductor.runtime.triton_heuristics import grid from torch._C import _cuda_getCurrentRawStream as get_raw_stream from torch._inductor.runtime import triton_helpers import torch.nn as nn assert_...
daroczyb/tangent_sensitivity
Bottleneck_nobn
false
10,002
[ "MIT" ]
0
925258ab381ca5ab95620c411f72836a90baeb7f
https://github.com/daroczyb/tangent_sensitivity/tree/925258ab381ca5ab95620c411f72836a90baeb7f
MLP1x
# AOT ID: ['0_forward'] from ctypes import c_void_p, c_long, c_int import torch import math import random import os import tempfile from math import inf, nan from torch._inductor.hooks import run_intermediate_hooks from torch._inductor.utils import maybe_profile from torch._inductor.codegen.memory_planning import _alig...
import torch import torch.nn as nn class MLP1x(nn.Module): def __init__(self, dim, hidd, num_classes=10): super(MLP1x, self).__init__() self.fc1 = nn.Linear(dim, hidd) self.fc2 = nn.Linear(hidd, num_classes) self.relu = nn.ReLU(inplace=True) def forward(self, x): out ...
import torch from torch._inductor.select_algorithm import extern_kernels import triton import triton.language as tl from torch._inductor.runtime.triton_heuristics import grid from torch._C import _cuda_getCurrentRawStream as get_raw_stream from torch._inductor.runtime import triton_helpers import torch.nn as nn assert_...
daroczyb/tangent_sensitivity
MLP1x
false
10,003
[ "MIT" ]
0
925258ab381ca5ab95620c411f72836a90baeb7f
https://github.com/daroczyb/tangent_sensitivity/tree/925258ab381ca5ab95620c411f72836a90baeb7f
Discriminator
# AOT ID: ['0_forward'] from ctypes import c_void_p, c_long, c_int import torch import math import random import os import tempfile from math import inf, nan from torch._inductor.hooks import run_intermediate_hooks from torch._inductor.utils import maybe_profile from torch._inductor.codegen.memory_planning import _alig...
import torch import numpy as np import torch.nn as nn from torch.nn import functional as F class Discriminator(nn.Module): def __init__(self, img_shape, hidden_dim=1024): super().__init__() in_dim = int(np.prod(img_shape)) self.fc1 = nn.Linear(in_dim, hidden_dim) self.fc2 = nn.Lin...
import torch from torch._inductor.select_algorithm import extern_kernels import triton import triton.language as tl from torch._inductor.runtime.triton_heuristics import grid from torch._C import _cuda_getCurrentRawStream as get_raw_stream import numpy as np import torch.nn as nn assert_size_stride = torch._C._dynamo.g...
bartolkaruza/pytorch-lightning-bolts
Discriminator
false
10,004
[ "Apache-2.0" ]
0
2e903c333c37ea83394c7da2ce826de1b82fb356
https://github.com/bartolkaruza/pytorch-lightning-bolts/tree/2e903c333c37ea83394c7da2ce826de1b82fb356
NCHWLayerNorm
# AOT ID: ['0_forward'] from ctypes import c_void_p, c_long, c_int import torch import math import random import os import tempfile from math import inf, nan from torch._inductor.hooks import run_intermediate_hooks from torch._inductor.utils import maybe_profile from torch._inductor.codegen.memory_planning import _alig...
import torch from torch import nn class NCHWLayerNorm(nn.LayerNorm): """Applies LayerNorm to the channel dimension of NCHW tensors.""" def forward(self, x): x = x.permute(0, 2, 3, 1) x = super().forward(x) return x.permute(0, 3, 1, 2) def get_inputs(): return [torch.rand([4, 4, ...
import torch import triton import triton.language as tl from torch._inductor.runtime.triton_heuristics import grid from torch._C import _cuda_getCurrentRawStream as get_raw_stream from torch._inductor.runtime.triton_helpers import libdevice from torch import nn assert_size_stride = torch._C._dynamo.guards.assert_size_s...
cobypenso/pytorch-generative
NCHWLayerNorm
false
10,005
[ "MIT" ]
0
72d1a3d8045179bd3a83ee3783aa070e74a1e400
https://github.com/cobypenso/pytorch-generative/tree/72d1a3d8045179bd3a83ee3783aa070e74a1e400
Transition_nobn
# AOT ID: ['0_forward'] from ctypes import c_void_p, c_long, c_int import torch import math import random import os import tempfile from math import inf, nan from torch._inductor.hooks import run_intermediate_hooks from torch._inductor.utils import maybe_profile from torch._inductor.codegen.memory_planning import _alig...
import torch import torch.nn as nn import torch.nn.functional as F class Transition_nobn(nn.Module): def __init__(self, in_planes, out_planes): super(Transition_nobn, self).__init__() self.conv = nn.Conv2d(in_planes, out_planes, kernel_size=1, bias=False) def forward(self, x): out = ...
import torch from torch._inductor.select_algorithm import extern_kernels import triton import triton.language as tl from torch._inductor.runtime.triton_heuristics import grid from torch._C import _cuda_getCurrentRawStream as get_raw_stream from torch._inductor.runtime import triton_helpers import torch.nn as nn assert_...
daroczyb/tangent_sensitivity
Transition_nobn
false
10,006
[ "MIT" ]
0
925258ab381ca5ab95620c411f72836a90baeb7f
https://github.com/daroczyb/tangent_sensitivity/tree/925258ab381ca5ab95620c411f72836a90baeb7f
Illumination_Alone
# AOT ID: ['0_forward'] from ctypes import c_void_p, c_long, c_int import torch import math import random import os import tempfile from math import inf, nan from torch._inductor.hooks import run_intermediate_hooks from torch._inductor.utils import maybe_profile from torch._inductor.codegen.memory_planning import _alig...
from _paritybench_helpers import _mock_config import torch import torch.nn as nn def get_conv2d_layer(in_c, out_c, k, s, p=0, dilation=1, groups=1): return nn.Conv2d(in_channels=in_c, out_channels=out_c, kernel_size=k, stride=s, padding=p, dilation=dilation, groups=groups) class Illumination_Alone(nn.Mo...
import torch from torch._inductor.select_algorithm import extern_kernels import triton import triton.language as tl from torch._inductor.runtime.triton_heuristics import grid from torch._C import _cuda_getCurrentRawStream as get_raw_stream from torch._inductor.runtime import triton_helpers import torch.nn as nn assert_...
AndersonYong/URetinex-Net-Retinex-based-Deep-Unfolding-Network-for-Low-light-Image-Enhancem
Illumination_Alone
false
10,007
[ "MIT" ]
0
9d837b8df9c761defb1eca390b3a60aa4a6fbb1a
https://github.com/AndersonYong/URetinex-Net-Retinex-based-Deep-Unfolding-Network-for-Low-light-Image-Enhancem/tree/9d837b8df9c761defb1eca390b3a60aa4a6fbb1a
GatedActivation
# AOT ID: ['0_inference'] from ctypes import c_void_p, c_long, c_int import torch import math import random import os import tempfile from math import inf, nan from torch._inductor.hooks import run_intermediate_hooks from torch._inductor.utils import maybe_profile from torch._inductor.codegen.memory_planning import _al...
import torch from torch import nn class GatedActivation(nn.Module): """Activation function which computes actiation_fn(f) * sigmoid(g). The f and g correspond to the top 1/2 and bottom 1/2 of the input channels. """ def __init__(self, activation_fn=torch.tanh): """Initializes a new GatedActi...
import torch import triton import triton.language as tl from torch._inductor.runtime.triton_heuristics import grid from torch._C import _cuda_getCurrentRawStream as get_raw_stream from torch._inductor.runtime.triton_helpers import libdevice from torch import nn assert_size_stride = torch._C._dynamo.guards.assert_size_s...
cobypenso/pytorch-generative
GatedActivation
false
10,008
[ "MIT" ]
0
72d1a3d8045179bd3a83ee3783aa070e74a1e400
https://github.com/cobypenso/pytorch-generative/tree/72d1a3d8045179bd3a83ee3783aa070e74a1e400
SigmoidCrossEntropyLoss
# AOT ID: ['0_inference'] from ctypes import c_void_p, c_long, c_int import torch import math import random import os import tempfile from math import inf, nan from torch._inductor.hooks import run_intermediate_hooks from torch._inductor.utils import maybe_profile from torch._inductor.codegen.memory_planning import _al...
import torch from torch import nn import torch.nn.functional as F class SigmoidCrossEntropyLoss(nn.Module): def __init__(self): """ :param num_negs: number of negative instances in bpr loss. """ super(SigmoidCrossEntropyLoss, self).__init__() def forward(self, y_pred, y_true)...
import torch import triton import triton.language as tl from torch._inductor.runtime.triton_heuristics import grid from torch._C import _cuda_getCurrentRawStream as get_raw_stream from torch._inductor.runtime import triton_helpers from torch._inductor.runtime.triton_helpers import libdevice, math as tl_math from torch ...
byzhang/OpenMatch
SigmoidCrossEntropyLoss
false
10,009
[ "Apache-2.0" ]
0
28b2d49a5eec2e1dc3934767c747ff0ca6c93d96
https://github.com/byzhang/OpenMatch/tree/28b2d49a5eec2e1dc3934767c747ff0ca6c93d96
MaskedAveragePooling
# AOT ID: ['0_inference'] from ctypes import c_void_p, c_long, c_int import torch import math import random import os import tempfile from math import inf, nan from torch._inductor.hooks import run_intermediate_hooks from torch._inductor.utils import maybe_profile from torch._inductor.codegen.memory_planning import _al...
import torch from torch import nn class MaskedAveragePooling(nn.Module): def __init__(self): super(MaskedAveragePooling, self).__init__() def forward(self, embedding_matrix): sum_pooling_matrix = torch.sum(embedding_matrix, dim=1) non_padding_length = (embedding_matrix.sum(dim=-1) !=...
import torch import triton import triton.language as tl from torch._inductor.runtime.triton_heuristics import grid from torch._C import _cuda_getCurrentRawStream as get_raw_stream from torch import nn assert_size_stride = torch._C._dynamo.guards.assert_size_stride empty_strided_cuda = torch._C._dynamo.guards._empty_str...
byzhang/OpenMatch
MaskedAveragePooling
false
10,010
[ "Apache-2.0" ]
0
28b2d49a5eec2e1dc3934767c747ff0ca6c93d96
https://github.com/byzhang/OpenMatch/tree/28b2d49a5eec2e1dc3934767c747ff0ca6c93d96
FullyConnectedHead
# AOT ID: ['0_forward'] from ctypes import c_void_p, c_long, c_int import torch import math import random import os import tempfile from math import inf, nan from torch._inductor.hooks import run_intermediate_hooks from torch._inductor.utils import maybe_profile from torch._inductor.codegen.memory_planning import _alig...
import torch from typing import Any from typing import Dict from typing import Optional import torch.nn as nn import torch.nn.modules as nn import torch.optim from torch import nn def is_pos_int(number): """ Returns True if a number is a positive integer. """ return type(number) == int and number >= 0...
import torch from torch._inductor.select_algorithm import extern_kernels import triton import triton.language as tl from torch._inductor.runtime.triton_heuristics import grid from torch._C import _cuda_getCurrentRawStream as get_raw_stream from typing import Any from typing import Dict from typing import Optional impor...
dendisuhubdy/ClassyVision
FullyConnectedHead
false
10,011
[ "MIT" ]
0
c7f8de4615181b5a14dd5ec44fa72bebb790e886
https://github.com/dendisuhubdy/ClassyVision/tree/c7f8de4615181b5a14dd5ec44fa72bebb790e886
MaskedSumPooling
# AOT ID: ['0_inference'] from ctypes import c_void_p, c_long, c_int import torch import math import random import os import tempfile from math import inf, nan from torch._inductor.hooks import run_intermediate_hooks from torch._inductor.utils import maybe_profile from torch._inductor.codegen.memory_planning import _al...
import torch from torch import nn class MaskedSumPooling(nn.Module): def __init__(self): super(MaskedSumPooling, self).__init__() def forward(self, embedding_matrix): return torch.sum(embedding_matrix, dim=1) def get_inputs(): return [torch.rand([4, 4, 4, 4])] def get_init_inputs(): ...
import torch import triton import triton.language as tl from torch._inductor.runtime.triton_heuristics import grid from torch._C import _cuda_getCurrentRawStream as get_raw_stream from torch import nn assert_size_stride = torch._C._dynamo.guards.assert_size_stride empty_strided_cuda = torch._C._dynamo.guards._empty_str...
byzhang/OpenMatch
MaskedSumPooling
false
10,012
[ "Apache-2.0" ]
0
28b2d49a5eec2e1dc3934767c747ff0ca6c93d96
https://github.com/byzhang/OpenMatch/tree/28b2d49a5eec2e1dc3934767c747ff0ca6c93d96
Self_Attn
# AOT ID: ['0_forward'] from ctypes import c_void_p, c_long, c_int import torch import math import random import os import tempfile from math import inf, nan from torch._inductor.hooks import run_intermediate_hooks from torch._inductor.utils import maybe_profile from torch._inductor.codegen.memory_planning import _alig...
import torch import torch.nn as nn class Self_Attn(nn.Module): """ Self attention Layer""" def __init__(self, in_dim): super(Self_Attn, self).__init__() self.chanel_in = in_dim self.value_conv = nn.Conv2d(in_channels=in_dim, out_channels=in_dim, kernel_size=1, bias=False) ...
import torch from torch._inductor.select_algorithm import extern_kernels import triton import triton.language as tl from torch._inductor.runtime.triton_heuristics import grid from torch._C import _cuda_getCurrentRawStream as get_raw_stream from torch._inductor.runtime import triton_helpers from torch._inductor.runtime....
douya1997/pytorch-cifar
Self_Attn
false
10,013
[ "MIT" ]
0
d5c73f6c1eddf3a2e74cb2dbd0eab6cc6dc4d14b
https://github.com/douya1997/pytorch-cifar/tree/d5c73f6c1eddf3a2e74cb2dbd0eab6cc6dc4d14b
GradLoss
# AOT ID: ['0_inference'] from ctypes import c_void_p, c_long, c_int import torch import math import random import os import tempfile from math import inf, nan from torch._inductor.hooks import run_intermediate_hooks from torch._inductor.utils import maybe_profile from torch._inductor.codegen.memory_planning import _al...
import torch import torch.nn as nn import torch.utils.data import torch.optim class GradLoss(nn.Module): def __init__(model): super(GradLoss, model).__init__() def forward(model, grad_fake, grad_real): return torch.sum(torch.mean(torch.abs(grad_real - grad_fake))) def get_inputs(): ret...
import torch import triton import triton.language as tl from torch._inductor.runtime.triton_heuristics import grid from torch._C import _cuda_getCurrentRawStream as get_raw_stream from torch._inductor.runtime import triton_helpers from torch._inductor.runtime.triton_helpers import math as tl_math import torch.nn as nn ...
domo23/DeepSFM
GradLoss
false
10,014
[ "BSD-3-Clause" ]
0
9456c1505e63b467417496545f17363ca17d02e4
https://github.com/domo23/DeepSFM/tree/9456c1505e63b467417496545f17363ca17d02e4
GCN_encoder
# AOT ID: ['0_forward'] from ctypes import c_void_p, c_long, c_int import torch import math import random import os import tempfile from math import inf, nan from torch._inductor.hooks import run_intermediate_hooks from torch._inductor.utils import maybe_profile from torch._inductor.codegen.memory_planning import _alig...
import torch import torch.nn as nn import torch.nn.init as init class GraphConv(nn.Module): def __init__(self, input_dim, output_dim): super(GraphConv, self).__init__() self.input_dim = input_dim self.output_dim = output_dim self.weight = nn.Parameter(torch.FloatTensor(input_dim, ...
import torch from torch._inductor.select_algorithm import extern_kernels import triton import triton.language as tl from torch._inductor.runtime.triton_heuristics import grid from torch._C import _cuda_getCurrentRawStream as get_raw_stream from torch._inductor.runtime import triton_helpers import torch.nn as nn import ...
bwalker1/graph-generation
GCN_encoder
false
10,015
[ "MIT" ]
0
e068769cb021760eb2549ced382b1a217609db86
https://github.com/bwalker1/graph-generation/tree/e068769cb021760eb2549ced382b1a217609db86
PatchEmbed
# AOT ID: ['0_forward'] from ctypes import c_void_p, c_long, c_int import torch import math import random import os import tempfile from math import inf, nan from torch._inductor.hooks import run_intermediate_hooks from torch._inductor.utils import maybe_profile from torch._inductor.codegen.memory_planning import _alig...
import torch from torch import nn class PatchEmbed(nn.Module): """ Image to Patch Embedding """ def __init__(self, img_size, patch_size=16, in_chans=3, embed_dim=768): super().__init__() num_patches_h = img_size[0] // patch_size num_patches_w = img_size[1] // patch_size nu...
import torch from torch._inductor.select_algorithm import extern_kernels import triton import triton.language as tl from torch._inductor.runtime.triton_heuristics import grid from torch._C import _cuda_getCurrentRawStream as get_raw_stream from torch import nn assert_size_stride = torch._C._dynamo.guards.assert_size_st...
daniel347x/dino
PatchEmbed
false
10,016
[ "Apache-2.0" ]
0
bb96d041de246ad0dc9672471911467fe635b018
https://github.com/daniel347x/dino/tree/bb96d041de246ad0dc9672471911467fe635b018
PSNR
# AOT ID: ['0_inference'] from ctypes import c_void_p, c_long, c_int import torch import math import random import os import tempfile from math import inf, nan from torch._inductor.hooks import run_intermediate_hooks from torch._inductor.utils import maybe_profile from torch._inductor.codegen.memory_planning import _al...
import torch import torch as th class PSNR(th.nn.Module): def __init__(self): super(PSNR, self).__init__() self.mse = th.nn.MSELoss() def forward(self, out, ref): mse = self.mse(out, ref) return -10 * th.log10(mse) def get_inputs(): return [torch.rand([4, 4, 4, 4]), tor...
import torch import triton import triton.language as tl from torch._inductor.runtime.triton_heuristics import grid from torch._C import _cuda_getCurrentRawStream as get_raw_stream from torch._inductor.runtime import triton_helpers from torch._inductor.runtime.triton_helpers import libdevice import torch as th assert_si...
endrol/demosaicnet
PSNR
false
10,017
[ "MIT" ]
0
4b3726a08dcbbb5b70240687f211b39ebd15ad54
https://github.com/endrol/demosaicnet/tree/4b3726a08dcbbb5b70240687f211b39ebd15ad54
PredictionHead
# AOT ID: ['0_forward'] from ctypes import c_void_p, c_long, c_int import torch import math import random import os import tempfile from math import inf, nan from torch._inductor.hooks import run_intermediate_hooks from torch._inductor.utils import maybe_profile from torch._inductor.codegen.memory_planning import _alig...
import torch import torch.nn as nn import torch.onnx class PredictionHead(nn.Module): def __init__(self, in_channels, num_classes, num_anchors): super(PredictionHead, self).__init__() self.classification = nn.Conv2d(in_channels, num_classes * num_anchors, kernel_size=1) self.r...
import torch from torch._inductor.select_algorithm import extern_kernels import triton import triton.language as tl from torch._inductor.runtime.triton_heuristics import grid from torch._C import _cuda_getCurrentRawStream as get_raw_stream import torch.nn as nn import torch.onnx assert_size_stride = torch._C._dynamo.gu...
danshirron/inference
PredictionHead
false
10,018
[ "Apache-2.0" ]
0
31ae9b30ca5b1081a2d35f73ffcde10ae1fdaf41
https://github.com/danshirron/inference/tree/31ae9b30ca5b1081a2d35f73ffcde10ae1fdaf41
RobertaClassificationHead_R
# AOT ID: ['0_forward'] from ctypes import c_void_p, c_long, c_int import torch import math import random import os import tempfile from math import inf, nan from torch._inductor.hooks import run_intermediate_hooks from torch._inductor.utils import maybe_profile from torch._inductor.codegen.memory_planning import _alig...
from _paritybench_helpers import _mock_config import torch from torch import nn import torch.utils.checkpoint class RobertaClassificationHead_R(nn.Module): """Head for sentence-level classification tasks.""" def __init__(self, config): super().__init__() self.dense = nn.Linear(config.hidden_s...
import torch from torch._inductor.select_algorithm import extern_kernels import triton import triton.language as tl from torch._inductor.runtime.triton_heuristics import grid from torch._C import _cuda_getCurrentRawStream as get_raw_stream from torch._inductor.runtime.triton_helpers import libdevice from torch import n...
Delecis/bert-classification
RobertaClassificationHead_R
false
10,019
[ "Apache-2.0" ]
0
00e0d295ecf22a1bd364f2d63244469692ff23a3
https://github.com/Delecis/bert-classification/tree/00e0d295ecf22a1bd364f2d63244469692ff23a3
ContrastiveLoss
# AOT ID: ['0_inference'] from ctypes import c_void_p, c_long, c_int import torch import math import random import os import tempfile from math import inf, nan from torch._inductor.hooks import run_intermediate_hooks from torch._inductor.utils import maybe_profile from torch._inductor.codegen.memory_planning import _al...
import torch from torch import nn from torch.nn import CosineSimilarity class ContrastiveLoss(nn.Module): """ Contrastive loss Takes embeddings of two samples and a target label == 1 if samples are from the same class and label == 0 otherwise """ def __init__(self, margin=0.5): super(Cont...
import torch import triton import triton.language as tl from torch._inductor.runtime.triton_heuristics import grid from torch._C import _cuda_getCurrentRawStream as get_raw_stream from torch._inductor.runtime import triton_helpers from torch._inductor.runtime.triton_helpers import libdevice from torch import nn from to...
elloworl/FRMiner2.0
ContrastiveLoss
false
10,020
[ "MIT" ]
0
f596530d18512a1b1b8b8d56772f006f9f53f429
https://github.com/elloworl/FRMiner2.0/tree/f596530d18512a1b1b8b8d56772f006f9f53f429
PositionwiseFeedForward
# AOT ID: ['0_forward'] from ctypes import c_void_p, c_long, c_int import torch import math import random import os import tempfile from math import inf, nan from torch._inductor.hooks import run_intermediate_hooks from torch._inductor.utils import maybe_profile from torch._inductor.codegen.memory_planning import _alig...
import torch import torch.nn as nn class LayerNorm(nn.Module): """ Layer Normalization class """ def __init__(self, features, eps=1e-06): super(LayerNorm, self).__init__() self.weight = nn.Parameter(torch.ones(features)) self.bias = nn.Parameter(torch.zeros(features)) ...
import torch from torch._inductor.select_algorithm import extern_kernels import triton import triton.language as tl from torch._inductor.runtime.triton_heuristics import grid from torch._C import _cuda_getCurrentRawStream as get_raw_stream from torch._inductor.runtime import triton_helpers from torch._inductor.runtime....
czhao39/NeuralCodeSum
PositionwiseFeedForward
false
10,021
[ "MIT" ]
0
d06f8165a8af993239ec6d796bac1d378aa8be91
https://github.com/czhao39/NeuralCodeSum/tree/d06f8165a8af993239ec6d796bac1d378aa8be91
Net
# AOT ID: ['0_forward'] from ctypes import c_void_p, c_long, c_int import torch import math import random import os import tempfile from math import inf, nan from torch._inductor.hooks import run_intermediate_hooks from torch._inductor.utils import maybe_profile from torch._inductor.codegen.memory_planning import _alig...
import torch import torch.nn as nn import torch.nn.functional as F class Net(nn.Module): def __init__(self): super(Net, self).__init__() self.conv1 = nn.Conv2d(1, 6, 3) self.conv2 = nn.Conv2d(6, 16, 3) self.fc1 = nn.Linear(16 * 28 * 28, 512) self.fc2 = nn.Linear(512, 64) ...
import torch from torch._inductor.select_algorithm import extern_kernels import triton import triton.language as tl from torch._inductor.runtime.triton_heuristics import grid from torch._C import _cuda_getCurrentRawStream as get_raw_stream from torch._inductor.runtime import triton_helpers import torch.nn as nn assert_...
dollarkillerx/PyTorchStudy
Net
false
10,022
[ "MIT" ]
0
c17b2973c89e3a2f088513f29bd5eb6f47957585
https://github.com/dollarkillerx/PyTorchStudy/tree/c17b2973c89e3a2f088513f29bd5eb6f47957585
CoFusion
# AOT ID: ['0_forward'] from ctypes import c_void_p, c_long, c_int import torch import math import random import os import tempfile from math import inf, nan from torch._inductor.hooks import run_intermediate_hooks from torch._inductor.utils import maybe_profile from torch._inductor.codegen.memory_planning import _alig...
import torch import torch.nn.functional as F import torch.nn as nn class CoFusion(nn.Module): def __init__(self, in_ch, out_ch): super(CoFusion, self).__init__() self.conv1 = nn.Conv2d(in_ch, 64, kernel_size=3, stride=1, padding=1) self.conv2 = nn.Conv2d(64, 64, kernel_size=3, stride=1, p...
import torch from torch._inductor.select_algorithm import extern_kernels import triton import triton.language as tl from torch._inductor.runtime.triton_heuristics import grid from torch._C import _cuda_getCurrentRawStream as get_raw_stream from torch._inductor.runtime import triton_helpers from torch._inductor.runtime....
cordob/DexiNed
CoFusion
false
10,023
[ "MIT" ]
0
9e084652f8051155c98277c02eecefa927bfe04c
https://github.com/cordob/DexiNed/tree/9e084652f8051155c98277c02eecefa927bfe04c
Gaussian
# AOT ID: ['0_inference'] from ctypes import c_void_p, c_long, c_int import torch import math import random import os import tempfile from math import inf, nan from torch._inductor.hooks import run_intermediate_hooks from torch._inductor.utils import maybe_profile from torch._inductor.codegen.memory_planning import _al...
import torch import torch.utils.tensorboard import torch.utils.data class Gaussian(torch.nn.Module): """Gaussian activation""" def forward(self, x): return torch.exp(-x * x) def get_inputs(): return [torch.rand([4, 4, 4, 4])] def get_init_inputs(): return [[], {}]
import torch import triton import triton.language as tl from torch._inductor.runtime.triton_heuristics import grid from torch._C import _cuda_getCurrentRawStream as get_raw_stream from torch._inductor.runtime.triton_helpers import math as tl_math import torch.utils.tensorboard import torch.utils.data assert_size_stride...
chc273/torchani
Gaussian
false
10,024
[ "MIT" ]
0
bbcd7bedc254796f0c2f839c4868ac211ad9078d
https://github.com/chc273/torchani/tree/bbcd7bedc254796f0c2f839c4868ac211ad9078d
GatedTransition
# AOT ID: ['0_forward'] from ctypes import c_void_p, c_long, c_int import torch import math import random import os import tempfile from math import inf, nan from torch._inductor.hooks import run_intermediate_hooks from torch._inductor.utils import maybe_profile from torch._inductor.codegen.memory_planning import _alig...
import torch from torch import nn class GatedTransition(nn.Module): """ Parameterizes the gaussian latent transition probability p(z_t | z_{t-1}) """ def __init__(self, z_dim, transition_dim): super().__init__() self.lin_gate_z_to_hidden = nn.Linear(z_dim, transition_dim) self...
import torch from torch._inductor.select_algorithm import extern_kernels import triton import triton.language as tl from torch._inductor.runtime.triton_heuristics import grid from torch._C import _cuda_getCurrentRawStream as get_raw_stream from torch._inductor.runtime import triton_helpers from torch._inductor.runtime....
devonjkohler/sysbioDMM
GatedTransition
false
10,025
[ "MIT" ]
0
3967a084a492f5b7abd1f3274f1dc5ee9ef868ff
https://github.com/devonjkohler/sysbioDMM/tree/3967a084a492f5b7abd1f3274f1dc5ee9ef868ff
Combiner
# AOT ID: ['0_forward'] from ctypes import c_void_p, c_long, c_int import torch import math import random import os import tempfile from math import inf, nan from torch._inductor.hooks import run_intermediate_hooks from torch._inductor.utils import maybe_profile from torch._inductor.codegen.memory_planning import _alig...
import torch from torch import nn class Combiner(nn.Module): """ Parameterizes q(z_t | z_{t-1}, x_{t:T}), which is the basic building block of the guide (i.e. the variational distribution). The dependence on x_{t:T} is through the hidden state of the RNN (see the pytorch module `rnn` below). The g...
import torch from torch._inductor.select_algorithm import extern_kernels import triton import triton.language as tl from torch._inductor.runtime.triton_heuristics import grid from torch._C import _cuda_getCurrentRawStream as get_raw_stream from torch._inductor.runtime.triton_helpers import libdevice, math as tl_math fr...
devonjkohler/sysbioDMM
Combiner
false
10,026
[ "MIT" ]
0
3967a084a492f5b7abd1f3274f1dc5ee9ef868ff
https://github.com/devonjkohler/sysbioDMM/tree/3967a084a492f5b7abd1f3274f1dc5ee9ef868ff
BertMultiPairPooler
# AOT ID: ['0_forward'] from ctypes import c_void_p, c_long, c_int import torch import math import random import os import tempfile from math import inf, nan from torch._inductor.hooks import run_intermediate_hooks from torch._inductor.utils import maybe_profile from torch._inductor.codegen.memory_planning import _alig...
from _paritybench_helpers import _mock_config import torch import torch.nn as nn class BertMultiPairPooler(nn.Module): def __init__(self, config): super().__init__() self.dense = nn.Linear(config.hidden_size * 2, config.hidden_size) self.activation = nn.Tanh() def forward(self, hidde...
import torch from torch._inductor.select_algorithm import extern_kernels import triton import triton.language as tl from torch._inductor.runtime.triton_heuristics import grid from torch._C import _cuda_getCurrentRawStream as get_raw_stream from torch._inductor.runtime.triton_helpers import libdevice import torch.nn as ...
doduo-anonymous/doduo-submission
BertMultiPairPooler
false
10,027
[ "Apache-2.0" ]
0
34d397c14174d64e6a3026d51cc25560a4f1e29f
https://github.com/doduo-anonymous/doduo-submission/tree/34d397c14174d64e6a3026d51cc25560a4f1e29f
VitMlpHead
# AOT ID: ['0_forward'] from ctypes import c_void_p, c_long, c_int import torch import math import random import os import tempfile from math import inf, nan from torch._inductor.hooks import run_intermediate_hooks from torch._inductor.utils import maybe_profile from torch._inductor.codegen.memory_planning import _alig...
import torch def get_args(): parser = argparse.ArgumentParser() group = parser.add_argument_group(title='input data') group.add_argument('--input', type=str, required=True, help= 'Path to input JSON') group.add_argument('--json-keys', nargs='+', default=['text'], help= 'space separate ...
import torch from torch._inductor.select_algorithm import extern_kernels import triton import triton.language as tl from torch._inductor.runtime.triton_heuristics import grid from torch._C import _cuda_getCurrentRawStream as get_raw_stream from torch._inductor.runtime.triton_helpers import libdevice assert_size_stride ...
deepakn94/Megatron-DeepSpeed
VitMlpHead
false
10,028
[ "MIT" ]
0
541b967fbf9fd97ce090ca464ccd205b55aae59c
https://github.com/deepakn94/Megatron-DeepSpeed/tree/541b967fbf9fd97ce090ca464ccd205b55aae59c
ScaledDotProductAttention
# AOT ID: ['0_inference'] from ctypes import c_void_p, c_long, c_int import torch import math import random import os import tempfile from math import inf, nan from torch._inductor.hooks import run_intermediate_hooks from torch._inductor.utils import maybe_profile from torch._inductor.codegen.memory_planning import _al...
import torch import torch.nn as nn class ScaledDotProductAttention(nn.Module): def __init__(self, temperature, dropout=0.1): super(ScaledDotProductAttention, self).__init__() self.temperature = temperature self.dropout = nn.Dropout(p=dropout) def forward(self, q, k, v, mask=None): ...
import torch from torch._inductor.select_algorithm import extern_kernels import triton import triton.language as tl from torch._inductor.runtime.triton_heuristics import grid from torch._C import _cuda_getCurrentRawStream as get_raw_stream from torch._inductor.runtime import triton_helpers from torch._inductor.runtime....
connoisseures/vedastr
ScaledDotProductAttention
false
10,029
[ "Apache-2.0" ]
0
5dc64f3f6f810f615414aec3508e5dfba1239216
https://github.com/connoisseures/vedastr/tree/5dc64f3f6f810f615414aec3508e5dfba1239216
CORblock_Z
# AOT ID: ['0_forward'] from ctypes import c_void_p, c_long, c_int import torch import math import random import os import tempfile from math import inf, nan from torch._inductor.hooks import run_intermediate_hooks from torch._inductor.utils import maybe_profile from torch._inductor.codegen.memory_planning import _alig...
import torch from torch import nn class CORblock_Z(nn.Module): """ CORblock_Z is a computational area of CORnet-Z """ def __init__(self, in_channels, out_channels, kernel_size=3, stride=1): super().__init__() self.conv = nn.Conv2d(in_channels, out_channels, kernel_size= ke...
import torch from torch._inductor.select_algorithm import extern_kernels import triton import triton.language as tl from torch._inductor.runtime.triton_heuristics import grid from torch._C import _cuda_getCurrentRawStream as get_raw_stream from torch._inductor.runtime import triton_helpers from torch import nn assert_s...
emaliemcmahon/dl-final-proj-spring21-group2
CORblock_Z
false
10,030
[ "MIT" ]
0
51abed6633c4b326e62d26c1600256a959b39510
https://github.com/emaliemcmahon/dl-final-proj-spring21-group2/tree/51abed6633c4b326e62d26c1600256a959b39510
BasicLinearReLULinear
# AOT ID: ['0_forward'] from ctypes import c_void_p, c_long, c_int import torch import math import random import os import tempfile from math import inf, nan from torch._inductor.hooks import run_intermediate_hooks from torch._inductor.utils import maybe_profile from torch._inductor.codegen.memory_planning import _alig...
import torch import torch.nn as nn class BasicLinearReLULinear(nn.Module): def __init__(self, in_features, out_features=5, bias=False): super().__init__() self.fc1 = nn.Linear(in_features, out_features, bias=bias) self.relu1 = nn.ReLU() self.fc2 = nn.Linear(out_features, 1, bias=b...
import torch from torch._inductor.select_algorithm import extern_kernels import triton import triton.language as tl from torch._inductor.runtime.triton_heuristics import grid from torch._C import _cuda_getCurrentRawStream as get_raw_stream from torch._inductor.runtime import triton_helpers import torch.nn as nn assert_...
dkrako/captum
BasicLinearReLULinear
false
10,031
[ "BSD-3-Clause" ]
0
b5297bacbaec4e37f353a27de5e728bc2cbc1694
https://github.com/dkrako/captum/tree/b5297bacbaec4e37f353a27de5e728bc2cbc1694
BasicLinearNet
# AOT ID: ['0_forward'] from ctypes import c_void_p, c_long, c_int import torch import math import random import os import tempfile from math import inf, nan from torch._inductor.hooks import run_intermediate_hooks from torch._inductor.utils import maybe_profile from torch._inductor.codegen.memory_planning import _alig...
import torch import torch.nn as nn class BasicLinearNet(nn.Module): def __init__(self, in_features, hidden_nodes, out_features): super().__init__() self.linear1 = nn.Linear(in_features, hidden_nodes) self.linear2 = nn.Linear(hidden_nodes, out_features) def forward(self, input): ...
import torch from torch._inductor.select_algorithm import extern_kernels import triton import triton.language as tl from torch._inductor.runtime.triton_heuristics import grid from torch._C import _cuda_getCurrentRawStream as get_raw_stream from torch._inductor.runtime.triton_helpers import libdevice import torch.nn as ...
dkrako/captum
BasicLinearNet
false
10,032
[ "BSD-3-Clause" ]
0
b5297bacbaec4e37f353a27de5e728bc2cbc1694
https://github.com/dkrako/captum/tree/b5297bacbaec4e37f353a27de5e728bc2cbc1694
HighwayLayer
# AOT ID: ['0_forward'] from ctypes import c_void_p, c_long, c_int import torch import math import random import os import tempfile from math import inf, nan from torch._inductor.hooks import run_intermediate_hooks from torch._inductor.utils import maybe_profile from torch._inductor.codegen.memory_planning import _alig...
import torch from torch import nn import torch.utils.data import torch.utils.data.distributed import torch.utils.checkpoint import torch.utils.tensorboard def my_xavier_init(m, gain=1): """Xavier initialization: weights initialization that tries to make variance of outputs of a layer equal to variance of its ...
import torch from torch._inductor.select_algorithm import extern_kernels import triton import triton.language as tl from torch._inductor.runtime.triton_heuristics import grid from torch._C import _cuda_getCurrentRawStream as get_raw_stream from torch._inductor.runtime.triton_helpers import libdevice from torch import n...
ali-senguel/fairo-explore
HighwayLayer
false
10,033
[ "MIT" ]
0
893481da270eed1e6d504c71e483d685ca9218d1
https://github.com/ali-senguel/fairo-explore/tree/893481da270eed1e6d504c71e483d685ca9218d1
BertMultiPooler
# AOT ID: ['0_forward'] from ctypes import c_void_p, c_long, c_int import torch import math import random import os import tempfile from math import inf, nan from torch._inductor.hooks import run_intermediate_hooks from torch._inductor.utils import maybe_profile from torch._inductor.codegen.memory_planning import _alig...
from _paritybench_helpers import _mock_config import torch import torch.nn as nn class BertMultiPooler(nn.Module): def __init__(self, config): super().__init__() self.dense = nn.Linear(config.hidden_size, config.hidden_size) self.activation = nn.Tanh() def forward(self, hidden_states...
import torch from torch._inductor.select_algorithm import extern_kernels import triton import triton.language as tl from torch._inductor.runtime.triton_heuristics import grid from torch._C import _cuda_getCurrentRawStream as get_raw_stream from torch._inductor.runtime.triton_helpers import libdevice import torch.nn as ...
doduo-anonymous/doduo-submission
BertMultiPooler
false
10,034
[ "Apache-2.0" ]
0
34d397c14174d64e6a3026d51cc25560a4f1e29f
https://github.com/doduo-anonymous/doduo-submission/tree/34d397c14174d64e6a3026d51cc25560a4f1e29f
make_style
# AOT ID: ['0_inference'] from ctypes import c_void_p, c_long, c_int import torch import math import random import os import tempfile from math import inf, nan from torch._inductor.hooks import run_intermediate_hooks from torch._inductor.utils import maybe_profile from torch._inductor.codegen.memory_planning import _al...
import torch from torch import nn import torch.nn.functional as F class make_style(nn.Module): def __init__(self): super().__init__() self.flatten = nn.Flatten() def forward(self, x0): style = F.avg_pool2d(x0, kernel_size=(x0.shape[-2], x0.shape[-1])) style = self.flatten(sty...
import torch import triton import triton.language as tl from torch._inductor.runtime.triton_heuristics import grid from torch._C import _cuda_getCurrentRawStream as get_raw_stream from torch._inductor.runtime.triton_helpers import libdevice from torch import nn assert_size_stride = torch._C._dynamo.guards.assert_size_s...
dkurt/cellpose
make_style
false
10,035
[ "BSD-3-Clause" ]
0
975821a5d75ce5f1b40b7a95ed0bd45cf99a0acb
https://github.com/dkurt/cellpose/tree/975821a5d75ce5f1b40b7a95ed0bd45cf99a0acb
BehaviorAggregator
# AOT ID: ['0_forward'] from ctypes import c_void_p, c_long, c_int import torch import math import random import os import tempfile from math import inf, nan from torch._inductor.hooks import run_intermediate_hooks from torch._inductor.utils import maybe_profile from torch._inductor.codegen.memory_planning import _alig...
import torch from torch import nn class BehaviorAggregator(nn.Module): def __init__(self, embedding_dim, gamma=0.5, aggregator='mean', dropout_rate=0.0): super(BehaviorAggregator, self).__init__() self.aggregator = aggregator self.gamma = gamma self.W_v = nn.Linear(embeddi...
import torch from torch._inductor.select_algorithm import extern_kernels import triton import triton.language as tl from torch._inductor.runtime.triton_heuristics import grid from torch._C import _cuda_getCurrentRawStream as get_raw_stream from torch import nn assert_size_stride = torch._C._dynamo.guards.assert_size_st...
byzhang/OpenMatch
BehaviorAggregator
false
10,036
[ "Apache-2.0" ]
0
28b2d49a5eec2e1dc3934767c747ff0ca6c93d96
https://github.com/byzhang/OpenMatch/tree/28b2d49a5eec2e1dc3934767c747ff0ca6c93d96
AddSubNet
# AOT ID: ['0_inference'] from ctypes import c_void_p, c_long, c_int import torch import math import random import os import tempfile from math import inf, nan from torch._inductor.hooks import run_intermediate_hooks from torch._inductor.utils import maybe_profile from torch._inductor.codegen.memory_planning import _al...
import torch from torch import nn class AddSubNet(nn.Module): """ Simple AddSub network in PyTorch. This network outputs the sum and subtraction of the inputs. """ def __init__(self): super(AddSubNet, self).__init__() def forward(self, input0, input1): return torch.sub(input0...
import torch import triton import triton.language as tl from torch._inductor.runtime.triton_heuristics import grid from torch._C import _cuda_getCurrentRawStream as get_raw_stream from torch import nn assert_size_stride = torch._C._dynamo.guards.assert_size_stride empty_strided_cuda = torch._C._dynamo.guards._empty_str...
fivetran-VitaliyMalkin/server
AddSubNet
false
10,037
[ "BSD-3-Clause" ]
0
643840a61038aa090c37e1544826264925d0b483
https://github.com/fivetran-VitaliyMalkin/server/tree/643840a61038aa090c37e1544826264925d0b483
FeatureWiseAffine
# AOT ID: ['0_inference'] from ctypes import c_void_p, c_long, c_int import torch import math import random import os import tempfile from math import inf, nan from torch._inductor.hooks import run_intermediate_hooks from torch._inductor.utils import maybe_profile from torch._inductor.codegen.memory_planning import _al...
import torch class BaseModule(torch.nn.Module): def __init__(self): super(BaseModule, self).__init__() @property def nparams(self): return sum(p.numel() for p in self.parameters() if p.requires_grad) class FeatureWiseAffine(BaseModule): def __init__(self): super(FeatureWis...
import torch import triton import triton.language as tl from torch._inductor.runtime.triton_heuristics import grid from torch._C import _cuda_getCurrentRawStream as get_raw_stream assert_size_stride = torch._C._dynamo.guards.assert_size_stride empty_strided_cuda = torch._C._dynamo.guards._empty_strided_cuda @triton.j...
dodoproptit99/WaveGrad
FeatureWiseAffine
false
10,038
[ "BSD-3-Clause" ]
0
d5e3cb5d8c1c3d115eeb5f1673b87bdbb36f79e0
https://github.com/dodoproptit99/WaveGrad/tree/d5e3cb5d8c1c3d115eeb5f1673b87bdbb36f79e0
BasicModulationBlock
# AOT ID: ['0_forward'] from ctypes import c_void_p, c_long, c_int import torch import math import random import os import tempfile from math import inf, nan from torch._inductor.hooks import run_intermediate_hooks from torch._inductor.utils import maybe_profile from torch._inductor.codegen.memory_planning import _alig...
import torch class BaseModule(torch.nn.Module): def __init__(self): super(BaseModule, self).__init__() @property def nparams(self): return sum(p.numel() for p in self.parameters() if p.requires_grad) class Conv1dWithInitialization(BaseModule): def __init__(self, **kwargs): ...
import torch from torch._inductor.select_algorithm import extern_kernels import triton import triton.language as tl from torch._inductor.runtime.triton_heuristics import grid from torch._C import _cuda_getCurrentRawStream as get_raw_stream assert_size_stride = torch._C._dynamo.guards.assert_size_stride empty_strided_cu...
dodoproptit99/WaveGrad
BasicModulationBlock
false
10,039
[ "BSD-3-Clause" ]
0
d5e3cb5d8c1c3d115eeb5f1673b87bdbb36f79e0
https://github.com/dodoproptit99/WaveGrad/tree/d5e3cb5d8c1c3d115eeb5f1673b87bdbb36f79e0
PVABlock
# AOT ID: ['0_forward'] from ctypes import c_void_p, c_long, c_int import torch import math import random import os import tempfile from math import inf, nan from torch._inductor.hooks import run_intermediate_hooks from torch._inductor.utils import maybe_profile from torch._inductor.codegen.memory_planning import _alig...
import torch import torch.nn as nn def constant_init(module, val, bias=0): nn.init.constant_(module.weight, val) if hasattr(module, 'bias') and module.bias is not None: nn.init.constant_(module.bias, bias) def kaiming_init(module, a=0, is_rnn=False, mode='fan_in', nonlinearity= 'leaky_relu', bia...
import torch from torch._inductor.select_algorithm import extern_kernels import triton import triton.language as tl from torch._inductor.runtime.triton_heuristics import grid from torch._C import _cuda_getCurrentRawStream as get_raw_stream from torch._inductor.runtime import triton_helpers from torch._inductor.runtime....
connoisseures/vedastr
PVABlock
false
10,040
[ "Apache-2.0" ]
0
5dc64f3f6f810f615414aec3508e5dfba1239216
https://github.com/connoisseures/vedastr/tree/5dc64f3f6f810f615414aec3508e5dfba1239216
Invertible1x1Conv
# AOT ID: ['0_forward'] from ctypes import c_void_p, c_long, c_int import torch import math import random import os import tempfile from math import inf, nan from torch._inductor.hooks import run_intermediate_hooks from torch._inductor.utils import maybe_profile from torch._inductor.codegen.memory_planning import _alig...
import torch import torch.nn.functional as F from torch.autograd import Variable import torch.utils.data class Invertible1x1Conv(torch.nn.Module): """ The layer outputs both the convolution, and the log determinant of its weight matrix. If reverse=True it does convolution with inverse """ de...
import torch from torch._inductor.select_algorithm import extern_kernels import triton import triton.language as tl from torch._inductor.runtime.triton_heuristics import grid from torch._C import _cuda_getCurrentRawStream as get_raw_stream import torch.nn.functional as F from torch.autograd import Variable import torch...
eba472/fastPitchPyTorch
Invertible1x1Conv
false
10,041
[ "BSD-3-Clause" ]
0
0f946c05539102e6868f72f5bf2c461d9711e7d7
https://github.com/eba472/fastPitchPyTorch/tree/0f946c05539102e6868f72f5bf2c461d9711e7d7
GumbelSoftmaxLayer
# AOT ID: ['0_inference'] from ctypes import c_void_p, c_long, c_int import torch import math import random import os import tempfile from math import inf, nan from torch._inductor.hooks import run_intermediate_hooks from torch._inductor.utils import maybe_profile from torch._inductor.codegen.memory_planning import _al...
import torch import torch.nn as nn from torch.distributions import RelaxedOneHotCategorical import torch.nn.parallel import torch.utils.data import torch.distributions def gumbel_softmax_sample(logits: 'torch.Tensor', temperature: 'float'=1.0, training: 'bool'=True, straight_through: 'bool'=False): size = log...
import torch import triton import triton.language as tl from torch._inductor.runtime.triton_heuristics import grid from torch._C import _cuda_getCurrentRawStream as get_raw_stream import torch.nn as nn from torch.distributions import RelaxedOneHotCategorical import torch.nn.parallel import torch.utils.data import torch...
cjlovering/EGG
GumbelSoftmaxLayer
false
10,042
[ "MIT" ]
0
cce146e035decbc410e981f8bc7ada32979f3b6d
https://github.com/cjlovering/EGG/tree/cce146e035decbc410e981f8bc7ada32979f3b6d
SparseDecoder
# AOT ID: ['0_forward'] from ctypes import c_void_p, c_long, c_int import torch import math import random import os import tempfile from math import inf, nan from torch._inductor.hooks import run_intermediate_hooks from torch._inductor.utils import maybe_profile from torch._inductor.codegen.memory_planning import _alig...
import torch import numpy as np from torch import Tensor import torch.nn as nn from scipy.special import erfinv class SparseDecoder(nn.Module): def __init__(self, seq_len, alphabet_size, latent_dim, h1_dim=100, h2_dim=500, n_tiles=4, conv_size=40, scale_mu=0.01, scale_sigma=4.0): """ ...
import torch from torch import device from torch._inductor.select_algorithm import extern_kernels import triton import triton.language as tl from torch._inductor.runtime.triton_heuristics import grid from torch._C import _cuda_getCurrentRawStream as get_raw_stream from torch._inductor.runtime import triton_helpers from...
charlesxu90/DeepSequence-torch
SparseDecoder
false
10,043
[ "MIT" ]
0
640db39769a93ef3d5bc11d6ad05aa7f5d761972
https://github.com/charlesxu90/DeepSequence-torch/tree/640db39769a93ef3d5bc11d6ad05aa7f5d761972
StackTime
# AOT ID: ['0_inference'] from ctypes import c_void_p, c_long, c_int import torch import math import random import os import tempfile from math import inf, nan from torch._inductor.hooks import run_intermediate_hooks from torch._inductor.utils import maybe_profile from torch._inductor.codegen.memory_planning import _al...
import torch import torch.nn as nn import torch.utils.data import torch.jit import torch.optim import torch.utils.collect_env import torch.nn.parallel import torch.utils.data.distributed class StackTime(nn.Module): def __init__(self, factor): super().__init__() self.factor = int(factor) def ...
import torch import triton import triton.language as tl from torch._inductor.runtime.triton_heuristics import grid from torch._C import _cuda_getCurrentRawStream as get_raw_stream import torch.nn as nn import torch.utils.data import torch.jit import torch.optim import torch.utils.collect_env import torch.nn.parallel im...
cometta/training
StackTime
false
10,044
[ "Apache-2.0" ]
0
2f33c36d5aa2e1c2770fb3bab35afc8c665e01ce
https://github.com/cometta/training/tree/2f33c36d5aa2e1c2770fb3bab35afc8c665e01ce
Similarity
# AOT ID: ['0_inference'] from ctypes import c_void_p, c_long, c_int import torch import math import random import os import tempfile from math import inf, nan from torch._inductor.hooks import run_intermediate_hooks from torch._inductor.utils import maybe_profile from torch._inductor.codegen.memory_planning import _al...
import torch import torch.nn as nn class Similarity(nn.Module): """ Dot product or cosine similarity """ def __init__(self, temp): super().__init__() self.temp = temp self.cos = nn.CosineSimilarity(dim=-1) def forward(self, x, y): return self.cos(x, y) / self.temp...
import torch import triton import triton.language as tl from torch._inductor.runtime.triton_heuristics import grid from torch._C import _cuda_getCurrentRawStream as get_raw_stream from torch._inductor.runtime import triton_helpers from torch._inductor.runtime.triton_helpers import libdevice import torch.nn as nn assert...
firefighter-eric/SentEmbedding
Similarity
false
10,045
[ "MIT" ]
0
c1ad140c42ef946ac7d155a85581c0cf35871133
https://github.com/firefighter-eric/SentEmbedding/tree/c1ad140c42ef946ac7d155a85581c0cf35871133
ConvolutionBlock
# AOT ID: ['0_forward'] from ctypes import c_void_p, c_long, c_int import torch import math import random import os import tempfile from math import inf, nan from torch._inductor.hooks import run_intermediate_hooks from torch._inductor.utils import maybe_profile from torch._inductor.codegen.memory_planning import _alig...
import torch class BaseModule(torch.nn.Module): def __init__(self): super(BaseModule, self).__init__() @property def nparams(self): return sum(p.numel() for p in self.parameters() if p.requires_grad) class Conv1dWithInitialization(BaseModule): def __init__(self, **kwargs): ...
import torch from torch._inductor.select_algorithm import extern_kernels import triton import triton.language as tl from torch._inductor.runtime.triton_heuristics import grid from torch._C import _cuda_getCurrentRawStream as get_raw_stream assert_size_stride = torch._C._dynamo.guards.assert_size_stride empty_strided_cu...
dodoproptit99/WaveGrad
ConvolutionBlock
false
10,046
[ "BSD-3-Clause" ]
0
d5e3cb5d8c1c3d115eeb5f1673b87bdbb36f79e0
https://github.com/dodoproptit99/WaveGrad/tree/d5e3cb5d8c1c3d115eeb5f1673b87bdbb36f79e0
BahdanauAttention
# AOT ID: ['0_forward'] from ctypes import c_void_p, c_long, c_int import torch import math import random import os import tempfile from math import inf, nan from torch._inductor.hooks import run_intermediate_hooks from torch._inductor.utils import maybe_profile from torch._inductor.codegen.memory_planning import _alig...
import math import torch import torch.nn.functional as F import torch.nn as nn from torch.nn import Parameter import torch.optim.lr_scheduler import torch.utils.data import torch.onnx.operators import torch.optim class BaseAttention(nn.Module): """Base class for attention layers.""" def __init__(self, query_...
import torch from torch._inductor.select_algorithm import extern_kernels import triton import triton.language as tl from torch._inductor.runtime.triton_heuristics import grid from torch._C import _cuda_getCurrentRawStream as get_raw_stream from torch._inductor.runtime.triton_helpers import libdevice, math as tl_math im...
entn-at/espresso
BahdanauAttention
false
10,047
[ "MIT" ]
0
754b69a316429446a5602e13e644142310b7980b
https://github.com/entn-at/espresso/tree/754b69a316429446a5602e13e644142310b7980b
NeuralNetwork
# AOT ID: ['0_forward'] from ctypes import c_void_p, c_long, c_int import torch import math import random import os import tempfile from math import inf, nan from torch._inductor.hooks import run_intermediate_hooks from torch._inductor.utils import maybe_profile from torch._inductor.codegen.memory_planning import _alig...
import torch import torch.nn.functional as F import torch.nn as nn class NeuralNetwork(nn.Module): def __init__(self, state_size, action_size, fc1_units=128, fc2_units=64): """Initialize parameters and build model. Params ====== state_size (int): Dimension of each state ...
import torch from torch._inductor.select_algorithm import extern_kernels import triton import triton.language as tl from torch._inductor.runtime.triton_heuristics import grid from torch._C import _cuda_getCurrentRawStream as get_raw_stream from torch._inductor.runtime.triton_helpers import libdevice import torch.nn as ...
escribano89/bananas-dqn
NeuralNetwork
false
10,048
[ "MIT" ]
0
53497ab99bd7d78a1d8b9b387b4fd056be3a4564
https://github.com/escribano89/bananas-dqn/tree/53497ab99bd7d78a1d8b9b387b4fd056be3a4564
MultiHeadAttention
# AOT ID: ['0_forward'] from ctypes import c_void_p, c_long, c_int import torch import math import random import os import tempfile from math import inf, nan from torch._inductor.hooks import run_intermediate_hooks from torch._inductor.utils import maybe_profile from torch._inductor.codegen.memory_planning import _alig...
import torch import torch.nn as nn class ScaledDotProductAttention(nn.Module): def __init__(self, temperature, dropout=0.1): super(ScaledDotProductAttention, self).__init__() self.temperature = temperature self.dropout = nn.Dropout(p=dropout) def forward(self, q, k, v, mask=None): ...
import torch from torch._inductor.select_algorithm import extern_kernels import triton import triton.language as tl from torch._inductor.runtime.triton_heuristics import grid from torch._C import _cuda_getCurrentRawStream as get_raw_stream from torch._inductor.runtime import triton_helpers from torch._inductor.runtime....
connoisseures/vedastr
MultiHeadAttention
false
10,049
[ "Apache-2.0" ]
0
5dc64f3f6f810f615414aec3508e5dfba1239216
https://github.com/connoisseures/vedastr/tree/5dc64f3f6f810f615414aec3508e5dfba1239216
SigmaL1SmoothLoss
# AOT ID: ['0_inference'] from ctypes import c_void_p, c_long, c_int import torch import math import random import os import tempfile from math import inf, nan from torch._inductor.hooks import run_intermediate_hooks from torch._inductor.utils import maybe_profile from torch._inductor.codegen.memory_planning import _al...
import torch import torch.nn as nn from typing import * class SigmaL1SmoothLoss(nn.Module): def forward(self, output, target): reg_diff = torch.abs(target - output) reg_loss = torch.where(torch.le(reg_diff, 1 / 9), 4.5 * torch.pow( reg_diff, 2), reg_diff - 1 / 18) return reg_l...
import torch import triton import triton.language as tl from torch._inductor.runtime.triton_heuristics import grid from torch._C import _cuda_getCurrentRawStream as get_raw_stream from torch._inductor.runtime import triton_helpers from torch._inductor.runtime.triton_helpers import math as tl_math import torch.nn as nn ...
davidpfahler/fastai_dev
SigmaL1SmoothLoss
false
10,050
[ "Apache-2.0" ]
0
a86b15f86138a9902e8649e3f745e76a19139ab3
https://github.com/davidpfahler/fastai_dev/tree/a86b15f86138a9902e8649e3f745e76a19139ab3
Accuracy
# AOT ID: ['0_inference'] from ctypes import c_void_p, c_long, c_int import torch import math import random import os import tempfile from math import inf, nan from torch._inductor.hooks import run_intermediate_hooks from torch._inductor.utils import maybe_profile from torch._inductor.codegen.memory_planning import _al...
from torch.nn import Module import torch from torch import Tensor class Accuracy(Module): """ Class for calculating the accuracy for a given prediction and the labels for comparison. Expects the inputs to be from a range of 0 to 1 and sets a crossing threshold at 0.5 the labels are similarly round...
import torch import triton import triton.language as tl from torch._inductor.runtime.triton_heuristics import grid from torch._C import _cuda_getCurrentRawStream as get_raw_stream from torch._inductor.runtime import triton_helpers from torch.nn import Module from torch import Tensor assert_size_stride = torch._C._dynam...
eldarkurtic/sparseml
Accuracy
false
10,051
[ "Apache-2.0" ]
0
9535ce1a576cd672fead58826376eef22baaebf7
https://github.com/eldarkurtic/sparseml/tree/9535ce1a576cd672fead58826376eef22baaebf7
SimpleTwoLayer
# AOT ID: ['0_forward'] from ctypes import c_void_p, c_long, c_int import torch import math import random import os import tempfile from math import inf, nan from torch._inductor.hooks import run_intermediate_hooks from torch._inductor.utils import maybe_profile from torch._inductor.codegen.memory_planning import _alig...
import torch from torch import nn class SimpleTwoLayer(nn.Module): """Some Information about SimpleTwoLayer""" def __init__(self, input_size, hidden_size, output_size): super(SimpleTwoLayer, self).__init__() self.l1 = nn.Linear(input_size, hidden_size) self.l2 = nn.Linear(hidden_size,...
import torch from torch._inductor.select_algorithm import extern_kernels import triton import triton.language as tl from torch._inductor.runtime.triton_heuristics import grid from torch._C import _cuda_getCurrentRawStream as get_raw_stream from torch import nn assert_size_stride = torch._C._dynamo.guards.assert_size_st...
euidong/ML
SimpleTwoLayer
false
10,052
[ "Apache-2.0" ]
0
7e28b6e52c4c145aa6f8342714f16f7fd8880d9b
https://github.com/euidong/ML/tree/7e28b6e52c4c145aa6f8342714f16f7fd8880d9b
SigmoidRange
# AOT ID: ['0_inference'] from ctypes import c_void_p, c_long, c_int import torch import math import random import os import tempfile from math import inf, nan from torch._inductor.hooks import run_intermediate_hooks from torch._inductor.utils import maybe_profile from torch._inductor.codegen.memory_planning import _al...
from torch.nn import Module import functools import torch import torch.nn as nn from typing import * def sigmoid_range(x, low, high): """Sigmoid function with range `(low, high)`""" return torch.sigmoid(x) * (high - low) + low class PrePostInitMeta(type): """A metaclass that calls optional `__pre_init__...
import torch import triton import triton.language as tl from torch._inductor.runtime.triton_heuristics import grid from torch._C import _cuda_getCurrentRawStream as get_raw_stream from torch.nn import Module import functools import torch.nn as nn from typing import * assert_size_stride = torch._C._dynamo.guards.assert_...
davidpfahler/fastai_dev
SigmoidRange
false
10,053
[ "Apache-2.0" ]
0
a86b15f86138a9902e8649e3f745e76a19139ab3
https://github.com/davidpfahler/fastai_dev/tree/a86b15f86138a9902e8649e3f745e76a19139ab3
RegModel
# AOT ID: ['0_forward'] from ctypes import c_void_p, c_long, c_int import torch import math import random import os import tempfile from math import inf, nan from torch._inductor.hooks import run_intermediate_hooks from torch._inductor.utils import maybe_profile from torch._inductor.codegen.memory_planning import _alig...
from torch.nn import Module import functools import torch import torch.nn as nn from typing import * class PrePostInitMeta(type): """A metaclass that calls optional `__pre_init__` and `__post_init__` methods""" def __new__(cls, name, bases, dct): x = super().__new__(cls, name, bases, dct) de...
import torch import triton import triton.language as tl from torch._inductor.runtime.triton_heuristics import grid from torch._C import _cuda_getCurrentRawStream as get_raw_stream from torch.nn import Module import functools import torch.nn as nn from typing import * assert_size_stride = torch._C._dynamo.guards.assert_...
davidpfahler/fastai_dev
RegModel
false
10,054
[ "Apache-2.0" ]
0
a86b15f86138a9902e8649e3f745e76a19139ab3
https://github.com/davidpfahler/fastai_dev/tree/a86b15f86138a9902e8649e3f745e76a19139ab3
Critic
# AOT ID: ['0_forward'] from ctypes import c_void_p, c_long, c_int import torch import math import random import os import tempfile from math import inf, nan from torch._inductor.hooks import run_intermediate_hooks from torch._inductor.utils import maybe_profile from torch._inductor.codegen.memory_planning import _alig...
import torch import torch.nn as nn import torch.nn.parallel import torch.utils.data import torch.distributions class Critic(nn.Module): def __init__(self, num_inputs, num_outputs): super(Critic, self).__init__() self.linear = nn.Linear(num_inputs, num_outputs) def forward(self, x): x...
import torch from torch._inductor.select_algorithm import extern_kernels import triton import triton.language as tl from torch._inductor.runtime.triton_heuristics import grid from torch._C import _cuda_getCurrentRawStream as get_raw_stream from torch._inductor.runtime import triton_helpers import torch.nn as nn import ...
cjlovering/EGG
Critic
false
10,055
[ "MIT" ]
0
cce146e035decbc410e981f8bc7ada32979f3b6d
https://github.com/cjlovering/EGG/tree/cce146e035decbc410e981f8bc7ada32979f3b6d
CNN_decoder_attention
# AOT ID: ['0_forward'] from ctypes import c_void_p, c_long, c_int import torch import math import random import os import tempfile from math import inf, nan from torch._inductor.hooks import run_intermediate_hooks from torch._inductor.utils import maybe_profile from torch._inductor.codegen.memory_planning import _alig...
import torch import torch.nn as nn import torch.nn.init as init class CNN_decoder_attention(nn.Module): def __init__(self, input_size, output_size, stride=2): super(CNN_decoder_attention, self).__init__() self.input_size = input_size self.output_size = output_size self.relu = nn.R...
import torch from torch._inductor.select_algorithm import extern_kernels import triton import triton.language as tl from torch._inductor.runtime.triton_heuristics import grid from torch._C import _cuda_getCurrentRawStream as get_raw_stream from torch._inductor.runtime import triton_helpers from torch._inductor.runtime....
bwalker1/graph-generation
CNN_decoder_attention
false
10,056
[ "MIT" ]
0
e068769cb021760eb2549ced382b1a217609db86
https://github.com/bwalker1/graph-generation/tree/e068769cb021760eb2549ced382b1a217609db86
InformedSender
# AOT ID: ['0_forward'] from ctypes import c_void_p, c_long, c_int import torch import math import random import os import tempfile from math import inf, nan from torch._inductor.hooks import run_intermediate_hooks from torch._inductor.utils import maybe_profile from torch._inductor.codegen.memory_planning import _alig...
import torch import torch.nn as nn import torch.nn.functional as F import torch.nn.parallel import torch.utils.data import torch.distributions class InformedSender(nn.Module): def __init__(self, game_size, feat_size, embedding_size, hidden_size, vocab_size=100, temp=1.0): super(InformedSender, se...
import torch from torch._inductor.select_algorithm import extern_kernels import triton import triton.language as tl from torch._inductor.runtime.triton_heuristics import grid from torch._C import _cuda_getCurrentRawStream as get_raw_stream from torch._inductor.runtime import triton_helpers from torch._inductor.runtime....
cjlovering/EGG
InformedSender
false
10,057
[ "MIT" ]
0
cce146e035decbc410e981f8bc7ada32979f3b6d
https://github.com/cjlovering/EGG/tree/cce146e035decbc410e981f8bc7ada32979f3b6d
RandomShiftsAug
# AOT ID: ['0_inference'] from ctypes import c_void_p, c_long, c_int import torch import math import random import os import tempfile from math import inf, nan from torch._inductor.hooks import run_intermediate_hooks from torch._inductor.utils import maybe_profile from torch._inductor.codegen.memory_planning import _al...
import torch import torch.nn as nn import torch.nn.functional as F class RandomShiftsAug(nn.Module): def __init__(self, pad): super().__init__() self.pad = pad def forward(self, x): n, _c, h, w = x.size() assert h == w padding = tuple([self.pad] * 4) x = F.pad...
import torch from torch import device import triton import triton.language as tl from torch._inductor.runtime.triton_heuristics import grid from torch._C import _cuda_getCurrentRawStream as get_raw_stream from torch._inductor.runtime.triton_helpers import libdevice import torch.nn as nn assert_size_stride = torch._C._d...
emigmo/drqv2
RandomShiftsAug
false
10,058
[ "MIT" ]
0
76ca8a613f5c1ed3f07f0ddf8d7aa09469a1ce21
https://github.com/emigmo/drqv2/tree/76ca8a613f5c1ed3f07f0ddf8d7aa09469a1ce21
DenseParallel
# AOT ID: ['0_forward'] from ctypes import c_void_p, c_long, c_int import torch import math import random import os import tempfile from math import inf, nan from torch._inductor.hooks import run_intermediate_hooks from torch._inductor.utils import maybe_profile from torch._inductor.codegen.memory_planning import _alig...
import torch import numpy as np import torch.nn as nn class DenseParallel(nn.Module): def __init__(self, in_features: 'int', out_features: 'int', n_parallel: 'int', bias: 'bool'=True, device=None, dtype=None) ->None: factory_kwargs = {'device': device, 'dtype': dtype} super(DenseParallel,...
import torch from torch._inductor.select_algorithm import extern_kernels import triton import triton.language as tl from torch._inductor.runtime.triton_heuristics import grid from torch._C import _cuda_getCurrentRawStream as get_raw_stream import numpy as np import torch.nn as nn assert_size_stride = torch._C._dynamo.g...
emigmo/drqv2
DenseParallel
false
10,059
[ "MIT" ]
0
76ca8a613f5c1ed3f07f0ddf8d7aa09469a1ce21
https://github.com/emigmo/drqv2/tree/76ca8a613f5c1ed3f07f0ddf8d7aa09469a1ce21
SCLN
# AOT ID: ['0_forward'] from ctypes import c_void_p, c_long, c_int import torch import math import random import os import tempfile from math import inf, nan from torch._inductor.hooks import run_intermediate_hooks from torch._inductor.utils import maybe_profile from torch._inductor.codegen.memory_planning import _alig...
import torch import torch.nn as nn class LinearNorm(nn.Module): """ LinearNorm Projection """ def __init__(self, in_features, out_features, bias=False): super(LinearNorm, self).__init__() self.linear = nn.Linear(in_features, out_features, bias) nn.init.xavier_uniform_(self.linear.weig...
import torch from torch._inductor.select_algorithm import extern_kernels import triton import triton.language as tl from torch._inductor.runtime.triton_heuristics import grid from torch._C import _cuda_getCurrentRawStream as get_raw_stream from torch._inductor.runtime.triton_helpers import libdevice import torch.nn as ...
dtx525942103/Cross-Speaker-Emotion-Transfer
SCLN
false
10,060
[ "MIT" ]
0
195c3bf227f4de98942e17327ff26e728366022b
https://github.com/dtx525942103/Cross-Speaker-Emotion-Transfer/tree/195c3bf227f4de98942e17327ff26e728366022b
ReinforcedReceiver
# AOT ID: ['0_forward'] from ctypes import c_void_p, c_long, c_int import torch import math import random import os import tempfile from math import inf, nan from torch._inductor.hooks import run_intermediate_hooks from torch._inductor.utils import maybe_profile from torch._inductor.codegen.memory_planning import _alig...
import torch import torch.nn as nn import torch.nn.functional as F import torch.nn.parallel import torch.utils.data from torch.distributions import Bernoulli import torch.distributions class ReinforcedReceiver(nn.Module): def __init__(self, n_bits, n_hidden): super(ReinforcedReceiver, self).__init__() ...
import torch from torch._inductor.select_algorithm import extern_kernels import triton import triton.language as tl from torch._inductor.runtime.triton_heuristics import grid from torch._C import _cuda_getCurrentRawStream as get_raw_stream import torch.nn as nn import torch.nn.parallel import torch.utils.data import to...
cjlovering/EGG
ReinforcedReceiver
false
10,061
[ "MIT" ]
0
cce146e035decbc410e981f8bc7ada32979f3b6d
https://github.com/cjlovering/EGG/tree/cce146e035decbc410e981f8bc7ada32979f3b6d
ELUPlus
# AOT ID: ['0_inference'] from ctypes import c_void_p, c_long, c_int import torch import math import random import os import tempfile from math import inf, nan from torch._inductor.hooks import run_intermediate_hooks from torch._inductor.utils import maybe_profile from torch._inductor.codegen.memory_planning import _al...
import torch from torch import nn import torch.nn class ELUPlus(nn.Module): def __init__(self): super().__init__() self.elu = nn.ELU() def forward(self, x): return self.elu(x) + 1.0 def get_inputs(): return [torch.rand([4, 4, 4, 4])] def get_init_inputs(): return [[], {}]...
import torch import triton import triton.language as tl from torch._inductor.runtime.triton_heuristics import grid from torch._C import _cuda_getCurrentRawStream as get_raw_stream from torch._inductor.runtime.triton_helpers import libdevice from torch import nn import torch.nn assert_size_stride = torch._C._dynamo.guar...
dennisprangle/nflows
ELUPlus
false
10,062
[ "MIT" ]
0
d3160c60845a4f22f3bf505dc11210d55848e69f
https://github.com/dennisprangle/nflows/tree/d3160c60845a4f22f3bf505dc11210d55848e69f
TensorRepeat
# AOT ID: ['0_inference'] from ctypes import c_void_p, c_long, c_int import torch import math import random import os import tempfile from math import inf, nan from torch._inductor.hooks import run_intermediate_hooks from torch._inductor.utils import maybe_profile from torch._inductor.codegen.memory_planning import _al...
import torch class TensorRepeat(torch.nn.Module): """ duolicate a 1D tensor into N channels (grayscale to rgb for instance) code derived from https://github.com/pytorch/vision/blob/main/torchvision/transforms/transforms.py """ def __init__(self, num_output_channels=1): super().__init__() ...
import torch import triton import triton.language as tl from torch._inductor.runtime.triton_heuristics import grid from torch._C import _cuda_getCurrentRawStream as get_raw_stream assert_size_stride = torch._C._dynamo.guards.assert_size_stride empty_strided_cuda = torch._C._dynamo.guards._empty_strided_cuda @triton.j...
georand/distributedpytorch
TensorRepeat
false
10,063
[ "MIT" ]
0
69341b364830ad62968ea5646e485dff6b0b24f2
https://github.com/georand/distributedpytorch/tree/69341b364830ad62968ea5646e485dff6b0b24f2
TransformerEncoderLayer
# AOT ID: ['0_forward'] from ctypes import c_void_p, c_long, c_int import torch import math import random import os import tempfile from math import inf, nan from torch._inductor.hooks import run_intermediate_hooks from torch._inductor.utils import maybe_profile from torch._inductor.codegen.memory_planning import _alig...
import torch import torch.nn as nn import torch.nn.functional as F import torch.nn.parallel import torch.utils.data import torch.distributions class TransformerEncoderLayer(nn.Module): def __init__(self, embed_dim, num_heads, hidden_size, dropout=0.0, attention_dropout=0.0, activation_dropout=0.0): ...
import torch from torch._inductor.select_algorithm import extern_kernels import triton import triton.language as tl from torch._inductor.runtime.triton_heuristics import grid from torch._C import _cuda_getCurrentRawStream as get_raw_stream from torch._inductor.runtime import triton_helpers from torch._inductor.runtime....
cjlovering/EGG
TransformerEncoderLayer
false
10,064
[ "MIT" ]
0
cce146e035decbc410e981f8bc7ada32979f3b6d
https://github.com/cjlovering/EGG/tree/cce146e035decbc410e981f8bc7ada32979f3b6d
BahdanauAttention
# AOT ID: ['0_forward'] from ctypes import c_void_p, c_long, c_int import torch import math import random import os import tempfile from math import inf, nan from torch._inductor.hooks import run_intermediate_hooks from torch._inductor.utils import maybe_profile from torch._inductor.codegen.memory_planning import _alig...
import math import torch import torch.nn as nn import torch.nn.functional as F import torch.utils.data from torchvision.transforms import functional as F from torch.nn import functional as F import torch.jit from torch.nn import Parameter from torch.nn.parameter import Parameter import torch.optim import torch.utils.co...
import torch from torch._inductor.select_algorithm import extern_kernels import triton import triton.language as tl from torch._inductor.runtime.triton_heuristics import grid from torch._C import _cuda_getCurrentRawStream as get_raw_stream from torch._inductor.runtime import triton_helpers from torch._inductor.runtime....
cometta/training
BahdanauAttention
false
10,066
[ "Apache-2.0" ]
0
2f33c36d5aa2e1c2770fb3bab35afc8c665e01ce
https://github.com/cometta/training/tree/2f33c36d5aa2e1c2770fb3bab35afc8c665e01ce
LogSumPenalty
# AOT ID: ['0_inference'] from ctypes import c_void_p, c_long, c_int import torch import math import random import os import tempfile from math import inf, nan from torch._inductor.hooks import run_intermediate_hooks from torch._inductor.utils import maybe_profile from torch._inductor.codegen.memory_planning import _al...
from torch.nn import Module import torch class LogSumPenalty(Module): def __init__(self, epsilon=1): super(LogSumPenalty, self).__init__() self.epsilon = epsilon def forward(self, input): return torch.sum(torch.log(torch.abs(input) + self.epsilon)) def eta_hat(self, w): ...
import torch import triton import triton.language as tl from torch._inductor.runtime.triton_heuristics import grid from torch._C import _cuda_getCurrentRawStream as get_raw_stream from torch._inductor.runtime import triton_helpers from torch._inductor.runtime.triton_helpers import math as tl_math from torch.nn import M...
dlej/adaptive-dropout
LogSumPenalty
false
10,067
[ "MIT" ]
0
0540b2d06f1f97eb5861c6917eec6c086d33dfa8
https://github.com/dlej/adaptive-dropout/tree/0540b2d06f1f97eb5861c6917eec6c086d33dfa8
Policy
# AOT ID: ['0_forward'] from ctypes import c_void_p, c_long, c_int import torch import math import random import os import tempfile from math import inf, nan from torch._inductor.hooks import run_intermediate_hooks from torch._inductor.utils import maybe_profile from torch._inductor.codegen.memory_planning import _alig...
import torch import torch.nn.functional as F import torch.nn as nn class Policy(nn.Module): def __init__(self): super(Policy, self).__init__() self.conv1 = nn.Conv2d(2, 4, kernel_size=6, stride=2, bias=False) self.conv2 = nn.Conv2d(4, 16, kernel_size=6, stride=4) self.size = 9 * 9...
import torch from torch._inductor.select_algorithm import extern_kernels import triton import triton.language as tl from torch._inductor.runtime.triton_heuristics import grid from torch._C import _cuda_getCurrentRawStream as get_raw_stream from torch._inductor.runtime import triton_helpers import torch.nn as nn assert_...
faberfred/udacity-deep-RL
Policy
false
10,068
[ "MIT" ]
0
37b9bf8fa5489eb1c77e5c61ea2f59de10c734bd
https://github.com/faberfred/udacity-deep-RL/tree/37b9bf8fa5489eb1c77e5c61ea2f59de10c734bd
Generative_Model
# AOT ID: ['0_forward'] from ctypes import c_void_p, c_long, c_int import torch import math import random import os import tempfile from math import inf, nan from torch._inductor.hooks import run_intermediate_hooks from torch._inductor.utils import maybe_profile from torch._inductor.codegen.memory_planning import _alig...
import torch import torch.nn as nn class Generative_Model(nn.Module): def __init__(self, input_size, hidden_size_1, hidden_size_2, output_size, n_classes): super(Generative_Model, self).__init__() self.input_size = input_size self.hidden_size_1 = hidden_size_1 self.hidden_...
import torch from torch._inductor.select_algorithm import extern_kernels import triton import triton.language as tl from torch._inductor.runtime.triton_heuristics import grid from torch._C import _cuda_getCurrentRawStream as get_raw_stream from torch._inductor.runtime import triton_helpers import torch.nn as nn assert_...
frhrdr/MMD-GAN
Generative_Model
false
10,069
[ "Apache-2.0" ]
0
7522093498b658026344541ddd5c248095763fb6
https://github.com/frhrdr/MMD-GAN/tree/7522093498b658026344541ddd5c248095763fb6
nin
# AOT ID: ['0_forward'] from ctypes import c_void_p, c_long, c_int import torch import math import random import os import tempfile from math import inf, nan from torch._inductor.hooks import run_intermediate_hooks from torch._inductor.utils import maybe_profile from torch._inductor.codegen.memory_planning import _alig...
import torch import torch.nn as nn from torch.nn.utils import weight_norm as wn class nin(nn.Module): def __init__(self, dim_in, dim_out): super(nin, self).__init__() self.lin_a = wn(nn.Linear(dim_in, dim_out)) self.dim_out = dim_out def forward(self, x): """ a network in net...
import torch from torch._inductor.select_algorithm import extern_kernels import triton import triton.language as tl from torch._inductor.runtime.triton_heuristics import grid from torch._C import _cuda_getCurrentRawStream as get_raw_stream from torch._inductor.runtime.triton_helpers import libdevice import torch.nn as ...
elahekhodaie/PixelCnnPP
nin
false
10,070
[ "MIT" ]
0
ab1e245ed8c24009364b1f891288eb1a526b0121
https://github.com/elahekhodaie/PixelCnnPP/tree/ab1e245ed8c24009364b1f891288eb1a526b0121
ResNetBlock
# AOT ID: ['0_forward'] from ctypes import c_void_p, c_long, c_int import torch import math import random import os import tempfile from math import inf, nan from torch._inductor.hooks import run_intermediate_hooks from torch._inductor.utils import maybe_profile from torch._inductor.codegen.memory_planning import _alig...
from torch.nn import Module import torch from torch.nn import Conv2d from torch.nn import InstanceNorm2d from torch.nn.init import kaiming_normal_ from torch.nn.init import xavier_normal_ from torch import relu def create_init_function(method: 'str'='none'): def init(module: 'Module'): if method == 'none...
import torch from torch._inductor.select_algorithm import extern_kernels import triton import triton.language as tl from torch._inductor.runtime.triton_heuristics import grid from torch._C import _cuda_getCurrentRawStream as get_raw_stream from torch._inductor.runtime import triton_helpers from torch._inductor.runtime....
fireresistance/talking_heads
ResNetBlock
false
10,071
[ "MIT" ]
0
949af9ee8192d737bdfd9f2d83b70f56b3cdfbe7
https://github.com/fireresistance/talking_heads/tree/949af9ee8192d737bdfd9f2d83b70f56b3cdfbe7
AnimalBaselineNet
# AOT ID: ['0_forward'] from ctypes import c_void_p, c_long, c_int import torch import math import random import os import tempfile from math import inf, nan from torch._inductor.hooks import run_intermediate_hooks from torch._inductor.utils import maybe_profile from torch._inductor.codegen.memory_planning import _alig...
import torch import torch.nn as nn import torch.nn.functional as F class AnimalBaselineNet(nn.Module): def __init__(self, num_classes=16): super(AnimalBaselineNet, self).__init__() self.conv1 = nn.Conv2d(3, 6, kernel_size=3, stride=2, padding=1) self.conv2 = nn.Conv2d(6, 12, kernel_size=3...
import torch from torch._inductor.select_algorithm import extern_kernels import triton import triton.language as tl from torch._inductor.runtime.triton_heuristics import grid from torch._C import _cuda_getCurrentRawStream as get_raw_stream from torch._inductor.runtime import triton_helpers import torch.nn as nn assert_...
elouie/CodeSamples
AnimalBaselineNet
false
10,072
[ "Apache-2.0" ]
0
3fe9fcf23cbfc82d84a679ea16d69ae41e700f06
https://github.com/elouie/CodeSamples/tree/3fe9fcf23cbfc82d84a679ea16d69ae41e700f06
LinearEmbedding
# AOT ID: ['0_forward'] from ctypes import c_void_p, c_long, c_int import torch import math import random import os import tempfile from math import inf, nan from torch._inductor.hooks import run_intermediate_hooks from torch._inductor.utils import maybe_profile from torch._inductor.codegen.memory_planning import _alig...
import math import torch import torch.utils.data import torch.nn as nn class LinearEmbedding(nn.Module): def __init__(self, inp_size, d_model): super(LinearEmbedding, self).__init__() self.lut = nn.Linear(inp_size, d_model) self.d_model = d_model def forward(self, x): return ...
import torch from torch._inductor.select_algorithm import extern_kernels import triton import triton.language as tl from torch._inductor.runtime.triton_heuristics import grid from torch._C import _cuda_getCurrentRawStream as get_raw_stream import torch.utils.data import torch.nn as nn assert_size_stride = torch._C._dyn...
flyslowly/Trajectory-Transformer
LinearEmbedding
false
10,073
[ "MIT" ]
0
8a5772e67366854155eb3f9a0ebff08c3e9f9186
https://github.com/flyslowly/Trajectory-Transformer/tree/8a5772e67366854155eb3f9a0ebff08c3e9f9186
AnimalStudentNet
# AOT ID: ['0_forward'] from ctypes import c_void_p, c_long, c_int import torch import math import random import os import tempfile from math import inf, nan from torch._inductor.hooks import run_intermediate_hooks from torch._inductor.utils import maybe_profile from torch._inductor.codegen.memory_planning import _alig...
import torch import torch.nn as nn import torch.nn.functional as F class AnimalStudentNet(nn.Module): def __init__(self, num_classes=16): super(AnimalStudentNet, self).__init__() self.pool = nn.MaxPool2d(2, 2) self.dropout = nn.Dropout2d(p=0.1) self.conv1 = nn.Conv2d(3, 6, kernel_...
import torch from torch._inductor.select_algorithm import extern_kernels import triton import triton.language as tl from torch._inductor.runtime.triton_heuristics import grid from torch._C import _cuda_getCurrentRawStream as get_raw_stream from torch._inductor.runtime import triton_helpers import torch.nn as nn assert_...
elouie/CodeSamples
AnimalStudentNet
false
10,074
[ "Apache-2.0" ]
0
3fe9fcf23cbfc82d84a679ea16d69ae41e700f06
https://github.com/elouie/CodeSamples/tree/3fe9fcf23cbfc82d84a679ea16d69ae41e700f06
LogSumDualPenalty
# AOT ID: ['0_inference'] from ctypes import c_void_p, c_long, c_int import torch import math import random import os import tempfile from math import inf, nan from torch._inductor.hooks import run_intermediate_hooks from torch._inductor.utils import maybe_profile from torch._inductor.codegen.memory_planning import _al...
from torch.nn import Module import torch class LogSumDualPenalty(Module): def __init__(self, epsilon=1): super(LogSumDualPenalty, self).__init__() self.epsilon = epsilon def forward(self, input): eta = input sqrt = torch.sqrt(self.epsilon ** 2 + 4 * eta) return 2 * to...
import torch import triton import triton.language as tl from torch._inductor.runtime.triton_heuristics import grid from torch._C import _cuda_getCurrentRawStream as get_raw_stream from torch._inductor.runtime import triton_helpers from torch._inductor.runtime.triton_helpers import libdevice, math as tl_math from torch....
dlej/adaptive-dropout
LogSumDualPenalty
false
10,075
[ "MIT" ]
0
0540b2d06f1f97eb5861c6917eec6c086d33dfa8
https://github.com/dlej/adaptive-dropout/tree/0540b2d06f1f97eb5861c6917eec6c086d33dfa8
Downsample
# AOT ID: ['0_forward'] from ctypes import c_void_p, c_long, c_int import torch import math import random import os import tempfile from math import inf, nan from torch._inductor.hooks import run_intermediate_hooks from torch._inductor.utils import maybe_profile from torch._inductor.codegen.memory_planning import _alig...
import torch import torch.nn as nn def conv_nd(dims, *args, **kwargs): """ Create a 1D, 2D, or 3D convolution module. """ if dims == 1: return nn.Conv1d(*args, **kwargs) elif dims == 2: return nn.Conv2d(*args, **kwargs) elif dims == 3: return nn.Conv3d(*args, **kwargs) ...
import torch from torch._inductor.select_algorithm import extern_kernels import triton import triton.language as tl from torch._inductor.runtime.triton_heuristics import grid from torch._C import _cuda_getCurrentRawStream as get_raw_stream import torch.nn as nn assert_size_stride = torch._C._dynamo.guards.assert_size_s...
francoismaze/improved-diffusion
Downsample
false
10,076
[ "MIT" ]
0
bb403ba2437d6d834bb285b7259549fb3fa40f1b
https://github.com/francoismaze/improved-diffusion/tree/bb403ba2437d6d834bb285b7259549fb3fa40f1b
RELUTwosided
# AOT ID: ['0_forward'] from ctypes import c_void_p, c_long, c_int import torch import math import random import os import tempfile from math import inf, nan from torch._inductor.hooks import run_intermediate_hooks from torch._inductor.utils import maybe_profile from torch._inductor.codegen.memory_planning import _alig...
import torch class RELUTwosided(torch.nn.Module): def __init__(self, num_conv, lam=0.001, L=100, sigma=1, device=None): super(RELUTwosided, self).__init__() self.L = L self.lam = torch.nn.Parameter(lam * torch.ones(1, num_conv, 1, 1, device=device)) self.sigma = sigma ...
import torch import triton import triton.language as tl from torch._inductor.runtime.triton_heuristics import grid from torch._C import _cuda_getCurrentRawStream as get_raw_stream from torch._inductor.runtime import triton_helpers from torch._inductor.runtime.triton_helpers import math as tl_math assert_size_stride = t...
garysnake/crsae
RELUTwosided
false
10,077
[ "MIT" ]
0
ca03574fc75e855e612df71535504e956ef897c7
https://github.com/garysnake/crsae/tree/ca03574fc75e855e612df71535504e956ef897c7
Critic
# AOT ID: ['0_forward'] from ctypes import c_void_p, c_long, c_int import torch import math import random import os import tempfile from math import inf, nan from torch._inductor.hooks import run_intermediate_hooks from torch._inductor.utils import maybe_profile from torch._inductor.codegen.memory_planning import _alig...
import torch import numpy as np import torch.nn.functional as F import torch.nn as nn class Critic(nn.Module): """Critic (Value) Model. This class construct the model. """ def __init__(self, state_size, action_size, seed, fc1_units=128, fc2_units=128, fc3_units=128): """ Initialize p...
import torch from torch._inductor.select_algorithm import extern_kernels import triton import triton.language as tl from torch._inductor.runtime.triton_heuristics import grid from torch._C import _cuda_getCurrentRawStream as get_raw_stream import numpy as np import torch.nn as nn assert_size_stride = torch._C._dynamo.g...
fernandofsilva/Tennis
Critic
false
10,078
[ "MIT" ]
0
5b454f7999a33bfd189d45ed2fa3a95727b8f94f
https://github.com/fernandofsilva/Tennis/tree/5b454f7999a33bfd189d45ed2fa3a95727b8f94f
L2
# AOT ID: ['0_inference'] from ctypes import c_void_p, c_long, c_int import torch import math import random import os import tempfile from math import inf, nan from torch._inductor.hooks import run_intermediate_hooks from torch._inductor.utils import maybe_profile from torch._inductor.codegen.memory_planning import _al...
import torch import torch.nn as nn class L2(nn.Module): def __init__(self): super(L2, self).__init__() def forward(self, output, target): lossvalue = torch.norm(output - target, p=2, dim=1).mean() return lossvalue def get_inputs(): return [torch.rand([4, 4, 4, 4]), torch.rand([...
import torch import triton import triton.language as tl from torch._inductor.runtime.triton_heuristics import grid from torch._C import _cuda_getCurrentRawStream as get_raw_stream from torch._inductor.runtime.triton_helpers import libdevice import torch.nn as nn assert_size_stride = torch._C._dynamo.guards.assert_size_...
dark-tea/flownet2-pytorch
L2
false
10,079
[ "Apache-2.0" ]
0
41ea3353f11048833f6baebcf9f9c951b0b722d7
https://github.com/dark-tea/flownet2-pytorch/tree/41ea3353f11048833f6baebcf9f9c951b0b722d7
RobertaClassificationHead
# AOT ID: ['0_forward'] from ctypes import c_void_p, c_long, c_int import torch import math import random import os import tempfile from math import inf, nan from torch._inductor.hooks import run_intermediate_hooks from torch._inductor.utils import maybe_profile from torch._inductor.codegen.memory_planning import _alig...
from _paritybench_helpers import _mock_config import torch import torch.nn as nn class RobertaClassificationHead(nn.Module): """Head for sentence-level classification tasks.""" def __init__(self, config): super().__init__() self.dense = nn.Linear(config.hidden_size * 2, config.hidden_size) ...
import torch from torch._inductor.select_algorithm import extern_kernels import triton import triton.language as tl from torch._inductor.runtime.triton_heuristics import grid from torch._C import _cuda_getCurrentRawStream as get_raw_stream from torch._inductor.runtime.triton_helpers import libdevice import torch.nn as ...
frankxu2004/CodeT5
RobertaClassificationHead
false
10,080
[ "BSD-3-Clause" ]
0
454e30a40b833a5ed862a1942f5d545e6a06b2b1
https://github.com/frankxu2004/CodeT5/tree/454e30a40b833a5ed862a1942f5d545e6a06b2b1
SinActv
# AOT ID: ['0_inference'] from ctypes import c_void_p, c_long, c_int import torch import math import random import os import tempfile from math import inf, nan from torch._inductor.hooks import run_intermediate_hooks from torch._inductor.utils import maybe_profile from torch._inductor.codegen.memory_planning import _al...
import torch import torch.nn as nn class SinActv(nn.Module): def __init__(self): super().__init__() def forward(self, input_): return torch.sin(input_) def get_inputs(): return [torch.rand([4, 4, 4, 4])] def get_init_inputs(): return [[], {}]
import torch import triton import triton.language as tl from torch._inductor.runtime.triton_heuristics import grid from torch._C import _cuda_getCurrentRawStream as get_raw_stream from torch._inductor.runtime.triton_helpers import math as tl_math import torch.nn as nn assert_size_stride = torch._C._dynamo.guards.assert...
gnicks007/neurodiffeq
SinActv
false
10,081
[ "MIT" ]
0
a4a4fd2379442937b748712e1cf45510aba6f0c0
https://github.com/gnicks007/neurodiffeq/tree/a4a4fd2379442937b748712e1cf45510aba6f0c0
Net
# AOT ID: ['0_forward'] from ctypes import c_void_p, c_long, c_int import torch import math import random import os import tempfile from math import inf, nan from torch._inductor.hooks import run_intermediate_hooks from torch._inductor.utils import maybe_profile from torch._inductor.codegen.memory_planning import _alig...
import torch import torch.nn as nn import torch.nn.functional as F class Net(nn.Module): def __init__(self): super().__init__() self.conv1 = nn.Conv2d(3, 16, kernel_size=3, padding=1) self.conv2 = nn.Conv2d(16, 8, kernel_size=3, padding=1) self.fc1 = nn.Linear(8 * 8 * 8, 32) ...
import torch from torch._inductor.select_algorithm import extern_kernels import triton import triton.language as tl from torch._inductor.runtime.triton_heuristics import grid from torch._C import _cuda_getCurrentRawStream as get_raw_stream from torch._inductor.runtime import triton_helpers from torch._inductor.runtime....
frullah/website-fruits-classification
Net
false
10,082
[ "MIT" ]
0
1fdd67884e75e2894afa6b170c023c7e60e28155
https://github.com/frullah/website-fruits-classification/tree/1fdd67884e75e2894afa6b170c023c7e60e28155
Actor
# AOT ID: ['0_forward'] from ctypes import c_void_p, c_long, c_int import torch import math import random import os import tempfile from math import inf, nan from torch._inductor.hooks import run_intermediate_hooks from torch._inductor.utils import maybe_profile from torch._inductor.codegen.memory_planning import _alig...
import torch import numpy as np import torch.nn.functional as F import torch.nn as nn class Actor(nn.Module): """Actor (Policy) Model. This class construct the model. """ def __init__(self, state_size, action_size, seed, fc1_units=128, fc2_units=128, fc3_units=128): """ Initialize pa...
import torch from torch._inductor.select_algorithm import extern_kernels import triton import triton.language as tl from torch._inductor.runtime.triton_heuristics import grid from torch._C import _cuda_getCurrentRawStream as get_raw_stream from torch._inductor.runtime.triton_helpers import libdevice import numpy as np ...
fernandofsilva/Tennis
Actor
false
10,083
[ "MIT" ]
0
5b454f7999a33bfd189d45ed2fa3a95727b8f94f
https://github.com/fernandofsilva/Tennis/tree/5b454f7999a33bfd189d45ed2fa3a95727b8f94f
down_right_shifted_conv2d
# AOT ID: ['0_forward'] from ctypes import c_void_p, c_long, c_int import torch import math import random import os import tempfile from math import inf, nan from torch._inductor.hooks import run_intermediate_hooks from torch._inductor.utils import maybe_profile from torch._inductor.codegen.memory_planning import _alig...
import torch import torch.nn as nn from torch.nn.utils import weight_norm as wn def right_shift(x, pad=None): xs = [int(y) for y in x.size()] x = x[:, :, :, :xs[3] - 1] pad = nn.ZeroPad2d((1, 0, 0, 0)) if pad is None else pad return pad(x) class down_right_shifted_conv2d(nn.Module): def __init_...
import torch from torch._inductor.select_algorithm import extern_kernels import triton import triton.language as tl from torch._inductor.runtime.triton_heuristics import grid from torch._C import _cuda_getCurrentRawStream as get_raw_stream from torch._inductor.runtime.triton_helpers import libdevice import torch.nn as ...
elahekhodaie/PixelCnnPP
down_right_shifted_conv2d
false
10,084
[ "MIT" ]
0
ab1e245ed8c24009364b1f891288eb1a526b0121
https://github.com/elahekhodaie/PixelCnnPP/tree/ab1e245ed8c24009364b1f891288eb1a526b0121
SelfAttention
# AOT ID: ['0_forward'] from ctypes import c_void_p, c_long, c_int import torch import math import random import os import tempfile from math import inf, nan from torch._inductor.hooks import run_intermediate_hooks from torch._inductor.utils import maybe_profile from torch._inductor.codegen.memory_planning import _alig...
import math import torch from torch import nn import torch.nn.functional as F def mask_(matrices, maskval=0.0, mask_diagonal=True): """ Masks out all values in the given batch of matrices where i <= j holds, i < j if mask_diagonal is false In place operation :param tns: :return: """ ...
import torch from torch._inductor.select_algorithm import extern_kernels import triton import triton.language as tl from torch._inductor.runtime.triton_heuristics import grid from torch._C import _cuda_getCurrentRawStream as get_raw_stream from torch._inductor.runtime import triton_helpers from torch._inductor.runtime....
esvhd/former
SelfAttention
false
10,085
[ "MIT" ]
0
9aca51b8f7a6f2abe2175293b895ed4af468e890
https://github.com/esvhd/former/tree/9aca51b8f7a6f2abe2175293b895ed4af468e890
DiscriReceiver
# AOT ID: ['0_forward'] from ctypes import c_void_p, c_long, c_int import torch import math import random import os import tempfile from math import inf, nan from torch._inductor.hooks import run_intermediate_hooks from torch._inductor.utils import maybe_profile from torch._inductor.codegen.memory_planning import _alig...
import torch import torch.nn as nn import torch.nn.parallel import torch.utils.data import torch.distributions class DiscriReceiver(nn.Module): def __init__(self, n_features, n_hidden): super(DiscriReceiver, self).__init__() self.fc1 = nn.Linear(n_features, n_hidden) def forward(self, x, _in...
import torch from torch._inductor.select_algorithm import extern_kernels import triton import triton.language as tl from torch._inductor.runtime.triton_heuristics import grid from torch._C import _cuda_getCurrentRawStream as get_raw_stream from torch._inductor.runtime.triton_helpers import libdevice import torch.nn as ...
eugene-kharitonov/EGG
DiscriReceiver
false
10,086
[ "MIT" ]
0
714958f24ac23bc18cc7fac395e1aae0afbcabe0
https://github.com/eugene-kharitonov/EGG/tree/714958f24ac23bc18cc7fac395e1aae0afbcabe0
BottleNeck
# AOT ID: ['0_inference'] from ctypes import c_void_p, c_long, c_int import torch import math import random import os import tempfile from math import inf, nan from torch._inductor.hooks import run_intermediate_hooks from torch._inductor.utils import maybe_profile from torch._inductor.codegen.memory_planning import _al...
import torch import torch.nn as nn class BottleNeck(nn.Module): def __init__(self): super().__init__() def forward(self, x): avg = x.mean(dim=-1).unsqueeze(2) return torch.cat((x, avg), dim=2) def get_inputs(): return [torch.rand([4, 4, 4, 4])] def get_init_inputs(): retu...
import torch import triton import triton.language as tl from torch._inductor.runtime.triton_heuristics import grid from torch._C import _cuda_getCurrentRawStream as get_raw_stream import torch.nn as nn assert_size_stride = torch._C._dynamo.guards.assert_size_stride empty_strided_cuda = torch._C._dynamo.guards._empty_st...
etienne87/pytorch-cifar
BottleNeck
false
10,087
[ "MIT" ]
0
d9164df8ba0cb9259daf857e006db3fecb762af7
https://github.com/etienne87/pytorch-cifar/tree/d9164df8ba0cb9259daf857e006db3fecb762af7
BasicModel
# AOT ID: ['0_inference'] from ctypes import c_void_p, c_long, c_int import torch import math import random import os import tempfile from math import inf, nan from torch._inductor.hooks import run_intermediate_hooks from torch._inductor.utils import maybe_profile from torch._inductor.codegen.memory_planning import _al...
import torch import torch.nn as nn import torch.nn.functional as F class BasicModel(nn.Module): def __init__(self) ->None: super().__init__() def forward(self, input): input = 1 - F.relu(1 - input) return input def get_inputs(): return [torch.rand([4, 4, 4, 4])] def get_init_...
import torch import triton import triton.language as tl from torch._inductor.runtime.triton_heuristics import grid from torch._C import _cuda_getCurrentRawStream as get_raw_stream from torch._inductor.runtime import triton_helpers import torch.nn as nn assert_size_stride = torch._C._dynamo.guards.assert_size_stride emp...
aravipati12/captum
BasicModel
false
10,088
[ "BSD-3-Clause" ]
0
ef3e81d89c8c4404a49c384cf0727f2e7d393f5f
https://github.com/aravipati12/captum/tree/ef3e81d89c8c4404a49c384cf0727f2e7d393f5f
SineLayer
# AOT ID: ['0_forward'] from ctypes import c_void_p, c_long, c_int import torch import math import random import os import tempfile from math import inf, nan from torch._inductor.hooks import run_intermediate_hooks from torch._inductor.utils import maybe_profile from torch._inductor.codegen.memory_planning import _alig...
import math import torch import torch.nn as nn class SineLayer(nn.Module): def __init__(self, in_features, out_features, bias=True, is_first=False, omega_0=30): super().__init__() self.omega_0 = omega_0 self.is_first = is_first self.in_features = in_features self.l...
import torch from torch._inductor.select_algorithm import extern_kernels import triton import triton.language as tl from torch._inductor.runtime.triton_heuristics import grid from torch._C import _cuda_getCurrentRawStream as get_raw_stream from torch._inductor.runtime.triton_helpers import math as tl_math import math i...
etienne87/pytorch-cifar
SineLayer
false
10,089
[ "MIT" ]
0
d9164df8ba0cb9259daf857e006db3fecb762af7
https://github.com/etienne87/pytorch-cifar/tree/d9164df8ba0cb9259daf857e006db3fecb762af7
BasicModel_MaxPool_ReLU
# AOT ID: ['0_inference'] from ctypes import c_void_p, c_long, c_int import torch import math import random import os import tempfile from math import inf, nan from torch._inductor.hooks import run_intermediate_hooks from torch._inductor.utils import maybe_profile from torch._inductor.codegen.memory_planning import _al...
import torch import torch.nn as nn class BasicModel_MaxPool_ReLU(nn.Module): def __init__(self, inplace=False) ->None: super().__init__() self.maxpool = nn.MaxPool1d(3) self.relu = nn.ReLU(inplace=inplace) def forward(self, x): return self.relu(self.maxpool(x)).sum(dim=1) d...
import torch import triton import triton.language as tl from torch._inductor.runtime.triton_heuristics import grid from torch._C import _cuda_getCurrentRawStream as get_raw_stream from torch._inductor.runtime import triton_helpers import torch.nn as nn assert_size_stride = torch._C._dynamo.guards.assert_size_stride emp...
aravipati12/captum
BasicModel_MaxPool_ReLU
false
10,090
[ "BSD-3-Clause" ]
0
ef3e81d89c8c4404a49c384cf0727f2e7d393f5f
https://github.com/aravipati12/captum/tree/ef3e81d89c8c4404a49c384cf0727f2e7d393f5f