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
SimpleReciprocalModel
import torch import torch.jit import torch.onnx import torch.nn class SimpleReciprocalModel(torch.nn.Module): def __init__(self, inplace=False): super(SimpleReciprocalModel, self).__init__() self.inplace = inplace def forward(self, tensor): other = tensor + tensor return othe...
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...
opti-mix/glow
SimpleReciprocalModel
false
7,410
[ "Apache-2.0" ]
1
4ba074df5da9822986a23a6679ab592c22660f6d
https://github.com/opti-mix/glow/tree/4ba074df5da9822986a23a6679ab592c22660f6d
BertPredictionHead
# 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....
adymaharana/VLCStoryGan
BertPredictionHead
false
18,257
[ "MIT" ]
10
74112404689e8144c2ed2d375e1e5a1cde09debb
https://github.com/adymaharana/VLCStoryGan/tree/74112404689e8144c2ed2d375e1e5a1cde09debb
PerceptualLoss
import torch import torch.nn as nn import torch.nn.functional as F class PerceptualLoss(nn.Module): def __init__(self): super().__init__() self.tgt_gm = None def gram_matrix(self, x): a, b, c, d = x.shape features = x.view(a * b, c * d) G = torch.mm(features, 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 import torch.nn as nn assert_...
aadhithya/mobilenet-styletransfer
PerceptualLoss
false
9,668
[ "MIT" ]
0
58e2c29020864d82d92d52d01427618bc35773fd
https://github.com/aadhithya/mobilenet-styletransfer/tree/58e2c29020864d82d92d52d01427618bc35773fd
MeanVoxelFeatureExtractor
import torch import torch.nn as nn class VoxelFeatureExtractor(nn.Module): def __init__(self, **kwargs): super().__init__() def get_output_feature_dim(self): raise NotImplementedError def forward(self, **kwargs): raise NotImplementedError class MeanVoxelFeatureExtractor(VoxelF...
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...
AndyYuan96/MVF-End-to-End-Multi-View-Fusion-for-3D-Object-Detection-in-LiDAR-Point-Clouds-
MeanVoxelFeatureExtractor
false
13,250
[ "Apache-2.0" ]
55
cf34897f25353a3f348d0a39c8db5ba15cadb2d7
https://github.com/AndyYuan96/MVF-End-to-End-Multi-View-Fusion-for-3D-Object-Detection-in-LiDAR-Point-Clouds-/tree/cf34897f25353a3f348d0a39c8db5ba15cadb2d7
VGGASPP
import torch from torch import nn class FCReLUDrop(nn.Sequential): def __init__(self, in_ch, out_ch, kernel_size, dilation, padding, layer_idx, branch_idx): super(FCReLUDrop, self).__init__() self.add_module(f'fc{layer_idx}_{branch_idx}', nn.Conv2d(in_ch, out_ch, 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 import nn assert_s...
HAL-42/DeepLabV2YQ
VGGASPP
false
524
[ "Apache-2.0" ]
0
96bfcf1055da7adeb4a7c1ed841f6ec29957be59
https://github.com/HAL-42/DeepLabV2YQ/tree/96bfcf1055da7adeb4a7c1ed841f6ec29957be59
ScalarMix
# 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 import torch.nn as nn assert_size_stride = torch._C._dynamo.guards.assert...
ashim95/parser
ScalarMix
false
6,240
[ "MIT" ]
1
61e9cd6bf16dcf1aa2b9d51b3a6c04ed048b3199
https://github.com/ashim95/parser/tree/61e9cd6bf16dcf1aa2b9d51b3a6c04ed048b3199
AnchorFlatten
# 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 import torch.utils.data assert_size_stride = torch._C._dynamo.guards.assert_size_stride empty_strided_cuda = torch._C....
AIpakchoi/visualDet3D
AnchorFlatten
false
4,757
[ "Apache-2.0" ]
1
920f6f8ea44eac4c1896b7d157c015e039ac39f9
https://github.com/AIpakchoi/visualDet3D/tree/920f6f8ea44eac4c1896b7d157c015e039ac39f9
ResBlock
import torch import torch.nn as nn def set_activate_layer(types): if types == 'relu': activation = nn.ReLU() elif types == 'lrelu': activation = nn.LeakyReLU(0.2) elif types == 'tanh': activation = nn.Tanh() elif types == 'sig': activation = nn.Sigmoid() elif types ...
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....
innerverz/CodeTemplate
ResBlock
false
3,681
[ "MIT" ]
0
a20f5d24b0b79871aa39b5cde33e3bb4d2507d13
https://github.com/innerverz/CodeTemplate/tree/a20f5d24b0b79871aa39b5cde33e3bb4d2507d13
L2Norm
# 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 from math import sqrt as sqrt from itertools import produ...
Atine/pytorch.SSD.handles
L2Norm
false
8,824
[ "MIT" ]
0
ff57ceacc57f195361adceb92a84d54d155ba1a4
https://github.com/Atine/pytorch.SSD.handles/tree/ff57ceacc57f195361adceb92a84d54d155ba1a4
GRU122
# 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 ...
smeznar/ProGED
GRU122
false
10,805
[ "BSD-3-Clause" ]
0
191cfd2b7b1fece819109a4b61e3f7533332fd74
https://github.com/smeznar/ProGED/tree/191cfd2b7b1fece819109a4b61e3f7533332fd74
Centered_Grad
import torch import torch.nn as nn class Centered_Grad(nn.Module): def __init__(self): super(Centered_Grad, self).__init__() self.x_ker_init = torch.tensor([[[[-0.5, 0, 0.5]]]], dtype=torch. float, requires_grad=True) self.y_ker_init = torch.tensor([[[[-0.5], [0], [0.5]]]], dt...
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...
AmazingAng/pytorch-tvnet
Centered_Grad
false
7,653
[ "MIT" ]
12
e880d3ce15f55e5d9a11b423cfd1e0461de4fedb
https://github.com/AmazingAng/pytorch-tvnet/tree/e880d3ce15f55e5d9a11b423cfd1e0461de4fedb
dy_mixprop
# 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....
kevin-xuan/Traffic-Benchmark
dy_mixprop
false
15,865
[ "MIT" ]
120
b9f8e40b4df9b58f5ad88432dc070cbbbcdc0228
https://github.com/kevin-xuan/Traffic-Benchmark/tree/b9f8e40b4df9b58f5ad88432dc070cbbbcdc0228
MCDO
# 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...
Daniil-Selikhanovych/bnn-vi
MCDO
false
17,196
[ "MIT" ]
3
6788edc1438c66609abca249e33a81da7a0ff1a2
https://github.com/Daniil-Selikhanovych/bnn-vi/tree/6788edc1438c66609abca249e33a81da7a0ff1a2
AELossPureCls
# 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.cuda assert_size_stride = torch._C._dynamo.guards.asse...
abhithosar/chartocr_cv
AELossPureCls
false
6,070
[ "BSD-3-Clause" ]
1
388b95710a02ded0532b021f64c58d8d3e1cc639
https://github.com/abhithosar/chartocr_cv/tree/388b95710a02ded0532b021f64c58d8d3e1cc639
AvgPool2d
from torch.nn import Module import torch import torch as th class AvgPool2d(Module): """ This class is the beginning of an exact python port of the torch.nn.AvgPool2d module. Because PySyft cannot hook into layers which are implemented in C++, our special functionalities (such as encrypted computation...
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 assert_size_stride = torch._C._dynamo.guards.assert_size_stride empty_strided_cuda = torch._C._dynamo.guards._em...
Rahul-160/PySyft
AvgPool2d
false
17,833
[ "Apache-2.0" ]
7
182627db2369d6f93aa0667f5ea2abee5b878d58
https://github.com/Rahul-160/PySyft/tree/182627db2369d6f93aa0667f5ea2abee5b878d58
BasicConvBlock
# 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 from torch import n...
royerloic/aydin
BasicConvBlock
false
16,345
[ "BSD-3-Clause" ]
78
f9c61a24030891d008c318b250da5faec69fcd7d
https://github.com/royerloic/aydin/tree/f9c61a24030891d008c318b250da5faec69fcd7d
CRFLoss
# 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 ...
Johannes0Horn/mtl-dts
CRFLoss
false
8,362
[ "MIT" ]
19
ae50253c808bbb77af3b1117f69f08d2268099e9
https://github.com/Johannes0Horn/mtl-dts/tree/ae50253c808bbb77af3b1117f69f08d2268099e9
F_fully_connected
import torch import torch.nn as nn import torch.optim class F_fully_connected(nn.Module): """Fully connected tranformation, not reversible, but used below.""" def __init__(self, size_in, size, internal_size=None, dropout=0.0): super().__init__() if not internal_size: internal_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 import torch.nn as nn import ...
zimmerrol/FrEIA
F_fully_connected
false
4,668
[ "MIT" ]
0
73d01ab8c90e0deb5e242d66405bd168db06dc19
https://github.com/zimmerrol/FrEIA/tree/73d01ab8c90e0deb5e242d66405bd168db06dc19
Upscale2d
import torch from torch import nn def upscale2d(x, factor=2, gain=1): assert x.dim() == 4 if gain != 1: x = x * gain if factor != 1: shape = x.shape x = x.view(shape[0], shape[1], shape[2], 1, shape[3], 1).expand(-1, -1, -1, factor, -1, factor) x = x.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 import nn assert_size_stride = torch._C._dynamo.guards.assert_size_stride empty_strided_cuda = torch._C._dynamo.guards._empty_str...
AnimeshKoratana/blurryface
Upscale2d
false
43
[ "Apache-2.0" ]
0
c6cb5feec02f6d5af3acb1678336800390715d65
https://github.com/AnimeshKoratana/blurryface/tree/c6cb5feec02f6d5af3acb1678336800390715d65
CNN
# 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_...
mswzeus/DeeperHSP
CNN
false
7,296
[ "MIT" ]
1
571387f048d3c33fcd78730fdaef57b6c44a27a7
https://github.com/mswzeus/DeeperHSP/tree/571387f048d3c33fcd78730fdaef57b6c44a27a7
BWCEWLoss
# 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, math as tl_math from torch ...
jimthompson5802/ludwig
BWCEWLoss
false
3,859
[ "Apache-2.0" ]
0
8a369328a3f839d9cdb3710be315952c7891d7c0
https://github.com/jimthompson5802/ludwig/tree/8a369328a3f839d9cdb3710be315952c7891d7c0
TokenEmbedding
import torch import torch.nn as nn class TokenEmbedding(nn.Module): def __init__(self, c_in, d_model): super(TokenEmbedding, self).__init__() padding = 1 if torch.__version__ >= '1.5.0' else 2 self.tokenConv = nn.Conv1d(in_channels=c_in, out_channels=d_model, kernel_size=3, pa...
import torch from torch._inductor.select_algorithm import extern_kernels import triton import triton.language as tl from torch._inductor.runtime.triton_heuristics import grid from torch._C import _cuda_getCurrentRawStream as get_raw_stream import torch.nn as nn assert_size_stride = torch._C._dynamo.guards.assert_size_s...
MAZiqing/FEDformer
TokenEmbedding
false
17,645
[ "MIT" ]
7
7914d39df829494a8172afb9676982c3789d491d
https://github.com/MAZiqing/FEDformer/tree/7914d39df829494a8172afb9676982c3789d491d
FCLateActionSAQFunction
# 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 numpy as np import tor...
imatge-upc/pixelcoordEDL
FCLateActionSAQFunction
false
6,871
[ "MIT" ]
1
353632feed6ac8c93758c1a2a1b7a477e7ff053c
https://github.com/imatge-upc/pixelcoordEDL/tree/353632feed6ac8c93758c1a2a1b7a477e7ff053c
RNN
import torch import torch.nn as nn from torch.autograd import Variable class RNN(nn.Module): def __init__(self, input_size, hidden_size, output_size): super(RNN, self).__init__() self.hidden_size = hidden_size self.output_size = output_size self.layer1 = nn.Linear(input_size, 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.triton_helpers import libdevice import torch.nn as ...
Lukx19/TorcsDriver
RNN
false
789
[ "MIT" ]
0
e6e3dd4b15e8dec487a29465f7592c7d5d2581cc
https://github.com/Lukx19/TorcsDriver/tree/e6e3dd4b15e8dec487a29465f7592c7d5d2581cc
LayerNormalization
import torch import torch.nn as nn class LayerNormalization(nn.Module): def __init__(self, normal_shape, gamma=True, beta=True, epsilon=1e-10): """Layer normalization layer See: [Layer Normalization](https://arxiv.org/pdf/1607.06450.pdf) :param normal_shape: The shape of the input tenso...
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_...
CyberZHG/torch-layer-normalization
LayerNormalization
false
17,166
[ "MIT" ]
9
89f405b60f53f85da6f03fe685c190ef394ce50c
https://github.com/CyberZHG/torch-layer-normalization/tree/89f405b60f53f85da6f03fe685c190ef394ce50c
CharbonnierLoss
import torch import torch.nn as nn class CharbonnierLoss(nn.Module): """Charbonnier Loss (L1)""" def __init__(self, eps=1e-06, mode=None): super(CharbonnierLoss, self).__init__() self.eps = eps self.mode = mode def forward(self, x, y, mask=None): N = x.size(1) dif...
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...
myeldib/Simple-SR
CharbonnierLoss
false
12,806
[ "MIT" ]
0
583456b1f231574d9e0b45c29266cf41603d161d
https://github.com/myeldib/Simple-SR/tree/583456b1f231574d9e0b45c29266cf41603d161d
CosineDistance
import torch import torch.utils.data.dataloader import torch.nn def dot_product(a: 'torch.Tensor', b: 'torch.Tensor', normalize=False): """ Computes dot product for pairs of vectors. :param normalize: Vectors are normalized (leads to cosine similarity) :return: Matrix with res[i][j] = dot_product(a[i...
import torch from torch._inductor.select_algorithm import extern_kernels import triton import triton.language as tl from torch._inductor.runtime.triton_heuristics import grid from torch._C import _cuda_getCurrentRawStream as get_raw_stream from torch._inductor.runtime import triton_helpers from torch._inductor.runtime....
adriensas/flair
CosineDistance
false
9,751
[ "MIT" ]
0
f01b0e7ff9a87d3862acae50aeaffdc8e8b8ac21
https://github.com/adriensas/flair/tree/f01b0e7ff9a87d3862acae50aeaffdc8e8b8ac21
SoftLarge
import math import torch from torch import nn class SoftCompare(nn.Module): def __init__(self, alpha=None, beta=None): super().__init__() self.alpha = nn.Parameter(torch.ones(1) * (0 if alpha is None else alpha), requires_grad=True) self.beta = nn.Parameter(torch.ones(1) * (0 ...
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 from torch import nn assert_size_stride = torch._C._dynamo.gu...
C-SUNSHINE/TOQ-Nets-PyTorch-Release
SoftLarge
false
17,144
[ "MIT" ]
6
05e06bf633fb3c6b610dda9a5126ecd7af1db02f
https://github.com/C-SUNSHINE/TOQ-Nets-PyTorch-Release/tree/05e06bf633fb3c6b610dda9a5126ecd7af1db02f
ClassificationCircleLoss
import torch import torch.nn as nn import torch.utils.data from typing import Tuple from torch.nn.functional import cross_entropy from itertools import product as product from math import sqrt as sqrt class ClassificationCircleLoss(nn.Module): """Circle loss for class-level labels as described in the paper `"...
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 ...
lingtengqiu/LearnableTreeFilterV2
ClassificationCircleLoss
false
7,096
[ "Apache-2.0" ]
1
3814a5a84c0a5c33d6538749eaf5aed4827366de
https://github.com/lingtengqiu/LearnableTreeFilterV2/tree/3814a5a84c0a5c33d6538749eaf5aed4827366de
PositionWiseFeedForwardNetworks
import torch from torch import nn from torch.nn import functional as F def Linear(in_features, out_features, bias=True): m = nn.Linear(in_features, out_features, bias) nn.init.xavier_uniform_(m.weight) if bias: nn.init.constant_(m.bias, 0.0) return m class PositionWiseFeedForwardNetworks(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 import triton_helpers from torch import nn assert_s...
L-Zhe/FasySeq
PositionWiseFeedForwardNetworks
false
8,417
[ "Apache-2.0" ]
34
2cd2abd290666b1e118d8ad11c973b58ca4f0573
https://github.com/L-Zhe/FasySeq/tree/2cd2abd290666b1e118d8ad11c973b58ca4f0573
CNN64x3
# 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_...
InExp123/pytorch-self_driving_car
CNN64x3
false
2,376
[ "MIT" ]
0
b4e8c8a76079085bf0471dad1820ee9995cffc74
https://github.com/InExp123/pytorch-self_driving_car/tree/b4e8c8a76079085bf0471dad1820ee9995cffc74
SDSDRLoss
# 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 assert_size_stride = torch._C._dynamo.guards.assert_size_stride empty_strided_c...
leoauri/auraloss
SDSDRLoss
false
15,902
[ "Apache-2.0" ]
272
0e3362674ae1b53aa61c6a631fb4e6970c5683c1
https://github.com/leoauri/auraloss/tree/0e3362674ae1b53aa61c6a631fb4e6970c5683c1
NormalLoss
import torch import torch.nn as nn class NormalLoss(nn.Module): def __init__(self): super(NormalLoss, self).__init__() def forward(self, grad_fake, grad_real): prod = (grad_fake[:, :, None, :] @ grad_real[:, :, :, None]).squeeze(-1 ).squeeze(-1) fake_norm = torch.sqrt(tor...
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 ...
d4l3k/crowds
NormalLoss
false
12,244
[ "MIT" ]
0
a57eee80d66498474c86cec22dd77be9d627ad97
https://github.com/d4l3k/crowds/tree/a57eee80d66498474c86cec22dd77be9d627ad97
AdaptiveInstanceNorm
# 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.utils....
yuhongherald/pytorch-CycleGAN-and-pix2pix
AdaptiveInstanceNorm
false
4,640
[ "BSD-3-Clause" ]
0
48cb3aa46fde39684db9c24586fcec6781138e2a
https://github.com/yuhongherald/pytorch-CycleGAN-and-pix2pix/tree/48cb3aa46fde39684db9c24586fcec6781138e2a
Conv2d
import torch import torch.nn as nn from torch.nn import functional as F class Conv2d(nn.Conv2d): def __init__(self, in_channels, out_channels, kernel_size, stride=1, padding=0, dilation=1, groups=1, bias=True): super(Conv2d, self).__init__(in_channels, out_channels, kernel_size, strid...
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 ...
JassiGhuman/backgroundSubtraction
Conv2d
false
11,544
[ "MIT" ]
0
351a380b34f9d84548bea734a69842227e373e65
https://github.com/JassiGhuman/backgroundSubtraction/tree/351a380b34f9d84548bea734a69842227e373e65
TorchSub
import torch class TorchSub(torch.nn.Module): def __init__(self): super(TorchSub, self).__init__() def forward(self, x, y): return torch.sub(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...
ahangchen/torch2trt
TorchSub
false
6,119
[ "MIT" ]
1
53c663f0e0570ef7ffd6771354ae3478f63bd328
https://github.com/ahangchen/torch2trt/tree/53c663f0e0570ef7ffd6771354ae3478f63bd328
RepresentationModule
from _paritybench_helpers import _mock_config import torch import torch.nn as nn class RepresentationModule(nn.Module): def __init__(self, config, task_name, repr_size): super(RepresentationModule, self).__init__() self.config = config self.task_name = task_name self.repr_size = r...
import torch from torch._inductor.select_algorithm import extern_kernels import triton import triton.language as tl from torch._inductor.runtime.triton_heuristics import grid from torch._C import _cuda_getCurrentRawStream as get_raw_stream import torch.nn as nn assert_size_stride = torch._C._dynamo.guards.assert_size_s...
Impavidity/relogic
RepresentationModule
false
8,792
[ "MIT" ]
24
f647106e143cd603b95b63e06ea530cdd516aefe
https://github.com/Impavidity/relogic/tree/f647106e143cd603b95b63e06ea530cdd516aefe
HuggingfaceFastGelu
# 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 import torch.nn import torch.onnx import torch.utils.checkpoint assert_size_str...
TingGong1/onnxruntime
HuggingfaceFastGelu
false
5,890
[ "MIT" ]
1
435010ab6873974803591fa22262ed8b3e36e44d
https://github.com/TingGong1/onnxruntime/tree/435010ab6873974803591fa22262ed8b3e36e44d
C1Bilinear
import torch from torch import nn class C1Bilinear(nn.Module): def __init__(self, num_class=150, fc_dim=4096, segSize=384, use_softmax =False): super(C1Bilinear, self).__init__() self.segSize = segSize self.use_softmax = use_softmax self.conv_last = nn.Conv2d(fc_dim, num_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 import triton_helpers from torch._inductor.runtime....
PCIHD/Project_Daydream
C1Bilinear
false
9,762
[ "MIT" ]
0
94c75ff494e7489a4066e3f9d056a85ff768f40e
https://github.com/PCIHD/Project_Daydream/tree/94c75ff494e7489a4066e3f9d056a85ff768f40e
RepeatModule
# 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
RepeatModule
false
14,642
[ "Apache-2.0" ]
2,838
a13706a4239fa7eaf059c670dc573e3eb0768f86
https://github.com/YaronBenAtar/glow/tree/a13706a4239fa7eaf059c670dc573e3eb0768f86
Block
import math import torch import torch.utils.data import torch import torch.nn as nn def gelu(x): """ Original Implementation of the gelu activation function in Google Bert repo when initialy created. For information: OpenAI GPT's gelu is slightly different (and gives slightly different results): 0...
import torch from torch._inductor.select_algorithm import extern_kernels import triton import triton.language as tl from torch._inductor.runtime.triton_heuristics import grid from torch._C import _cuda_getCurrentRawStream as get_raw_stream from torch._inductor.runtime import triton_helpers from torch._inductor.runtime....
denisleonov/pytorch-CycleGAN-and-pix2pix
Block
false
12,280
[ "BSD-3-Clause" ]
0
d1a5f0c5911f70ed896f826619b4067ce737a83d
https://github.com/denisleonov/pytorch-CycleGAN-and-pix2pix/tree/d1a5f0c5911f70ed896f826619b4067ce737a83d
MHAScoresCalculation
# 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 from torch._inductor.runtime....
JudeDavis1/intel-extension-for-pytorch
MHAScoresCalculation
false
2,577
[ "Apache-2.0" ]
0
364e34cb4917a709f5108c07d4005bf82f3d5067
https://github.com/JudeDavis1/intel-extension-for-pytorch/tree/364e34cb4917a709f5108c07d4005bf82f3d5067
ConvGRUCellNd
import torch import torch.nn as nn import torch.jit import torch.nn class ConvGRUCellNd(nn.Module): def __init__(self, in_size, out_size, kernel_size, N=1, **kwargs): super(ConvGRUCellNd, self).__init__() conv = eval(f'nn.Conv{N}d') self.conv_ir = conv(in_size, out_size, kernel_size, **kw...
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 ...
ankmathur96/torchsupport
ConvGRUCellNd
false
3,189
[ "MIT" ]
0
77bf4a90b8770a408665e2604428808c3ed2f979
https://github.com/ankmathur96/torchsupport/tree/77bf4a90b8770a408665e2604428808c3ed2f979
SimpleLoss
# 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...
FranciscoShi/piepline
SimpleLoss
false
17,276
[ "MIT" ]
5
6105788339fc18bab39ea07625b5fd26ad687254
https://github.com/FranciscoShi/piepline/tree/6105788339fc18bab39ea07625b5fd26ad687254
L2Norm
# 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_...
ashuk203/face-alignment
L2Norm
false
6,244
[ "BSD-3-Clause" ]
1
1f6452ae05ede0db9bbc48331d67d8b239fa9994
https://github.com/ashuk203/face-alignment/tree/1f6452ae05ede0db9bbc48331d67d8b239fa9994
UniformDistributionLoss
import torch import torch.nn.functional as F class UniformDistributionLoss(torch.nn.Module): """ Implementation of the confusion loss from [Simultaneous Deep Transfer Across Domains and Tasks](https://arxiv.org/abs/1510.02192). """ def forward(self, x, *args): """""" probs = F.log...
import torch import triton import triton.language as tl from torch._inductor.runtime.triton_heuristics import grid from torch._C import _cuda_getCurrentRawStream as get_raw_stream 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
UniformDistributionLoss
false
13,945
[ "MIT" ]
131
ff1491e1bfcc586afb8ee619712c8816ddf10358
https://github.com/KevinMusgrave/pytorch-adapt/tree/ff1491e1bfcc586afb8ee619712c8816ddf10358
MinimalRNNCell
# 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 from torch import n...
tarepan/HiPPO
MinimalRNNCell
false
16,539
[ "Apache-2.0" ]
57
bc23e2dba13da6c307cb5a4ae248c2d2c56d465f
https://github.com/tarepan/HiPPO/tree/bc23e2dba13da6c307cb5a4ae248c2d2c56d465f
PositionalEncoder
# 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...
aim-uofa/DyCo3D
PositionalEncoder
false
14,762
[ "BSD-2-Clause" ]
100
17d22c2d839c0a1043fb72df301e3935af5ca0e9
https://github.com/aim-uofa/DyCo3D/tree/17d22c2d839c0a1043fb72df301e3935af5ca0e9
TReLU
import torch import torch.nn as nn import torch.nn.functional as F class TReLU(nn.Module): def __init__(self): super(TReLU, self).__init__() self.alpha = nn.Parameter(torch.FloatTensor(1), requires_grad=True) self.alpha.data.fill_(0) def forward(self, x): x = F.relu(x - 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 import torch.nn as nn assert_size_stride = torch._C._dynamo.guards.assert_size_stride emp...
HenryOsborne/LearningToPaint
TReLU
false
9,134
[ "MIT" ]
0
d8fdf41c8d193b91c78f73b7a092897e846e19eb
https://github.com/HenryOsborne/LearningToPaint/tree/d8fdf41c8d193b91c78f73b7a092897e846e19eb
PredictionHead
# AOT ID: ['0_forward'] from ctypes import c_void_p, c_long, c_int import torch import math import random import os import tempfile from math import inf, nan from torch._inductor.hooks import run_intermediate_hooks from torch._inductor.utils import maybe_profile from torch._inductor.codegen.memory_planning import _alig...
import torch from torch._inductor.select_algorithm import extern_kernels import triton import triton.language as tl from torch._inductor.runtime.triton_heuristics import grid from torch._C import _cuda_getCurrentRawStream as get_raw_stream import torch.nn as nn import torch.onnx assert_size_stride = torch._C._dynamo.gu...
danshirron/inference
PredictionHead
false
10,018
[ "Apache-2.0" ]
0
31ae9b30ca5b1081a2d35f73ffcde10ae1fdaf41
https://github.com/danshirron/inference/tree/31ae9b30ca5b1081a2d35f73ffcde10ae1fdaf41
ClassAttentionBlock
# 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....
alhamami/Object-Detection-And-Tracking
ClassAttentionBlock
false
18,320
[ "MIT" ]
5
a211a1dc103e812c539cd0ee16a2da4251943bed
https://github.com/alhamami/Object-Detection-And-Tracking/tree/a211a1dc103e812c539cd0ee16a2da4251943bed
PolicyNetwork
import torch import numpy as np import torch.nn as nn import torch.nn.functional as F from torch.distributions import Normal class PolicyNetwork(nn.Module): def __init__(self, num_inputs, num_actions, hidden_size, action_range= 1.0, init_w=0.003, log_std_min=-20, log_std_max=2): super(PolicyNetwo...
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....
chagri/SOTA-RL-Algorithms
PolicyNetwork
false
1,665
[ "Apache-2.0" ]
0
58b416e7c706d8426dc402482e72ca7283568e71
https://github.com/chagri/SOTA-RL-Algorithms/tree/58b416e7c706d8426dc402482e72ca7283568e71
OverHaulLoss
# 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 ...
Lee-Gihun/Micronet_GSJ
OverHaulLoss
false
8,460
[ "MIT" ]
12
72289bb66507b6c3b4d14f2e5916dec718a1b198
https://github.com/Lee-Gihun/Micronet_GSJ/tree/72289bb66507b6c3b4d14f2e5916dec718a1b198
ConcatSquashConv2d
import torch import torch.nn as nn class ConcatSquashConv2d(nn.Module): def __init__(self, dim_in, dim_out, ksize=3, stride=1, padding=0, dilation=1, groups=1, bias=True, transpose=False): super(ConcatSquashConv2d, self).__init__() module = nn.ConvTranspose2d if transpose else nn.Conv2d ...
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...
D-hash-code/ffjord-rnode-finalweek-mnist
ConcatSquashConv2d
false
2,155
[ "MIT" ]
0
4cabcbadda79c68df53ec25f1f8fe03cfeee78f9
https://github.com/D-hash-code/ffjord-rnode-finalweek-mnist/tree/4cabcbadda79c68df53ec25f1f8fe03cfeee78f9
DirichletLayer
import torch import torch.nn as nn import torch.nn.functional as F class DirichletLayer(nn.Module): def __init__(self, evidence='exp', dim=-1): super(DirichletLayer, self).__init__() self.evidence = evidence self.dim = dim def evidence_func(self, logit): if self.evidence == '...
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 ...
Cogito2012/OpenTAL
DirichletLayer
false
7,904
[ "BSD-3-Clause" ]
16
a7ab938a52b3fb82163eb1ba5403888359eb7e6a
https://github.com/Cogito2012/OpenTAL/tree/a7ab938a52b3fb82163eb1ba5403888359eb7e6a
Concat3
# 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.onnx import torch.nn as nn assert_size_stride = torch._C._dynamo.guards.assert_size_stride empty_strided_cuda = torch._C._dynam...
mil-tokyo/webdnn
Concat3
false
16,061
[ "MIT" ]
1,967
38a60fd3e1a4e72bc01108189a3aa51e0752aecd
https://github.com/mil-tokyo/webdnn/tree/38a60fd3e1a4e72bc01108189a3aa51e0752aecd
Skew
import torch import torch.nn as nn import torch.quantization import torch.onnx import torch.nn.parallel import torch.utils.data import torch.fx import torch.nn import torch.optim import torch.profiler class Skew(nn.Module): def forward(self, X): A = X.triu(1) return A - A.transpose(-1, -2) d...
import torch import triton import triton.language as tl from torch._inductor.runtime.triton_heuristics import grid from torch._C import _cuda_getCurrentRawStream as get_raw_stream import torch.nn as nn import torch.quantization import torch.onnx import torch.nn.parallel import torch.utils.data import torch.fx import to...
Ismail-Mustapha/tutorials
Skew
false
13,851
[ "BSD-3-Clause" ]
6,424
0ccfbf0047db855e93e2aadb43c89c92e89f52b8
https://github.com/Ismail-Mustapha/tutorials/tree/0ccfbf0047db855e93e2aadb43c89c92e89f52b8
Attention
# AOT ID: ['0_forward'] from ctypes import c_void_p, c_long, c_int import torch import math import random import os import tempfile from math import inf, nan from torch._inductor.hooks import run_intermediate_hooks from torch._inductor.utils import maybe_profile from torch._inductor.codegen.memory_planning import _alig...
import torch 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....
qute012/Korean-Speech-Recognition
Attention
false
7,517
[ "Apache-2.0" ]
1
0e037fd03df1ad6bf1084ee748781cdf4d428940
https://github.com/qute012/Korean-Speech-Recognition/tree/0e037fd03df1ad6bf1084ee748781cdf4d428940
BasicModel_ConvNet_MaxPool3d
import torch import torch.nn as nn class BasicModel_ConvNet_MaxPool3d(nn.Module): """Same as above, but with the MaxPool1d replaced with a MaxPool3d. This is useful because the MaxPool modules behave differently to other modules from the perspective of the DeepLift Attributions """ def __init...
import torch from torch._inductor.select_algorithm import extern_kernels import triton import triton.language as tl from torch._inductor.runtime.triton_heuristics import grid from torch._C import _cuda_getCurrentRawStream as get_raw_stream from torch._inductor.runtime import triton_helpers from torch._inductor.runtime....
LMdeLiangMi/captum
BasicModel_ConvNet_MaxPool3d
false
5,508
[ "BSD-3-Clause" ]
1
8bd9686013fe0ba8996e9b1cbeb0ea8e91512787
https://github.com/LMdeLiangMi/captum/tree/8bd9686013fe0ba8996e9b1cbeb0ea8e91512787
Gradient
import torch from torch import nn import torch.nn.functional as F import torch.utils.data class Gradient(nn.Module): def __init__(self): super(Gradient, self).__init__() kernel_v = [[0, -1, 0], [0, 0, 0], [0, 1, 0]] kernel_h = [[0, 0, 0], [-1, 0, 1], [0, 0, 0]] kernel_h = torch.Fl...
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...
YDDDDG/3D2Unet
Gradient
false
6,008
[ "MIT" ]
1
daca056958fb2ae319dc18a350e04b3cefe0d99f
https://github.com/YDDDDG/3D2Unet/tree/daca056958fb2ae319dc18a350e04b3cefe0d99f
ResNetDownsampleA
# 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...
corypaik/pytorch-lightning-pbt
ResNetDownsampleA
false
6,480
[ "Apache-2.0" ]
1
ad25e472fe59ca22bc400023d2589f4bedd37e30
https://github.com/corypaik/pytorch-lightning-pbt/tree/ad25e472fe59ca22bc400023d2589f4bedd37e30
LabelSmoothingCrossEntropyBCE
import torch import torch.nn as nn import torch.nn.functional as F class LabelSmoothingCrossEntropyBCE(nn.Module): def __init__(self, smoothing=0.1): super(LabelSmoothingCrossEntropyBCE, self).__init__() assert smoothing < 1.0 self.smoothing = smoothing self.confidence = 1.0 - smo...
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...
Diyago/Graph-clasification-by-computer-vision
LabelSmoothingCrossEntropyBCE
false
17,224
[ "Apache-2.0" ]
9
703c44b98f9875d7a7b6db1c2b96372e11e256d6
https://github.com/Diyago/Graph-clasification-by-computer-vision/tree/703c44b98f9875d7a7b6db1c2b96372e11e256d6
Alignment
# 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....
alibaba-edu/simple-effective-text-matching-pytorch
Alignment
false
14,798
[ "Apache-2.0" ]
278
05d572e30801b235e989c78c95dd24d5f5d35f74
https://github.com/alibaba-edu/simple-effective-text-matching-pytorch/tree/05d572e30801b235e989c78c95dd24d5f5d35f74
ScaledDotProductAttention
import torch import torch.nn as nn import torch.nn.functional as F class ScaledDotProductAttention(nn.Module): """ Scaled Dot-Product Attention """ def __init__(self, temperature, attn_dropout=0.1): super().__init__() self.temperature = temperature self.dropout = nn.Dropout(attn_dropo...
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....
Blair129/FEAT-master
ScaledDotProductAttention
false
8,939
[ "MIT" ]
0
459e05000a8cca5421fafb7d2f33f19418378df7
https://github.com/Blair129/FEAT-master/tree/459e05000a8cca5421fafb7d2f33f19418378df7
TransposeConv2dLayer
# 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 from torch.nn import Parameter assert_size_stride = torch....
piggy2303/DeepFillv2_Pytorch
TransposeConv2dLayer
false
7,468
[ "MIT" ]
1
dd35299f11704f878ed7a33e14ccd51a9d64baaf
https://github.com/piggy2303/DeepFillv2_Pytorch/tree/dd35299f11704f878ed7a33e14ccd51a9d64baaf
Net
import torch import torch.nn as nn import torch.nn.functional as F class Net(nn.Module): """policy-value network module""" def __init__(self, board_width, board_height): super(Net, self).__init__() self.board_width = board_width self.board_height = board_height self.conv1 = 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 import triton_helpers from torch._inductor.runtime....
Dryeck/17-18-Reinforcement
Net
false
8,058
[ "MIT" ]
36
f5a289a96c0139758436ab6a5a589519af1178da
https://github.com/Dryeck/17-18-Reinforcement/tree/f5a289a96c0139758436ab6a5a589519af1178da
Linear_QNet
# 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...
cheapmouse94/Machine-Learning-tank1990-python
Linear_QNet
false
3,281
[ "MIT" ]
0
8b75983289c7bc0831827561cec12d4ad2addee2
https://github.com/cheapmouse94/Machine-Learning-tank1990-python/tree/8b75983289c7bc0831827561cec12d4ad2addee2
ContrastiveLoss
from torch.nn import Module import torch import torch.nn as nn from torch.nn.modules import Module class ContrastiveLoss(Module): def __init__(self, margin=3): super(ContrastiveLoss, self).__init__() self.margin = margin self.loss = nn.BCELoss() def forward(self, output, label): ...
import torch import triton import triton.language as tl from torch._inductor.runtime.triton_heuristics import grid from torch._C import _cuda_getCurrentRawStream as get_raw_stream from torch._inductor.runtime import triton_helpers from torch.nn import Module import torch.nn as nn from torch.nn.modules import Module ass...
Brain03Yao/M2TGCN
ContrastiveLoss
false
17,013
[ "MIT" ]
6
72c65687fa52c618740cd6d1db7366116f68398c
https://github.com/Brain03Yao/M2TGCN/tree/72c65687fa52c618740cd6d1db7366116f68398c
SoftDiceLossV1
import torch import torch.nn as nn class SoftDiceLossV1(nn.Module): """ soft-dice loss, useful in binary segmentation """ def __init__(self, p=1, smooth=1, reduction='mean'): super(SoftDiceLossV1, self).__init__() self.p = p self.smooth = smooth self.reduction = reduct...
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...
imvladikon/pytorch-loss
SoftDiceLossV1
false
6,876
[ "MIT" ]
1
6cfaabe1be898e1ff000b3dffb46d0ef09096f6b
https://github.com/imvladikon/pytorch-loss/tree/6cfaabe1be898e1ff000b3dffb46d0ef09096f6b
Gaussian
import torch import torch.nn as nn class Gaussian(nn.Module): def forward(self, x): return torch.exp(-x * x / 2.0) def get_inputs(): return [torch.rand([4, 4, 4, 4])] def get_init_inputs(): return [[], {}]
import torch import triton import triton.language as tl from torch._inductor.runtime.triton_heuristics import grid from torch._C import _cuda_getCurrentRawStream as get_raw_stream from torch._inductor.runtime.triton_helpers import math as tl_math import torch.nn as nn assert_size_stride = torch._C._dynamo.guards.assert...
fmhoward/pysurvival
Gaussian
false
12,375
[ "Apache-2.0" ]
0
3fea55f09477e9f0844845e09d6ea60434436e2e
https://github.com/fmhoward/pysurvival/tree/3fea55f09477e9f0844845e09d6ea60434436e2e
TransformerEncoderLayer
import math import torch from torch import nn import torch.nn.functional as F def _normalize(tensor, norm_layer): """ Broadcast layer norm """ size = tensor.size() return norm_layer(tensor.view(-1, size[-1])).view(size) class MultiHeadAttention(nn.Module): def __init__(self, n_heads, dim, 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 from torch._inductor.runtime....
jinjiren/ParlAI
TransformerEncoderLayer
false
12,626
[ "MIT" ]
0
40799aeee69f2a0bb25a1341bb8da0c44861268e
https://github.com/jinjiren/ParlAI/tree/40799aeee69f2a0bb25a1341bb8da0c44861268e
Smoother
from torch.nn import Module import torch from torch import Tensor from typing import Optional import torch.nn.functional as F from torch.nn import Dropout from torch.nn import LayerNorm from torch.nn import Conv1d from torch.nn import MultiheadAttention class Smoother(Module): """Convolutional Transformer Encoder...
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....
OlegJakushkin/FragmentVC
Smoother
false
14,171
[ "MIT" ]
136
8aa673157b855bf3b67f06fdb6eb4b2a12ed0005
https://github.com/OlegJakushkin/FragmentVC/tree/8aa673157b855bf3b67f06fdb6eb4b2a12ed0005
LayerNorm
import torch import torch.nn as nn class LayerNorm(nn.Module): def __init__(self, num_features, eps=1e-05, affine=True): super(LayerNorm, self).__init__() self.num_features = num_features self.affine = affine self.eps = eps if self.affine: self.gamma = nn.Param...
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_...
AntiAegis/PyTorch-GAN
LayerNorm
false
4,866
[ "MIT" ]
1
1cb951b3ad3a58b749c1802f84947b85f72c8367
https://github.com/AntiAegis/PyTorch-GAN/tree/1cb951b3ad3a58b749c1802f84947b85f72c8367
VAE
import torch import torch.nn as nn import torch.nn.functional as F class VAE(nn.Module): def __init__(self, encode_dims, decode_dims, dropout=0.0): super(VAE, self).__init__() self.encoder = nn.ModuleDict({f'enc_{i}': nn.Linear(encode_dims[i], encode_dims[i + 1]) for i in range(len(en...
import torch from torch import device from torch._inductor.select_algorithm import extern_kernels import triton import triton.language as tl from torch._inductor.runtime.triton_heuristics import grid from torch._C import _cuda_getCurrentRawStream as get_raw_stream from torch._inductor.runtime.triton_helpers import math...
Hassan-Lee/FusionModelingOfUser-GeneratedReviewDataOfComplexHeterogeneousTypes
VAE
false
5,280
[ "MIT" ]
1
b863e3fbf8058ecb06246a843e3fd2568bbbf260
https://github.com/Hassan-Lee/FusionModelingOfUser-GeneratedReviewDataOfComplexHeterogeneousTypes/tree/b863e3fbf8058ecb06246a843e3fd2568bbbf260
ECToCA3
import torch import torch.nn as nn import torch.nn.functional as F class ECToCA3(nn.Module): def __init__(self, D_in, D_out): super(ECToCA3, self).__init__() self.fc1 = nn.Linear(D_in, 800) self.fc2 = nn.Linear(800, D_out) def forward(self, x): x = F.leaky_relu(self.fc1(x), 0...
import torch from torch._inductor.select_algorithm import extern_kernels import triton import triton.language as tl from torch._inductor.runtime.triton_heuristics import grid from torch._C import _cuda_getCurrentRawStream as get_raw_stream import torch.nn as nn assert_size_stride = torch._C._dynamo.guards.assert_size_s...
sachio222/aha4
ECToCA3
false
7,583
[ "MIT" ]
1
ec378fe1bace85e325ad7cb8686b8ba321dc97d0
https://github.com/sachio222/aha4/tree/ec378fe1bace85e325ad7cb8686b8ba321dc97d0
Feedback
from _paritybench_helpers import _mock_config import torch import torch.nn as nn def weights_init(m): classname = m.__class__.__name__ if classname.find('Linear') != -1: m.weight.data.normal_(0.0, 0.02) m.bias.data.fill_(0) elif classname.find('BatchNorm') != -1: m.weight.data.norm...
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...
IacoSimoncini/tfvaegan
Feedback
false
12,630
[ "MIT" ]
0
157b526d65d0b0d5412f4be6fed02fc7d6325827
https://github.com/IacoSimoncini/tfvaegan/tree/157b526d65d0b0d5412f4be6fed02fc7d6325827
BalancedLoss
import torch import torch.nn as nn import torch.nn.functional as F class BalancedLoss(nn.Module): def __init__(self, neg_weight=1.0): super(BalancedLoss, self).__init__() self.neg_weight = neg_weight def forward(self, input, target): pos_mask = target == 1 neg_mask = target =...
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...
LIANGKE23/Siamese-FC-KF-CF
BalancedLoss
false
17,566
[ "MIT" ]
10
3d9db19c0f39f0588a5061cd182bfbfc37dca76f
https://github.com/LIANGKE23/Siamese-FC-KF-CF/tree/3d9db19c0f39f0588a5061cd182bfbfc37dca76f
DenseLayer
# 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_...
zzh-tech/RSCD
DenseLayer
false
16,840
[ "MIT" ]
57
b287b1621121f8ca7ece6b27ebd4e28a5f8e6f5e
https://github.com/zzh-tech/RSCD/tree/b287b1621121f8ca7ece6b27ebd4e28a5f8e6f5e
SquaredModulus
# 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...
entn-at/leaf-audio-pytorch
SquaredModulus
false
15,306
[ "Apache-2.0" ]
72
33f4ba4c8bdf07f125033f8e706d0d0bc6816445
https://github.com/entn-at/leaf-audio-pytorch/tree/33f4ba4c8bdf07f125033f8e706d0d0bc6816445
QuadriLinearScore
# 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 import torch.nn as nn import torch.utils.data.dataloader import torc...
ciaochiaociao/CLNER
QuadriLinearScore
false
3,379
[ "MIT" ]
0
a31fb1c3bfdaa5d62147dc892489d29a85e6b385
https://github.com/ciaochiaociao/CLNER/tree/a31fb1c3bfdaa5d62147dc892489d29a85e6b385
SimpleCNN
import torch import torch.nn as nn from collections import OrderedDict class SimpleCNN(nn.Module): def __init__(self, input_dim=3, global_pool=False): super(SimpleCNN, self).__init__() self.features = nn.Sequential(OrderedDict([('conv1', nn.Conv2d( input_dim, 64, kernel_size=3, stride...
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....
D-X-Y/MSPLD-2018
SimpleCNN
false
13,614
[ "MIT" ]
63
71a6a75830ac84c7a861e63367ad3ace991fae77
https://github.com/D-X-Y/MSPLD-2018/tree/71a6a75830ac84c7a861e63367ad3ace991fae77
PixelWise
import torch import torch.nn.init class PixelWise(torch.nn.Module): """ Implemented - https://arxiv.org/pdf/1710.10196.pdf """ def __init__(self, eps=1e-06): super(PixelWise, self).__init__() self.eps = eps def forward(self, tensor): return tensor.div(tensor.pow(2).mean(1, 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.init assert_size_stride = torch._C._dynamo.guards.assert_size_s...
Johnson-yue/TensorMONK
PixelWise
false
5,420
[ "MIT" ]
1
1785132b82c685c3b3fc05b00dec46b1fccfc948
https://github.com/Johnson-yue/TensorMONK/tree/1785132b82c685c3b3fc05b00dec46b1fccfc948
KdLoss
# 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, math as tl_math import torc...
CQUlearningsystemgroup/LearningToBinarize
KdLoss
false
4,949
[ "MIT" ]
1
1ecad897145af65ff52323bf2ec64a2154dc87d6
https://github.com/CQUlearningsystemgroup/LearningToBinarize/tree/1ecad897145af65ff52323bf2ec64a2154dc87d6
SVIGlobalMeanPool2D
import torch import torch.nn as nn class SVIGlobalMeanPool2D(nn.Module): """ Expects :param x: [examples, samples, channels, H, W] :return: [examples, samples, channels] """ def __init__(self): super(SVIGlobalMeanPool2D, self).__init__() def forward(self, x): x = x.mean(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 import torch.nn as nn assert_size_stride = torch._C._dynamo.guards.assert_size_stride empty_strided_cuda = torch._C._dynamo.guards._empty_st...
RomanShen/radial-bnn
SVIGlobalMeanPool2D
false
989
[ "Apache-2.0" ]
0
7c8bc85397c1461a6fd5ea9adf0631f9ade27f6c
https://github.com/RomanShen/radial-bnn/tree/7c8bc85397c1461a6fd5ea9adf0631f9ade27f6c
Net
import torch from torch import nn from torch.nn import functional as F class Net(nn.Module): def __init__(self): super(Net, self).__init__() self.conv1 = nn.Conv2d(1, 20, 5, 1) self.conv2 = nn.Conv2d(20, 50, 5, 1) self.fc1 = nn.Linear(5 * 5 * 50, 500) self.fc2 = 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....
zwc662/disentangling-vae
Net
false
11,086
[ "MIT" ]
0
7eeace2a30f8034e222be6a906f53748b3b2bb6e
https://github.com/zwc662/disentangling-vae/tree/7eeace2a30f8034e222be6a906f53748b3b2bb6e
LogisticRegression
# 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 as nn assert_size_stride = torch._C._dynamo.guards.assert_s...
ciubecca/3dunet-cavity
LogisticRegression
false
1,718
[ "MIT" ]
0
cfcc827773b18a95d221ab86c1afc5e2f7c30ecb
https://github.com/ciubecca/3dunet-cavity/tree/cfcc827773b18a95d221ab86c1afc5e2f7c30ecb
PadSameConv2d
import math import torch import torch.nn.functional as F class PadSameConv2d(torch.nn.Module): def __init__(self, kernel_size, stride=1): """ Imitates padding_mode="same" from tensorflow. :param kernel_size: Kernelsize of the convolution, int or tuple/list :param stride: Stride of...
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...
fish258/MonoRec
PadSameConv2d
false
15,354
[ "MIT" ]
388
c0612d2710802004cdd83205e63d0582de543c41
https://github.com/fish258/MonoRec/tree/c0612d2710802004cdd83205e63d0582de543c41
BCE_Dice
# 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, math as tl_math import torc...
evilidol/kaggle-Steel-Defect-Detection
BCE_Dice
false
6,660
[ "MIT" ]
1
41e3e360f49d706c8c79bcd442342c529648a736
https://github.com/evilidol/kaggle-Steel-Defect-Detection/tree/41e3e360f49d706c8c79bcd442342c529648a736
SingleHeadAttention
# 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....
JustinLiam/DAN
SingleHeadAttention
false
7,625
[ "MIT" ]
1
eb29cddad6c93e591854b115ef524643b1cd471c
https://github.com/JustinLiam/DAN/tree/eb29cddad6c93e591854b115ef524643b1cd471c
ycbcr_to_rgb_jpeg
import torch import numpy as np import torch.nn as nn class ycbcr_to_rgb_jpeg(nn.Module): """ Converts YCbCr image to RGB JPEG Input: image(tensor): batch x height x width x 3 Outpput: result(tensor): batch x 3 x height x width """ def __init__(self): super(ycbcr_to_rgb_jp...
import torch from torch._inductor.select_algorithm import extern_kernels import triton import triton.language as tl from torch._inductor.runtime.triton_heuristics import grid from torch._C import _cuda_getCurrentRawStream as get_raw_stream import numpy as np import torch.nn as nn assert_size_stride = torch._C._dynamo.g...
mlomnitz/DifferentiableJPEG
ycbcr_to_rgb_jpeg
false
16,100
[ "MIT" ]
86
a5767feba955a1bcb78600135a09c36a806f6249
https://github.com/mlomnitz/DifferentiableJPEG/tree/a5767feba955a1bcb78600135a09c36a806f6249
BertLayerNorm
# 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 from torch import nn assert_size_stride = torch._C._dynamo.guards.assert_size_s...
BIT-ENGD/eeqa
BertLayerNorm
false
13,366
[ "MIT" ]
142
2995abbaff1fb47131246a247ee7ed62aa94f4c3
https://github.com/BIT-ENGD/eeqa/tree/2995abbaff1fb47131246a247ee7ed62aa94f4c3
PointWiseConvolution
import torch from torch import nn as nn class PointWiseConvolution(nn.Module): def __init__(self, inChannels, outChannels, stride, expansionFactor, isNormal): super(PointWiseConvolution, self).__init__() if isNormal: self.layer = nn.Conv2d(in_channels=inChannels * expansionFac...
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 as nn assert_size_stride = torch._C._dynamo.guards.assert_s...
Pranshu-Bahadur/g2net
PointWiseConvolution
false
9,485
[ "MIT" ]
0
a117df7699837c9a3ae21ec59a310d7384369601
https://github.com/Pranshu-Bahadur/g2net/tree/a117df7699837c9a3ae21ec59a310d7384369601
GaussianPolicyFunction
import torch import torch.nn as nn import torch.nn.functional as F class GaussianPolicyFunction(nn.Module): """fully connected 200x200 hidden layers""" def __init__(self, state_dim, action_dim): super(GaussianPolicyFunction, self).__init__() self.fc1 = nn.Linear(state_dim, 200) self.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.triton_helpers import libdevice, math as tl_math im...
himanshusahni/task-biased-url
GaussianPolicyFunction
false
10,259
[ "MIT" ]
0
28e4ec318d46d84065b6e197fa9f4100bd4a4c34
https://github.com/himanshusahni/task-biased-url/tree/28e4ec318d46d84065b6e197fa9f4100bd4a4c34
rSoftMax
import torch import torch.nn as nn import torch.nn.functional as F class rSoftMax(nn.Module): def __init__(self, radix, cardinality): super().__init__() self.radix = radix self.cardinality = cardinality def forward(self, x): batch = x.size(0) if self.radix > 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 import triton_helpers from torch._inductor.runtime.triton_helpers import math as tl_math import torch.nn as nn ...
Exdenta/torchsat
rSoftMax
false
13,654
[ "MIT" ]
316
70ea3db758757104fb3ba618ddf7997f0f3a75b4
https://github.com/Exdenta/torchsat/tree/70ea3db758757104fb3ba618ddf7997f0f3a75b4
BasicDeconv
# 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_...
Yuuchuin/C3_V2
BasicDeconv
false
6,020
[ "MIT" ]
1
92a5edbc2c2b3452c5f57e74f928591192293e81
https://github.com/Yuuchuin/C3_V2/tree/92a5edbc2c2b3452c5f57e74f928591192293e81
DiscShiftLoss
# 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...
Jason-Khan/mmediting
DiscShiftLoss
false
614
[ "Apache-2.0" ]
0
d187f95a675dff3eb975a575bd9278d643b5b645
https://github.com/Jason-Khan/mmediting/tree/d187f95a675dff3eb975a575bd9278d643b5b645
MultiHeadAttention
import math import torch import torch.nn.functional as F import torch.nn as nn def attention(q, k, v, d_k, mask=None, dropout=None): scores = torch.matmul(q, k.transpose(-2, -1)) / math.sqrt(d_k) if mask is not None: mask = mask.unsqueeze(1) scores = scores.masked_fill(mask == 0, -1000000000.0...
import torch from torch._inductor.select_algorithm import extern_kernels import triton import triton.language as tl from torch._inductor.runtime.triton_heuristics import grid from torch._C import _cuda_getCurrentRawStream as get_raw_stream from torch._inductor.runtime import triton_helpers from torch._inductor.runtime....
Hyunseung-Kim/molGCT
MultiHeadAttention
false
8,249
[ "Apache-2.0" ]
10
5a2604337cf0a9d3c725295ccb7c8ea4b0144636
https://github.com/Hyunseung-Kim/molGCT/tree/5a2604337cf0a9d3c725295ccb7c8ea4b0144636
GCN
from torch.nn import Module import math import torch from torch.nn.modules import Module import torch.nn.functional as F from torch.nn.parameter import Parameter class GraphConvolution(Module): """ Simple GCN layer, similar to https://arxiv.org/abs/1609.02907 Z = f(X, A) = softmax(A` * ReLU(A` * X * W0)* ...
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...
Brain03Yao/M2TGCN
GCN
false
17,008
[ "MIT" ]
6
72c65687fa52c618740cd6d1db7366116f68398c
https://github.com/Brain03Yao/M2TGCN/tree/72c65687fa52c618740cd6d1db7366116f68398c
DiceLoss
import torch import torch.nn as nn class DiceLoss(nn.Module): """ Criterion that computes Sørensen-Dice Coefficient loss. https://en.wikipedia.org/wiki/S%C3%B8rensen%E2%80%93Dice_coefficient """ def __init__(self): super().__init__() self.smooth = 1.0 def forward(self, input...
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...
Quentin18/road-segmentation
DiceLoss
false
965
[ "MIT" ]
0
9d212c80fa3f6926c431847337d2ca38ec96b614
https://github.com/Quentin18/road-segmentation/tree/9d212c80fa3f6926c431847337d2ca38ec96b614
Upsample
import torch import torch.nn as nn class Upsample(nn.Module): """PyTorch upsampling implementation. This module upsamples by inserting <i-1> zeros in between samples in the time dimension. It does not low pass filter after this and assumes that the filter is a separate module if desired. .. see...
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...
plexixx/rfml
Upsample
false
16,260
[ "BSD-3-Clause" ]
61
c00633b2c2005d38f991c6b9e3fd855ca25166c4
https://github.com/plexixx/rfml/tree/c00633b2c2005d38f991c6b9e3fd855ca25166c4