entry_point
stringlengths
1
65
original_triton_python_code
stringlengths
208
619k
optimised_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
ReconstructionBlock
import math import torch import torch.utils.data import torch import torch.nn as nn class Conv2dSame(nn.Module): def __init__(self, in_channels, out_channels, kernel_size, stride=1, dilation=1): super(Conv2dSame, self).__init__() self.F = kernel_size self.S = stride self.D...
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 math import torch.util...
adityamehta00/HIDeGAN
ReconstructionBlock
false
3,031
[ "BSD-3-Clause" ]
0
91a0674e092ccde2784a82bf927dfefd8673eb4c
https://github.com/adityamehta00/HIDeGAN/tree/91a0674e092ccde2784a82bf927dfefd8673eb4c
PositionWiseFeedForward
from _paritybench_helpers import _mock_config import math import torch import torch.nn as nn def gelu(x): return x * 0.5 * (1.0 + torch.erf(x / math.sqrt(2.0))) class PositionWiseFeedForward(nn.Module): def __init__(self, args): super(PositionWiseFeedForward, self).__init__() self.fc1 = nn....
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 math import ...
DannielSilva/MMBERT
PositionWiseFeedForward
false
18,387
[ "MIT" ]
4
2c9069b59b66b8f3fec6de2e68ec42b489a3a437
https://github.com/DannielSilva/MMBERT/tree/2c9069b59b66b8f3fec6de2e68ec42b489a3a437
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 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.fft assert_size_...
Sh0cktr4p/PhiFlow
Net
false
9,433
[ "MIT" ]
0
cc87c5887bc3abfa1ef3c03252122a06e9fd2c18
https://github.com/Sh0cktr4p/PhiFlow/tree/cc87c5887bc3abfa1ef3c03252122a06e9fd2c18
BartClassificationHead
import torch from torch import nn import torch.utils.checkpoint class BartClassificationHead(nn.Module): """Head for sentence-level classification tasks.""" def __init__(self, input_dim: 'int', inner_dim: 'int', pooler_dropout: 'float'): super().__init__() self.dense = nn.Linear(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 from torch import n...
sajastu/transformers-sent-curr
BartClassificationHead
false
4,238
[ "Apache-2.0" ]
0
6dc41545c4ac298a010090fbca4b454c2eaf3dbb
https://github.com/sajastu/transformers-sent-curr/tree/6dc41545c4ac298a010090fbca4b454c2eaf3dbb
SoftmaxLoss
# 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 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...
MargauxMasson/semanticGAN_code
SoftmaxLoss
false
2,629
[ "BSD-2-Clause", "MIT" ]
0
a5b7fbbc505f8ae08c8aab8e199aa6406fffdb07
https://github.com/MargauxMasson/semanticGAN_code/tree/a5b7fbbc505f8ae08c8aab8e199aa6406fffdb07
PairwiseRankerModel
# 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._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.onnx import torch.nn as nn assert_size_stride = torch._C._dynamo.gu...
appotry/sample-apps
PairwiseRankerModel
false
14,898
[ "Apache-2.0" ]
167
6b107ffc67fc917d66fabdeff893b5b7cb157c61
https://github.com/appotry/sample-apps/tree/6b107ffc67fc917d66fabdeff893b5b7cb157c61
ValueNetwork
import torch import torch.nn as nn import torch.nn.functional as F class ValueNetwork(nn.Module): def __init__(self, input_dim, output_dim, init_w=0.003): super(ValueNetwork, self).__init__() self.fc1 = nn.Linear(input_dim, 256) self.fc2 = nn.Linear(256, 256) self.fc3 = nn.Linear(...
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_...
SAMMiCA/DL_based_E2E_Driving
ValueNetwork
false
17,871
[ "MIT" ]
4
01f7d74a0db7ed745cf27b9a1ebab0246015ecbd
https://github.com/SAMMiCA/DL_based_E2E_Driving/tree/01f7d74a0db7ed745cf27b9a1ebab0246015ecbd
Attention
import math import torch import torch.nn.functional as F import torch.utils.data def restricted_softmax(src, dim=-1, margin=0): src_max = torch.clamp(src.max(dim=dim, keepdim=True)[0], min=0) out = (src - src_max).exp() out = out / (out.sum(dim=dim, keepdim=True) + (margin - src_max).exp()) return 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 from torch._inductor.runtime....
pwycl/pytorch_geometric
Attention
false
10,776
[ "MIT" ]
0
ef7b1add2bb5a36a3a68cae7639c42000f629cac
https://github.com/pwycl/pytorch_geometric/tree/ef7b1add2bb5a36a3a68cae7639c42000f629cac
SphericalBesselBasis
import math import torch import numpy as np class SphericalBesselBasis(torch.nn.Module): """ 1D spherical Bessel basis Parameters ---------- num_radial: int Controls maximum frequency. cutoff: float Cutoff distance in Angstrom. """ def __init__(self, num_radial: 'int'...
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 math import numpy as np assert_size_stride = torch._C._dynamo.guar...
chris-price19/ocp
SphericalBesselBasis
false
1,701
[ "MIT", "BSD-3-Clause" ]
0
0175c5a11dd3aaccd4f4780c8cb559401f1ca15e
https://github.com/chris-price19/ocp/tree/0175c5a11dd3aaccd4f4780c8cb559401f1ca15e
ResidualBlock
import torch import torch.nn as nn class ResidualBlock(nn.Module): """Redisual network block for style transfer.""" def __init__(self, nchannels): """Create a block of a residual network.""" super(ResidualBlock, self).__init__() self.conv1 = nn.Conv2d(nchannels, nchannels, 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....
TrueMatthewKirkham/face-preserving-style-transfer
ResidualBlock
false
5,922
[ "MIT" ]
1
ae8a9509570227ea52776fba85658022124c886c
https://github.com/TrueMatthewKirkham/face-preserving-style-transfer/tree/ae8a9509570227ea52776fba85658022124c886c
CNN
import torch import torch.nn as nn import torch.nn.functional as F class CNN(nn.Module): def __init__(self, embed_size, hidden_size): super(CNN, self).__init__() self.hidden_size = hidden_size self.conv2d = nn.Conv2d(embed_size, hidden_size, (1, 5), bias=True) def forward(self, 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 assert_...
melaniezhang/cs224n-final-proj
CNN
false
12,771
[ "MIT" ]
0
a012759e8caf4d585421d78c07125fa3696fda4e
https://github.com/melaniezhang/cs224n-final-proj/tree/a012759e8caf4d585421d78c07125fa3696fda4e
ANN
from _paritybench_helpers import _mock_config import torch from torch import nn class ANN(nn.Module): def __init__(self, args, name): super(ANN, self).__init__() self.name = name self.len = 0 self.loss = 0 self.fc1 = nn.Linear(args.input_dim, 20) self.relu = nn.ReL...
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...
luoyang97/FedProx-PyTorch
ANN
false
7,133
[ "MIT" ]
1
b19263e22420251ad8c3a9701951a37b5c0a3569
https://github.com/luoyang97/FedProx-PyTorch/tree/b19263e22420251ad8c3a9701951a37b5c0a3569
Div
# 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 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...
Ilyabasharov/torch2trt
Div
false
2,513
[ "MIT" ]
0
76bf298b3da408509665e23e2494922b131afb10
https://github.com/Ilyabasharov/torch2trt/tree/76bf298b3da408509665e23e2494922b131afb10
EncoderLayer
# 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._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....
Luo-Chang/Graphormer
EncoderLayer
false
5,584
[ "MIT" ]
1
b35b3ca6369e25cdae80e1617bfc3921feeb3158
https://github.com/Luo-Chang/Graphormer/tree/b35b3ca6369e25cdae80e1617bfc3921feeb3158
LengthPredictor
import torch from torch.nn import functional as F from torch import nn from torchvision import models as models import torch.onnx import torch.nn class LengthPredictionLoss(nn.Module): def __init__(self, max_delta=50): super().__init__() self.max_delta = max_delta def forward(self, logits, 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 import triton_helpers from torch.nn import function...
krodyush/training_extensions
LengthPredictor
false
10,979
[ "Apache-2.0" ]
0
542f4004dfbc6fc62a622065367ba4f85a703dd3
https://github.com/krodyush/training_extensions/tree/542f4004dfbc6fc62a622065367ba4f85a703dd3
HSigmoid
# 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 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 torch.nn.functional import torch.nn.parallel import torch.ut...
ardianumam/Vanilla-GAN
HSigmoid
false
12,104
[ "Apache-2.0" ]
0
3fce9b60dca4609aad1d4e5eb834a2cc72cf07b3
https://github.com/ardianumam/Vanilla-GAN/tree/3fce9b60dca4609aad1d4e5eb834a2cc72cf07b3
BertSelfAttention
from _paritybench_helpers import _mock_config import math import torch import torch.nn as nn class BertSelfAttention(nn.Module): def __init__(self, config): super(BertSelfAttention, self).__init__() if config.hidden_size % config.num_attention_heads != 0: raise ValueError( ...
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....
AlanFokCo/bert-chinese-horovod-elastic
BertSelfAttention
false
7,621
[ "Apache-2.0" ]
1
02317d0857e0e8e313dd63ead61ca9996b25548e
https://github.com/AlanFokCo/bert-chinese-horovod-elastic/tree/02317d0857e0e8e313dd63ead61ca9996b25548e
SplitCrossEntropyLoss
import torch import torch.nn as nn def logsumexp(x, dim=None, keepdim=False): if dim is None: x, dim = x.view(-1), 0 xm, _ = torch.max(x, dim, keepdim=True) x = torch.where((xm == float('inf')) | (xm == float('-inf')), xm, xm + torch.log(torch.sum(torch.exp(x - xm), dim, keepdim=True))) ...
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....
MatthieuLabeau/power-divergences-LM
SplitCrossEntropyLoss
false
9,282
[ "BSD-3-Clause" ]
0
cdc9ff417650a3f1b7968e86ca6359533cabdf1e
https://github.com/MatthieuLabeau/power-divergences-LM/tree/cdc9ff417650a3f1b7968e86ca6359533cabdf1e
NormAttnMap
import torch import torch.nn as nn class NormAttnMap(nn.Module): def __init__(self, norm_type='cossim'): super(NormAttnMap, self).__init__() self.norm_type = norm_type def forward(self, attn_map): if self.norm_type != 'cosssim': norm = torch.max(attn_map, dim=1, keepdim=T...
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...
sibeiyang/sgmn
NormAttnMap
false
16,438
[ "MIT" ]
130
00731b4f2202246d40a36d2a6727c599e6e649aa
https://github.com/sibeiyang/sgmn/tree/00731b4f2202246d40a36d2a6727c599e6e649aa
AffineConstantFlow
# 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 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 from torch import Tensor from torch import nn assert_size_stride = torch....
lleonart1984/generative_modeling
AffineConstantFlow
false
10,408
[ "MIT" ]
0
d47c53d34b9eb704b6e8b2c334262b53fe7f4f32
https://github.com/lleonart1984/generative_modeling/tree/d47c53d34b9eb704b6e8b2c334262b53fe7f4f32
Net
import torch import torch.nn as nn import torch.nn.functional as F class Net(nn.Module): def __init__(self, n_states, n_actions, n_hidden): super(Net, self).__init__() self.fc1 = nn.Linear(n_states, n_hidden) self.fc2 = nn.Linear(n_hidden, n_hidden * 2) self.fc3 = nn.Linear(n_hidd...
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_...
tom99763/implement-DQN-on-maze-game
Net
false
10,849
[ "BSD-2-Clause" ]
0
24135a06e348b6f8b88a22c58b4a2c930bf7d7b6
https://github.com/tom99763/implement-DQN-on-maze-game/tree/24135a06e348b6f8b88a22c58b4a2c930bf7d7b6
Conv3D_Block
import torch import torch.nn as nn def define_norm(n_channel, norm_type, n_group=None, dim_mode=2): if norm_type == 'bn': if dim_mode == 2: return nn.BatchNorm2d(n_channel) elif dim_mode == 3: return nn.BatchNorm3d(n_channel) elif norm_type == 'gn': if n_group 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 import torch.nn as nn assert_...
Ohyeon5/SQM_basis
Conv3D_Block
false
5,700
[ "Apache-2.0" ]
1
a04662f1a4520128dd347b1e84d14717feb0655a
https://github.com/Ohyeon5/SQM_basis/tree/a04662f1a4520128dd347b1e84d14717feb0655a
Normalize
import torch import torch.nn as nn import torch.nn.parallel import torch.optim import torch.utils.data class Normalize(nn.Module): def __init__(self, power=2): super(Normalize, self).__init__() self.power = power def forward(self, x): norm = x.pow(self.power).sum(1, keepdim=True).pow...
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 import torch.nn.parallel import torch.optim import torch....
Bhaskers-Blu-Org2/metric-transfer.pytorch
Normalize
false
13,394
[ "MIT" ]
51
b0ae8ed6e6f62357100d799defbb61a78c831a87
https://github.com/Bhaskers-Blu-Org2/metric-transfer.pytorch/tree/b0ae8ed6e6f62357100d799defbb61a78c831a87
BertOutAttention
# 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._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....
MarSaKi/Recurrent-VLN-BERT
BertOutAttention
false
13,219
[ "MIT" ]
0
c1170f9ca48c234a0c3ded19f9273f2fdcd571d6
https://github.com/MarSaKi/Recurrent-VLN-BERT/tree/c1170f9ca48c234a0c3ded19f9273f2fdcd571d6
GCN
# 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._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 math import torch.nn a...
BrunoKM/rhoana_graph_tools
GCN
false
4,923
[ "MIT" ]
1
7150f4bc6337ecf51dd9123cf03561a57d655160
https://github.com/BrunoKM/rhoana_graph_tools/tree/7150f4bc6337ecf51dd9123cf03561a57d655160
NeuralNet
# 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._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....
bva-bme/Constrained_Policy_Gradient
NeuralNet
false
1,646
[ "MIT" ]
0
2331f55ff3bf06e2276662517c34cc45d5a51da8
https://github.com/bva-bme/Constrained_Policy_Gradient/tree/2331f55ff3bf06e2276662517c34cc45d5a51da8
SP
import torch import torch.nn as nn import torch.nn.functional as F class SP(nn.Module): def __init__(self): super(SP, self).__init__() def forward(self, feat_v, feat_t): feat_v = feat_v.view(feat_v.size(0), -1) G_v = torch.mm(feat_v, feat_v.t()) norm_G_v = F.normalize(G_v, 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....
JDAI-CV/CM-NAS
SP
false
8,305
[ "Apache-2.0" ]
31
bbc77f427b2c8afb9f3865f5a04e86079d33dd28
https://github.com/JDAI-CV/CM-NAS/tree/bbc77f427b2c8afb9f3865f5a04e86079d33dd28
mlp_5layer
import torch import torch.nn as nn import torch.nn.functional as F class mlp_5layer(nn.Module): def __init__(self, in_ch, in_dim, width=1): super(mlp_5layer, self).__init__() self.fc1 = nn.Linear(in_ch * in_dim * in_dim, 256 * width) self.fc2 = nn.Linear(256 * width, 256 * width) ...
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_...
Mahoumaru/auto_LiRPA
mlp_5layer
false
11,681
[ "BSD-3-Clause" ]
0
b03a6c36eb1b921726778359d6d2b94e0cd7e480
https://github.com/Mahoumaru/auto_LiRPA/tree/b03a6c36eb1b921726778359d6d2b94e0cd7e480
VanillaRNN
# 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._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....
Kuga23/Deep-Learning
VanillaRNN
false
2,481
[ "MIT" ]
0
86980338208c702b6bfcbcfffdb18498e389a56b
https://github.com/Kuga23/Deep-Learning/tree/86980338208c702b6bfcbcfffdb18498e389a56b
NormalSampler
import torch from torch import nn class NormalSampler(nn.Module): """p(z)""" def __init__(self): super(NormalSampler, self).__init__() self.register_buffer('eps', torch.tensor(1e-10)) def forward(self, mean, log_var): epsilon = torch.randn(mean.size(), requires_grad=False, device...
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 math as tl_math from torch import nn assert_size_stride = torch....
ChengF-Lab/scGGN
NormalSampler
false
2,099
[ "MIT" ]
0
eab585219e6d3eb06c94057f0e3b276d1846e8b6
https://github.com/ChengF-Lab/scGGN/tree/eab585219e6d3eb06c94057f0e3b276d1846e8b6
Attention
import torch import torch.nn as nn import torch.nn.functional as F class Attention(nn.Module): """Defining the attention layer to be used with Bi-LSTM""" def __init__(self, hidden_dim): """Constructor for the Attention class. Args: hidden_dim (int): The double of the hidden vector size of the...
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....
abhinavbh08/NNTI-WS2021-NLP-Project
Attention
false
9,656
[ "MIT" ]
0
946cfdcb0e0e64969d12423fa1b26dad3cb2d417
https://github.com/abhinavbh08/NNTI-WS2021-NLP-Project/tree/946cfdcb0e0e64969d12423fa1b26dad3cb2d417
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...
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....
amanapte/Federated-Learning-PyTorch
CNNCifar
false
11,134
[ "MIT" ]
0
ef48ed1457ba7deb53811e8e2a767f65bf82ae94
https://github.com/amanapte/Federated-Learning-PyTorch/tree/ef48ed1457ba7deb53811e8e2a767f65bf82ae94
CharbonnierLoss
import torch import torch.nn as nn from torch.nn import init as init class CharbonnierLoss(nn.Module): def __init__(self, loss_weight=1.0, eps=1e-06): """ the original eps is 1e-12 """ super(CharbonnierLoss, self).__init__() self.eps = eps def forward(self, pred, targ...
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 from t...
ljzycmd/SimDeblur
CharbonnierLoss
false
15,929
[ "MIT" ]
190
dd2f60c41176b75c4eaf80d740f547c206aa8227
https://github.com/ljzycmd/SimDeblur/tree/dd2f60c41176b75c4eaf80d740f547c206aa8227
FocalLoss2d
# 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 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...
Nareshvrao/Understanding-Clouds-from-Satellite-Images
FocalLoss2d
false
5,632
[ "MIT" ]
1
14c5e1f15e803e9638d7a3fa8b9e0d929a6015b6
https://github.com/Nareshvrao/Understanding-Clouds-from-Satellite-Images/tree/14c5e1f15e803e9638d7a3fa8b9e0d929a6015b6
GraphConvolution
# 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._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 from torch.nn import init assert_size_stride = torch._C._dy...
DavidHeSkr/GCN-GAN-pytorch
GraphConvolution
false
13,589
[ "MIT" ]
66
f8adf82596733464cb63dddf978c244b25aebe46
https://github.com/DavidHeSkr/GCN-GAN-pytorch/tree/f8adf82596733464cb63dddf978c244b25aebe46
DownBlock2d
# 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._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....
KangweiiLiu/Thin-Plate-Spline-Motion-Model
DownBlock2d
false
5,435
[ "MIT" ]
1
0ec14f6c06f5beeef159340142ec5182a1be9bc7
https://github.com/KangweiiLiu/Thin-Plate-Spline-Motion-Model/tree/0ec14f6c06f5beeef159340142ec5182a1be9bc7
FeedForwardBlock
# 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._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....
MSU-MLSys-Lab/CATE
FeedForwardBlock
false
8,584
[ "Apache-2.0" ]
15
654c393d7df888d2c3f3b90f9e6752faa061157e
https://github.com/MSU-MLSys-Lab/CATE/tree/654c393d7df888d2c3f3b90f9e6752faa061157e
my_AvgPool2d
# 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 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 from torch.nn.modules.module import Module assert_size_stride = torch._C._dynamo.guards.assert_size_stride empty...
likun97/Low_quality_classification_with_mobilenetv3
my_AvgPool2d
false
10,436
[ "Apache-2.0" ]
0
a9e6f66caad937fc7c8e101cddb76f116219b255
https://github.com/likun97/Low_quality_classification_with_mobilenetv3/tree/a9e6f66caad937fc7c8e101cddb76f116219b255
KLDivergence
import torch import torch as th class KLDivergence(th.nn.Module): """ Args: min_value(float): the loss is clipped so that value below this number don't affect the optimization. """ def __init__(self, min_value=0.2): super(KLDivergence, self).__init__() self.min_val...
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 as th ass...
v-a-s-a/diffvg
KLDivergence
false
4,470
[ "Apache-2.0" ]
0
3685f3d47a5a4e5c76c68643ebf383f809ba59ed
https://github.com/v-a-s-a/diffvg/tree/3685f3d47a5a4e5c76c68643ebf383f809ba59ed
SmallNN
# 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._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...
AustinCai/gmaxup-augmentation
SmallNN
false
100
[ "MIT" ]
0
a64ca0a76eb333e5ce6b217c301d27ca04d73bce
https://github.com/AustinCai/gmaxup-augmentation/tree/a64ca0a76eb333e5ce6b217c301d27ca04d73bce
GAT
import torch import torch.nn.functional as F import torch.autograd import torch.nn as nn class GraphAttConv(nn.Module): def __init__(self, in_features, out_features, dropout, alpha, concat=True): super(GraphAttConv, self).__init__() self.dropout = dropout self.in_features = in_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....
SsGood/MMGL
GAT
false
17,993
[ "MIT" ]
6
ea769e46fffb42559e764e2912c5b1dc17c10af2
https://github.com/SsGood/MMGL/tree/ea769e46fffb42559e764e2912c5b1dc17c10af2
Normalizer
import torch from torch import nn class Normalizer(nn.Module): def __init__(self, target_norm=1.0): super().__init__() self.target_norm = target_norm def forward(self, input: 'torch.Tensor'): return input * self.target_norm / input.norm(p=2, dim=1, keepdim=True) def get_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._inductor.runtime.triton_helpers import libdevice from torch import nn assert_size_stride = torch._C._dynamo.guards.assert_size_s...
YangXuanyue/Neural-Unaligned-Phoneme-Sequence-Prediction
Normalizer
false
18,139
[ "BSD-3-Clause" ]
5
91ef1c95478367f5b421da125f07660cfc9bed98
https://github.com/YangXuanyue/Neural-Unaligned-Phoneme-Sequence-Prediction/tree/91ef1c95478367f5b421da125f07660cfc9bed98
EncoderBlock
import math import torch from torch.autograd import Variable import torch.nn as nn import torch.optim class LayerNorm(nn.Module): def __init__(self, features, eps=1e-06): super(LayerNorm, self).__init__() self.a_2 = nn.Parameter(torch.ones(features)) self.b_2 = nn.Parameter(torch.zeros(fe...
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....
howardchenhd/Transformer-pytorch
EncoderBlock
false
6,849
[ "MIT" ]
1
ae71ed5767272feb7e717be6d5bfce46f80ec57a
https://github.com/howardchenhd/Transformer-pytorch/tree/ae71ed5767272feb7e717be6d5bfce46f80ec57a
AxialPositionalEmbedding
# 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 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...
lucidrains/axial-attention
AxialPositionalEmbedding
false
15,966
[ "MIT" ]
189
eff2c10c2e76c735a70a6b995b571213adffbbb7
https://github.com/lucidrains/axial-attention/tree/eff2c10c2e76c735a70a6b995b571213adffbbb7
NormedLinear
# 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._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....
IssacCyj/imbalanced-semi-self
NormedLinear
false
2,397
[ "MIT" ]
0
33ef166532c94c7ac65b41238c751b0a5369262b
https://github.com/IssacCyj/imbalanced-semi-self/tree/33ef166532c94c7ac65b41238c751b0a5369262b
IBWDCT
# 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._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.parallel import torch.utils.data from torch i...
KazutakaYamanouchi/bachelor-study
IBWDCT
false
2,663
[ "Apache-2.0" ]
0
a5b8392459e7649cb8a35d09e65bd269d13b5297
https://github.com/KazutakaYamanouchi/bachelor-study/tree/a5b8392459e7649cb8a35d09e65bd269d13b5297
InstanceNorm2dPlus
import torch import torch.nn as nn class InstanceNorm2dPlus(nn.Module): def __init__(self, num_features, bias=True): super().__init__() self.num_features = num_features self.bias = bias self.instance_norm = nn.InstanceNorm2d(num_features, affine=False, track_running_st...
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_...
samsartor/score_sde
InstanceNorm2dPlus
false
7,604
[ "Apache-2.0" ]
1
d25c8d092a68d643c796d771c55f80075aa041d1
https://github.com/samsartor/score_sde/tree/d25c8d092a68d643c796d771c55f80075aa041d1
RAEClassifier
# 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._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....
MHHukiewitz/SRAE_pytorch
RAEClassifier
false
11,677
[ "MIT" ]
0
91f961f740c96cdb49739c9738ed330af59750d0
https://github.com/MHHukiewitz/SRAE_pytorch/tree/91f961f740c96cdb49739c9738ed330af59750d0
Conv
import torch import torch.utils.data from torch import nn class Conv(nn.Module): """ 2d卷积 先batchnorm再ReLU,默认有ReLU但是没有BN 默认小核 """ def __init__(self, inp_dim, out_dim, kernel_size=3, stride=1, bn=False, relu=True): super(Conv, self).__init__() self.inp_dim = inp_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.utils.data from ...
rm-rf-me/Study-stacked-hourglass
Conv
false
7,568
[ "BSD-3-Clause" ]
1
48441f0dd5ae3397470c70db0f50ab5576b9d2f2
https://github.com/rm-rf-me/Study-stacked-hourglass/tree/48441f0dd5ae3397470c70db0f50ab5576b9d2f2
InvDepth
# 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 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...
ChristophReich1996/kornia
InvDepth
false
291
[ "ECL-2.0", "Apache-2.0" ]
0
35f955b46e8015da1cb9faa28c6943ec2b09cc2a
https://github.com/ChristophReich1996/kornia/tree/35f955b46e8015da1cb9faa28c6943ec2b09cc2a
Block
import torch import torch.nn as nn import torch.nn.functional as F class LayerNorm(nn.Module): """ LayerNorm that supports two data formats: channels_last (default) or channels_first. The ordering of the dimensions in the inputs. channels_last corresponds to inputs with shape (batch_size, height, width, c...
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 ...
ZhijieXiao-0624/CNXA
Block
false
3,005
[ "MIT" ]
0
a63b3561010cf87f696a005f8ea252e7cdaa7ca2
https://github.com/ZhijieXiao-0624/CNXA/tree/a63b3561010cf87f696a005f8ea252e7cdaa7ca2
MLP_AlexNet
import torch import torch.nn as nn import torch.nn.functional as F class MLP_AlexNet(nn.Module): """ The last fully connected part of LeNet MNIST: https://github.com/BVLC/caffe/blob/master/examples/mnist/lenet.prototxt """ def __init__(self, input_nc, input_width, input_height, dropout_prob= ...
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....
yulinfeng000/AdaptiveNeuralTrees
MLP_AlexNet
false
13,163
[ "MIT" ]
0
bbcb381b9cb0c91ae1af33ce43b43f352055041c
https://github.com/yulinfeng000/AdaptiveNeuralTrees/tree/bbcb381b9cb0c91ae1af33ce43b43f352055041c
Fire
import torch import torch.onnx import torch import torch.nn as nn class Fire(nn.Module): def __init__(self, inplanes, squeeze_planes, expand1x1_planes, expand3x3_planes): super(Fire, self).__init__() self.inplanes = inplanes self.squeeze = nn.Conv2d(inplanes, squeeze_planes, kerne...
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.onnx import torc...
AndySer37/pytorch-ssd-mobile
Fire
false
2,004
[ "MIT" ]
0
ec4935940ffa374edc1e9a7009c279e727e548d7
https://github.com/AndySer37/pytorch-ssd-mobile/tree/ec4935940ffa374edc1e9a7009c279e727e548d7
LeNet_300_100
import torch import torch.nn as nn import torch.nn.functional as F import torch.nn.parallel import torch.optim import torch.utils.data import torch.utils.data.distributed class LeNet_300_100(nn.Module): """Simple NN with hidden layers [300, 100] Based on https://github.com/mi-lad/snip/blob/master/train.py ...
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....
elony314/sparse_learning
LeNet_300_100
false
12,343
[ "MIT" ]
0
fff9ea0267016bda747f2882ef8de508ac1369e7
https://github.com/elony314/sparse_learning/tree/fff9ea0267016bda747f2882ef8de508ac1369e7
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 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 ...
benedictquartey/softgym_wm
Encoder
false
12,164
[ "BSD-3-Clause" ]
0
0aef75fed207b11029f6052c656a679c105b4677
https://github.com/benedictquartey/softgym_wm/tree/0aef75fed207b11029f6052c656a679c105b4677
LeNet
import torch from torch import nn import torch.nn.functional as F import torch.utils class LeNet(torch.nn.Module): def __init__(self): super(LeNet, self).__init__() self.conv1 = torch.nn.Conv2d(1, 6, kernel_size=5, padding=2) self.conv2 = torch.nn.Conv2d(6, 16, kernel_size=5) 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 import nn import t...
WingFeiTsang/FedML_New
LeNet
false
5,973
[ "Apache-2.0" ]
1
755d8fc63ce08df4dc3eef326aa7693e94262c7e
https://github.com/WingFeiTsang/FedML_New/tree/755d8fc63ce08df4dc3eef326aa7693e94262c7e
RegressionModel
import torch from torch import nn class RegressionModel(nn.Module): def __init__(self, num_features_in, num_anchors=9, feature_size=256): super(RegressionModel, self).__init__() self.conv1 = nn.Conv2d(num_features_in, feature_size, kernel_size=3, padding=1) self.act1 = nn.ReLU...
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...
DerekGloudemans/temporary-repo
RegressionModel
false
5,083
[ "MIT" ]
1
f278e9c7c9c7c1f362a64aec492ddb8fb1f984ad
https://github.com/DerekGloudemans/temporary-repo/tree/f278e9c7c9c7c1f362a64aec492ddb8fb1f984ad
FocalLoss
# 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 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 import nn i...
IssacCyj/imbalanced-semi-self
FocalLoss
false
2,398
[ "MIT" ]
0
33ef166532c94c7ac65b41238c751b0a5369262b
https://github.com/IssacCyj/imbalanced-semi-self/tree/33ef166532c94c7ac65b41238c751b0a5369262b
Envelope
import torch class Envelope(torch.nn.Module): def __init__(self, exponent): super(Envelope, self).__init__() self.p = exponent self.a = -(self.p + 1) * (self.p + 2) / 2 self.b = self.p * (self.p + 2) self.c = -self.p * (self.p + 1) / 2 def forward(self, x): p,...
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...
coopersigrist/Multi-fragment-energy
Envelope
false
12,226
[ "MIT" ]
0
c21c1b884f364cf3f2ac71e393464e85ebeccb04
https://github.com/coopersigrist/Multi-fragment-energy/tree/c21c1b884f364cf3f2ac71e393464e85ebeccb04
RingLoss
# 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 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 warnings import torch.nn as nn from torchvision.transforms import * asse...
DRACOyu/deep-person-reid
RingLoss
false
5,195
[ "MIT" ]
1
8ca8be28c204dbc37cff76e77691f29045773aa2
https://github.com/DRACOyu/deep-person-reid/tree/8ca8be28c204dbc37cff76e77691f29045773aa2
CausalConv2d
# 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._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 ...
imatge-upc/pixelcoordEDL
CausalConv2d
false
6,881
[ "MIT" ]
1
353632feed6ac8c93758c1a2a1b7a477e7ff053c
https://github.com/imatge-upc/pixelcoordEDL/tree/353632feed6ac8c93758c1a2a1b7a477e7ff053c
MemoryReader
import torch import torch.nn as nn class MemoryReader(nn.Module): def __init__(self, state_size, memory_size, h_size, device): super(MemoryReader, self).__init__() self.device = device self.state_size = state_size self.memory_size = memory_size self.h_size = h_size ...
import torch from torch._inductor.select_algorithm import extern_kernels from torch._C import _cuda_getCurrentRawStream as get_raw_stream import triton import triton.language as tl from torch._inductor.runtime.triton_heuristics import grid import torch.nn as nn assert_size_stride = torch._C._dynamo.guards.assert_size_s...
rchavan10/Multiple-Intersection-Traffic-Control-using-Reinforcement-Learning
MemoryReader
false
10,750
[ "MIT" ]
0
3663a1c7a89fe18974d13c9dc78ac7a99dac2300
https://github.com/rchavan10/Multiple-Intersection-Traffic-Control-using-Reinforcement-Learning/tree/3663a1c7a89fe18974d13c9dc78ac7a99dac2300
CNormalized_Linear
import math import torch import torch as th class CNormalized_Linear(th.nn.Module): """Linear layer with column-wise normalized input matrix.""" def __init__(self, in_features, out_features, bias=False): """Initialize the layer.""" super(CNormalized_Linear, self).__init__() self.in_fe...
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 math import ...
BadrYoubiIdrissi/CausalDiscoveryToolbox
CNormalized_Linear
false
2,005
[ "MIT" ]
0
1e729d002a64ea1942caecd21b9dc8cc217ea0e2
https://github.com/BadrYoubiIdrissi/CausalDiscoveryToolbox/tree/1e729d002a64ea1942caecd21b9dc8cc217ea0e2
Conv2dBlock
import torch import torch.nn.functional as F from torch import nn class AdaptiveInstanceNorm2d(nn.Module): def __init__(self, num_features, eps=1e-05, momentum=0.1): super(AdaptiveInstanceNorm2d, self).__init__() self.num_features = num_features self.eps = eps self.momentum = mome...
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.functional as...
Alikfp/research-GANwriting
Conv2dBlock
false
7,637
[ "MIT" ]
41
2190954218a733deac52c929f51bb85bca5d7216
https://github.com/Alikfp/research-GANwriting/tree/2190954218a733deac52c929f51bb85bca5d7216
Upsample_interpolate
import torch import torch.nn as nn import torch.nn.functional as F class Upsample_interpolate(nn.Module): def __init__(self, stride): super(Upsample_interpolate, self).__init__() self.stride = stride def forward(self, x): x_numpy = x.cpu().detach().numpy() H = x_numpy.shape[2...
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...
Mathiebhan/darknet_ros
Upsample_interpolate
false
11,685
[ "BSD-3-Clause" ]
0
04a97b61b6b3b086da1a46331a747accd37d05f9
https://github.com/Mathiebhan/darknet_ros/tree/04a97b61b6b3b086da1a46331a747accd37d05f9
SELayer
import torch import torch.nn.functional as F import torch.nn as nn class SELayer(nn.Module): def __init__(self, in_channels, reduction): super().__init__() mid_channels = in_channels // reduction self.fc1 = nn.Linear(in_channels, mid_channels) self.fc2 = nn.Linear(mid_channels, 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 import torch.nn as nn assert_...
implus/pytorch_image_classification
SELayer
false
10,284
[ "MIT" ]
0
cac490ed518ad09b0429fc01af060457fb050e68
https://github.com/implus/pytorch_image_classification/tree/cac490ed518ad09b0429fc01af060457fb050e68
CoevolExtractor
import torch import torch.nn as nn class LayerNorm(nn.Module): def __init__(self, d_model, eps=1e-05): super(LayerNorm, self).__init__() self.a_2 = nn.Parameter(torch.ones(d_model)) self.b_2 = nn.Parameter(torch.zeros(d_model)) self.eps = eps def forward(self, x): mea...
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 ...
wukevin/RoseTTAFold
CoevolExtractor
false
4,559
[ "MIT" ]
0
e3c15dbf4bc1e4f8726e26c63aca1625188da803
https://github.com/wukevin/RoseTTAFold/tree/e3c15dbf4bc1e4f8726e26c63aca1625188da803
SelfAttention
import torch import numpy as np import torch.nn as nn import torch.nn.functional as F def masked_softmax(logits, mask, dim=-1, log_softmax=False): """Take the softmax of `logits` over given dimension, and set entries to 0 wherever `mask` is 0. Args: logits (torch.Tensor): Inputs to the softmax fu...
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....
mayankiitg/cs224n
SelfAttention
false
4,015
[ "MIT" ]
0
c67b7904101c8f19a5a231e4fe521e764470d41b
https://github.com/mayankiitg/cs224n/tree/c67b7904101c8f19a5a231e4fe521e764470d41b
RankingLoss
import torch from abc import abstractmethod import torch.utils.data.dataloader import torch.nn.functional as F from torch import nn import torch.nn class SimilarityLoss(nn.Module): def __init__(self): super(SimilarityLoss, self).__init__() @abstractmethod def forward(self, inputs, targets): ...
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 abc import abstractmethod import torch.utils.data.dataloader from torch import nn im...
MaxDall/flair
RankingLoss
false
9,311
[ "MIT" ]
0
fe33be4a63134595c21891edbe00ef9bd6014641
https://github.com/MaxDall/flair/tree/fe33be4a63134595c21891edbe00ef9bd6014641
Intensity_Loss
import torch import torch.nn as nn import torch.nn.functional import torch.nn class Intensity_Loss(nn.Module): def __init__(self): super().__init__() def forward(self, gen_frames, gt_frames): return torch.mean(torch.abs((gen_frames - gt_frames) ** 2)) def get_inputs(): return [torch.ra...
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 ...
ChmarsLuo/Hero_anomaly_prediction
Intensity_Loss
false
4,986
[ "Apache-2.0" ]
1
dba2322dabb3476466e296db6c316fc08e0cb11d
https://github.com/ChmarsLuo/Hero_anomaly_prediction/tree/dba2322dabb3476466e296db6c316fc08e0cb11d
Stack
import torch from torch import nn from typing import * class Stack(nn.Module): def __init__(self): super().__init__() def forward(self, modalities): flattened = [] for modality in modalities: flattened.append(torch.flatten(modality, start_dim=1)) return torch.stac...
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 from typing import * assert_size_stride = torch._C._dynamo.guards.assert_size_stride empty_strided_cuda = torch._C._dyn...
HughMun/MultiBench
Stack
false
13,803
[ "MIT" ]
148
d5712a0815a9486b0e0c76b54cd63c880188fc8e
https://github.com/HughMun/MultiBench/tree/d5712a0815a9486b0e0c76b54cd63c880188fc8e
CharbonnierLoss
import torch import torch.nn as nn import torch.utils.data class CharbonnierLoss(nn.Module): """Charbonnier Loss (L1)""" def __init__(self, eps=1e-06): super(CharbonnierLoss, self).__init__() self.eps = eps def forward(self, x, y): diff = x - y loss = torch.sum(torch.sqrt...
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 import...
JaguAroo/SRResCGAN
CharbonnierLoss
false
587
[ "MIT" ]
0
9aac612aff631f7fb9142e0a36de9559cfc1a62d
https://github.com/JaguAroo/SRResCGAN/tree/9aac612aff631f7fb9142e0a36de9559cfc1a62d
DilatedResidualLayer
# 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._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_...
cmhungsteve/SSTDA
DilatedResidualLayer
false
15,045
[ "MIT" ]
154
9c5e1df952bd122ea474046d91e3ac6fa79ec312
https://github.com/cmhungsteve/SSTDA/tree/9c5e1df952bd122ea474046d91e3ac6fa79ec312
Delta
import torch import torch.nn as nn from torchaudio import transforms class Delta(nn.Module): def __init__(self, order=2, **kwargs): super(Delta, self).__init__() self.order = order self.compute_delta = transforms.ComputeDeltas(**kwargs) def forward(self, x): feats = [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 import torch.nn as nn from torchaudio import transforms assert_size_stride = tor...
gcambara/s3prl
Delta
false
15,424
[ "MIT" ]
856
33284ebde3a903ed8604d6dae85669d0174ae1d3
https://github.com/gcambara/s3prl/tree/33284ebde3a903ed8604d6dae85669d0174ae1d3
LocAndConf
import torch import torch.nn as nn from math import sqrt as sqrt from itertools import product as product class LocAndConf(nn.Module): def __init__(self, c_in, c_out, num_classes): super(LocAndConf, self).__init__() self.c_in = c_in self.c_out = c_out self.num_classes = num_classe...
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 from math import sqrt as sqrt from itertools import produc...
beichen2012/ssd.pytorch
LocAndConf
false
1,529
[ "MIT" ]
0
90b68a6903d2bef4c358e295d88b25e6fc6daf54
https://github.com/beichen2012/ssd.pytorch/tree/90b68a6903d2bef4c358e295d88b25e6fc6daf54
EncoderLayer
# 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._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....
eminem171333491/PaddleOCR2Pytorch
EncoderLayer
false
3,470
[ "Apache-2.0" ]
0
ec466bb3a689eccb9290e9f80812a45301d3b030
https://github.com/eminem171333491/PaddleOCR2Pytorch/tree/ec466bb3a689eccb9290e9f80812a45301d3b030
BilinearAttention
import torch import torch.nn as nn import torch.utils.data class BilinearAttention(nn.Module): """ :param enc_dim: Scalar. :param dec_dim: Scalar """ def __init__(self, enc_dim, dec_dim): super(BilinearAttention, self).__init__() self.W = nn.Linear(enc_dim, dec_dim) def forw...
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....
CookiePPP/mellotron
BilinearAttention
false
9,064
[ "BSD-3-Clause" ]
0
488425981c19cd0eddddea13d1348da4bfef8d26
https://github.com/CookiePPP/mellotron/tree/488425981c19cd0eddddea13d1348da4bfef8d26
Conv3DBlock
import torch import torch.nn as nn from typing import Union def act_layer(act): if act == 'relu': return nn.ReLU() elif act == 'lrelu': return nn.LeakyReLU(LRELU_SLOPE) elif act == 'elu': return nn.ELU() elif act == 'tanh': return nn.Tanh() elif act == 'prelu': ...
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 from typing import Union assert_size_stride = torch._C._dy...
rll-research/ARM
Conv3DBlock
false
16,328
[ "BSD-3-Clause" ]
46
7a51e00fabdcdbd8ad2b235266c66115e79deeb0
https://github.com/rll-research/ARM/tree/7a51e00fabdcdbd8ad2b235266c66115e79deeb0
Clamp
# 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 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_size_stride = torch._C._dynamo.guards.assert_size_stride empt...
abdalazizrashid/idao-21-baseline
Clamp
false
18,229
[ "Apache-2.0" ]
7
649c2c70a1754b09fa06bf2264d7e8217b3e10f0
https://github.com/abdalazizrashid/idao-21-baseline/tree/649c2c70a1754b09fa06bf2264d7e8217b3e10f0
BiliAttnReduction
# 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._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....
Asichurter/MalFusionFSL
BiliAttnReduction
false
16,989
[ "MIT" ]
4
713bf64cc07a3489f42941fd2299837075575ac0
https://github.com/Asichurter/MalFusionFSL/tree/713bf64cc07a3489f42941fd2299837075575ac0
MultiHeadedAttention
# 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._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....
GuyTevet/MotionCLIP
MultiHeadedAttention
false
8,167
[ "MIT" ]
45
c2b9f40b0e721e42981f3e8b58133a1c51fde715
https://github.com/GuyTevet/MotionCLIP/tree/c2b9f40b0e721e42981f3e8b58133a1c51fde715
IoULoss
# 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 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 ...
AIpakchoi/visualDet3D
IoULoss
false
4,760
[ "Apache-2.0" ]
1
920f6f8ea44eac4c1896b7d157c015e039ac39f9
https://github.com/AIpakchoi/visualDet3D/tree/920f6f8ea44eac4c1896b7d157c015e039ac39f9
RegWeightedL1Loss
import torch import torch.nn as nn import torch.nn.functional as F import torch.utils.data def _gather_feat(feat, ind, mask=None): dim = feat.size(2) ind = ind.unsqueeze(2).expand(ind.size(0), ind.size(1), dim) feat = feat.gather(1, ind) if mask is not None: mask = mask.unsqueeze(2).expand_as(...
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 ...
leobean/CenterNet_simple
RegWeightedL1Loss
false
3,964
[ "MIT" ]
0
13e2eab2c049563afde5defdf90434a310a32d02
https://github.com/leobean/CenterNet_simple/tree/13e2eab2c049563afde5defdf90434a310a32d02
SmallDecoder4_16x
import torch import torch.nn as nn class SmallDecoder4_16x(nn.Module): def __init__(self, model=None, fixed=False): super(SmallDecoder4_16x, self).__init__() self.fixed = fixed self.conv41 = nn.Conv2d(128, 64, 3, 1, 0) self.conv34 = nn.Conv2d(64, 64, 3, 1, 0) self.conv33 =...
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....
MingSun-Tse/Collaborative-Distillation
SmallDecoder4_16x
false
14,044
[ "MIT" ]
172
915712674af82ff91d926d922c14988cce0430f3
https://github.com/MingSun-Tse/Collaborative-Distillation/tree/915712674af82ff91d926d922c14988cce0430f3
Conv2dWithConstraint
# 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._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 ...
High-East/BCI-ToolBox
Conv2dWithConstraint
false
17,378
[ "MIT" ]
10
57015ae5fd008e8636889b9afba49c64c3a35ff3
https://github.com/High-East/BCI-ToolBox/tree/57015ae5fd008e8636889b9afba49c64c3a35ff3
CNNLayerNorm
import torch import torch.nn as nn class CNNLayerNorm(nn.Module): """Layer normalization built for cnns input""" def __init__(self, n_feats): super(CNNLayerNorm, self).__init__() self.layer_norm = nn.LayerNorm(n_feats) def forward(self, x): x = x.transpose(2, 3).contiguous() ...
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_...
MatyashDare/DLA
CNNLayerNorm
false
2,638
[ "MIT" ]
0
a1783a1298d9e5c7edc82bb2e7f17ba59743152e
https://github.com/MatyashDare/DLA/tree/a1783a1298d9e5c7edc82bb2e7f17ba59743152e
WeighedMSELoss
# 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 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 MSELoss assert_size_stride = torch._C._dynamo.guards.assert_size_str...
UT-ADL/lidar-as-camera
WeighedMSELoss
false
1,166
[ "Apache-2.0" ]
0
daccb2ae21b4899ecfd8611b7a27f91681617383
https://github.com/UT-ADL/lidar-as-camera/tree/daccb2ae21b4899ecfd8611b7a27f91681617383
UnStackDelta
# 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 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...
wenjie-p/CAT
UnStackDelta
false
4,648
[ "Apache-2.0" ]
0
0e6904658dd3d14afe51faf1d0141ae95fef44e8
https://github.com/wenjie-p/CAT/tree/0e6904658dd3d14afe51faf1d0141ae95fef44e8
FC_Q
# 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._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_...
cedesu/BCQ
FC_Q
false
12,199
[ "MIT" ]
0
424548510349a85c31809431494dcc6f64b611ba
https://github.com/cedesu/BCQ/tree/424548510349a85c31809431494dcc6f64b611ba
NeuralNetNonDifferentiableOutput
# 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._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 import torch....
RyanUnderhill/onnxruntime
NeuralNetNonDifferentiableOutput
false
11,826
[ "MIT" ]
0
6df4e293ffbb47d739d2dedfbb87fa6234b8c37c
https://github.com/RyanUnderhill/onnxruntime/tree/6df4e293ffbb47d739d2dedfbb87fa6234b8c37c
Connect2Model
# 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._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....
JoshVarty/ConnectX
Connect2Model
false
5,421
[ "MIT" ]
1
05478e250a149df46bf93a6b85282ded34afadc3
https://github.com/JoshVarty/ConnectX/tree/05478e250a149df46bf93a6b85282ded34afadc3
AdaptiveInstanceNorm
import torch import torch.nn as nn from torch.nn.init import _calculate_correct_fan import torch.utils.cpp_extension def equalized_lr(module, name='weight', gain=2 ** 0.5, mode='fan_in', lr_mul=1.0): """Equalized Learning Rate. This trick is proposed in: Progressive Growing of GANs for Improved Quali...
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 ...
bladesaber/mmgeneration
AdaptiveInstanceNorm
false
1,573
[ "Apache-2.0" ]
0
158b49f7efd8028f231f6e9ca758ae0e20dd72ae
https://github.com/bladesaber/mmgeneration/tree/158b49f7efd8028f231f6e9ca758ae0e20dd72ae
MetaAconC
# 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._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...
cuiboyuan/plato
MetaAconC
false
15,094
[ "Apache-2.0" ]
135
260b785cbbf8588c92331d6343211ff72321f90e
https://github.com/cuiboyuan/plato/tree/260b785cbbf8588c92331d6343211ff72321f90e
AddBroadcastPosEmbed
# 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 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...
pointoflight/VideoGPT
AddBroadcastPosEmbed
false
7,483
[ "MIT" ]
1
85f19d8cb0d251238f295f0294e69b9299c13e21
https://github.com/pointoflight/VideoGPT/tree/85f19d8cb0d251238f295f0294e69b9299c13e21
Normalize
import torch from torch import Tensor from typing import Tuple import torch.nn.functional as F import torch.nn.functional class Normalize(torch.nn.Module): """Normalize a tensor time series with mean and standard deviation. Given mean: ``(mean[1],...,mean[n])`` and std: ``(std[1],..,std[n])`` for ``n`` ch...
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 typing import Tuple imp...
VincentSch4rf/torchtime
Normalize
false
18,044
[ "Apache-2.0" ]
4
bebd006cd67b31c342e0658285c9771c27411df0
https://github.com/VincentSch4rf/torchtime/tree/bebd006cd67b31c342e0658285c9771c27411df0
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 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....
mayankiitg/cs224n
SelfAttention
false
4,015
[ "MIT" ]
0
c67b7904101c8f19a5a231e4fe521e764470d41b
https://github.com/mayankiitg/cs224n/tree/c67b7904101c8f19a5a231e4fe521e764470d41b
ZeroOneTest
import torch from torch import nn class ZeroOneTest(nn.Module): def __init__(self): super(ZeroOneTest, self).__init__() return def forward(self, output_p, output_n, prior): cost = prior * torch.mean((1 - torch.sign(output_p)) / 2) cost = cost + (1 - prior) * torch.mean((1 + t...
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 import nn assert_size_stride = torch._C._dynamo.guards.assert_size_stride empt...
mxuq/Imbalance-PU
ZeroOneTest
false
7,312
[ "MIT" ]
1
fd4403b05f98ca6bc8156783e8275888d63f6435
https://github.com/mxuq/Imbalance-PU/tree/fd4403b05f98ca6bc8156783e8275888d63f6435
MultiHeadAttention
import torch import numpy as np import torch.utils.data import torch import torch.nn as nn import torch.nn.functional as F class PositionalEncoding(nn.Module): def __init__(self, max_pos, d_k): super().__init__() self.w_rpr = nn.Linear(d_k, max_pos + 1, bias=False) def __call__(self, q, dist...
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....
TomerRonen34/MeshCNN
MultiHeadAttention
false
5,923
[ "MIT" ]
1
8c50f3804c48044b78572d652a42184640e904d9
https://github.com/TomerRonen34/MeshCNN/tree/8c50f3804c48044b78572d652a42184640e904d9
HGNN
import math import torch from torch import nn import torch.nn.functional as F from torch.nn.parameter import Parameter class HGNN_conv(nn.Module): def __init__(self, in_ft, out_ft, bias=True): super(HGNN_conv, self).__init__() self.weight = Parameter(torch.Tensor(in_ft, out_ft)) if bias: ...
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 math from torch import...
young917/HGNN
HGNN
false
4,636
[ "MIT" ]
0
41017f4315f459e1250830ca6c498b920d57e80a
https://github.com/young917/HGNN/tree/41017f4315f459e1250830ca6c498b920d57e80a
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 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....
jiahuanluo/multi_media
MultiheadAttention
false
10,272
[ "MIT" ]
0
ac5ac59dba87d0368ca656e600a85bfd9a1da28e
https://github.com/jiahuanluo/multi_media/tree/ac5ac59dba87d0368ca656e600a85bfd9a1da28e