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
MaskedConv1d
# 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.nn.parallel import torch.optim import torch a...
B0BBB/seq2seq.pytorch
MaskedConv1d
false
114
[ "MIT" ]
0
54bb0e9f3e5c7db7f257841ed652e8ff447b8ee4
https://github.com/B0BBB/seq2seq.pytorch/tree/54bb0e9f3e5c7db7f257841ed652e8ff447b8ee4
EqualizedLinear
# 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 numpy as np from torch import nn import torch.utils.data impo...
Hadryan/nn
EqualizedLinear
false
9,376
[ "MIT" ]
0
b10e3dea2c7e1f6569bfdf8e1a48f8d48b5a645d
https://github.com/Hadryan/nn/tree/b10e3dea2c7e1f6569bfdf8e1a48f8d48b5a645d
ReturnAsLoss
import torch import torch.nn as nn class ReturnAsLoss(nn.Module): def __init__(self): super(ReturnAsLoss, self).__init__() def forward(self, output, y): """negative logarithm return""" return -torch.sum(torch.log(torch.sum(output * (y + 1), dim=1))) def get_inputs(): return [to...
import torch import triton import triton.language as tl from torch._inductor.runtime.triton_heuristics import grid from torch._C import _cuda_getCurrentRawStream as get_raw_stream from torch._inductor.runtime.triton_helpers import math as tl_math import torch.nn as nn assert_size_stride = torch._C._dynamo.guards.assert...
yanxurui/portfolio
ReturnAsLoss
false
4,598
[ "MIT" ]
0
032cf47ccac1c5815fd4827bf0d5f3cf43cec990
https://github.com/yanxurui/portfolio/tree/032cf47ccac1c5815fd4827bf0d5f3cf43cec990
MatrixVectorScaledDotProductAttention
import torch import numpy as np import torch.nn as nn class MatrixVectorScaledDotProductAttention(nn.Module): def __init__(self, temperature, attn_dropout=0.1): super().__init__() self.temperature = temperature self.dropout = nn.Dropout(attn_dropout) self.softmax = nn.Softmax(dim=...
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 ...
michiyasunaga/GreaseLM
MatrixVectorScaledDotProductAttention
false
16,056
[ "MIT" ]
76
596aa5047841e3e97730f621a2e4576772733df2
https://github.com/michiyasunaga/GreaseLM/tree/596aa5047841e3e97730f621a2e4576772733df2
PointNetfeat
import torch import torch.nn as nn import torch.nn.functional as F import torch.nn.parallel import torch.utils.data class PointNetfeat(nn.Module): """ Simple PointNet that extracts point-wise feature by concatenating local and global features. Uses group norm instead of batch norm. """ 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....
davrempe/caspr
PointNetfeat
false
15,148
[ "MIT" ]
65
a02edb4be11f5ccfe563b2a7869ee8e731e0f8ff
https://github.com/davrempe/caspr/tree/a02edb4be11f5ccfe563b2a7869ee8e731e0f8ff
BridgeFeatLoss
import torch import torch.nn as nn import torch.utils.data class BridgeFeatLoss(nn.Module): """Bridge loss on feature space. """ def __init__(self): super(BridgeFeatLoss, self).__init__() def forward(self, f_s, f_t, f_mixed, lam): dist_mixed2s = ((f_mixed - f_s) ** 2).sum(1, keepdim=...
import torch import triton import triton.language as tl from torch._inductor.runtime.triton_heuristics import grid from torch._C import _cuda_getCurrentRawStream as get_raw_stream from torch._inductor.runtime import triton_helpers from torch._inductor.runtime.triton_helpers import libdevice import torch.nn as nn import...
XianyuanLiu/Transfer-Learning-Library
BridgeFeatLoss
false
10,139
[ "MIT" ]
0
25f83f32437032df88ca6101ecd1f63ec7a0aa2c
https://github.com/XianyuanLiu/Transfer-Learning-Library/tree/25f83f32437032df88ca6101ecd1f63ec7a0aa2c
SimpleSSM
# 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 assert_size_stride = torch._C._dynamo.guards.a...
Junyoungpark/2021-lg-AI-camp
SimpleSSM
false
17,521
[ "MIT" ]
4
3c0e5dd689e8e3dd61cc80243ad90cab951c06de
https://github.com/Junyoungpark/2021-lg-AI-camp/tree/3c0e5dd689e8e3dd61cc80243ad90cab951c06de
HME
import numpy import torch class HME(torch.nn.Module): def __init__(self, in_features, out_features, depth, projection='linear'): super(HME, self).__init__() self.proj = projection self.depth = depth self.in_features = in_features self.out_features = out_features se...
import torch from torch._inductor.select_algorithm import extern_kernels import triton import triton.language as tl from torch._inductor.runtime.triton_heuristics import grid from torch._C import _cuda_getCurrentRawStream as get_raw_stream import numpy assert_size_stride = torch._C._dynamo.guards.assert_size_stride emp...
alper111/hmog
HME
false
6,182
[ "MIT" ]
1
556da11600c97bcb075a0f19ffc284120d9789d2
https://github.com/alper111/hmog/tree/556da11600c97bcb075a0f19ffc284120d9789d2
GCN
from torch.nn import Module import math import torch from torch.nn.parameter import Parameter from torch.nn.modules.module import Module class GraphConvolution(Module): def __init__(self, in_features, out_features, bias=True): super(GraphConvolution, self).__init__() self.in_features = in_feature...
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...
CaiYufan-sjtu/GCNOIE
GCN
false
2,122
[ "MIT" ]
0
c84afca5b66d75c7108b2719241e2907700b4111
https://github.com/CaiYufan-sjtu/GCNOIE/tree/c84afca5b66d75c7108b2719241e2907700b4111
NeuralNetNonDifferentiableOutput
import torch import torch.nn import torch.onnx class NeuralNetNonDifferentiableOutput(torch.nn.Module): def __init__(self, input_size, hidden_size, num_classes): super(NeuralNetNonDifferentiableOutput, self).__init__() self.fc1 = torch.nn.Linear(input_size, hidden_size) self.relu = torch....
import torch from torch._inductor.select_algorithm import extern_kernels import triton import triton.language as tl from torch._inductor.runtime.triton_heuristics import grid from torch._C import _cuda_getCurrentRawStream as get_raw_stream from torch._inductor.runtime import triton_helpers import torch.nn import torch....
thilow/onnxruntime
NeuralNetNonDifferentiableOutput
false
11,017
[ "MIT" ]
0
1a3ddf0714e1bdf9b807a342eee5f6e160ad1ec9
https://github.com/thilow/onnxruntime/tree/1a3ddf0714e1bdf9b807a342eee5f6e160ad1ec9
PA
import torch import torch.nn as nn class PA(nn.Module): def __init__(self, dim): super().__init__() self.pa_conv = nn.Conv3d(dim, dim, kernel_size=3, padding=1, groups=dim ) self.sigmoid = nn.Sigmoid() def forward(self, x): return x * self.sigmoid(self.pa_conv(x))...
import torch from torch._inductor.select_algorithm import extern_kernels import triton import triton.language as tl from torch._inductor.runtime.triton_heuristics import grid from torch._C import _cuda_getCurrentRawStream as get_raw_stream import torch.nn as nn assert_size_stride = torch._C._dynamo.guards.assert_size_s...
SLKaMiHi/ResT-UNet-unsupervised-medical-image-registration-network-based-on-Transformer-and-CNN
PA
false
5,790
[ "MIT" ]
1
728624f978f345a1e713046a7dde12d6f84fd3dd
https://github.com/SLKaMiHi/ResT-UNet-unsupervised-medical-image-registration-network-based-on-Transformer-and-CNN/tree/728624f978f345a1e713046a7dde12d6f84fd3dd
OneLayerFCBodyWithAction
# 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 ...
Fieps1/p3-tennis
OneLayerFCBodyWithAction
false
494
[ "MIT" ]
0
29f3dab5810d7cd7f84120416a615956d266c256
https://github.com/Fieps1/p3-tennis/tree/29f3dab5810d7cd7f84120416a615956d266c256
BinaryFocalLossWithLogits
import torch import torch.nn as nn def binary_focal_loss_with_logits(input: 'torch.Tensor', target: 'torch.Tensor', alpha: 'float'=0.25, gamma: 'float'=2.0, reduction: 'str'='none', eps: 'float'=1e-08) ->torch.Tensor: """Function that computes Binary Focal loss. .. math:: \\text{FL}(p_t) = -...
import torch import triton import triton.language as tl from torch._inductor.runtime.triton_heuristics import grid from torch._C import _cuda_getCurrentRawStream as get_raw_stream from torch._inductor.runtime.triton_helpers import math as tl_math import torch.nn as nn assert_size_stride = torch._C._dynamo.guards.assert...
JoanFM/kornia
BinaryFocalLossWithLogits
false
11,557
[ "ECL-2.0", "Apache-2.0" ]
0
808898887cde69074ca3e3df9b24dea9682aad90
https://github.com/JoanFM/kornia/tree/808898887cde69074ca3e3df9b24dea9682aad90
CriticNetwork
# 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_...
TheCamusean/mushroom-rl
CriticNetwork
false
2,893
[ "MIT" ]
0
48585f883e546ea57224b8d446ecb9b8ba90cf73
https://github.com/TheCamusean/mushroom-rl/tree/48585f883e546ea57224b8d446ecb9b8ba90cf73
SimpleAtariNet
# 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_...
aaronmckinstry706/pytorch-practice
SimpleAtariNet
false
12,064
[ "MIT" ]
0
d3fd28733ea6de6a2e522ec52ff3e748df21b85a
https://github.com/aaronmckinstry706/pytorch-practice/tree/d3fd28733ea6de6a2e522ec52ff3e748df21b85a
co_peak_loss
import torch from torch import nn class co_peak_loss(nn.Module): def __init__(self): super(co_peak_loss, self).__init__() def forward(self, co_peak_value): a = -1 * co_peak_value b = torch.max(torch.zeros_like(co_peak_value), a) t = b + torch.log(torch.exp(-b) + torch.exp(a -...
import torch import triton import triton.language as tl from torch._inductor.runtime.triton_heuristics import grid from torch._C import _cuda_getCurrentRawStream as get_raw_stream from torch._inductor.runtime import triton_helpers from torch._inductor.runtime.triton_helpers import math as tl_math from torch import nn a...
cj4L/DeepCO3-python
co_peak_loss
false
6,445
[ "MIT" ]
1
fa28ed7b43a3a236d0cc7bf31ce9fd68c01b5888
https://github.com/cj4L/DeepCO3-python/tree/fa28ed7b43a3a236d0cc7bf31ce9fd68c01b5888
Block
import torch import torch.nn as nn class Mlp(nn.Module): def __init__(self, in_features, hidden_features=None, out_features=None, act_layer=nn.GELU, drop=0.0): super().__init__() out_features = out_features or in_features hidden_features = hidden_features or in_features se...
import torch from torch._inductor.select_algorithm import extern_kernels import triton import triton.language as tl from torch._inductor.runtime.triton_heuristics import grid from torch._C import _cuda_getCurrentRawStream as get_raw_stream from torch._inductor.runtime import triton_helpers from torch._inductor.runtime....
Pang-Yatian/Point-MAE
Block
false
8,690
[ "MIT" ]
42
61727f76e9d0c28babf422505073bd43c2f517bc
https://github.com/Pang-Yatian/Point-MAE/tree/61727f76e9d0c28babf422505073bd43c2f517bc
BCEIoULoss
import torch from typing import Callable from functools import partial from torch import nn import torch.distributed from torch.nn.modules.loss import * from torch.nn.modules import * from torch.optim import * from torch.optim.lr_scheduler import * import torch.backends def get_activation_fn(activation: 'str'=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 from torch._inductor.runtime import triton_helpers from torch._inductor.runtime.triton_helpers import libdevice, math as tl_math from typing...
litvinich/catalyst
BCEIoULoss
false
3,925
[ "Apache-2.0" ]
0
b039bb69597d3fe48eed8c34342fa9be968b776e
https://github.com/litvinich/catalyst/tree/b039bb69597d3fe48eed8c34342fa9be968b776e
MultiHeadSelfAttention
# 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....
Zed-Wu/ManiSkill-Learn
MultiHeadSelfAttention
false
3,106
[ "Apache-2.0" ]
0
8056fe327752cd0863f8730672fe62bd85a0ec12
https://github.com/Zed-Wu/ManiSkill-Learn/tree/8056fe327752cd0863f8730672fe62bd85a0ec12
TransposedConv1d
import torch import torch.nn as nn import torch.nn.functional as F class TransposedConv1d(nn.Module): def __init__(self, in_channels, output_channels, kernel_shape=3, stride =2, padding=1, output_padding=1, activation_fn=F.relu, use_batch_norm=False, use_bias=True): super(TransposedConv1d...
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 ...
Cogito2012/OpenTAL
TransposedConv1d
false
7,896
[ "BSD-3-Clause" ]
16
a7ab938a52b3fb82163eb1ba5403888359eb7e6a
https://github.com/Cogito2012/OpenTAL/tree/a7ab938a52b3fb82163eb1ba5403888359eb7e6a
PLCCLoss
import torch import torch.nn as nn import torch.utils class PLCCLoss(nn.Module): def __init__(self): super(PLCCLoss, self).__init__() def forward(self, input, target): input0 = input - torch.mean(input) target0 = target - torch.mean(target) self.loss = torch.sum(input0 * targ...
import torch import triton import triton.language as tl from torch._inductor.runtime.triton_heuristics import grid from torch._C import _cuda_getCurrentRawStream as get_raw_stream from torch._inductor.runtime import triton_helpers from torch._inductor.runtime.triton_helpers import libdevice import torch.nn as nn import...
adynmiles/DARTS-FQA
PLCCLoss
false
6,074
[ "MIT" ]
1
a088a0efeb1160d0cdbf2b2a3e30f132c16eb53f
https://github.com/adynmiles/DARTS-FQA/tree/a088a0efeb1160d0cdbf2b2a3e30f132c16eb53f
UpsampleBlock
import torch import torch.nn.functional as F import torch.nn as nn class UpsampleBlock(nn.Module): """ Defines upsampling block performed using bilinear or nearest-neigbor interpolation followed by 1-by-1 convolution (the latter can be used to reduce a number of feature channels) Args: nd...
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...
miguel-fc/atomai
UpsampleBlock
false
10,665
[ "MIT" ]
0
f51699ef5e1bfc577781977d38f7414b1b51449d
https://github.com/miguel-fc/atomai/tree/f51699ef5e1bfc577781977d38f7414b1b51449d
MaxPool1D
import torch class MaxPool1D(torch.nn.Module): def __init__(self, kernel_size, stride=None, padding=0, ceil_mode=False): super().__init__() self.kernel_size = kernel_size self.stride = stride self.padding = padding self.ceil_mode = ceil_mode def forward(self, x): ...
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...
PogChamper/torch2trt
MaxPool1D
false
14,193
[ "MIT" ]
3,363
43b12627ec0de4d212efb6d02b07570205085ccc
https://github.com/PogChamper/torch2trt/tree/43b12627ec0de4d212efb6d02b07570205085ccc
ECA
import torch from torch import nn class FastGlobalAvgPool2d: def __init__(self, flatten=False): self.flatten = flatten def __call__(self, x): if self.flatten: in_size = x.size() return x.view((in_size[0], in_size[1], -1)).mean(dim=2) else: return x...
import torch from torch._inductor.select_algorithm import extern_kernels import triton import triton.language as tl from torch._inductor.runtime.triton_heuristics import grid from torch._C import _cuda_getCurrentRawStream as get_raw_stream from torch import nn assert_size_stride = torch._C._dynamo.guards.assert_size_st...
cooked-sashimi/Yet-Another-YOLOv4-Pytorch
ECA
false
15,087
[ "MIT" ]
133
c884ef8849987a75b0e17eba1b739c22d3782e90
https://github.com/cooked-sashimi/Yet-Another-YOLOv4-Pytorch/tree/c884ef8849987a75b0e17eba1b739c22d3782e90
VAE
# AOT ID: ['0_forward'] from ctypes import c_void_p, c_long, c_int import torch import math import random import os import tempfile from math import inf, nan from torch._inductor.hooks import run_intermediate_hooks from torch._inductor.utils import maybe_profile from torch._inductor.codegen.memory_planning import _alig...
import torch from torch import device from torch._inductor.select_algorithm import extern_kernels import triton import triton.language as tl from torch._inductor.runtime.triton_heuristics import grid from torch._C import _cuda_getCurrentRawStream as get_raw_stream from torch._inductor.runtime import triton_helpers from...
anandijain/audio
VAE
false
6,203
[ "MIT" ]
1
1990de57ebc760cf6c5cc7132119b389cfd2dbfb
https://github.com/anandijain/audio/tree/1990de57ebc760cf6c5cc7132119b389cfd2dbfb
TripletLoss
import torch import torch.utils.data import torch import torch.nn as nn class TripletLoss(nn.Module): def __init__(self, margin=1.0): super(TripletLoss, self).__init__() self.margin = margin def calc_euclidean(self, x1, x2): return (x1 - x2).pow(2).sum(1) def forward(self, ancho...
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.utils.data import torch import torch.nn as nn assert_size_stride = torch._C....
ketan-lambat/contrastive-unpaired-translation
TripletLoss
false
3,825
[ "BSD-3-Clause" ]
0
ea71b3a9603a51b97f1fa8426d5a1beae9260a0d
https://github.com/ketan-lambat/contrastive-unpaired-translation/tree/ea71b3a9603a51b97f1fa8426d5a1beae9260a0d
GLU
import torch import torch.nn as nn import torch.nn.functional class GLU(nn.Module): def __init__(self, input_size, gating_size, output_size): super().__init__() self.gate = nn.Linear(gating_size, input_size) self.lin = nn.Linear(input_size, output_size) def forward(self, x, gating): ...
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.functional assert_size_stride = torch._C._...
MichalOp/StarTrain
GLU
false
17,720
[ "MIT" ]
7
e8dddf879f103e18239ad37b373c9b51fbbe093b
https://github.com/MichalOp/StarTrain/tree/e8dddf879f103e18239ad37b373c9b51fbbe093b
MoEHead
import math import torch from torch.nn import functional as F from torch.autograd import Variable from torch import nn def softmax(x): if x.dim() == 3: return F.softmax(x.transpose(0, 2)).transpose(0, 2) return F.softmax(x) def gumbel_softmax(input, beta=0.5, tau=1.0): noise = input.data.new(*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....
cclauss/nonauto-nmt
MoEHead
false
15,014
[ "BSD-3-Clause" ]
262
efcbe4f2329b140ac3ce06abb6409457cebc8e49
https://github.com/cclauss/nonauto-nmt/tree/efcbe4f2329b140ac3ce06abb6409457cebc8e49
ContrastiveLoss
import torch import torch.utils.data import torch.nn.functional as F import torch.nn.parallel class ContrastiveLoss(torch.nn.Module): """ Contrastive loss function. Based on: http://yann.lecun.com/exdb/publis/pdf/hadsell-chopra-lecun-06.pdf """ def __init__(self, margin=2.0): super(Contra...
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.utils.data impo...
MinesNicaicai/large-scale-pointcloud-matching
ContrastiveLoss
false
5,598
[ "MIT" ]
1
cfe140f2be1110ed75b6edd27538021e513a31c9
https://github.com/MinesNicaicai/large-scale-pointcloud-matching/tree/cfe140f2be1110ed75b6edd27538021e513a31c9
GlobalWeightedAvgPool2d
# 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 from torch im...
huangjiadidi/dfdc_deepfake_challenge
GlobalWeightedAvgPool2d
false
15,549
[ "MIT" ]
499
1f78fe93a5a445ced386e43b3b0378ee567eaa77
https://github.com/huangjiadidi/dfdc_deepfake_challenge/tree/1f78fe93a5a445ced386e43b3b0378ee567eaa77
Actor
# AOT ID: ['0_forward'] from ctypes import c_void_p, c_long, c_int import torch import math import random import os import tempfile from math import inf, nan from torch._inductor.hooks import run_intermediate_hooks from torch._inductor.utils import maybe_profile from torch._inductor.codegen.memory_planning import _alig...
import torch 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 ...
Emily0219/distiller
Actor
false
5,134
[ "Apache-2.0" ]
1
445ed35b671fb54586acc280b53d951f18bf97ae
https://github.com/Emily0219/distiller/tree/445ed35b671fb54586acc280b53d951f18bf97ae
SoftTargetCrossEntropy
import torch import torch.nn as nn import torch.nn.functional as F import torch.distributed class SoftTargetCrossEntropy(nn.Module): def forward(self, x, target): loss = torch.sum(-target * F.log_softmax(x, dim=-1), dim=-1) return loss.mean() 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._inductor.runtime.triton_helpers import math as tl_math import torch.nn as nn ...
ccjlovewsy/relabel_imagenet
SoftTargetCrossEntropy
false
15,005
[ "Apache-2.0" ]
344
6cd84dffe4ce8005395970b2938b3196d0958351
https://github.com/ccjlovewsy/relabel_imagenet/tree/6cd84dffe4ce8005395970b2938b3196d0958351
DotSelector
from _paritybench_helpers import _mock_config import torch import torch as th from torch.distributions import Categorical import torch.nn as nn import torch.nn.functional as F class DotSelector(nn.Module): def __init__(self, input_shape, args): super(DotSelector, self).__init__() self.args = args...
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 as th from torch...
OkYongChoi/smac
DotSelector
false
18,386
[ "Apache-2.0" ]
8
5b2b59e42d17a124e97feeecf9154a3a0aa9d260
https://github.com/OkYongChoi/smac/tree/5b2b59e42d17a124e97feeecf9154a3a0aa9d260
GAE
# 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....
g6ling/Pytorch-Cartpole
GAE
false
15,392
[ "MIT" ]
116
ecb7b622cfefe825ac95388cceb6752413d90a2a
https://github.com/g6ling/Pytorch-Cartpole/tree/ecb7b622cfefe825ac95388cceb6752413d90a2a
LossAttentionLayer
import torch import torch.nn as nn import torch.nn.functional as F import torch.utils.data class LossAttentionLayer(nn.Module): def __init__(self): super(LossAttentionLayer, self).__init__() def forward(self, features, W_1, b_1): out_c = F.linear(features, W_1, b_1) out = out_c - out...
import torch from torch._inductor.select_algorithm import extern_kernels import triton import triton.language as tl from torch._inductor.runtime.triton_heuristics import grid from torch._C import _cuda_getCurrentRawStream as get_raw_stream from torch._inductor.runtime import triton_helpers from torch._inductor.runtime....
AnetaKaczynska/ProtoPNet
LossAttentionLayer
false
1,952
[ "MIT" ]
0
7de2aa57833586ccfd8e63dc835c8cc9db727a2f
https://github.com/AnetaKaczynska/ProtoPNet/tree/7de2aa57833586ccfd8e63dc835c8cc9db727a2f
Critic
# AOT ID: ['0_forward'] from ctypes import c_void_p, c_long, c_int import torch import math import random import os import tempfile from math import inf, nan from torch._inductor.hooks import run_intermediate_hooks from torch._inductor.utils import maybe_profile from torch._inductor.codegen.memory_planning import _alig...
import torch 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_...
dongminlee94/Samsung-DRL-Code
Critic
false
15,207
[ "MIT" ]
116
c96f8739a09cfd708c265954ee8ecf0ea3b67395
https://github.com/dongminlee94/Samsung-DRL-Code/tree/c96f8739a09cfd708c265954ee8ecf0ea3b67395
Bias
import torch import torch.nn as nn class Bias(nn.Module): def __init__(self, size): super().__init__() self.bias = nn.Parameter(torch.Tensor(size)) self.reset_parameters() def reset_parameters(self): nn.init.zeros_(self.bias) def forward(self, x): return 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 import torch.nn as nn assert_size_stride = torch._C._dynamo.guards.assert_size_stride empty_strided_cuda = torch._C._dynamo.guards._empty_st...
daviddavini/cs-260-project
Bias
false
3,390
[ "MIT" ]
0
9e1067f8ff85c8c573262589bbe52740ef11275d
https://github.com/daviddavini/cs-260-project/tree/9e1067f8ff85c8c573262589bbe52740ef11275d
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 itertools import product as product import torch.nn....
AnupKumarGupta/syncnet_python
L2Norm
false
11,249
[ "MIT" ]
0
932b4621cf6aa090baac7c7de22d0649bde9fbbd
https://github.com/AnupKumarGupta/syncnet_python/tree/932b4621cf6aa090baac7c7de22d0649bde9fbbd
FociDetector
import torch import torch.nn as nn import torch.utils.data class FociDetector(nn.Module): def __init__(self, input_channels=3, input_size=17, ksize=5, hidden_channels=10): super(FociDetector, self).__init__() self.conv1 = nn.Conv2d(input_channels, hidden_channels, ksize, 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 import triton_helpers import torch.nn as nn import ...
bharath272/centrosome-analysis
FociDetector
false
6,340
[ "MIT" ]
1
6ae3744be464812b3767909420d7b78cea9da670
https://github.com/bharath272/centrosome-analysis/tree/6ae3744be464812b3767909420d7b78cea9da670
Dunet_2levels
# 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_...
MuhammadIbrahim0/dvae-refiner
Dunet_2levels
false
9,369
[ "MIT" ]
0
034241ce6a5aeb19e9f8952ee996b56412a1f95a
https://github.com/MuhammadIbrahim0/dvae-refiner/tree/034241ce6a5aeb19e9f8952ee996b56412a1f95a
HighwayLayer
# AOT ID: ['0_forward'] from ctypes import c_void_p, c_long, c_int import torch import math import random import os import tempfile from math import inf, nan from torch._inductor.hooks import run_intermediate_hooks from torch._inductor.utils import maybe_profile from torch._inductor.codegen.memory_planning import _alig...
import torch from torch._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....
ROCmSoftwarePlatform/translate
HighwayLayer
false
968
[ "BSD-3-Clause" ]
0
32a6380d914ebe1a6c38c4992aac9600ed3d9810
https://github.com/ROCmSoftwarePlatform/translate/tree/32a6380d914ebe1a6c38c4992aac9600ed3d9810
WRNBottleneck
import torch import torch.nn as nn import torch.utils.data def wrn_conv1x1(in_channels, out_channels, stride, activate): """ 1x1 version of the WRN specific convolution block. Parameters: ---------- in_channels : int Number of input channels. out_channels : int Number of outpu...
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 ...
earhian/imgclsmob
WRNBottleneck
false
6,635
[ "MIT" ]
1
c87c0942420876941868c016211073dec4392e4d
https://github.com/earhian/imgclsmob/tree/c87c0942420876941868c016211073dec4392e4d
RPN_Up
import torch import torch.nn as nn import torch.nn.functional as F class RPN_Up(nn.Module): """ For SiamRPN """ def __init__(self, anchor_nums=5, inchannels=256, outchannels=256, cls_type='thicker'): super(RPN_Up, self).__init__() self.anchor_nums = anchor_nums self.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 import torch.nn as nn import torch.nn.functional as F assert_size_stride = torch...
FMsunyh/SiamDW
RPN_Up
false
9,286
[ "MIT" ]
0
ef7a97ee6bdf732edbb7dc2943daf15b92535019
https://github.com/FMsunyh/SiamDW/tree/ef7a97ee6bdf732edbb7dc2943daf15b92535019
DeepHeadModule
# 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 from ma...
fuankarion/FaceDetection-DSFD
DeepHeadModule
false
12,403
[ "Apache-2.0" ]
0
f1e464ec5c9d95c2fe73edf44e4d414a464839b1
https://github.com/fuankarion/FaceDetection-DSFD/tree/f1e464ec5c9d95c2fe73edf44e4d414a464839b1
TensorClampOptionMaxMin
import torch class TensorClampOptionMaxMin(torch.nn.Module): def forward(self, x): return x.clamp(min=-0.1, max=0.1) 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 import triton_helpers assert_size_stride = torch._C._dynamo.guards.assert_size_stride empty_strided_cuda = torc...
NVIDIA-AI-IOT-private/torch2trt
TensorClampOptionMaxMin
false
10,521
[ "MIT" ]
0
953d60039e0c81e90eea467c3df2e6e3f7040242
https://github.com/NVIDIA-AI-IOT-private/torch2trt/tree/953d60039e0c81e90eea467c3df2e6e3f7040242
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 import torch.nn as nn assert_...
DingXiaoH/GSM-SGD
SEBlock
false
7,960
[ "MIT" ]
40
ffc605651c4c5115dfb8659ebe48ccf71d3955a0
https://github.com/DingXiaoH/GSM-SGD/tree/ffc605651c4c5115dfb8659ebe48ccf71d3955a0
PointerSwitch
import torch import torch.nn as nn class Linear(nn.Linear): """ Apply linear projection to the last dimention of a tensor. """ def forward(self, x): size = x.size() return super().forward(x.contiguous().view(-1, size[-1])).view(* size[:-1], -1) class ConcatAndProject(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 import torch.nn as nn assert_size_stride = torch._C._dynamo.guards.assert_size_s...
aishwaryaprabhat/BRIDGE-Tabular-Semantic-Parsing
PointerSwitch
false
9,665
[ "BSD-3-Clause" ]
0
640858024df444006dfae106a28fdb58f36f687e
https://github.com/aishwaryaprabhat/BRIDGE-Tabular-Semantic-Parsing/tree/640858024df444006dfae106a28fdb58f36f687e
Net
import torch import torch.nn.functional as F import torch.nn as nn class Net(nn.Module): def __init__(self): super(Net, self).__init__() self.conv1 = nn.Conv2d(1, 10, kernel_size=5) self.conv2 = nn.Conv2d(10, 20, kernel_size=5) self.conv2_drop = nn.Dropout2d() self.fc1 = n...
import torch from torch._inductor.select_algorithm import extern_kernels import triton import triton.language as tl from torch._inductor.runtime.triton_heuristics import grid from torch._C import _cuda_getCurrentRawStream as get_raw_stream from torch._inductor.runtime import triton_helpers from torch._inductor.runtime....
generall/Torchlite
Net
false
6,752
[ "MIT" ]
1
2eb3e2a20b7619bd58b0b0fca120e2aefca0e79a
https://github.com/generall/Torchlite/tree/2eb3e2a20b7619bd58b0b0fca120e2aefca0e79a
CustomInverse
import torch class CustomTorchOp(torch.autograd.Function): @staticmethod def symbolic(g, input): return g.op('torchcustom::Add10', input) @staticmethod def forward(ctx, x): return x + 10 class CustomInverse(torch.nn.Module): def forward(self, x, y): ress = CustomTorchO...
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...
shaahji/onnxruntime-extensions
CustomInverse
false
13,063
[ "MIT" ]
0
c30df08aee69db761b97185be9f87160a4efa6bc
https://github.com/shaahji/onnxruntime-extensions/tree/c30df08aee69db761b97185be9f87160a4efa6bc
MyNetwork
from torch.nn import Module import random import torch import torch.nn as nn import torch.optim as optim from torch.utils.data import DataLoader from torch.utils.data import TensorDataset class MyNetwork(Module): def __init__(self, size_input, size_hidden, size_output): """Create simple network""" ...
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....
Thijsvanede/torch-train
MyNetwork
false
2,909
[ "MIT" ]
0
e10c64b1d61f9cdfb84b2645a196be4379851a1a
https://github.com/Thijsvanede/torch-train/tree/e10c64b1d61f9cdfb84b2645a196be4379851a1a
DRS
# 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...
manideep1108/DRS
DRS
false
15,991
[ "MIT" ]
62
0858c3ffea310e9d504b7c2b06db5f281273df56
https://github.com/manideep1108/DRS/tree/0858c3ffea310e9d504b7c2b06db5f281273df56
AmdimNCELoss
# AOT ID: ['0_inference'] from ctypes import c_void_p, c_long, c_int import torch import math import random import os import tempfile from math import inf, nan from torch._inductor.hooks import run_intermediate_hooks from torch._inductor.utils import maybe_profile from torch._inductor.codegen.memory_planning import _al...
import torch from torch._inductor.select_algorithm import extern_kernels import triton import triton.language as tl from torch._inductor.runtime.triton_heuristics import grid from torch._C import _cuda_getCurrentRawStream as get_raw_stream from torch._inductor.runtime import triton_helpers from torch._inductor.runtime....
bartolkaruza/pytorch-lightning-bolts
AmdimNCELoss
false
9,992
[ "Apache-2.0" ]
0
2e903c333c37ea83394c7da2ce826de1b82fb356
https://github.com/bartolkaruza/pytorch-lightning-bolts/tree/2e903c333c37ea83394c7da2ce826de1b82fb356
Hsigmoid
import torch import torch.nn as nn import torch.nn.functional as F class Hsigmoid(nn.Module): def __init__(self, inplace=True): super(Hsigmoid, self).__init__() self.inplace = inplace def forward(self, x): return F.relu6(x + 3.0, inplace=self.inplace) / 6.0 def get_inputs(): re...
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...
IgorDavidyuk/pytorch-mobilenet-v3
Hsigmoid
false
2,359
[ "Apache-2.0" ]
0
48678f80d9390b530cb97966db492cf01d1c4a43
https://github.com/IgorDavidyuk/pytorch-mobilenet-v3/tree/48678f80d9390b530cb97966db492cf01d1c4a43
SimpleAttention
# 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....
RaleLee/conv-emotion
SimpleAttention
false
11,809
[ "MIT" ]
0
1b07223cbdfd52eb31e913e982d18ff1ed3daf08
https://github.com/RaleLee/conv-emotion/tree/1b07223cbdfd52eb31e913e982d18ff1ed3daf08
MultiLabelSoftBinaryCrossEntropy
# 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...
ClementPla/Retinal-Lesions-Segmentation
MultiLabelSoftBinaryCrossEntropy
false
5,014
[ "MIT" ]
1
20fa4ac8eae24814470095bb6e7f08d6751c4e11
https://github.com/ClementPla/Retinal-Lesions-Segmentation/tree/20fa4ac8eae24814470095bb6e7f08d6751c4e11
MultiHeadAttention
import torch import torch.nn as nn def scaled_dot_product_attention(q, k, v, mask=None): """Calculate the attention weights. q, k, v must have matching leading dimensions. k, v must have matching penultimate dimension, i.e.: seq_len_k = seq_len_v. The mask has different shapes depending on its type(pa...
import torch from torch._inductor.select_algorithm import extern_kernels import triton import triton.language as tl from torch._inductor.runtime.triton_heuristics import grid from torch._C import _cuda_getCurrentRawStream as get_raw_stream from torch._inductor.runtime import triton_helpers from torch._inductor.runtime....
ULTR-Community/ULTRA_Pytorch
MultiHeadAttention
false
14,535
[ "Apache-2.0" ]
46
ec4fe329e4239b588a940cb4bcdd6a321aade679
https://github.com/ULTR-Community/ULTRA_Pytorch/tree/ec4fe329e4239b588a940cb4bcdd6a321aade679
AE
# 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.functional as...
peterfeifanchen/scGNN
AE
false
16,230
[ "MIT" ]
60
4ef9013ad0f44f9f51708e9bb60e5138f5706593
https://github.com/peterfeifanchen/scGNN/tree/4ef9013ad0f44f9f51708e9bb60e5138f5706593
Joiner
# 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...
Andrewzh112/experiments
Joiner
false
47
[ "MIT" ]
0
a35fd9e6157cd9a746f82229c2487539f668716a
https://github.com/Andrewzh112/experiments/tree/a35fd9e6157cd9a746f82229c2487539f668716a
SoftDiceLoss
# 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 numpy as np from torch import nn assert_size_stride = torch._C._dynamo.guards.assert_size_stride empty_strided_cuda = torch._C._dynam...
Project-SwaG/igvc-software
SoftDiceLoss
false
14,243
[ "MIT" ]
100
cfe5ad5ae06199030544560af7e4ebf732cd3004
https://github.com/Project-SwaG/igvc-software/tree/cfe5ad5ae06199030544560af7e4ebf732cd3004
torch_fakeint8_to_float
# 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...
ozendelait/pytorch-semseg
torch_fakeint8_to_float
false
7,434
[ "MIT" ]
1
200491febd653bd26befcd5b3d52c614aa832b7e
https://github.com/ozendelait/pytorch-semseg/tree/200491febd653bd26befcd5b3d52c614aa832b7e
LocationLayer
# 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 from torch import nn assert_size_stride = torch._C._dyna...
FadyKhalaf/tacotron2
LocationLayer
false
463
[ "BSD-3-Clause" ]
0
d9bf28a6d286aab42bce46df9f26a9a3d7c2f01f
https://github.com/FadyKhalaf/tacotron2/tree/d9bf28a6d286aab42bce46df9f26a9a3d7c2f01f
Confucius
import torch import torch.nn as nn class Confucius(nn.Module): def __init__(self, output_dim, expose_dim, hidden): super(Confucius, self).__init__() self.output_fc = nn.Linear(output_dim, hidden) self.fc_expose = nn.Linear(expose_dim, hidden) self.fc_final = nn.Linear(hidden, 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...
Fuchai/FixMatch-pytorch
Confucius
false
11,434
[ "MIT" ]
0
105f40678414182d194945b77d24d658b1e84850
https://github.com/Fuchai/FixMatch-pytorch/tree/105f40678414182d194945b77d24d658b1e84850
TripletMarginCosineLoss
# 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 from torch.nn import Module ...
monkeyhjy/aspect_summarization
TripletMarginCosineLoss
false
10,572
[ "MIT" ]
0
3018815cd0aeccb752e9f51a4d49453c4f441650
https://github.com/monkeyhjy/aspect_summarization/tree/3018815cd0aeccb752e9f51a4d49453c4f441650
ResARModule
# 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.utils.spectral_norm import spectral_norm fro...
mansoorcheema/segan_pytorch
ResARModule
false
10,699
[ "MIT" ]
0
8f3b401e42cadfd1f8ad57a8ba0e89c16cc7ee65
https://github.com/mansoorcheema/segan_pytorch/tree/8f3b401e42cadfd1f8ad57a8ba0e89c16cc7ee65
PositionwiseFeedForward
import torch import torch.nn as nn import torch.nn.functional as F class PositionwiseFeedForward(nn.Module): """Positionwise feed forward :param int idim: input dimenstion :param int hidden_units: number of hidden units :param float dropout_rate: dropout rate """ def __init__(self, idim, hid...
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...
pkufool/DaVinci-Speech
PositionwiseFeedForward
false
7,475
[ "MIT" ]
1
98602363168476356d492852093adbe65c65ac95
https://github.com/pkufool/DaVinci-Speech/tree/98602363168476356d492852093adbe65c65ac95
Get_gradient_nopadding
# 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.triton_helpers import libdevice import torch.nn as ...
JoeyBallentine/ESRGAN
Get_gradient_nopadding
false
13,905
[ "Apache-2.0" ]
95
9000b43e3acf8709626f45951bb91ace1d983359
https://github.com/JoeyBallentine/ESRGAN/tree/9000b43e3acf8709626f45951bb91ace1d983359
encoder_block
# 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...
ninamiolane/quicksilver
encoder_block
false
16,188
[ "Apache-2.0" ]
126
1baf251360dadea0afa3daaa09942d9d2d7c71fb
https://github.com/ninamiolane/quicksilver/tree/1baf251360dadea0afa3daaa09942d9d2d7c71fb
IndepAnisotropicGaussianUVLoss
import math import torch import torch.utils.data from torch import nn import torch.nn.functional as F class IndepAnisotropicGaussianUVLoss(nn.Module): """ Loss for the case of independent residuals with anisotropic covariances: $Sigma_i = sigma_i^2 I + r_i r_i^T$ The loss (negative log likelihood) is ...
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 math...
TinBacon/FastAutoAugmentation
IndepAnisotropicGaussianUVLoss
false
5,892
[ "Apache-2.0" ]
1
011e4e348fd9a937a29df11695dc71410f555d0a
https://github.com/TinBacon/FastAutoAugmentation/tree/011e4e348fd9a937a29df11695dc71410f555d0a
EQConv2D
# 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...
AjaybirRandhawa/Face-Generator
EQConv2D
false
18,442
[ "Apache-2.0" ]
2
9cac0822b6e6337c3599e949154ce44eeae5746b
https://github.com/AjaybirRandhawa/Face-Generator/tree/9cac0822b6e6337c3599e949154ce44eeae5746b
ModelRegressionGex2Adt
import torch import torch.utils.data import torch.nn.functional as F import torch.nn as nn class ModelRegressionGex2Adt(nn.Module): def __init__(self, dim_mod1, dim_mod2): super(ModelRegressionGex2Adt, self).__init__() self.input_ = nn.Linear(dim_mod1, 512) self.dropout1 = nn.Dropout(p=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.triton_helpers import libdevice import torch.utils....
Permoment-95/neurips2021_multimodal_topmethods
ModelRegressionGex2Adt
false
9,479
[ "MIT" ]
0
017bc23b366a80ba9b1c2a47ea6c44124f77a7ca
https://github.com/Permoment-95/neurips2021_multimodal_topmethods/tree/017bc23b366a80ba9b1c2a47ea6c44124f77a7ca
GaussianMixtureReconstructionLoss
# 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 nump...
v-a-s-a/diffvg
GaussianMixtureReconstructionLoss
false
4,479
[ "Apache-2.0" ]
0
3685f3d47a5a4e5c76c68643ebf383f809ba59ed
https://github.com/v-a-s-a/diffvg/tree/3685f3d47a5a4e5c76c68643ebf383f809ba59ed
GroupNorm32
# 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_...
GastonMazzei/escher-project-website
GroupNorm32
false
17,293
[ "MIT" ]
5
b3861eeeca11a7c31502f539ded9ae718f3d9e2e
https://github.com/GastonMazzei/escher-project-website/tree/b3861eeeca11a7c31502f539ded9ae718f3d9e2e
Network
# 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 ...
PuzeLiu/mushroom-rl
Network
false
14,251
[ "MIT" ]
344
99942b425e66b4ddcc26009d7105dde23841e95d
https://github.com/PuzeLiu/mushroom-rl/tree/99942b425e66b4ddcc26009d7105dde23841e95d
ThreeLayerSemSegNetWideView
# 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....
benkoger/kasanka
ThreeLayerSemSegNetWideView
false
12,161
[ "Apache-2.0" ]
0
d5b1d32b7abf54845af0832da577137397089001
https://github.com/benkoger/kasanka/tree/d5b1d32b7abf54845af0832da577137397089001
BertSelfOutput
from _paritybench_helpers import _mock_config import torch import torch.nn as nn class BertSelfOutput(nn.Module): def __init__(self, config): super(BertSelfOutput, self).__init__() self.dense = nn.Linear(config.hidden_size, config.hidden_size) self.dropout = nn.Dropout(config.hidden_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.triton_helpers import libdevice import torch.nn as ...
QuLiang132/nlp-notebook
BertSelfOutput
false
5,728
[ "MIT" ]
1
b7659867b967d1e541bee5617cee017b3b67d9ba
https://github.com/QuLiang132/nlp-notebook/tree/b7659867b967d1e541bee5617cee017b3b67d9ba
GCN
import torch import torch.nn as nn import torch.nn.functional as F class GCN(nn.Module): def __init__(self, dim_nd, dim_ft, dim_hd, dim_ot, drop_rate=0.5): super(GCN, self).__init__() self.lin1 = nn.Linear(dim_ft, dim_hd) self.lin2 = nn.Linear(dim_hd, dim_ot) self.act1 = F.relu ...
import torch from torch._inductor.select_algorithm import extern_kernels import triton import triton.language as tl from torch._inductor.runtime.triton_heuristics import grid from torch._C import _cuda_getCurrentRawStream as get_raw_stream from torch._inductor.runtime import triton_helpers import torch.nn as nn import ...
lanseyege/Graph
GCN
false
12,694
[ "MIT" ]
0
ec94502ea59d2b68de095d8160f37aa22d26f8cb
https://github.com/lanseyege/Graph/tree/ec94502ea59d2b68de095d8160f37aa22d26f8cb
AdMSoftmaxLoss
# 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....
gcambara/s3prl
AdMSoftmaxLoss
false
15,484
[ "MIT" ]
856
33284ebde3a903ed8604d6dae85669d0174ae1d3
https://github.com/gcambara/s3prl/tree/33284ebde3a903ed8604d6dae85669d0174ae1d3
VoxelFeatureExtractor
# 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...
eraofelix/PV-RCNN
VoxelFeatureExtractor
false
6,647
[ "MIT" ]
1
6361ec99cc1c92120263ef56b2c2b003c2cd7264
https://github.com/eraofelix/PV-RCNN/tree/6361ec99cc1c92120263ef56b2c2b003c2cd7264
AttDec
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 from torch._inductor.runtime.triton_helpers import libdevice import torch.nn as ...
IacoSimoncini/tfvaegan
AttDec
false
13,204
[ "MIT" ]
0
157b526d65d0b0d5412f4be6fed02fc7d6325827
https://github.com/IacoSimoncini/tfvaegan/tree/157b526d65d0b0d5412f4be6fed02fc7d6325827
GroupLinear
import torch import torch.nn as nn import torch.nn.parallel import torch.utils.data class GroupLinear(nn.Module): """ Group Linear operator """ def __init__(self, in_planes, out_channels, groups=1, bias=True): super(GroupLinear, self).__init__() assert in_planes % groups == 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 import torch.nn.parallel import torch.utils.data assert_si...
dumpmemory/TokenLabeling
GroupLinear
false
15,256
[ "Apache-2.0" ]
367
9dbfd59aedecfe83f6f3253db4e99b82359d48ac
https://github.com/dumpmemory/TokenLabeling/tree/9dbfd59aedecfe83f6f3253db4e99b82359d48ac
L2Loss
# AOT ID: ['0_inference'] from ctypes import c_void_p, c_long, c_int import torch import math import random import os import tempfile from math import inf, nan from torch._inductor.hooks import run_intermediate_hooks from torch._inductor.utils import maybe_profile from torch._inductor.codegen.memory_planning import _al...
import torch import triton import triton.language as tl from torch._inductor.runtime.triton_heuristics import grid from torch._C import _cuda_getCurrentRawStream as get_raw_stream from torch._inductor.runtime import triton_helpers from torch import nn from functools import * assert_size_stride = torch._C._dynamo.guards...
JaviBite/TFG
L2Loss
false
2,399
[ "MIT" ]
0
e406580697132f53b63a7c983daaa098af45b52c
https://github.com/JaviBite/TFG/tree/e406580697132f53b63a7c983daaa098af45b52c
FiLMNetwork
# 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...
bblinn2017/IM-NET-pytorch
FiLMNetwork
false
3,184
[ "MIT" ]
0
82ff646aaf2f93ae1560debb40fe05f1420ff655
https://github.com/bblinn2017/IM-NET-pytorch/tree/82ff646aaf2f93ae1560debb40fe05f1420ff655
RelativeMSE
import torch class RelativeMSE(torch.nn.Module): """Relative Mean-Squared Error. :math:`0.5 * \\frac{(x - y)^2}{y^2 + \\epsilon}` Args: eps(float): small number to avoid division by 0. """ def __init__(self, eps=0.01): super(RelativeMSE, self).__init__() self.eps = eps ...
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...
Mephisto405/WCMC-Public
RelativeMSE
false
8,540
[ "BSD-2-Clause" ]
19
bd54f218d5239db84f404fbe1b465f9497bcf9e4
https://github.com/Mephisto405/WCMC-Public/tree/bd54f218d5239db84f404fbe1b465f9497bcf9e4
FixupResidualChain
# 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...
IlyaBizyaev/ttools
FixupResidualChain
false
8,323
[ "MIT" ]
11
b1435b19f397ce1baff9daed3cb287e52a029fdb
https://github.com/IlyaBizyaev/ttools/tree/b1435b19f397ce1baff9daed3cb287e52a029fdb
Normalization
# 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...
Inkln/StyleTransferWithCatalyst
Normalization
false
8,298
[ "Apache-2.0" ]
11
c3181ecdfd32160907efc2d9d917a55925c25c11
https://github.com/Inkln/StyleTransferWithCatalyst/tree/c3181ecdfd32160907efc2d9d917a55925c25c11
MixedLoss
import torch import torch.nn as nn import torch.nn.functional as F def dice_loss(input, target): input = torch.sigmoid(input) smooth = 1.0 iflat = input.view(-1) tflat = target.view(-1) intersection = (iflat * tflat).sum() return (2.0 * intersection + smooth) / (iflat.sum() + tflat.sum() + 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...
xkp793003821/kaggle-tgs-salt
MixedLoss
false
4,586
[ "MIT" ]
0
4acd7f8b6aff914e2c8558677d6dac8b5ddc1f30
https://github.com/xkp793003821/kaggle-tgs-salt/tree/4acd7f8b6aff914e2c8558677d6dac8b5ddc1f30
MultiheadAttention
# AOT ID: ['0_forward'] from ctypes import c_void_p, c_long, c_int import torch import math import random import os import tempfile from math import inf, nan from torch._inductor.hooks import run_intermediate_hooks from torch._inductor.utils import maybe_profile from torch._inductor.codegen.memory_planning import _alig...
import torch from torch._inductor.select_algorithm import extern_kernels import triton import triton.language as tl from torch._inductor.runtime.triton_heuristics import grid from torch._C import _cuda_getCurrentRawStream as get_raw_stream from torch._inductor.runtime import triton_helpers from torch._inductor.runtime....
wukevin/RoseTTAFold
MultiheadAttention
false
4,562
[ "MIT" ]
0
e3c15dbf4bc1e4f8726e26c63aca1625188da803
https://github.com/wukevin/RoseTTAFold/tree/e3c15dbf4bc1e4f8726e26c63aca1625188da803
BCELoss
import torch import torch.distributed import torch import torch.nn as nn import torch.nn.functional as F import torch.nn.functional import torch.utils.data import torch.optim import torch.optim.lr_scheduler def bce_loss(pred, target, use_sigmoid=True): """Quality Focal Loss (QFL) is from `Generalized Focal Loss: ...
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...
zhangzhengde0225/SwinTrack
BCELoss
false
16,795
[ "MIT" ]
143
526be17f8ef266cb924c6939bd8dda23e9b73249
https://github.com/zhangzhengde0225/SwinTrack/tree/526be17f8ef266cb924c6939bd8dda23e9b73249
Actor
import torch import torch.nn as nn import torch.nn.functional as F class Actor(nn.Module): def __init__(self, state_dim, action_dim, max_action): super(Actor, self).__init__() self.l1 = nn.Linear(state_dim, 5) self.l2 = nn.Linear(5, 3) self.l3 = nn.Linear(3, action_dim) se...
import torch from torch._inductor.select_algorithm import extern_kernels import triton import triton.language as tl from torch._inductor.runtime.triton_heuristics import grid from torch._C import _cuda_getCurrentRawStream as get_raw_stream from torch._inductor.runtime import triton_helpers from torch._inductor.runtime....
chenbq1234/CityLearn
Actor
false
6,422
[ "MIT" ]
1
baa162435954ecd58e7f4769a46fa9046f4d2cf6
https://github.com/chenbq1234/CityLearn/tree/baa162435954ecd58e7f4769a46fa9046f4d2cf6
Attn
import math import torch import torch.nn as nn import torch.nn.functional as F class Attn(nn.Module): def __init__(self, method, hidden_size): super(Attn, self).__init__() self.method = method self.hidden_size = hidden_size self.attn = nn.Linear(self.hidden_size * 2, hidden_size) ...
import torch from torch._inductor.select_algorithm import extern_kernels import triton import triton.language as tl from torch._inductor.runtime.triton_heuristics import grid from torch._C import _cuda_getCurrentRawStream as get_raw_stream from torch._inductor.runtime import triton_helpers from torch._inductor.runtime....
Aleph0Inc/HDSA-Dialog
Attn
false
13,264
[ "MIT" ]
146
88e2604adb5dc38ae32205410b15b2ac39116ecd
https://github.com/Aleph0Inc/HDSA-Dialog/tree/88e2604adb5dc38ae32205410b15b2ac39116ecd
Discriminate_Loss
import torch import torch.nn as nn import torch.nn.functional import torch.nn class Discriminate_Loss(nn.Module): def __init__(self): super().__init__() def forward(self, real_outputs, fake_outputs): return torch.mean((real_outputs - 1) ** 2 / 2) + torch.mean( fake_outputs ** 2 /...
import torch import triton import triton.language as tl from torch._inductor.runtime.triton_heuristics import grid from torch._C import _cuda_getCurrentRawStream as get_raw_stream from torch._inductor.runtime import triton_helpers import torch.nn as nn import torch.nn.functional import torch.nn assert_size_stride = tor...
ChmarsLuo/Hero_anomaly_prediction
Discriminate_Loss
false
4,992
[ "Apache-2.0" ]
1
dba2322dabb3476466e296db6c316fc08e0cb11d
https://github.com/ChmarsLuo/Hero_anomaly_prediction/tree/dba2322dabb3476466e296db6c316fc08e0cb11d
LatentLoss
# 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...
CSID-DGU/-2020-1-OSSP1-ninetynine-2
LatentLoss
false
4,941
[ "MIT" ]
1
b1824254882eeea0ee44e4e60896b72c51ef1d2c
https://github.com/CSID-DGU/-2020-1-OSSP1-ninetynine-2/tree/b1824254882eeea0ee44e4e60896b72c51ef1d2c
GaussianKLLoss
import torch import torch.nn as nn class GaussianKLLoss(nn.Module): def __init__(self): super(GaussianKLLoss, self).__init__() def forward(self, mu1, logvar1, mu2, logvar2): numerator = logvar1.exp() + torch.pow(mu1 - mu2, 2) fraction = torch.div(numerator, logvar2.exp()) kl ...
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...
johnson7788/Info-HCVAE
GaussianKLLoss
false
12,628
[ "Apache-2.0" ]
0
f43bf705aab3dcdc340ded3be09fb87420a48c51
https://github.com/johnson7788/Info-HCVAE/tree/f43bf705aab3dcdc340ded3be09fb87420a48c51
DisAlignFastRCNNOutputLayers
# 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 numpy as np import torch.nn as nn import torch.utils.data from itertools ...
tonysy/cvpods
DisAlignFastRCNNOutputLayers
false
16,599
[ "Apache-2.0" ]
548
e322d7842ca0e34b1ef6237ea6d350633efc793a
https://github.com/tonysy/cvpods/tree/e322d7842ca0e34b1ef6237ea6d350633efc793a
ContentLoss
import torch from torch import nn class ContentLoss(nn.Module): def __init__(self): super().__init__() def forward(self, x, y): return 0.5 * torch.sum((x - y) ** 2) 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 from torch._inductor.runtime import triton_helpers from torch import nn assert_size_stride = torch._C._dynamo.guards.assert_size_stride empt...
Enigmatisms/NeuralStyle
ContentLoss
false
5,130
[ "Apache-2.0" ]
1
27b435b5c51b41427e9f465793a0b81ad7248ab8
https://github.com/Enigmatisms/NeuralStyle/tree/27b435b5c51b41427e9f465793a0b81ad7248ab8
TVLoss
# 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 import torch.utils.data from torchvision.transforms import * assert_size_stride = torch._C._dynamo.guards.assert_size_s...
RyanMoussouni/iSeeBetter
TVLoss
false
14,336
[ "MIT" ]
327
af193ae0852f8e477fcd6875dce874eb5092a24a
https://github.com/RyanMoussouni/iSeeBetter/tree/af193ae0852f8e477fcd6875dce874eb5092a24a
QNetwork
import torch import torch.nn.functional as F import torch.nn as nn class QNetwork(nn.Module): def __init__(self, state_size, action_size, seed, num_layers=1, hidden_size=64): """ Initialize parameters and build model. parameters: state_size : (int) Dimension of each s...
import torch from torch._inductor.select_algorithm import extern_kernels import triton import triton.language as tl from torch._inductor.runtime.triton_heuristics import grid from torch._C import _cuda_getCurrentRawStream as get_raw_stream from torch._inductor.runtime import triton_helpers import torch.nn as nn assert_...
RevanMacQueen/DRQN
QNetwork
false
9,410
[ "MIT" ]
0
7b8a743935679f65817ad4f41d28c2c155e7a62a
https://github.com/RevanMacQueen/DRQN/tree/7b8a743935679f65817ad4f41d28c2c155e7a62a
MergeLayer
import torch class MergeLayer(torch.nn.Module): def __init__(self, dim1, dim2, dim3, dim4): super().__init__() self.fc1 = torch.nn.Linear(dim1 + dim2, dim3) self.fc2 = torch.nn.Linear(dim3, dim4) self.act = torch.nn.ReLU() torch.nn.init.xavier_normal_(self.fc1.weight) ...
import torch from torch._inductor.select_algorithm import extern_kernels import triton import triton.language as tl from torch._inductor.runtime.triton_heuristics import grid from torch._C import _cuda_getCurrentRawStream as get_raw_stream from torch._inductor.runtime import triton_helpers assert_size_stride = torch._C...
IDSC-io/vre-tgn
MergeLayer
false
9,138
[ "Apache-2.0" ]
0
46e8327e3befe67003874fa70b384a511523f8f7
https://github.com/IDSC-io/vre-tgn/tree/46e8327e3befe67003874fa70b384a511523f8f7
AE_4D
# 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...
Autoencoders-compression-anomaly/Various-AEs-Compression-Tensorflow
AE_4D
false
4,888
[ "Apache-2.0" ]
1
772ba547c2b7d5d90e79382bf4d8a50e4d733210
https://github.com/Autoencoders-compression-anomaly/Various-AEs-Compression-Tensorflow/tree/772ba547c2b7d5d90e79382bf4d8a50e4d733210
LeastSquaresGenerativeAdversarialLoss
# 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.utils.data assert_size_stride = torch._C._dynamo.guard...
XianyuanLiu/Transfer-Learning-Library
LeastSquaresGenerativeAdversarialLoss
false
10,143
[ "MIT" ]
0
25f83f32437032df88ca6101ecd1f63ec7a0aa2c
https://github.com/XianyuanLiu/Transfer-Learning-Library/tree/25f83f32437032df88ca6101ecd1f63ec7a0aa2c