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
NN
# 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...
Jie-Yuan/Deeps
NN
false
17,478
[ "MIT" ]
4
b4acbb8e16b8ff5d181e70c3b549df0d818d0d76
https://github.com/Jie-Yuan/Deeps/tree/b4acbb8e16b8ff5d181e70c3b549df0d818d0d76
AttentionLayer
import torch import torch.nn as nn import torch.nn.functional as F from torch.autograd import * class AttentionLayer(nn.Module): def __init__(self, hidden_dim_en, hidden_dim_de, projected_size): super(AttentionLayer, self).__init__() self.linear1 = nn.Linear(hidden_dim_en, projected_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....
minhdo3000/visual_storytelling
AttentionLayer
false
4,008
[ "MIT" ]
0
451c5194564fb1bb02929f57eac8f026662637b1
https://github.com/minhdo3000/visual_storytelling/tree/451c5194564fb1bb02929f57eac8f026662637b1
Hsigmoid
import torch import torch.nn as nn from torch.quantization import QuantStub from torch.quantization import DeQuantStub class Hsigmoid(nn.Module): def __init__(self, inplace=True, add_stub=False): super().__init__() self.float_op = nn.quantized.FloatFunctional() self.relu6 = nn.ReLU6(inpla...
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 from torch.quantization import QuantStub from torch.quantization im...
akosik-anyvision/incubator-tvm
Hsigmoid
false
18,241
[ "Apache-2.0" ]
9
e1b11712ac09c32614483d24a4c7e0245ee4cb4b
https://github.com/akosik-anyvision/incubator-tvm/tree/e1b11712ac09c32614483d24a4c7e0245ee4cb4b
FirstOctaveConv
import torch import torch.nn as nn import torch.nn.parallel import torch.utils.data.distributed class FirstOctaveConv(nn.Module): def __init__(self, in_channels, out_channels, kernel_size, alpha=0.5, stride=1, padding=1, dilation=1, groups=1, bias=False): super(FirstOctaveConv, 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.distribut...
SSusantAchary/OctaveConv_pytorch
FirstOctaveConv
false
14,362
[ "MIT" ]
633
079f7da29d55c2eeed8985d33f0b2f765d7a469e
https://github.com/SSusantAchary/OctaveConv_pytorch/tree/079f7da29d55c2eeed8985d33f0b2f765d7a469e
Conv3x3
import torch import torch.nn as nn class Conv3x3(nn.Module): """Layer to pad and convolve input """ def __init__(self, in_channels, out_channels, use_refl=True): super(Conv3x3, self).__init__() if use_refl: self.pad = nn.ReflectionPad2d(1) else: self.pad = ...
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 torch....
Morbotu/drone-PWS
Conv3x3
false
11,719
[ "MIT" ]
0
face9cbf30a55783592cce8af59c1c70da982b6a
https://github.com/Morbotu/drone-PWS/tree/face9cbf30a55783592cce8af59c1c70da982b6a
Solver_GAP_OneFClayers
import torch import torch.nn as nn import torch.nn.functional as F class Solver_GAP_OneFClayers(nn.Module): """ GAP + fc1 """ def __init__(self, input_nc, input_width, input_height, dropout_prob= 0.0, reduction_rate=2, **kwargs): super(Solver_GAP_OneFClayers, self).__init__() self.dro...
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
Solver_GAP_OneFClayers
false
13,159
[ "MIT" ]
0
bbcb381b9cb0c91ae1af33ce43b43f352055041c
https://github.com/yulinfeng000/AdaptiveNeuralTrees/tree/bbcb381b9cb0c91ae1af33ce43b43f352055041c
Expand
# 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...
Lalihoo/yolov5-detect
Expand
false
9,606
[ "MIT" ]
0
265c3137ea3586d913541501a1562488fbe59e9e
https://github.com/Lalihoo/yolov5-detect/tree/265c3137ea3586d913541501a1562488fbe59e9e
NormalDivLoss
import torch import torch.nn as nn def fuzzyDist(x, a=0.1, b=2): return 1 / (1 + (x / a).abs().pow(2 * b)) class SoftHist(nn.Module): def __init__(self, bins, dist): super(SoftHist, self).__init__() bins[1] - bins[0] self.bins = nn.Parameter(bins.unsqueeze(1)) self.dist = di...
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, math as tl_math import torch.nn as nn assert_size_stride = torch._C._dynamo.gu...
JWHan717/CS492I-Project
NormalDivLoss
false
8,315
[ "MIT" ]
23
5da80bc41425ee90711a3de89c5501b5f7acd4b7
https://github.com/JWHan717/CS492I-Project/tree/5da80bc41425ee90711a3de89c5501b5f7acd4b7
ChannelSpatialSELayer3D
import torch import torch.nn as nn import torch.nn.functional as F class ChannelSELayer3D(nn.Module): """ 3D extension of Squeeze-and-Excitation (SE) block described in: *Hu et al., Squeeze-and-Excitation Networks, arXiv:1709.01507* *Zhu et al., AnatomyNet, arXiv:arXiv:1808.05238* """ ...
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 ...
Jianrong-Lu/Head-and-Neck-Tumour-Segmentation-and-Prediction-of-Patient-Survival
ChannelSpatialSELayer3D
false
666
[ "MIT" ]
0
257cf17ce6d405166dd8449f3b34e305cb5103b2
https://github.com/Jianrong-Lu/Head-and-Neck-Tumour-Segmentation-and-Prediction-of-Patient-Survival/tree/257cf17ce6d405166dd8449f3b34e305cb5103b2
Encoder1
import torch import torch.nn as nn class Encoder1(nn.Module): def __init__(self, model=None, fixed=False): super(Encoder1, self).__init__() self.fixed = fixed self.conv0 = nn.Conv2d(3, 3, 1, 1, 0) self.conv11 = nn.Conv2d(3, 64, 3, 1, 0, dilation=1) self.relu = nn.ReLU(inpl...
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....
EndyWon/Texture-Reformer
Encoder1
false
8,144
[ "MIT" ]
11
f84f95accb3574c7b759a7f03c0b0b4e150314b5
https://github.com/EndyWon/Texture-Reformer/tree/f84f95accb3574c7b759a7f03c0b0b4e150314b5
ModelWithDuplicates
# 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....
Donfa1con/distiller
ModelWithDuplicates
false
11,525
[ "Apache-2.0" ]
0
645ee41bfebc463523b228ff087e41619607d8b2
https://github.com/Donfa1con/distiller/tree/645ee41bfebc463523b228ff087e41619607d8b2
GlobalAveragePooling
import torch import torch.nn as nn import torch.nn.functional as F class GlobalAveragePooling(nn.Module): def __init__(self): super(GlobalAveragePooling, self).__init__() def forward(self, feat): num_channels = feat.size(1) return F.avg_pool2d(feat, (feat.size(2), feat.size(3))).view...
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...
MrChenFeng/Project-Template
GlobalAveragePooling
false
850
[ "MIT" ]
0
42a335c6abb710bbae6407cbb0ca461533bc12f9
https://github.com/MrChenFeng/Project-Template/tree/42a335c6abb710bbae6407cbb0ca461533bc12f9
MLP
import torch from abc import * import torch.nn.functional as F from torch.optim import * def orthogonal_init(layer, nonlinearity='relu'): if isinstance(nonlinearity, str): if nonlinearity == 'policy': gain = 0.01 else: gain = torch.nn.init.calculate_gain(nonlinearity) e...
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 abc import * from torch....
ramanuzan/JORLDY
MLP
false
12,939
[ "Apache-2.0" ]
0
be371ad0607e5dba5d5082101c38c6a9f2c96767
https://github.com/ramanuzan/JORLDY/tree/be371ad0607e5dba5d5082101c38c6a9f2c96767
L_1st
import torch import torch.nn as nn class L_1st(nn.Module): def __init__(self, alpha): super(L_1st, self).__init__() self.alpha = alpha def forward(self, y_pred, y_true): Y = y_pred L = y_true batch_size = Y.shape[0] return 2 * self.alpha * torch.trace(torch.mm...
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...
ZagHe568/graph_embedding
L_1st
false
18,166
[ "MIT" ]
4
2a6f8214ce4b30b51eb9f1904b64fe782876f010
https://github.com/ZagHe568/graph_embedding/tree/2a6f8214ce4b30b51eb9f1904b64fe782876f010
SAGEAggregator
# 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...
EdisonLeeeee/Graphgallery
SAGEAggregator
false
5,109
[ "MIT" ]
1
8ae9ef57d44f073d0ceaf3f33a3a998546f960a8
https://github.com/EdisonLeeeee/Graphgallery/tree/8ae9ef57d44f073d0ceaf3f33a3a998546f960a8
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 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...
usherbob/dgcnn.pytorch
Discriminator
false
10,954
[ "MIT" ]
0
fdf5f7a470123b292ac7642f65fd4f693d9b010d
https://github.com/usherbob/dgcnn.pytorch/tree/fdf5f7a470123b292ac7642f65fd4f693d9b010d
Parseval_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 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...
cadurosar/laplacian_networks
Parseval_Conv2d
false
6,371
[ "MIT" ]
1
27f6f2d7145426b38f578e9c1beecae3e7392f1b
https://github.com/cadurosar/laplacian_networks/tree/27f6f2d7145426b38f578e9c1beecae3e7392f1b
LayerNormalization
import torch import torch.nn as nn class LayerNormalization(nn.Module): def __init__(self, hidden_size, eps=1e-05): super(LayerNormalization, self).__init__() self.eps = eps self.hidden_size = hidden_size self.a2 = nn.Parameter(torch.ones(hidden_size), requires_grad=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.triton_helpers import libdevice import torch.nn as nn assert_size_stride = torch._C._dynamo.guards.assert_size_...
analvikingur/RGAN
LayerNormalization
false
18,310
[ "MIT" ]
8
b1893c2f53d11c9173c7a30f63f6d93d72232493
https://github.com/analvikingur/RGAN/tree/b1893c2f53d11c9173c7a30f63f6d93d72232493
Sum
# 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...
Alex-Beh/hand_tracking
Sum
false
11,150
[ "Apache-2.0" ]
0
40ac39e10ed5815d9400d6a87149015ad6ab9686
https://github.com/Alex-Beh/hand_tracking/tree/40ac39e10ed5815d9400d6a87149015ad6ab9686
ApplyHardAttention
# 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...
ishine/NISQA
ApplyHardAttention
false
15,620
[ "MIT" ]
223
2c8917f30c4e4bbca3a48e9852301f1e2480a741
https://github.com/ishine/NISQA/tree/2c8917f30c4e4bbca3a48e9852301f1e2480a741
GCN
from torch.nn import Module import math import torch import torch.nn as nn import torch.nn.functional as F from torch.nn.parameter import Parameter from torch.nn.modules.module import Module class GraphConvolution(Module): """ Simple GCN layer, similar to https://arxiv.org/abs/1609.02907 """ def __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....
yutaoming/Rare-Category-Detection
GCN
false
4,693
[ "MIT" ]
0
76cf023dff44eef3ecc17f0ebf2b11a08cd63a73
https://github.com/yutaoming/Rare-Category-Detection/tree/76cf023dff44eef3ecc17f0ebf2b11a08cd63a73
SpeakNet
import math import torch import torch.nn as nn import torch.optim def xavier_init(module): """ Xavier initializer for module parameters. """ for parameter in module.parameters(): if len(parameter.data.shape) == 1: parameter.data.fill_(0) else: fan_in = parameter...
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....
aaronmueller/discourse-hw3
SpeakNet
false
1,350
[ "MIT" ]
0
93313a2ce83fde9480914384be52ec9160e967af
https://github.com/aaronmueller/discourse-hw3/tree/93313a2ce83fde9480914384be52ec9160e967af
ScoreCap
import torch from torch import nn import torch.nn import torch.optim class ScoreCap(nn.Module): def __init__(self, cap: 'float'): super().__init__() self.cap = cap def forward(self, input): return torch.clip(input, max=self.cap) def get_inputs(): return [torch.rand([4, 4, 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 import triton_helpers from torch import nn import torch.nn import torch.optim assert_size_stride = torch._C._dy...
mikaylagawarecki/ReAgent
ScoreCap
false
10,696
[ "BSD-3-Clause" ]
0
b1a306a9d3641c8adeb03ac272e5774a0009fa88
https://github.com/mikaylagawarecki/ReAgent/tree/b1a306a9d3641c8adeb03ac272e5774a0009fa88
BertLayerNormNoVar
# 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...
jiachens/auto_LiRPA
BertLayerNormNoVar
false
10,286
[ "BSD-3-Clause" ]
0
cc1ff18e8fbc938953b20ae6a030a25761cb0b78
https://github.com/jiachens/auto_LiRPA/tree/cc1ff18e8fbc938953b20ae6a030a25761cb0b78
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 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....
OneDirection9/Persona-Dialogue-Generation
TransformerEncoderLayer
false
11,792
[ "MIT" ]
0
9696659efe668177bb775dc4192b4b6dd41a9ce1
https://github.com/OneDirection9/Persona-Dialogue-Generation/tree/9696659efe668177bb775dc4192b4b6dd41a9ce1
FusedLeakyReLU
import torch import torch.utils.data import torch import torch.nn as nn import torch.nn.functional as F def fused_leaky_relu(input, bias, negative_slope=0.2, scale=2 ** 0.5): return F.leaky_relu(input + bias, negative_slope) * scale class FusedLeakyReLU(nn.Module): def __init__(self, channel, negative_slop...
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.utils.data import torch import torch.nn as nn import torch.nn.functional as F assert_size_stride = torch._C._dynamo.guards.asse...
a11isonliu/contrastive-unpaired-translation
FusedLeakyReLU
false
9,842
[ "BSD-3-Clause" ]
0
67651ed9877cae121d9398f46094ce8dbc678802
https://github.com/a11isonliu/contrastive-unpaired-translation/tree/67651ed9877cae121d9398f46094ce8dbc678802
Zeros
import torch import torch.optim class Zeros(torch.nn.Module): def __init__(self): super(Zeros, self).__init__() def forward(self, tensor: 'torch.Tensor') ->torch.Tensor: return torch.zeros(1, *tensor.shape[1:], dtype=tensor.dtype, device =tensor.device).expand_as(tensor) def ge...
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.optim assert_size_stride = torch._C._dynamo.guards.assert_size_stride empty_strided_cuda = torch._C._dynamo.guards._empty_strid...
ai-in-motion/moai
Zeros
false
18,344
[ "Apache-2.0" ]
10
e38cac046c059d2e2331ef4883bbabc5a500a5cf
https://github.com/ai-in-motion/moai/tree/e38cac046c059d2e2331ef4883bbabc5a500a5cf
ChannelNorm
# 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 torch.nn as nn assert_size_stride = torch._C._dynamo.guards.assert_size_...
czlwang/s3prl
ChannelNorm
false
12,279
[ "Apache-2.0" ]
0
81d4bb8d051cee20fa87c083b8478999e1766172
https://github.com/czlwang/s3prl/tree/81d4bb8d051cee20fa87c083b8478999e1766172
SelfAttn
# 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....
DreamerDeo/gazp
SelfAttn
false
7,998
[ "MIT" ]
18
5f823a447ffdf5176023a01516d2be7c383294d9
https://github.com/DreamerDeo/gazp/tree/5f823a447ffdf5176023a01516d2be7c383294d9
MulticlassDiceLoss
import torch import torch.nn as nn class DiceLoss(nn.Module): def __init__(self): super(DiceLoss, self).__init__() def forward(self, input, target, logits=True): if logits: input = nn.Sigmoid()(input) N = target.size(0) smooth = 1 input_flat = input.view(N...
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...
LanXiangExcavator/challenge2021_submission_4
MulticlassDiceLoss
false
784
[ "BSD-2-Clause" ]
0
ca0d4d4dd219119f7dc46464c92062ecdb7f9c49
https://github.com/LanXiangExcavator/challenge2021_submission_4/tree/ca0d4d4dd219119f7dc46464c92062ecdb7f9c49
Sigmoid
# 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.triton_helpers import math as tl_math import torch.nn as nn assert_size_stride = torch._C._dynamo.guards.assert...
ashutoshml/lightning-tutorials
Sigmoid
false
6,243
[ "Apache-2.0" ]
1
898b8b6f9852c0b80f034a3187bc1cd34dd521ce
https://github.com/ashutoshml/lightning-tutorials/tree/898b8b6f9852c0b80f034a3187bc1cd34dd521ce
_AddNorm
import torch import torch.nn as nn import torch.nn.functional as F class _TimeDistributedInterpolation(nn.Module): def __init__(self, output_size: 'int', batch_first: 'bool'=False, trainable: 'bool'=False): super().__init__() self.output_size = output_size self.batch_first = batch...
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.functional as F assert_size_stride = torc...
Gian-Wiher/darts
_AddNorm
false
5,206
[ "Apache-2.0" ]
1
0d267e08643e2e3f88163a5d955b8be75840c2f6
https://github.com/Gian-Wiher/darts/tree/0d267e08643e2e3f88163a5d955b8be75840c2f6
SmallMnistNoDropout
# 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....
quic-akhobare/aimet
SmallMnistNoDropout
false
11,114
[ "BSD-3-Clause" ]
0
1811a0ef58a75d103e173731b436876ee5dc4c49
https://github.com/quic-akhobare/aimet/tree/1811a0ef58a75d103e173731b436876ee5dc4c49
Actor
import torch import numpy as np import torch.nn.functional as F import torch.nn as nn def hidden_init(layer): fan_in = layer.weight.data.size()[0] lim = 1.0 / np.sqrt(fan_in) return -lim, lim class Actor(nn.Module): """Actor (Policy) Model.""" def __init__(self, state_size, action_size, seed, f...
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....
adriaciurana/udacity-project-3
Actor
false
9,677
[ "MIT" ]
0
806f78e35a6699eeb0a3272e326d0edc199d16be
https://github.com/adriaciurana/udacity-project-3/tree/806f78e35a6699eeb0a3272e326d0edc199d16be
EqualConv2d
# 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 math from torch import nn assert_size_stride = torch._C._dynamo.guards.as...
BinahHu/stylegan2-pytorch
EqualConv2d
false
166
[ "MIT", "BSD-2-Clause", "Apache-2.0" ]
0
9975707ffd93872fce02f7e3654eb588a09e23e4
https://github.com/BinahHu/stylegan2-pytorch/tree/9975707ffd93872fce02f7e3654eb588a09e23e4
TensorCumsum
# 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...
Minyus/kedex
TensorCumsum
false
9,676
[ "Apache-2.0" ]
0
92f952eed3cb6109bc783f449051f2bd13579d2a
https://github.com/Minyus/kedex/tree/92f952eed3cb6109bc783f449051f2bd13579d2a
DQN
import torch import torch.nn.functional as F import torch.nn as nn class DQN(nn.Module): """A simple deep Q network implementation. Computes Q values for each (action, object) tuple given an input state vector """ def __init__(self, state_dim, action_dim, object_dim, hidden_size=100): super(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 torch.nn as nn assert_...
stepinski/machinelearning
DQN
false
12,998
[ "MIT" ]
0
1f84883a25616da4cd76bb4655267efd3421e561
https://github.com/stepinski/machinelearning/tree/1f84883a25616da4cd76bb4655267efd3421e561
DownBlock
import torch import torch.utils.data from torchvision.transforms import * class ConvBlock(torch.nn.Module): def __init__(self, input_size, output_size, kernel_size=3, stride=1, padding=1, bias=True, activation='prelu', norm=None): super(ConvBlock, self).__init__() self.conv = torch.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 import torch.utils.data from torchvision.transforms import * assert_size_stride ...
RyanMoussouni/iSeeBetter
DownBlock
false
14,360
[ "MIT" ]
327
af193ae0852f8e477fcd6875dce874eb5092a24a
https://github.com/RyanMoussouni/iSeeBetter/tree/af193ae0852f8e477fcd6875dce874eb5092a24a
ResidualBlock
import torch import numpy as np import torch.nn as nn class ConvLayer(nn.Module): def __init__(self, in_channels, out_channels, kernel_size, stride): super(ConvLayer, self).__init__() reflection_padding = int(np.floor(kernel_size / 2)) self.reflection_pad = nn.ReflectionPad2d(reflection_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....
IvoryCandy/neural-style
ResidualBlock
false
5,397
[ "Apache-2.0" ]
1
d9d73676479e36c1cbd6c9af36d857f80099504b
https://github.com/IvoryCandy/neural-style/tree/d9d73676479e36c1cbd6c9af36d857f80099504b
SoftmaxLoss
# 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....
B06901052/s3prl
SoftmaxLoss
false
119
[ "MIT" ]
0
5f63d2df043d2d7c81580cd042fa2cea34746f48
https://github.com/B06901052/s3prl/tree/5f63d2df043d2d7c81580cd042fa2cea34746f48
Combinator
# 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 import torch.autograd assert_size_stride = torch._C._dynamo.guards.assert_size_stride empty_strided_cuda = torch._C._dy...
Goschjann/ssltsc
Combinator
false
17,314
[ "MIT" ]
5
08d6b1bf711bb1c8f19f9bfb66a98d4e423e932e
https://github.com/Goschjann/ssltsc/tree/08d6b1bf711bb1c8f19f9bfb66a98d4e423e932e
BareLoss
import torch import torch.nn as nn class BareLoss(nn.Module): def __init__(self, loss_weight=1.0): super().__init__() self.loss_weight = loss_weight def forward(self, pre_loss): loss = self.loss_weight * pre_loss.mean() return loss def get_inputs(): return [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 import triton_helpers import torch.nn as nn assert_size_stride = torch._C._dynamo.guards.assert_size_stride emp...
JDAI-CV/LIO
BareLoss
false
13,847
[ "Apache-2.0" ]
105
7bcd4d5e2990db5c8a7ec6ecc76a23c2e913e523
https://github.com/JDAI-CV/LIO/tree/7bcd4d5e2990db5c8a7ec6ecc76a23c2e913e523
InnerProductLoss
import torch import numpy as np import torch.nn as nn import torch.utils.data import torch.autograd class InnerProductLoss(nn.Module): def __init__(self, code_weights: 'list'=None): super(InnerProductLoss, self).__init__() if code_weights is not None: self.code_weights = np.array(code...
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 numpy as np import torch.nn as nn import torch.utils.data import torch.a...
LaudateCorpus1/LIGA-Stereo
InnerProductLoss
false
13,985
[ "Apache-2.0" ]
56
aee3731a24a0ab1667e633e520cc89be2f135272
https://github.com/LaudateCorpus1/LIGA-Stereo/tree/aee3731a24a0ab1667e633e520cc89be2f135272
SplitChannels
import torch class SplitChannels(torch.nn.Module): def __init__(self, split_location): super(SplitChannels, self).__init__() self.split_location = split_location def forward(self, x): a, b = x[:, :self.split_location], x[:, self.split_location:] a, b = a.clone(), b.clone() ...
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...
Myyyr/segmentation
SplitChannels
false
859
[ "MIT" ]
0
6b9423e327cff1eb23599404031b7fb8e9ecf75d
https://github.com/Myyyr/segmentation/tree/6b9423e327cff1eb23599404031b7fb8e9ecf75d
BNMLoss
import torch class BNMLoss(torch.nn.Module): """ Implementation of the loss in [Towards Discriminability and Diversity: Batch Nuclear-norm Maximization under Label Insufficient Situations](https://arxiv.org/abs/2003.12237). """ def forward(self, x): """""" x = torch.nn.fun...
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...
KevinMusgrave/pytorch-adapt
BNMLoss
false
13,950
[ "MIT" ]
131
ff1491e1bfcc586afb8ee619712c8816ddf10358
https://github.com/KevinMusgrave/pytorch-adapt/tree/ff1491e1bfcc586afb8ee619712c8816ddf10358
BlendConv2d
# 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 import torch.utils.data assert_size_stride = torch._C._dyn...
D-hash-code/ffjord
BlendConv2d
false
11,375
[ "MIT" ]
0
3647ab35537a8bac3b4dc1e45a593819ac8e2c18
https://github.com/D-hash-code/ffjord/tree/3647ab35537a8bac3b4dc1e45a593819ac8e2c18
Linear_QNet
import torch import torch.nn as nn class Linear_QNet(nn.Module): def __init__(self, input_size, hidden_size_1, hidden_size_2, output_size): super().__init__() self.linear1 = nn.Linear(input_size, hidden_size_1) self.leakyrelu = nn.LeakyReLU() self.linear2 = nn.Linear(hidden_size_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 import torch.nn as nn assert_size_stride = torch._C._dynamo.guards.assert_size_s...
cheapmouse94/Machine-Learning-tank1990-python
Linear_QNet
false
3,281
[ "MIT" ]
0
8b75983289c7bc0831827561cec12d4ad2addee2
https://github.com/cheapmouse94/Machine-Learning-tank1990-python/tree/8b75983289c7bc0831827561cec12d4ad2addee2
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 ...
Hao-Kailong/DisFeb
Encoder
false
522
[ "MIT" ]
0
2877edd587556e127d6648ee211ed22838c8d015
https://github.com/Hao-Kailong/DisFeb/tree/2877edd587556e127d6648ee211ed22838c8d015
CNNLayer
# 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...
WiseDoge/Text-Classification-PyTorch
CNNLayer
false
18,095
[ "MIT" ]
6
9371eeed6bd7ecf1d529c8f2a6c997fcde67a559
https://github.com/WiseDoge/Text-Classification-PyTorch/tree/9371eeed6bd7ecf1d529c8f2a6c997fcde67a559
Encoding
# 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 from torch._inductor.runtime.triton_helpers import math as tl_math import torch.nn as nn ...
SeHwanJoo/mmsegmentation_body
Encoding
false
1,044
[ "Apache-2.0" ]
0
31c4bf27c3dc0a84bfbb06a0c017c5908c17f0ac
https://github.com/SeHwanJoo/mmsegmentation_body/tree/31c4bf27c3dc0a84bfbb06a0c017c5908c17f0ac
AdaptiveInstanceNorm
import torch import torch.nn as nn class AdaptiveInstanceNorm(nn.Module): def __init__(self, style_dim, in_channel): super(AdaptiveInstanceNorm, self).__init__() self.norm = nn.InstanceNorm2d(in_channel) self.style = nn.Linear(style_dim, in_channel * 2) self.style.bias.data[:in_ch...
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 ...
williamyang1991/DeepPS
AdaptiveInstanceNorm
false
11,098
[ "MIT" ]
0
f3eb6ba4b0f2ef068361a4bbbd3d6c2c2f6726b4
https://github.com/williamyang1991/DeepPS/tree/f3eb6ba4b0f2ef068361a4bbbd3d6c2c2f6726b4
SelfAttention
import torch import torch.nn as nn from scipy.sparse import * class SelfAttention(nn.Module): def __init__(self, input_size, hidden_size): super(SelfAttention, self).__init__() self.W1 = torch.Tensor(input_size, hidden_size) self.W1 = nn.Parameter(nn.init.xavier_uniform_(self.W1)) ...
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....
talha1503/RL-based-Graph2Seq-for-NQG
SelfAttention
false
16,522
[ "Apache-2.0" ]
100
1039e0b6231ae7029ea6e4073b1e55df5ad2e928
https://github.com/talha1503/RL-based-Graph2Seq-for-NQG/tree/1039e0b6231ae7029ea6e4073b1e55df5ad2e928
SimpleStackModel
# 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.jit import torch.onnx import torch.nn assert_size_stride = torch._C._dynamo.guards.assert_size_stride empty_strided_cuda = torc...
YaronBenAtar/glow
SimpleStackModel
false
14,688
[ "Apache-2.0" ]
2,838
a13706a4239fa7eaf059c670dc573e3eb0768f86
https://github.com/YaronBenAtar/glow/tree/a13706a4239fa7eaf059c670dc573e3eb0768f86
KLDivLoss
import torch class KLDivLoss(torch.nn.KLDivLoss): def __init__(self, reduction='none'): super().__init__(reduction=reduction) def forward(self, preds, targets): """ Applies ``log_softmax`` to ``pred`` and ``softmax`` to ``targets`` prior to computing KL-Divergence loss. These...
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 assert_size...
Thesys-lab/learned-coded-computation
KLDivLoss
false
17,997
[ "Apache-2.0" ]
8
c5c32bcfb7cc4a9f52079f648373e6972c19eff9
https://github.com/Thesys-lab/learned-coded-computation/tree/c5c32bcfb7cc4a9f52079f648373e6972c19eff9
ILN
import torch import torch.nn as nn from torch.nn.parameter import Parameter class ILN(nn.Module): def __init__(self, num_features, eps=1e-05, momentum=0.9, using_moving_average=True, using_bn=False): super(ILN, self).__init__() self.eps = eps self.momentum = momentum self....
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 import torc...
Elvinky/IEGAN
ILN
false
8,063
[ "MIT" ]
29
db072e38fb022b367da24d3210c59136fbad224e
https://github.com/Elvinky/IEGAN/tree/db072e38fb022b367da24d3210c59136fbad224e
PADB
# 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.utils.data import torch.nn as nn assert_size_stride = torch._C._dyn...
qwopqwop200/Fast-Invertible-Rescaling-Net
PADB
false
7,545
[ "MIT" ]
1
871733f2eee7929d6b37c4d1d6a27347b39b67a9
https://github.com/qwopqwop200/Fast-Invertible-Rescaling-Net/tree/871733f2eee7929d6b37c4d1d6a27347b39b67a9
MyDilateBlur
# 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 from torch._inductor.runtime import triton_helpers import math import torch.nn a...
williamyang1991/DeepPS
MyDilateBlur
false
11,104
[ "MIT" ]
0
f3eb6ba4b0f2ef068361a4bbbd3d6c2c2f6726b4
https://github.com/williamyang1991/DeepPS/tree/f3eb6ba4b0f2ef068361a4bbbd3d6c2c2f6726b4
MyMaxPool1dPadSame
import torch import torch.nn as nn import torch.nn.functional as F class MyMaxPool1dPadSame(nn.Module): """ extend nn.MaxPool1d to support SAME padding """ def __init__(self, kernel_size): super(MyMaxPool1dPadSame, self).__init__() self.kernel_size = kernel_size self.stride = ...
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...
huynhnhathao/hum_to_find
MyMaxPool1dPadSame
false
6,833
[ "MIT" ]
1
a0d7ec4bab1a7e2f7175956ff2721e23e2448840
https://github.com/huynhnhathao/hum_to_find/tree/a0d7ec4bab1a7e2f7175956ff2721e23e2448840
VGGBase
import torch import torchvision from torch import nn import torch.nn.functional as F from itertools import product as product import torch.optim import torch.utils.data def decimate(tensor, m): """ Decimate a tensor by a factor 'm', i.e. downsample by keeping every 'm'th value. This is used when we conve...
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 torchvision from torch...
aarashfeizi/a-PyTorch-Tutorial-to-Object-Detection
VGGBase
false
1,906
[ "MIT" ]
0
a9e1f3092d4b8c094bff5cd0897e0e3c1e0bc9c2
https://github.com/aarashfeizi/a-PyTorch-Tutorial-to-Object-Detection/tree/a9e1f3092d4b8c094bff5cd0897e0e3c1e0bc9c2
SEBlock
# 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 import t...
gentlebreeze1/dbnet
SEBlock
false
3,538
[ "Apache-2.0" ]
0
be28a7ae835af7d6f8b7c2b636b875adc9fc187c
https://github.com/gentlebreeze1/dbnet/tree/be28a7ae835af7d6f8b7c2b636b875adc9fc187c
TorchClampMin
# 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 assert_size_stride = torch._C._dynamo.guards.assert_size_stride empty_strided_cuda = torc...
bunderhi/torch2trt
TorchClampMin
false
1,611
[ "MIT" ]
0
fa5e31e742a0f0c9a9ee38909a6fa56bb07ba96d
https://github.com/bunderhi/torch2trt/tree/fa5e31e742a0f0c9a9ee38909a6fa56bb07ba96d
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....
Gan-Tu/ganutils
SelfAttention
false
5,193
[ "MIT" ]
1
203c703cbba0345f9cfe23b03e1e3981f03e43db
https://github.com/Gan-Tu/ganutils/tree/203c703cbba0345f9cfe23b03e1e3981f03e43db
l1normalization
import torch import torch.nn as nn class l1normalization(nn.Module): def __init__(self, scale): super(l1normalization, self).__init__() self.scale = scale def forward(self, x, dim=1): return self.scale * x * x.pow(1).sum(dim).clamp(min=1e-12).rsqrt( ).expand_as(x) def g...
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...
kensakurada/SceneChangeDet
l1normalization
false
15,792
[ "MIT" ]
199
0530e0162863fec0c5296188526f0d27e0109814
https://github.com/kensakurada/SceneChangeDet/tree/0530e0162863fec0c5296188526f0d27e0109814
BertAttention
from _paritybench_helpers import _mock_config import math import torch from torch import nn class BertLayerNorm(nn.Module): def __init__(self, hidden_size, eps=1e-05): """Construct a layernorm module in the TF style (epsilon inside the square root). """ super(BertLayerNorm, 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 from torch._inductor.runtime import triton_helpers from torch._inductor.runtime....
caldoe/BERT-NL2SPARQL
BertAttention
false
6,386
[ "MIT" ]
1
2e09c1aeffc855bc7f1dc8c182e21153b2bc73a8
https://github.com/caldoe/BERT-NL2SPARQL/tree/2e09c1aeffc855bc7f1dc8c182e21153b2bc73a8
PatchEmbeddings
from torch.nn import Module import torch from torch import nn import torch.utils.data import torch.nn.functional import torch.autograd class PatchEmbeddings(Module): """ <a id="PatchEmbeddings"></a> ## Get patch embeddings The paper splits the image into patches of equal size and do a linear transfo...
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.nn import Module from torch import nn import torch.utils.data import ...
techthiyanes/annotated_deep_learning_paper_implementations
PatchEmbeddings
false
16,573
[ "MIT" ]
3,714
8af24da2dd39a9a87482a4d18c2dc829bbd3fd47
https://github.com/techthiyanes/annotated_deep_learning_paper_implementations/tree/8af24da2dd39a9a87482a4d18c2dc829bbd3fd47
LayerNorm
import torch from torch import nn from torch.nn import Parameter from torch.nn.parameter import Parameter import torch.nn.utils from torch.optim.lr_scheduler import * class LayerNorm(nn.Module): def __init__(self, hidden_size, eps=0.0001): super(LayerNorm, self).__init__() self.alpha = Parameter(...
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 from torch.nn import Parameter from torch.nn.parameter imp...
FalconX777/CharacterBert_Multitasking
LayerNorm
false
11,509
[ "BSD-3-Clause" ]
0
eab566975871fffd0ec875a05ba478f1bce9b0ab
https://github.com/FalconX777/CharacterBert_Multitasking/tree/eab566975871fffd0ec875a05ba478f1bce9b0ab
SamePadConv3d
# 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...
AshBT/VideoGPT
SamePadConv3d
false
13,313
[ "MIT" ]
396
a823bc734af3387129f3bd624caad3db270707f2
https://github.com/AshBT/VideoGPT/tree/a823bc734af3387129f3bd624caad3db270707f2
LogCoshLoss
# 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.triton_helpers import libdevice, math as tl_math assert_size_stride = torch._C._dynamo.guards.assert_size_strid...
leoauri/auraloss
LogCoshLoss
false
15,904
[ "Apache-2.0" ]
272
0e3362674ae1b53aa61c6a631fb4e6970c5683c1
https://github.com/leoauri/auraloss/tree/0e3362674ae1b53aa61c6a631fb4e6970c5683c1
ASC
import torch import torch.optim import torch.nn as nn import torch.nn.init class ASC(nn.Module): def __init__(self, a=3.5): super().__init__() self.a = a def forward(self, input): return torch.div(torch.exp(self.a * input), torch.sum(torch.exp( self.a * input), 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._inductor.runtime.triton_helpers import math as tl_math import torch.optim import torch.nn as nn import torch.nn.init assert_size...
RichardScottOZ/UnDIP
ASC
false
8,714
[ "Apache-2.0" ]
10
8e4a39801142495e785cfbae0744872729fa3fac
https://github.com/RichardScottOZ/UnDIP/tree/8e4a39801142495e785cfbae0744872729fa3fac
SobelConv
# 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 math as tl_math import torch....
SeVEnMY/hyper-reconstruction
SobelConv
false
5,807
[ "MIT" ]
1
018c34aaf6884650c36a73bd7f4635f927a79da3
https://github.com/SeVEnMY/hyper-reconstruction/tree/018c34aaf6884650c36a73bd7f4635f927a79da3
NegSamplingLoss
# 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 assert_size_stride = torch._C._dynamo.guards.assert_size_stride emp...
MIracleyin/RecBole-notebook
NegSamplingLoss
false
9,560
[ "MIT" ]
0
ef32b3e57a297ff4889dec1f63c7984f8f901a23
https://github.com/MIracleyin/RecBole-notebook/tree/ef32b3e57a297ff4889dec1f63c7984f8f901a23
PositionwiseFeedForward
import torch import torch.nn as nn class LayerNormalization(nn.Module): """ Layer normalization module """ def __init__(self, d_hid, eps=0.001): super(LayerNormalization, self).__init__() self.eps = eps self.a_2 = nn.Parameter(torch.ones(d_hid), requires_grad=True) self.b_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 from torch._inductor.runtime....
awesome-archive/attention-is-all-you-need-pytorch
PositionwiseFeedForward
false
9,847
[ "MIT" ]
0
d1fb26fafaf7170a7c3a45968cd555f3c6aeb3bc
https://github.com/awesome-archive/attention-is-all-you-need-pytorch/tree/d1fb26fafaf7170a7c3a45968cd555f3c6aeb3bc
AlexNet
import torch import torch.nn as nn class LRN(nn.Module): """ Local Response Normalization """ def __init__(self, kernel_size, alpha, beta): super(LRN, self).__init__() self.avg_pool = nn.AvgPool2d(kernel_size=kernel_size, stride=1, padding=int(kernel_size / 2)) sel...
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....
jjeamin/obJDetection
AlexNet
false
7,088
[ "MIT" ]
1
eb7fbc410beb00fad1a6477e827e9ce2d8efbac5
https://github.com/jjeamin/obJDetection/tree/eb7fbc410beb00fad1a6477e827e9ce2d8efbac5
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 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...
awlange/pysurvival
Gaussian
false
14,925
[ "Apache-2.0" ]
242
841b9bc6ce700ba8898d2a1488aa9cd25ee7a8e6
https://github.com/awlange/pysurvival/tree/841b9bc6ce700ba8898d2a1488aa9cd25ee7a8e6
_ASPPModule
import torch import torch.nn as nn class GCT(nn.Module): def __init__(self, num_channels, epsilon=1e-05, mode='l2', after_relu=False ): super(GCT, self).__init__() self.alpha = nn.Parameter(torch.ones(1, num_channels, 1, 1)) self.gamma = nn.Parameter(torch.zeros(1, num_channels, 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 from torch._inductor.runtime....
huanglf714/COMatchNet
_ASPPModule
false
6,832
[ "Apache-2.0" ]
1
79023f5be65d354eb9bdac026d7e0d73110bc4aa
https://github.com/huanglf714/COMatchNet/tree/79023f5be65d354eb9bdac026d7e0d73110bc4aa
MagnitudeTestModel
import torch from torch import nn from torchvision import models as models import torch.nn.parallel import torch.optim import torch.utils.data import torch.utils.data.distributed from torchvision.transforms import * import torch.onnx def fill_bias(module, value): module.bias.data.fill_(value) def fill_conv_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 import nn from torchvision import models as models import torch.nn.pa...
aalborov/openvino_training_extensions
MagnitudeTestModel
false
6,038
[ "Apache-2.0" ]
1
a0bb39424151a98e1ca80c4aa5c865636d401785
https://github.com/aalborov/openvino_training_extensions/tree/a0bb39424151a98e1ca80c4aa5c865636d401785
ConvEncoder
import torch import numpy as np import torch.nn as nn from typing import Tuple def to_sate_tensor(s, device): """ converts a numpy array to a Tensor suitable for passing through DQNs """ return torch.from_numpy(s) class ConvEncoder(nn.Module): def __init__(self, state_shape: 'Tuple', device=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 import torch.nn as nn from ty...
jondeaton/AgarAI
ConvEncoder
false
6,986
[ "MIT" ]
1
0c60896465a969ba6832a4b417cf6199715799a1
https://github.com/jondeaton/AgarAI/tree/0c60896465a969ba6832a4b417cf6199715799a1
DIAYNBaselineModel
import torch import torch.nn as nn class DIAYNBaselineModel(nn.Module): """The model that computes V(s)""" def __init__(self, n_observations, n_hidden, n_policies): super().__init__() self.linear = nn.Linear(n_observations, n_hidden) self.linear2 = nn.Linear(n_hidden, n_policies) ...
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 ...
Purple-PI/rlstructures
DIAYNBaselineModel
false
14,252
[ "MIT" ]
281
9b201b083715bbda2f3534b010c84e11dfc0a1c7
https://github.com/Purple-PI/rlstructures/tree/9b201b083715bbda2f3534b010c84e11dfc0a1c7
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 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....
tan-huaiyu/Network_science-and-Evolutionary_dynamics
Discriminator
false
13,024
[ "Apache-2.0" ]
0
4bdaaed18c6f230213fd69a31144db8e97eb0c7b
https://github.com/tan-huaiyu/Network_science-and-Evolutionary_dynamics/tree/4bdaaed18c6f230213fd69a31144db8e97eb0c7b
SoftmaxLoss
import torch import torch.utils.cpp_extension class SoftmaxLoss(torch.nn.Module): def __init__(self, tau=1.0): super().__init__() self.tau = tau self.ce_loss = torch.nn.CrossEntropyLoss() def forward(self, pred, true): logits = pred / self.tau l = self.ce_loss(logits,...
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.utils.cpp...
crobbins327/semanticGAN_WSI
SoftmaxLoss
false
1,755
[ "BSD-2-Clause", "MIT" ]
0
4046ddc822f463e03952402247f79d540bf7be95
https://github.com/crobbins327/semanticGAN_WSI/tree/4046ddc822f463e03952402247f79d540bf7be95
PerOutputClassifierHead
# 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.nn import Module i...
SpyrosMouselinos/DeltaFormers
PerOutputClassifierHead
false
5,882
[ "Apache-2.0" ]
1
38508fa9b85f2c50aa0031b67e7e8feff1a75b27
https://github.com/SpyrosMouselinos/DeltaFormers/tree/38508fa9b85f2c50aa0031b67e7e8feff1a75b27
ToRGB
# 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.autograd import Function import math from torch import nn from torch....
BinahHu/stylegan2-pytorch
ToRGB
false
183
[ "MIT", "BSD-2-Clause", "Apache-2.0" ]
0
9975707ffd93872fce02f7e3654eb588a09e23e4
https://github.com/BinahHu/stylegan2-pytorch/tree/9975707ffd93872fce02f7e3654eb588a09e23e4
ResidualSequential
import torch import torch.optim import torch.nn as nn import torch import torch.nn.init class ResidualSequential(nn.Sequential): def __init__(self, *args): super(ResidualSequential, self).__init__(*args) def forward(self, x): out = super(ResidualSequential, self).forward(x) x_ = None...
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.optim import torch.nn as nn import torch import torch.nn.init assert_size_stride = torch._C._dynamo.guards.assert_size_stride e...
Jay-Lewis/phase_retrieval
ResidualSequential
false
17,446
[ "MIT" ]
4
799cef92852c53e62e2a548f605652923e979456
https://github.com/Jay-Lewis/phase_retrieval/tree/799cef92852c53e62e2a548f605652923e979456
ExponentialUpdate
# 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 from torch.jit import Final assert_size_stride = torch._C._dynamo.guards.assert_size_stride empty_strided_cuda = torch....
Rikorose/clc-dns-challenge-2020
ExponentialUpdate
false
8,694
[ "Apache-2.0" ]
12
4f1c078691327a75b3a338fe372ba356b450a6da
https://github.com/Rikorose/clc-dns-challenge-2020/tree/4f1c078691327a75b3a338fe372ba356b450a6da
L2Norm
import torch import torch.nn as nn import torch.nn.init class L2Norm(nn.Module): def __init__(self): super(L2Norm, self).__init__() self.eps = 1e-10 def forward(self, x): norm = torch.sqrt(torch.sum(x * x, dim=1) + self.eps) x = x / norm.unsqueeze(-1).expand_as(x) 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.triton_helpers import libdevice import torch.nn as nn import torch.nn.init assert_size_stride = torch._C._dynam...
keeeeenw/image-matching-benchmark-baselines
L2Norm
false
15,785
[ "Apache-2.0" ]
103
1a11bedbe3c57f477ab9de302591811115ada37a
https://github.com/keeeeenw/image-matching-benchmark-baselines/tree/1a11bedbe3c57f477ab9de302591811115ada37a
TOP1Loss
# 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...
Ethan-Yys/GRU4REC-pytorch-master
TOP1Loss
false
2,218
[ "Apache-2.0" ]
0
175ccb851f881d3506680c459491e76f50aa9898
https://github.com/Ethan-Yys/GRU4REC-pytorch-master/tree/175ccb851f881d3506680c459491e76f50aa9898
NsKlCriterion
# 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.functi...
johnson7788/mt-dnn
NsKlCriterion
false
3,899
[ "MIT" ]
0
26e5c4a5bfdbf1a1dd1c903e606db1c070568237
https://github.com/johnson7788/mt-dnn/tree/26e5c4a5bfdbf1a1dd1c903e606db1c070568237
DepthGTLoss
# 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....
simon-donne/defusr
DepthGTLoss
false
16,469
[ "MIT" ]
65
fa4275070af4024eea128e99d7c6df2358d129a5
https://github.com/simon-donne/defusr/tree/fa4275070af4024eea128e99d7c6df2358d129a5
SimpleSumModule
# 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.jit import torch.onnx import torch.nn assert_size_stride = torch._C._dynamo....
andreas-hommel/glow
SimpleSumModule
false
3,354
[ "Apache-2.0" ]
0
2bbbf8188a2a941e85677c83f2146bbd076a262e
https://github.com/andreas-hommel/glow/tree/2bbbf8188a2a941e85677c83f2146bbd076a262e
MLP3_hardsig
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 MLP3_hardsig(nn.Module): def __init__(self, width=512, p=0.5): super(MLP3_hardsig, self).__init__() self.fc1 = 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 from torch._inductor.runtime....
RuokaiYin/UnarySim
MLP3_hardsig
false
5,784
[ "MIT" ]
1
343ff9abf356a63d526b1df8eb946ad528690a27
https://github.com/RuokaiYin/UnarySim/tree/343ff9abf356a63d526b1df8eb946ad528690a27
MetricLoss
import torch import torch.nn as nn import torch.jit import torch.nn class MetricLoss(nn.Module): """Loss designed to train a true metric, as opposed to a sigmoid classifier. """ def __init__(self): super(MetricLoss, self).__init__() def forward(self, input, target): weight = 1.0 - ta...
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.jit import torch.nn assert_size_stride = torch._C._dyn...
ankmathur96/torchsupport
MetricLoss
false
3,160
[ "MIT" ]
0
77bf4a90b8770a408665e2604428808c3ed2f979
https://github.com/ankmathur96/torchsupport/tree/77bf4a90b8770a408665e2604428808c3ed2f979
SwiGLU
# 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...
Actis92/pytorch_tabular
SwiGLU
false
4,798
[ "MIT" ]
1
78dabf5e7b97d8ff24db4bc83d9d0a2273941bbe
https://github.com/Actis92/pytorch_tabular/tree/78dabf5e7b97d8ff24db4bc83d9d0a2273941bbe
ReuseLayerNet
# 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.functional assert_size_stride = torch._C._dynamo.guards.assert_s...
elad-c/model_optimization
ReuseLayerNet
false
10,655
[ "Apache-2.0" ]
0
b0ecf41c3f9434008d57d7fe724ff8585e19d4cc
https://github.com/elad-c/model_optimization/tree/b0ecf41c3f9434008d57d7fe724ff8585e19d4cc
GraphLearner
# 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....
Originofamonia/vqa-project
GraphLearner
false
925
[ "Apache-2.0" ]
0
cf67b62ddf5732881dfb4278478accfd15c4df6d
https://github.com/Originofamonia/vqa-project/tree/cf67b62ddf5732881dfb4278478accfd15c4df6d
BinaryCrossEntropyLabelSmooth
import torch class BinaryCrossEntropyLabelSmooth(torch.nn.BCEWithLogitsLoss): def __init__(self, num_classes, epsilon=0.1, weight=None, size_average= None, reduce=None, reduction='mean', pos_weight=None): super(BinaryCrossEntropyLabelSmooth, self).__init__(weight, size_average, reduce...
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 assert_size...
NehzUx/autodl
BinaryCrossEntropyLabelSmooth
false
8,580
[ "Apache-2.0" ]
25
c80fdc4b297ed1ec2b9e6911d313f1fe31d83cb9
https://github.com/NehzUx/autodl/tree/c80fdc4b297ed1ec2b9e6911d313f1fe31d83cb9
_AddNorm
import torch import torch.nn as nn import torch.nn.functional as F class _TimeDistributedInterpolation(nn.Module): def __init__(self, output_size: 'int', batch_first: 'bool'=False, trainable: 'bool'=False): super().__init__() self.output_size = output_size self.batch_first = batch...
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.functional as F assert_size_stride = torc...
amadejkocbek/darts
_AddNorm
false
12,105
[ "Apache-2.0" ]
0
074be2a76eee11258da066878c564badf40834e9
https://github.com/amadejkocbek/darts/tree/074be2a76eee11258da066878c564badf40834e9
ConcatenatedAttention
import torch import torch.optim import torch.utils.data from torch import nn class ConcatenatedAttention(nn.Module): """ ConcatenatedAttention module which uses concatenation of encoder and decoder attention vectors instead of summing them up """ def __init__(self, encoder_dim, decoder_dim, atten...
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....
enesmsahin/ShowAttendTell
ConcatenatedAttention
false
3,472
[ "MIT" ]
0
ae94b9a61c3b7e6f2302b9fd4477b6a3e14a33fe
https://github.com/enesmsahin/ShowAttendTell/tree/ae94b9a61c3b7e6f2302b9fd4477b6a3e14a33fe
Rectifier
# 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.optim assert_size_stride = torch._C._dynamo.guards.ass...
ovechkinVT/SkipRNN
Rectifier
false
7,433
[ "MIT" ]
1
7c1f37349d464b1b6bf8835520abad22b199f1ad
https://github.com/ovechkinVT/SkipRNN/tree/7c1f37349d464b1b6bf8835520abad22b199f1ad
EQ
import torch class EQ(torch.nn.Module): def __init__(self): super(EQ, self).__init__() def forward(self, x, y): return x == y def get_inputs(): return [torch.rand([4, 4, 4, 4]), 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 assert_size_stride = torch._C._dynamo.guards.assert_size_stride empty_strided_cuda = torch._C._dynamo.guards._empty_strided_cuda @triton.j...
PogChamper/torch2trt
EQ
false
14,180
[ "MIT" ]
3,363
43b12627ec0de4d212efb6d02b07570205085ccc
https://github.com/PogChamper/torch2trt/tree/43b12627ec0de4d212efb6d02b07570205085ccc
angularLoss
# 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 libdevice import torch.nn as nn assert...
MingzheWu418/plastering
angularLoss
false
9,322
[ "MIT" ]
0
322531e934c3acf2ecc8f520b37a6d255b9959c2
https://github.com/MingzheWu418/plastering/tree/322531e934c3acf2ecc8f520b37a6d255b9959c2