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
EqualLinear
# 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...
GuiCamargoX/gans_pytorch
EqualLinear
false
9,142
[ "MIT" ]
0
3103184e54ea0d2922fc664a994a912bf61db426
https://github.com/GuiCamargoX/gans_pytorch/tree/3103184e54ea0d2922fc664a994a912bf61db426
FocalTverskyLoss
# 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...
Exdenta/torchsat
FocalTverskyLoss
false
13,656
[ "MIT" ]
316
70ea3db758757104fb3ba618ddf7997f0f3a75b4
https://github.com/Exdenta/torchsat/tree/70ea3db758757104fb3ba618ddf7997f0f3a75b4
Simplenet
import torch from torch.optim.lr_scheduler import * import torch.nn.functional as F import torch.optim import torch.nn as nn import torch.utils.data import torch.utils.model_zoo class Simplenet(nn.Module): def __init__(self): super(Simplenet, self).__init__() self.conv1 = nn.Conv2d(3, 6, 5) ...
import torch from torch._inductor.select_algorithm import extern_kernels import triton import triton.language as tl from 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.optim.lr_scheduler...
ChitienSun/NCTU_DLSR_final_project
Simplenet
false
293
[ "MIT" ]
0
9d647426c274afc7651ea4fe9a11f2a0a0fd1fba
https://github.com/ChitienSun/NCTU_DLSR_final_project/tree/9d647426c274afc7651ea4fe9a11f2a0a0fd1fba
Classifier
import torch from torch import nn import torch.nn.functional as F class Classifier(nn.Module): def __init__(self, input_size): super().__init__() self.hidden_1 = nn.Linear(input_size, 100) self.hidden_2 = nn.Linear(100, 100) self.hidden_3 = nn.Linear(100, 50) self.hidden_4...
import torch from torch._inductor.select_algorithm import extern_kernels import triton import triton.language as tl from 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....
Develop-Packt/Solving-a-Classification-Problem-with-DNNs-Using-PyTorch
Classifier
false
7,977
[ "MIT" ]
16
d0fe33c71242da256e3727bb49417a08de39c85c
https://github.com/Develop-Packt/Solving-a-Classification-Problem-with-DNNs-Using-PyTorch/tree/d0fe33c71242da256e3727bb49417a08de39c85c
ContractingBlock
# 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_...
furkannturkmen/pytorch-CNN-architecture
ContractingBlock
false
10,124
[ "MIT" ]
0
6a864811f51409c1526224c288fe608010e0c888
https://github.com/furkannturkmen/pytorch-CNN-architecture/tree/6a864811f51409c1526224c288fe608010e0c888
MHAScoresCalculation
import math import torch import torch.nn as nn import torch.cuda import torch.backends.cudnn import torch.backends.mkl class MHAScoresCalculation(nn.Module): def __init__(self, dim_per_head, softmax_dim=-1): super(MHAScoresCalculation, self).__init__() self.softmax = nn.Softmax(dim=softmax_dim) ...
import torch from torch._inductor.select_algorithm import extern_kernels import triton import triton.language as tl from torch._inductor.runtime.triton_heuristics import grid from torch._C import _cuda_getCurrentRawStream as get_raw_stream from torch._inductor.runtime import triton_helpers 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
SymDecoder
import torch from torch import nn import torch.utils.data class SymDecoder(nn.Module): def __init__(self, featureSize, symmetrySize, hiddenSize): super(SymDecoder, self).__init__() self.decode = nn.Linear(featureSize, hiddenSize) self.second = nn.Linear(hiddenSize, hiddenSize) sel...
import torch from torch._inductor.select_algorithm import extern_kernels import triton import triton.language as tl from torch._inductor.runtime.triton_heuristics import grid from torch._C import _cuda_getCurrentRawStream as get_raw_stream from torch._inductor.runtime.triton_helpers import libdevice from torch import n...
BigkoalaZhu/SCORES
SymDecoder
false
7,793
[ "MIT" ]
16
8332733c375ee85c02bd34c2adce6a3213aad3c4
https://github.com/BigkoalaZhu/SCORES/tree/8332733c375ee85c02bd34c2adce6a3213aad3c4
F1
import torch import torch.nn as nn class Recall(nn.Module): """ This class implements the recall score. No gradients supported. """ def __init__(self, threshold: 'float'=0.5) ->None: """ Constructor method :param threshold: (float) Threshold to be applied """ s...
import torch import triton import triton.language as tl from torch._inductor.runtime.triton_heuristics import grid from torch._C import _cuda_getCurrentRawStream as get_raw_stream from torch._inductor.runtime import triton_helpers import torch.nn as nn assert_size_stride = torch._C._dynamo.guards.assert_size_stride emp...
ChristophReich1996/Cell-DETR
F1
false
13,501
[ "MIT" ]
55
4d0c3a2d3ffd19184c8443e5b3a6dccc053c77ea
https://github.com/ChristophReich1996/Cell-DETR/tree/4d0c3a2d3ffd19184c8443e5b3a6dccc053c77ea
MultiHeadedAttention
import math import torch import torch.nn as nn import torch.nn.functional as F class MultiHeadedAttention(nn.Module): def __init__(self, num_head, d_model, dropout=0.1): super(MultiHeadedAttention, self).__init__() assert d_model % num_head == 0 self.d_k = d_model // num_head self...
import torch from torch._inductor.select_algorithm import extern_kernels import triton import triton.language as tl from torch._inductor.runtime.triton_heuristics import grid from torch._C import _cuda_getCurrentRawStream as get_raw_stream from torch._inductor.runtime import triton_helpers from torch._inductor.runtime....
qi700/my_point_summarize
MultiHeadedAttention
false
4,155
[ "Apache-2.0" ]
0
e269c2d0411fc61ea34055c3080472bc9111bcaa
https://github.com/qi700/my_point_summarize/tree/e269c2d0411fc61ea34055c3080472bc9111bcaa
ConvTemporalGraphical
# 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...
Hunkzer/mmskeleton
ConvTemporalGraphical
false
2,361
[ "Apache-2.0" ]
0
551e3b4fa01330b23caab5815a40fbd848400b15
https://github.com/Hunkzer/mmskeleton/tree/551e3b4fa01330b23caab5815a40fbd848400b15
WeightQuantizer
# 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....
XueYue404/QNN
WeightQuantizer
false
1,255
[ "MIT" ]
0
43cea970404156b591088d77672df58261edf1eb
https://github.com/XueYue404/QNN/tree/43cea970404156b591088d77672df58261edf1eb
Illumination_Alone
# AOT ID: ['0_forward'] from ctypes import c_void_p, c_long, c_int import torch import math import random import os import tempfile from math import inf, nan from torch._inductor.hooks import run_intermediate_hooks from torch._inductor.utils import maybe_profile from torch._inductor.codegen.memory_planning import _alig...
import torch from torch._inductor.select_algorithm import extern_kernels import triton import triton.language as tl from torch._inductor.runtime.triton_heuristics import grid from torch._C import _cuda_getCurrentRawStream as get_raw_stream from torch._inductor.runtime import triton_helpers import torch.nn as nn assert_...
AndersonYong/URetinex-Net-Retinex-based-Deep-Unfolding-Network-for-Low-light-Image-Enhancem
Illumination_Alone
false
10,007
[ "MIT" ]
0
9d837b8df9c761defb1eca390b3a60aa4a6fbb1a
https://github.com/AndersonYong/URetinex-Net-Retinex-based-Deep-Unfolding-Network-for-Low-light-Image-Enhancem/tree/9d837b8df9c761defb1eca390b3a60aa4a6fbb1a
DiscriminatorHingeLoss
# 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...
kpandey008/SAGAN
DiscriminatorHingeLoss
false
10,432
[ "MIT" ]
0
8e673d2ccabeb0450faf30dcb347b9ff2d710ae2
https://github.com/kpandey008/SAGAN/tree/8e673d2ccabeb0450faf30dcb347b9ff2d710ae2
Conv2dTime
import torch import torch.nn as nn class Conv2dTime(nn.Conv2d): """ Implements time dependent 2d convolutions, by appending the time variable as an extra channel. """ def __init__(self, in_channels, *args, **kwargs): super(Conv2dTime, self).__init__(in_channels + 1, *args, **kwargs) ...
import torch from torch._inductor.select_algorithm import extern_kernels import triton import triton.language as tl from torch._inductor.runtime.triton_heuristics import grid from torch._C import _cuda_getCurrentRawStream as get_raw_stream import torch.nn as nn assert_size_stride = torch._C._dynamo.guards.assert_size_s...
anway/augmented-neural-odes
Conv2dTime
false
14,883
[ "MIT" ]
449
561cfa540ef292d117ba9cf083758281774f3f22
https://github.com/anway/augmented-neural-odes/tree/561cfa540ef292d117ba9cf083758281774f3f22
projection_model
import torch class projection_model(torch.nn.Module): def __init__(self, neo_hidden, clip_hidden=512): super(projection_model, self).__init__() self.fc1 = torch.nn.Linear(neo_hidden, neo_hidden // 2) self.act = torch.nn.GELU() self.fc2 = torch.nn.Linear(neo_hidden // 2, clip_hidde...
import torch from torch._inductor.select_algorithm import extern_kernels import triton import triton.language as tl from torch._inductor.runtime.triton_heuristics import grid from torch._C import _cuda_getCurrentRawStream as get_raw_stream from torch._inductor.runtime.triton_helpers import libdevice assert_size_stride ...
ShivanshuPurohit/GPT-Neo-visual-grounding
projection_model
false
17,910
[ "Apache-2.0" ]
4
9c938257a688ef5ae8bc1b87b61d943aa158e880
https://github.com/ShivanshuPurohit/GPT-Neo-visual-grounding/tree/9c938257a688ef5ae8bc1b87b61d943aa158e880
FiLMLayer
import torch from torch import nn class FiLMLayer(nn.Module): def __init__(self, input_dim, hidden_dim): super().__init__() self.layer = nn.Linear(input_dim, hidden_dim) def forward(self, x, freq, phase_shift): x = self.layer(x) freq = freq.unsqueeze(1).expand_as(x) p...
import torch from torch._inductor.select_algorithm import extern_kernels import triton import triton.language as tl from torch._inductor.runtime.triton_heuristics import grid from torch._C import _cuda_getCurrentRawStream as get_raw_stream from torch._inductor.runtime.triton_helpers import math as tl_math from torch im...
xh-liu-tech/CIPS-3D
FiLMLayer
false
11,103
[ "MIT" ]
0
8910dfcf19bb86aab2287d652ae4e3666806b511
https://github.com/xh-liu-tech/CIPS-3D/tree/8910dfcf19bb86aab2287d652ae4e3666806b511
DEC_Conv
# 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...
amonod/udvd
DEC_Conv
false
1,440
[ "MIT" ]
0
a1ccb777d205255ac68c40efb93dd3996f562c45
https://github.com/amonod/udvd/tree/a1ccb777d205255ac68c40efb93dd3996f562c45
TransformerLayer
# 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....
COEN-390/YOLOv5-Lite
TransformerLayer
false
11,283
[ "MIT" ]
0
06a53f5d001c5d37729f55f47cbd46cc8eb63f84
https://github.com/COEN-390/YOLOv5-Lite/tree/06a53f5d001c5d37729f55f47cbd46cc8eb63f84
MutliClassNN
import torch from torch import nn class MutliClassNN(nn.Module): def __init__(self, num_features, num_labels): super(MutliClassNN, self).__init__() self.fc1 = torch.nn.Linear(num_features, 1000) self.fc3 = torch.nn.Linear(1000, num_labels) def forward(self, x): x = torch.relu...
import torch from torch._inductor.select_algorithm import extern_kernels import triton import triton.language as tl from torch._inductor.runtime.triton_heuristics import grid from torch._C import _cuda_getCurrentRawStream as get_raw_stream from torch._inductor.runtime import triton_helpers from torch import nn assert_s...
mhagenow01/ECE532ClassifierComparison
MutliClassNN
false
10,477
[ "MIT" ]
0
5066931d97aae2c25c8b9451fe3d12021f5748a1
https://github.com/mhagenow01/ECE532ClassifierComparison/tree/5066931d97aae2c25c8b9451fe3d12021f5748a1
Downsample
import torch import torch.nn as nn import torch.nn.parallel class Downsample(nn.Module): """ Image to Patch Embedding, downsampling between stage1 and stage2 """ def __init__(self, in_embed_dim, out_embed_dim, patch_size): super().__init__() self.proj = nn.Conv2d(in_embed_dim, out_emb...
import torch from torch._inductor.select_algorithm import extern_kernels import 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 assert_size_stride = torch._C._dy...
QLSong/cv-classify
Downsample
false
2,737
[ "Apache-2.0" ]
0
02f53d03868f299a08b5c97a266b50a7fdcd3f2b
https://github.com/QLSong/cv-classify/tree/02f53d03868f299a08b5c97a266b50a7fdcd3f2b
TestSub
# 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...
AliaksandrSiarohin/pytorch2keras
TestSub
false
8,900
[ "MIT" ]
0
9c8ee213cff43ade152b1de78fa76fd05ec8b40a
https://github.com/AliaksandrSiarohin/pytorch2keras/tree/9c8ee213cff43ade152b1de78fa76fd05ec8b40a
HessianResp
# AOT ID: ['0_forward'] from ctypes import c_void_p, c_long, c_int import torch import math import random import os import tempfile from math import inf, nan from torch._inductor.hooks import run_intermediate_hooks from torch._inductor.utils import maybe_profile from torch._inductor.codegen.memory_planning import _alig...
import torch from torch._inductor.select_algorithm import extern_kernels import triton import triton.language as tl from torch._inductor.runtime.triton_heuristics import grid from torch._C import _cuda_getCurrentRawStream as get_raw_stream from torch._inductor.runtime.triton_helpers import math as tl_math import numpy ...
rdguez-mariano/affnet
HessianResp
false
16,321
[ "MIT" ]
211
a3f0bb32d9001d1daf024f38d29867f37816ea78
https://github.com/rdguez-mariano/affnet/tree/a3f0bb32d9001d1daf024f38d29867f37816ea78
Attention
import torch import torch.nn as nn def weight_init(m): if isinstance(m, nn.Linear): size = m.weight.size() size[0] size[1] variance = 0.001 m.weight.data.normal_(0.0, variance) try: m.bias.data.normal_(0.0, 0.0001) except: pass clas...
import torch from torch._inductor.select_algorithm import extern_kernels import triton import triton.language 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 ...
EpiSci/SoCRATES
Attention
false
17,250
[ "MIT" ]
6
901a896c5a765e3cb56f290188cde71c8707192d
https://github.com/EpiSci/SoCRATES/tree/901a896c5a765e3cb56f290188cde71c8707192d
_Residual_Block_SR
import torch import torch.nn.functional import torch.nn as nn class _Residual_Block_SR(nn.Module): def __init__(self, num_ft): super(_Residual_Block_SR, self).__init__() self.conv1 = nn.Conv2d(in_channels=num_ft, out_channels=num_ft, kernel_size=3, stride=1, padding=1, bias=True) ...
import torch from torch._inductor.select_algorithm import extern_kernels import triton import triton.language as tl from torch._inductor.runtime.triton_heuristics import grid from torch._C import _cuda_getCurrentRawStream as get_raw_stream import torch.nn.functional import torch.nn as nn assert_size_stride = torch._C._...
CarlosPena00/pytorchvision
_Residual_Block_SR
false
229
[ "MIT" ]
0
824b3a5a8940f3ee6b4da5de7a391a88e5aa36a2
https://github.com/CarlosPena00/pytorchvision/tree/824b3a5a8940f3ee6b4da5de7a391a88e5aa36a2
Similarity
# AOT ID: ['0_inference'] from ctypes import c_void_p, c_long, c_int import torch import math import random import os import tempfile from math import inf, nan from torch._inductor.hooks import run_intermediate_hooks from torch._inductor.utils import maybe_profile from torch._inductor.codegen.memory_planning import _al...
import torch import triton import triton.language as tl from 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...
YJiangcm/DCPCSE
Similarity
false
18,125
[ "MIT" ]
5
698255e2e66b402325ff611e098e01d2f322743e
https://github.com/YJiangcm/DCPCSE/tree/698255e2e66b402325ff611e098e01d2f322743e
gram_matrix
# AOT ID: ['0_inference'] from ctypes import c_void_p, c_long, c_int import torch import math import random import os import tempfile from math import inf, nan from torch._inductor.hooks import run_intermediate_hooks from torch._inductor.utils import maybe_profile from torch._inductor.codegen.memory_planning import _al...
import torch from torch._inductor.select_algorithm import extern_kernels import triton import triton.language as tl from torch._inductor.runtime.triton_heuristics import grid from torch._C import _cuda_getCurrentRawStream as get_raw_stream import torch.nn as nn assert_size_stride = torch._C._dynamo.guards.assert_size_s...
ipjessica/neural-style-transfer
gram_matrix
false
12,535
[ "MIT" ]
0
ae0fc5e1e69d5d52997e5cab69e880085e04723b
https://github.com/ipjessica/neural-style-transfer/tree/ae0fc5e1e69d5d52997e5cab69e880085e04723b
MockAccuracy
import torch class _Metric(torch.nn.Module): def __init__(self): super().__init__() def forward(self, input: 'torch.Tensor', target: 'torch.Tensor'): raise NotImplementedError() class Accuracy(_Metric): def __init__(self): super().__init__() def forward(self, input: 'torc...
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...
NestLakerJasonLIN/MusicTransformer-pytorch
MockAccuracy
false
5,654
[ "MIT" ]
1
5f183374833ff6b7e17f3a24e3594dedd93a5fe5
https://github.com/NestLakerJasonLIN/MusicTransformer-pytorch/tree/5f183374833ff6b7e17f3a24e3594dedd93a5fe5
MultiRelu
# 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...
LMdeLiangMi/captum
MultiRelu
false
5,475
[ "BSD-3-Clause" ]
1
8bd9686013fe0ba8996e9b1cbeb0ea8e91512787
https://github.com/LMdeLiangMi/captum/tree/8bd9686013fe0ba8996e9b1cbeb0ea8e91512787
TripletLoss
# 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....
LunarShen/SECRET
TripletLoss
false
2,601
[ "MIT" ]
0
0f652e63ce760ece8690cbad013f0d9bdb341e84
https://github.com/LunarShen/SECRET/tree/0f652e63ce760ece8690cbad013f0d9bdb341e84
TorchLogCosh
import torch import torch as _torch class TorchLogCosh(_torch.nn.Module): """ Log(cosh) activation function for PyTorch modules """ def __init__(self): """ Init method. """ super().__init__() def forward(self, input): """ Forward pass of the functi...
import torch import triton import triton.language as tl from torch._inductor.runtime.triton_heuristics import grid from torch._C import _cuda_getCurrentRawStream as get_raw_stream from torch._inductor.runtime.triton_helpers import libdevice, math as tl_math import torch as _torch assert_size_stride = torch._C._dynamo.g...
inailuig/netket
TorchLogCosh
false
10,194
[ "Apache-2.0" ]
0
ab57a6fb019edb9ac298969950724781f2ae2b22
https://github.com/inailuig/netket/tree/ab57a6fb019edb9ac298969950724781f2ae2b22
GetStyleLoss
# AOT ID: ['0_inference'] from ctypes import c_void_p, c_long, c_int import torch import math import random import os import tempfile from math import inf, nan from torch._inductor.hooks import run_intermediate_hooks from torch._inductor.utils import maybe_profile from torch._inductor.codegen.memory_planning import _al...
import torch from torch._inductor.select_algorithm import extern_kernels import triton import triton.language as tl from torch._inductor.runtime.triton_heuristics import grid from torch._C import _cuda_getCurrentRawStream as get_raw_stream from torch._inductor.runtime import triton_helpers import torch.nn as nn assert_...
jaredaevans/UltrafastNST
GetStyleLoss
false
6,919
[ "MIT" ]
1
6671c6b618ce6bb4920b15f782be962e484a5423
https://github.com/jaredaevans/UltrafastNST/tree/6671c6b618ce6bb4920b15f782be962e484a5423
FocalLoss
# AOT ID: ['0_inference'] from ctypes import c_void_p, c_long, c_int import torch import math import random import os import tempfile from math import inf, nan from torch._inductor.hooks import run_intermediate_hooks from torch._inductor.utils import maybe_profile from torch._inductor.codegen.memory_planning import _al...
import torch import triton import triton.language as tl from torch._inductor.runtime.triton_heuristics import grid from torch._C import _cuda_getCurrentRawStream as get_raw_stream from torch._inductor.runtime import triton_helpers from torch._inductor.runtime.triton_helpers import libdevice, math as tl_math from torch ...
marshuang80/pe-slice-finder
FocalLoss
false
7,163
[ "Apache-2.0" ]
1
2426a55c404e8eb694110351d604d6bdd613e5ae
https://github.com/marshuang80/pe-slice-finder/tree/2426a55c404e8eb694110351d604d6bdd613e5ae
PGenLayer
# 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...
gau820827/AI-writer_Data2Doc
PGenLayer
false
15,406
[ "Apache-2.0" ]
77
6be0ee6238158a47aa0fdfa8a34df2a47714835a
https://github.com/gau820827/AI-writer_Data2Doc/tree/6be0ee6238158a47aa0fdfa8a34df2a47714835a
PixelNormLayer
# 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 as nn assert_size_stride = torch._C._dynamo.guards.assert_size_...
NunoEdgarGFlowHub/gandissect
PixelNormLayer
false
5,663
[ "MIT" ]
1
1a162a6bd3d4842139feb9f191aa1fad565dee4e
https://github.com/NunoEdgarGFlowHub/gandissect/tree/1a162a6bd3d4842139feb9f191aa1fad565dee4e
RobertaClassificationHead
from _paritybench_helpers import _mock_config import torch from torch import nn class RobertaClassificationHead(nn.Module): """Head for sentence-level classification tasks.""" def __init__(self, config): super(RobertaClassificationHead, self).__init__() self.dense = nn.Linear(config.hidden_si...
import torch from torch._inductor.select_algorithm import extern_kernels import triton import triton.language 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...
INK-USC/expl-refinement
RobertaClassificationHead
false
18,385
[ "MIT" ]
7
815a7892a8d4c42fb429856746212a44f67d2547
https://github.com/INK-USC/expl-refinement/tree/815a7892a8d4c42fb429856746212a44f67d2547
GeneralizedMeanPooling
# AOT ID: ['0_inference'] from ctypes import c_void_p, c_long, c_int import torch import math import random import os import tempfile from math import inf, nan from torch._inductor.hooks import run_intermediate_hooks from torch._inductor.utils import maybe_profile from torch._inductor.codegen.memory_planning import _al...
import torch import triton import triton.language as tl from torch._inductor.runtime.triton_heuristics import grid from torch._C import _cuda_getCurrentRawStream as get_raw_stream from torch._inductor.runtime import triton_helpers from torch._inductor.runtime.triton_helpers import libdevice import torch.nn as nn assert...
AsyaPes/light-reid-master
GeneralizedMeanPooling
false
8,961
[ "MIT" ]
0
acb4bdd973cdf3832294d8e42442305ab52014f5
https://github.com/AsyaPes/light-reid-master/tree/acb4bdd973cdf3832294d8e42442305ab52014f5
KlLoss
# 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 ...
by-liu/RetinalApp
KlLoss
false
1,621
[ "MIT" ]
0
53173b2b20dfcf613a3a22d6caa5178771d14225
https://github.com/by-liu/RetinalApp/tree/53173b2b20dfcf613a3a22d6caa5178771d14225
Net
# AOT ID: ['0_forward'] from ctypes import c_void_p, c_long, c_int import torch import math import random import os import tempfile from math import inf, nan from torch._inductor.hooks import run_intermediate_hooks from torch._inductor.utils import maybe_profile from torch._inductor.codegen.memory_planning import _alig...
import torch from torch._inductor.select_algorithm import extern_kernels import triton import triton.language as tl from torch._inductor.runtime.triton_heuristics import grid from torch._C import _cuda_getCurrentRawStream as get_raw_stream from torch._inductor.runtime import triton_helpers import torch.nn as nn import ...
zyouc518/crow
Net
false
4,740
[ "Apache-2.0" ]
0
e3fe92e329649fb82b3fef6c0ab5b732f1918900
https://github.com/zyouc518/crow/tree/e3fe92e329649fb82b3fef6c0ab5b732f1918900
SimpleFC
import torch import torch.nn as nn import torch.onnx class SimpleFC(nn.Module): def __init__(self, input_size, num_classes, name='SimpleFC'): super(SimpleFC, self).__init__() self.FC = nn.Parameter(torch.randn([input_size, num_classes])) self.FCbias = nn.Parameter(torch.randn([num_classes...
import torch from torch._inductor.select_algorithm import extern_kernels import 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...
adityakusupati/EdgeML
SimpleFC
false
3,021
[ "MIT" ]
0
65933a6fdfc38945f4311043a62e120784b2b0bf
https://github.com/adityakusupati/EdgeML/tree/65933a6fdfc38945f4311043a62e120784b2b0bf
BasicBlockWN
# 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....
iffiX/machin
BasicBlockWN
false
15,641
[ "MIT" ]
287
7fa986b1bafdefff117d6ff73d14644a5488de9d
https://github.com/iffiX/machin/tree/7fa986b1bafdefff117d6ff73d14644a5488de9d
h_swish
import torch import torch.nn as nn class h_sigmoid(nn.Module): def __init__(self, inplace=True): super(h_sigmoid, self).__init__() self.relu = nn.ReLU6(inplace=inplace) def forward(self, x): return self.relu(x + 3) / 6 class h_swish(nn.Module): def __init__(self, inplace=True)...
import torch import triton import triton.language as tl from torch._inductor.runtime.triton_heuristics import grid from torch._C import _cuda_getCurrentRawStream as get_raw_stream from torch._inductor.runtime import triton_helpers import torch.nn as nn assert_size_stride = torch._C._dynamo.guards.assert_size_stride emp...
Felicia980317/mytorch
h_swish
false
467
[ "Apache-2.0" ]
0
e463122c0d402878ec5b4c5a823a0feeba8fdbfe
https://github.com/Felicia980317/mytorch/tree/e463122c0d402878ec5b4c5a823a0feeba8fdbfe
PACRRConvMax2dModule
# 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.utils.data asser...
AlexWang000/capreolus
PACRRConvMax2dModule
false
4,827
[ "Apache-2.0" ]
1
00b0bf471ea0eb116ab973254ea61b0492405c54
https://github.com/AlexWang000/capreolus/tree/00b0bf471ea0eb116ab973254ea61b0492405c54
Conv2
# 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 math import ...
neverix/voice-conv
Conv2
false
7,328
[ "MIT" ]
1
6df0053a59aa26318bdbc096dd312ecc55596ac0
https://github.com/neverix/voice-conv/tree/6df0053a59aa26318bdbc096dd312ecc55596ac0
AttentionUnit
import torch import torch.nn.functional as F from torch import nn from torch.nn import init class AttentionUnit(nn.Module): def __init__(self, sDim, xDim, attDim): super(AttentionUnit, self).__init__() self.sDim = sDim self.xDim = xDim self.attDim = attDim self.sEmbed = 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....
YacobBY/ICDAR2019-ArT-Recognition-Alchemy
AttentionUnit
false
14,625
[ "MIT" ]
209
911c572c2aff4599a74b7974d46ef4cfb17078b9
https://github.com/YacobBY/ICDAR2019-ArT-Recognition-Alchemy/tree/911c572c2aff4599a74b7974d46ef4cfb17078b9
ConvReLU
# 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.functional as F from torch.nn import Conv2d from tor...
pc2005/MonoRec
ConvReLU
false
12,868
[ "MIT" ]
0
6e1628eeef9987b1acce3e5e8bb6a6a324fc8d2c
https://github.com/pc2005/MonoRec/tree/6e1628eeef9987b1acce3e5e8bb6a6a324fc8d2c
DepthwiseSeparableConv
# 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 import torch.nn.functional import torch assert_size_stride ...
YiminYang980510/A-TransUNet
DepthwiseSeparableConv
false
18,163
[ "MIT" ]
10
600b9abef3460d9751d3a6b7b4e4586aec164aa7
https://github.com/YiminYang980510/A-TransUNet/tree/600b9abef3460d9751d3a6b7b4e4586aec164aa7
ChannelSELayer3D
import torch import torch.nn as nn class ChannelSELayer3D(nn.Module): """ 3D extension of Squeeze-and-Excitation (SE) block described in: *Hu et al., Squeeze-and-Excitation Networks, arXiv:1709.01507* *Zhu et al., AnatomyNet, arXiv:arXiv:1808.05238* """ def __init__(self, num_channels...
import torch from torch._inductor.select_algorithm import extern_kernels import triton import triton.language as tl from 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_...
Hsuxu/vnet_attention
ChannelSELayer3D
false
13,789
[ "MIT" ]
45
6958932f3974d268e93bd6443369a3f43c497ed3
https://github.com/Hsuxu/vnet_attention/tree/6958932f3974d268e93bd6443369a3f43c497ed3
MultiHeadedAttention
import math import torch from torch import Tensor import torch.nn as nn class MultiHeadedAttention(nn.Module): """ Multi-Head Attention module from "Attention is All You Need" Implementation modified from OpenNMT-py. https://github.com/OpenNMT/OpenNMT-py """ def __init__(self, num_heads: '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....
AmitMY/joeynmt
MultiHeadedAttention
false
13,265
[ "Apache-2.0" ]
563
b30d1d53823ced56113def8fb5d5f7905d3c059f
https://github.com/AmitMY/joeynmt/tree/b30d1d53823ced56113def8fb5d5f7905d3c059f
GaussianPolicyFunction
# 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, 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
ShiftedSoftplus
# AOT ID: ['0_inference'] from ctypes import c_void_p, c_long, c_int import torch import math import random import os import tempfile from math import inf, nan from torch._inductor.hooks import run_intermediate_hooks from torch._inductor.utils import maybe_profile from torch._inductor.codegen.memory_planning import _al...
import torch import triton import triton.language as tl from torch._inductor.runtime.triton_heuristics import grid from torch._C import _cuda_getCurrentRawStream as get_raw_stream from torch._inductor.runtime.triton_helpers import libdevice, math as tl_math assert_size_stride = torch._C._dynamo.guards.assert_size_strid...
BaratiLab/AugLiChem
ShiftedSoftplus
false
7,754
[ "MIT" ]
16
37258b5ce2c653436b3e819b58d2659052d6edcc
https://github.com/BaratiLab/AugLiChem/tree/37258b5ce2c653436b3e819b58d2659052d6edcc
RNN
import torch import torch.nn as nn from torch.autograd import Variable class RNN(nn.Module): def __init__(self, category_size, input_size, hidden_size, output_size): super(RNN, self).__init__() self.category_size = category_size self.input_size = input_size self.hidden_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 import torch.nn as nn from torch.autograd import Variable assert_size_stride = t...
iclementine/practical-pytorch
RNN
false
10,187
[ "MIT" ]
0
88e2e53e47328cdb3ec23573aec3ff0421f1a2b7
https://github.com/iclementine/practical-pytorch/tree/88e2e53e47328cdb3ec23573aec3ff0421f1a2b7
SmoothL1Loss
# 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 functools impor...
AtticusJohnson/mmdetection
SmoothL1Loss
false
11,245
[ "Apache-2.0" ]
0
d8d89bafcce13d3b32b1fb3366be3bb9830546c2
https://github.com/AtticusJohnson/mmdetection/tree/d8d89bafcce13d3b32b1fb3366be3bb9830546c2
AverageAttention
# 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.cuda import torch.distributed assert_size_str...
GarrettNicolai/OpenNMT-py
AverageAttention
false
9,108
[ "MIT" ]
0
9491d900ac1b50fe39da417bacc0b9d610331888
https://github.com/GarrettNicolai/OpenNMT-py/tree/9491d900ac1b50fe39da417bacc0b9d610331888
ConvertPointsToHomogeneous
# 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...
Paultool/frankmocap
ConvertPointsToHomogeneous
false
14,151
[ "BSD-3-Clause" ]
1,612
b8bb7b587c0841b9292edb147729de581c66054c
https://github.com/Paultool/frankmocap/tree/b8bb7b587c0841b9292edb147729de581c66054c
_Multiply
# 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.nn import Module import abc from torch import Tensor from torch.nn im...
f-dangel/backpack
_Multiply
false
15,334
[ "MIT" ]
395
1da7e53ebb2c490e2b7dd9f79116583641f3cca1
https://github.com/f-dangel/backpack/tree/1da7e53ebb2c490e2b7dd9f79116583641f3cca1
DisaggregatedPinballLoss
import torch import torch.nn as nn class DisaggregatedPinballLoss(nn.Module): """ Pinball Loss Computes the pinball loss between y and y_hat. Parameters ---------- y: tensor actual values in torch tensor. y_hat: tensor (same shape as y) predicted values in torch tensor. tau: float, between 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 import triton_helpers import torch.nn as nn assert_size_stride = torch._C._dynamo.guards.assert_size_stride emp...
venkatkorapaty/esrnn
DisaggregatedPinballLoss
false
11,008
[ "MIT" ]
0
411d3191e7e12f29e521e06bc18f9b9b0fdf0f0c
https://github.com/venkatkorapaty/esrnn/tree/411d3191e7e12f29e521e06bc18f9b9b0fdf0f0c
AsymmetricLossOptimized
import torch import torch.nn as nn class AsymmetricLossOptimized(nn.Module): """ Notice - optimized version, minimizes memory allocation and gpu uploading, favors inplace operations""" def __init__(self, gamma_neg=4, gamma_pos=1, clip=0.05, eps=1e-08, disable_torch_grad_focal_loss=False): ...
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...
Pepijnnn/MasterThesis
AsymmetricLossOptimized
false
939
[ "MIT" ]
0
7ec831f5e55f5f181e0196fa78284e2846ce2e26
https://github.com/Pepijnnn/MasterThesis/tree/7ec831f5e55f5f181e0196fa78284e2846ce2e26
lp_L2_Loss
import torch from torch.utils.data import * import torch.nn as nn class lp_L2_Loss(nn.Module): def __init__(self): super().__init__() self.loss = nn.MSELoss(reduction='sum') def forward(self, x, y): b = x.shape[0] loss = self.loss(x, y) return loss / b def get_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 from torch.utils.data import * import torch.nn as nn assert_size_stride = torch._C._dynam...
loveorchids/local_patch_retrieval
lp_L2_Loss
false
3,937
[ "Apache-2.0" ]
0
52b2e8fdac965d56ef9f89a8c4de96d0b41d3981
https://github.com/loveorchids/local_patch_retrieval/tree/52b2e8fdac965d56ef9f89a8c4de96d0b41d3981
DentReLU
# 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...
bfeng/pytorch-cifar
DentReLU
false
6,329
[ "MIT" ]
1
6de257bb4b489429785502d487044c55bec62aae
https://github.com/bfeng/pytorch-cifar/tree/6de257bb4b489429785502d487044c55bec62aae
RadialPredictionLayer
import torch import torch.nn as nn class RadialPredictionLayer(torch.nn.Module): """ The RPL classification layer with fixed prototypes """ def __init__(self, in_features, out_features): super(RadialPredictionLayer, self).__init__() self.in_features = in_features self.out_features...
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_...
Monkso/RPL-Softmax_RoadSigns
RadialPredictionLayer
false
851
[ "MIT" ]
0
3df929d779ff02ec796e717659943bb46311ba0f
https://github.com/Monkso/RPL-Softmax_RoadSigns/tree/3df929d779ff02ec796e717659943bb46311ba0f
DenseModel
import torch from torch import nn class DenseModel(nn.Module): def __init__(self, input_shape, output_shape, hidden_size=150, activation=None): super(DenseModel, self).__init__() self.l1 = nn.Linear(input_shape, hidden_size) self.l2 = nn.Linear(hidden_size, output_shape) s...
import torch from torch._inductor.select_algorithm import extern_kernels import triton import triton.language as tl from torch._inductor.runtime.triton_heuristics import grid from torch._C import _cuda_getCurrentRawStream as get_raw_stream from torch._inductor.runtime.triton_helpers import libdevice from torch import n...
HSE-LAMBDA/pytorch_ard
DenseModel
false
9,044
[ "MIT" ]
0
b6b40d4c495d3374180698549d8fef0b768ffd3a
https://github.com/HSE-LAMBDA/pytorch_ard/tree/b6b40d4c495d3374180698549d8fef0b768ffd3a
ConvModule
import torch import torch.utils.data.distributed from torch import nn import torch.utils.data class ConvModule(nn.Module): def __init__(self, input_dim, kernel_size, dropout_rate, causal=False): super(ConvModule, self).__init__() self.layer_norm = nn.LayerNorm(input_dim) self.pw_conv_1 = ...
import torch from torch._inductor.select_algorithm import extern_kernels import triton import triton.language as tl from torch._inductor.runtime.triton_heuristics import grid from torch._C import _cuda_getCurrentRawStream as get_raw_stream from torch._inductor.runtime import triton_helpers from torch._inductor.runtime....
ishine/StreamingTransformer
ConvModule
false
15,664
[ "Apache-2.0" ]
252
4b56931a311d65686d310c54cc6896a4be4f47de
https://github.com/ishine/StreamingTransformer/tree/4b56931a311d65686d310c54cc6896a4be4f47de
MultiHeadSelfAttention
import torch import numpy as np import torch.nn as nn import torch.nn.init import torch.nn.parallel class MultiHeadSelfAttention(nn.Module): """Self-attention module by Lin, Zhouhan, et al. ICLR 2017""" def __init__(self, n_head, d_in, d_hidden): super(MultiHeadSelfAttention, self).__init__() ...
import torch from torch._inductor.select_algorithm import extern_kernels import triton import triton.language as tl from torch._inductor.runtime.triton_heuristics import grid from torch._C import _cuda_getCurrentRawStream as get_raw_stream from torch._inductor.runtime import triton_helpers from torch._inductor.runtime....
CLT29/pvse
MultiHeadSelfAttention
false
13,454
[ "MIT" ]
119
bf5232148396ee5051564ef68a48538de0ddbc84
https://github.com/CLT29/pvse/tree/bf5232148396ee5051564ef68a48538de0ddbc84
DownConv
# 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 copy from torch import...
ELEKTRONN/elektronn3
DownConv
false
13,627
[ "MIT" ]
124
19c751855dffc67b744cd43e757aa4a5bd577d9b
https://github.com/ELEKTRONN/elektronn3/tree/19c751855dffc67b744cd43e757aa4a5bd577d9b
AR
# AOT ID: ['0_forward'] from ctypes import c_void_p, c_long, c_int import torch import math import random import os import tempfile from math import inf, nan from torch._inductor.hooks import run_intermediate_hooks from torch._inductor.utils import maybe_profile from torch._inductor.codegen.memory_planning import _alig...
import torch from torch._inductor.select_algorithm import extern_kernels import 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...
lucianolorenti/rul_pm
AR
false
7,125
[ "MIT" ]
1
da9dfad79129dd47d24923cfd6c833869ef7b6a7
https://github.com/lucianolorenti/rul_pm/tree/da9dfad79129dd47d24923cfd6c833869ef7b6a7
PointLSTMCell
import torch import torch.nn as nn class PointLSTMCell(nn.Module): def __init__(self, pts_num, in_channels, hidden_dim, offset_dim, bias): super(PointLSTMCell, self).__init__() self.bias = bias self.pts_num = pts_num self.in_channels = in_channels self.hidden_dim = hidden_...
import torch from torch._inductor.select_algorithm import extern_kernels import triton import triton.language as tl from torch._inductor.runtime.triton_heuristics import grid from torch._C import _cuda_getCurrentRawStream as get_raw_stream from torch._inductor.runtime import triton_helpers from torch._inductor.runtime....
evanfebrianto/pointlstm_gesture_recognition_pytorch
PointLSTMCell
false
15,331
[ "Apache-2.0" ]
69
797ccdc7da5a859e28f2a8cc7ef7118358b82cb4
https://github.com/evanfebrianto/pointlstm_gesture_recognition_pytorch/tree/797ccdc7da5a859e28f2a8cc7ef7118358b82cb4
ResBlock
# 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....
TevenLeScao/BasicSR
ResBlock
false
18,005
[ "Apache-2.0" ]
4
1a7bd8754de00f3a9c9f2031acfc447350459ea0
https://github.com/TevenLeScao/BasicSR/tree/1a7bd8754de00f3a9c9f2031acfc447350459ea0
MAPELoss
import torch import torch.nn as nn class MAPELoss(nn.Module): def forward(self, input, target): return (torch.abs(input - target) / (torch.abs(target) + 0.01)).mean() 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._inductor.runtime.triton_helpers import math as tl_math import torch.nn as nn ...
LongerVision/oidn
MAPELoss
false
5,554
[ "Apache-2.0" ]
1
2f9e59f8b747b217f78c5c274f4f2bff347a03a7
https://github.com/LongerVision/oidn/tree/2f9e59f8b747b217f78c5c274f4f2bff347a03a7
AdaptiveConcatPool2d
# 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...
Vermeille/Torchelie
AdaptiveConcatPool2d
false
14,543
[ "MIT" ]
117
43957d83238372ae6436aac90127865c2040b76c
https://github.com/Vermeille/Torchelie/tree/43957d83238372ae6436aac90127865c2040b76c
VGG16
import torch import numpy as np import torchvision.transforms.functional as F import torch.nn as nn import torch.nn.functional as F class Normalize: def __init__(self, mean=(0.485, 0.456, 0.406), std=(0.229, 0.224, 0.225)): self.mean = mean self.std = std def undo(self, imgarr): proc...
import torch from torch._inductor.select_algorithm import extern_kernels import triton import triton.language as tl from 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...
candacelax/1-stage-wseg
VGG16
false
3,367
[ "Apache-2.0" ]
0
7a24791a3a78454e6611399ba55a808491551543
https://github.com/candacelax/1-stage-wseg/tree/7a24791a3a78454e6611399ba55a808491551543
StendLoss
import torch from itertools import chain as chain import torch.utils.data import torch.nn as nn from torch.nn.modules.loss import _Loss class StendLoss(_Loss): def __init__(self, size_average=None, reduce=None, reduction='mean'): super(StendLoss, self).__init__() self.reduction = reduction d...
import torch import triton import triton.language as tl from torch._inductor.runtime.triton_heuristics import grid from torch._C import _cuda_getCurrentRawStream as get_raw_stream from torch._inductor.runtime import triton_helpers from torch._inductor.runtime.triton_helpers import libdevice, math as tl_math from iterto...
anton-br/SlowFast
StendLoss
false
12,099
[ "Apache-2.0" ]
0
6e8d68bc6f3191886a57f819db1c766c6ca32d21
https://github.com/anton-br/SlowFast/tree/6e8d68bc6f3191886a57f819db1c766c6ca32d21
TorchFCNModel
# 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 assert_size_stride = torch._C...
muratcancicek/pointer_head
TorchFCNModel
false
12,809
[ "MIT" ]
0
b2a357f0183d5ced82b6dc7f6f12e0391bdc7380
https://github.com/muratcancicek/pointer_head/tree/b2a357f0183d5ced82b6dc7f6f12e0391bdc7380
StyleMod
import torch import torch.nn as nn import torch.nn.functional as F class MyLinear(nn.Module): """Linear layer with equalized learning rate and custom learning rate multiplier.""" def __init__(self, input_size, output_size, gain=2 ** 0.5, use_wscale= False, lrmul=1, bias=True): super().__init_...
import torch from torch._inductor.select_algorithm import extern_kernels import triton import triton.language as tl from torch._inductor.runtime.triton_heuristics import grid from torch._C import _cuda_getCurrentRawStream as get_raw_stream import torch.nn as nn import torch.nn.functional as F assert_size_stride = torch...
eitanrich/ganspace-manifold
StyleMod
false
12,338
[ "Apache-2.0" ]
0
148d5d30001c43794a40bbed885601e7816f5d7d
https://github.com/eitanrich/ganspace-manifold/tree/148d5d30001c43794a40bbed885601e7816f5d7d
ExponentialEnvelope
# AOT ID: ['0_inference'] from ctypes import c_void_p, c_long, c_int import torch import math import random import os import tempfile from math import inf, nan from torch._inductor.hooks import run_intermediate_hooks from torch._inductor.utils import maybe_profile from torch._inductor.codegen.memory_planning import _al...
import torch import triton import triton.language as tl from torch._inductor.runtime.triton_heuristics import grid from torch._C import _cuda_getCurrentRawStream as get_raw_stream from torch._inductor.runtime.triton_helpers import math as tl_math assert_size_stride = torch._C._dynamo.guards.assert_size_stride empty_str...
Irlirion/ocp
ExponentialEnvelope
false
13,837
[ "MIT", "BSD-3-Clause" ]
242
6fb3e794eef31559db990300198eca20f41d8f37
https://github.com/Irlirion/ocp/tree/6fb3e794eef31559db990300198eca20f41d8f37
FCUDown
import torch from functools import partial from torch import nn class FCUDown(nn.Module): """ CNN feature maps -> Transformer patch embeddings """ def __init__(self, inplanes, outplanes, dw_stride, act_layer=nn.GELU, norm_layer=partial(nn.LayerNorm, eps=1e-06)): super(FCUDown, self).__ini...
import torch from torch._inductor.select_algorithm import extern_kernels import triton import triton.language 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 functools impo...
CVPR2022-911/PPH
FCUDown
false
8,980
[ "Apache-2.0" ]
0
f066933525aaeef412b8d166ef167f00170b5428
https://github.com/CVPR2022-911/PPH/tree/f066933525aaeef412b8d166ef167f00170b5428
ShuffleCat
import torch import torch.nn as nn class ShuffleCat(nn.Module): def forward(self, a, b): assert a.size() == b.size() n, c, h, w = a.size() a = a.permute(0, 2, 3, 1).contiguous().view(-1, c) b = b.permute(0, 2, 3, 1).contiguous().view(-1, c) x = torch.cat((a, b), dim=0).tra...
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...
jjkennedy3/PINTO_model_zoo
ShuffleCat
false
6,956
[ "MIT" ]
1
a181c3015a6241873798c4ad3eadd4ce97024f70
https://github.com/jjkennedy3/PINTO_model_zoo/tree/a181c3015a6241873798c4ad3eadd4ce97024f70
DiceLoss
# 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.hub assert_size_stride = torch._C._dynamo.guards.assert_size_stride empty_strided_cuda = torch._C._dynamo...
thangnx183/kaggle-understanding-clouds
DiceLoss
false
16,575
[ "BSD-2-Clause" ]
207
15ad2a9029958262437b899cb00525579da23911
https://github.com/thangnx183/kaggle-understanding-clouds/tree/15ad2a9029958262437b899cb00525579da23911
MNIST_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 from torch._inductor.runtime....
FrancescoCappio/swad
MNIST_CNN
false
9,087
[ "MIT" ]
0
b1da3eacb7dc3711360e6621ca16f2d75c4f411c
https://github.com/FrancescoCappio/swad/tree/b1da3eacb7dc3711360e6621ca16f2d75c4f411c
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 from torch._inductor.runtime....
Thibaud-Ardoin/d4rl_evaluations
Actor
false
14,496
[ "Apache-2.0" ]
123
135b23d3aecc234aacaeaaa019fbc7101d9b87ec
https://github.com/Thibaud-Ardoin/d4rl_evaluations/tree/135b23d3aecc234aacaeaaa019fbc7101d9b87ec
SelfAttention0
import math import torch import torch.nn as nn import torch.nn.functional as F class MultiHeadedAttention(nn.Module): def __init__(self, h, d_model, dropout=0.0): """Take in model size and number of heads.""" super(MultiHeadedAttention, self).__init__() self.d_k = d_model // h sel...
import torch from torch._inductor.select_algorithm import extern_kernels import triton import triton.language as tl from torch._inductor.runtime.triton_heuristics import grid from torch._C import _cuda_getCurrentRawStream as get_raw_stream from torch._inductor.runtime import triton_helpers from torch._inductor.runtime....
SSussexGit/deepikachu
SelfAttention0
false
2,807
[ "MIT" ]
0
72999c4a3f1767c3e5f332fe64cba9240ef43a79
https://github.com/SSussexGit/deepikachu/tree/72999c4a3f1767c3e5f332fe64cba9240ef43a79
LocalNet
import torch import torch.nn as nn class LocalNet(nn.Module): def forward(self, x_in): """Defines a double convolution :param x_in: input convolutional features :returns: convolutional features :rtype: Tensor """ x = self.lrelu(self.conv1(self.refpad(x_in))) ...
import torch from torch._inductor.select_algorithm import extern_kernels import triton import triton.language as tl from torch._inductor.runtime.triton_heuristics import grid from torch._C import _cuda_getCurrentRawStream as get_raw_stream from torch._inductor.runtime.triton_helpers import math as tl_math import torch....
sjmoran/CURL
LocalNet
false
16,472
[ "BSD-3-Clause" ]
125
919e519717b66e14d92ac6fa404c328ee3f254a5
https://github.com/sjmoran/CURL/tree/919e519717b66e14d92ac6fa404c328ee3f254a5
BahdanauAttention
# AOT ID: ['0_forward'] from ctypes import c_void_p, c_long, c_int import torch import math import random import os import tempfile from math import inf, nan from torch._inductor.hooks import run_intermediate_hooks from torch._inductor.utils import maybe_profile from torch._inductor.codegen.memory_planning import _alig...
import torch from torch._inductor.select_algorithm import extern_kernels import triton import triton.language as tl from 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....
Emily0219/distiller
BahdanauAttention
false
5,142
[ "Apache-2.0" ]
1
445ed35b671fb54586acc280b53d951f18bf97ae
https://github.com/Emily0219/distiller/tree/445ed35b671fb54586acc280b53d951f18bf97ae
Net
import torch import torch.nn.functional as F import torch.nn as nn class Net(nn.Module): def __init__(self, x_d, w_d, out_d, hidden_d1=256, hidden_d2=512, hidden_d3=256, is_discrete_input=False, is_discrete_output=False, embedding_dim=None): super().__init__() self._x_d = x_d ...
import torch from torch._inductor.select_algorithm import extern_kernels import triton import triton.language as tl from torch._inductor.runtime.triton_heuristics import grid from torch._C import _cuda_getCurrentRawStream as get_raw_stream from torch._inductor.runtime import triton_helpers import torch.nn as nn assert_...
DataCanvasIO/YLearn
Net
false
17,215
[ "Apache-2.0" ]
3
d65b5afb83deed154c710de9096317165d95014a
https://github.com/DataCanvasIO/YLearn/tree/d65b5afb83deed154c710de9096317165d95014a
ElemAffineNetwork
# 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....
chawins/adv-exp
ElemAffineNetwork
false
6,450
[ "MIT" ]
1
5423e135c5599e4ec2bf90372916d8d05c89f285
https://github.com/chawins/adv-exp/tree/5423e135c5599e4ec2bf90372916d8d05c89f285
MaxPooling
# 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 typing import Union import torch.nn as nn from typing import Tuple assert_size_strid...
Latterlig96/DCUnet
MaxPooling
false
8,465
[ "MIT" ]
11
87d1c137a60177d6daf1dfff0483678d5580fda0
https://github.com/Latterlig96/DCUnet/tree/87d1c137a60177d6daf1dfff0483678d5580fda0
VertexDirectEmbedder
# 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 libdevice import torch.utils.data from...
nationaldronesau/detectron2
VertexDirectEmbedder
false
7,314
[ "Apache-2.0" ]
1
6afaee60eb6e0032b5b2edfbec1179f7e7b7b75f
https://github.com/nationaldronesau/detectron2/tree/6afaee60eb6e0032b5b2edfbec1179f7e7b7b75f
AdaILN
# 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.utils.data import torch.utils.data.distributed import torch import...
Lornatang/UGATIT_PyTorch
AdaILN
false
8,490
[ "Apache-2.0" ]
25
03519e4829b85ceee67c031a28d5a9318ac932b5
https://github.com/Lornatang/UGATIT_PyTorch/tree/03519e4829b85ceee67c031a28d5a9318ac932b5
Conv2dSame
import torch from torchvision.transforms import * import torch.nn import torch import torch.nn as nn class Conv2dSame(torch.nn.Module): """2D convolution that pads to keep spatial dimensions equal. Cannot deal with stride. Only quadratic kernels (=scalar kernel_size). """ def __init__(self, in_channe...
import torch from torch._inductor.select_algorithm import extern_kernels import triton import triton.language 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 torchvis...
COMHTVM/lensless
Conv2dSame
false
17,313
[ "MIT" ]
6
0d67a310bab08551d7422fa792f3422a7ee7d9cb
https://github.com/COMHTVM/lensless/tree/0d67a310bab08551d7422fa792f3422a7ee7d9cb
DDPGConvBody
import torch import torch.nn as nn import torch.nn.functional as F def layer_init(layer, w_scale=1.0): nn.init.orthogonal_(layer.weight.data) layer.weight.data.mul_(w_scale) nn.init.constant_(layer.bias.data, 0) return layer class DDPGConvBody(nn.Module): def __init__(self, in_channels=4): ...
import torch from torch._inductor.select_algorithm import extern_kernels import triton import triton.language 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 ...
Sohojoe/UdacityDeepRL-Project2
DDPGConvBody
false
5,953
[ "MIT" ]
1
7137eea0b606ea32d00424d23130ff213f03ecf1
https://github.com/Sohojoe/UdacityDeepRL-Project2/tree/7137eea0b606ea32d00424d23130ff213f03ecf1
Policy
# AOT ID: ['0_forward'] from ctypes import c_void_p, c_long, c_int import torch import math import random import os import tempfile from math import inf, nan from torch._inductor.hooks import run_intermediate_hooks from torch._inductor.utils import maybe_profile from torch._inductor.codegen.memory_planning import _alig...
import torch from torch._inductor.select_algorithm import extern_kernels import triton import triton.language as tl from 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....
albimc/deep-reinforcement-learning
Policy
false
1,402
[ "MIT" ]
0
e11a6c9d4c8991cf229e686b645ae22ec4cff4f5
https://github.com/albimc/deep-reinforcement-learning/tree/e11a6c9d4c8991cf229e686b645ae22ec4cff4f5
NoiseInjection
import torch from torch import nn class NoiseInjection(nn.Module): def __init__(self, channel): super().__init__() self.weight = nn.Parameter(torch.zeros(1, channel, 1, 1)) def forward(self, image, noise): return image + self.weight * noise def get_inputs(): return [torch.rand(...
import torch import triton import triton.language as tl from torch._inductor.runtime.triton_heuristics import grid from torch._C import _cuda_getCurrentRawStream as get_raw_stream from torch import nn assert_size_stride = torch._C._dynamo.guards.assert_size_stride empty_strided_cuda = torch._C._dynamo.guards._empty_str...
hologerry/style-based-gan-pytorch
NoiseInjection
false
3,624
[ "MIT" ]
0
1a694fb3ea0288f1aaaa43aa67a570d908d9dc27
https://github.com/hologerry/style-based-gan-pytorch/tree/1a694fb3ea0288f1aaaa43aa67a570d908d9dc27
SymKlCriterion
import torch import torch.nn.functional as F from torch.nn.modules.loss import _Loss from torch.optim.lr_scheduler import * class Criterion(_Loss): def __init__(self, alpha=1.0, name='criterion'): super().__init__() """Alpha is used to weight each loss term """ self.alpha = alpha ...
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....
chunhuililili/mt_dnn
SymKlCriterion
false
10,214
[ "MIT" ]
0
4c6efaf21724c7b8103a05e46b5b44d7b246225e
https://github.com/chunhuililili/mt_dnn/tree/4c6efaf21724c7b8103a05e46b5b44d7b246225e
Encoder
# AOT ID: ['0_forward'] from ctypes import c_void_p, c_long, c_int import torch import math import random import os import tempfile from math import inf, nan from torch._inductor.hooks import run_intermediate_hooks from torch._inductor.utils import maybe_profile from torch._inductor.codegen.memory_planning import _alig...
import torch from torch._inductor.select_algorithm import extern_kernels import triton import triton.language as tl from torch._inductor.runtime.triton_heuristics import grid from torch._C import _cuda_getCurrentRawStream as get_raw_stream from torch._inductor.runtime import triton_helpers from torch._inductor.runtime....
simonepreite/QABERT
Encoder
false
4,362
[ "MIT" ]
0
ed3e49f6619f3ff660068291231909693cb8f5d5
https://github.com/simonepreite/QABERT/tree/ed3e49f6619f3ff660068291231909693cb8f5d5
Dec
# 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...
naraysa/gzsl-od
Dec
false
16,134
[ "MIT" ]
50
be771e12e17a4c02386c70697c4b26e3170a7557
https://github.com/naraysa/gzsl-od/tree/be771e12e17a4c02386c70697c4b26e3170a7557
nn_model
import torch import torch.nn as nn import torch.nn.functional as F class nn_model(nn.Module): def __init__(self, feature_dim, num_classes): super(nn_model, self).__init__() self.l1 = nn.Linear(feature_dim, 1024) self.l2 = nn.Linear(1024, 1024) self.l3 = nn.Linear(1024, num_classes...
import torch from torch._inductor.select_algorithm import extern_kernels import triton import triton.language as tl from 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_...
kiankd/quicksand
nn_model
false
12,681
[ "MIT" ]
0
20f9505c843eec00e423a0e1589ebd1e6264e174
https://github.com/kiankd/quicksand/tree/20f9505c843eec00e423a0e1589ebd1e6264e174
KlCriterion
# 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....
mahartmann/mt-dnn
KlCriterion
false
10,480
[ "MIT" ]
0
c9aa3379dc255fd8fc40f24b6cd508f6a645b32f
https://github.com/mahartmann/mt-dnn/tree/c9aa3379dc255fd8fc40f24b6cd508f6a645b32f
BCEDiceLoss
import torch from torch import nn from torch import torch class BCEDiceLoss(nn.Module): def __init__(self): super().__init__() def forward(self, Yp, Yt, smooth=1e-07): num = Yt.size(0) Yp = Yp.view(num, -1) Yt = Yt.view(num, -1) bce = nn.functional.binary_cross_entrop...
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 ...
oskarnatan/RGBDVS-fusion
BCEDiceLoss
false
7,425
[ "MIT" ]
1
5e560f54442d387a86e3a469107cf65859693987
https://github.com/oskarnatan/RGBDVS-fusion/tree/5e560f54442d387a86e3a469107cf65859693987
Net
# AOT ID: ['0_forward'] from ctypes import c_void_p, c_long, c_int import torch import math import random import os import tempfile from math import inf, nan from torch._inductor.hooks import run_intermediate_hooks from torch._inductor.utils import maybe_profile from torch._inductor.codegen.memory_planning import _alig...
import torch from torch._inductor.select_algorithm import extern_kernels import triton import triton.language as tl from torch._inductor.runtime.triton_heuristics import grid from torch._C import _cuda_getCurrentRawStream as get_raw_stream from torch._inductor.runtime import triton_helpers import torch.nn as nn assert_...
hany606/PMLDL-Project
Net
false
3,568
[ "MIT" ]
0
40ccf97720c8fd28ed2a8d8101a0499ff58c2b38
https://github.com/hany606/PMLDL-Project/tree/40ccf97720c8fd28ed2a8d8101a0499ff58c2b38
SoftCrossEntropyLoss2d
import torch import torch.nn.functional as F from torch import nn class SoftCrossEntropyLoss2d(nn.Module): def forward(self, inputs, targets): loss = 0 inputs = -F.log_softmax(inputs, dim=1) for index in range(inputs.size()[0]): loss += F.conv2d(inputs[range(index, index + 1)]...
import torch from torch._inductor.select_algorithm import extern_kernels import triton import triton.language as tl from torch._inductor.runtime.triton_heuristics import grid from torch._C import _cuda_getCurrentRawStream as get_raw_stream from torch._inductor.runtime import triton_helpers from torch._inductor.runtime....
sudohainguyen/GLNet-pytorch
SoftCrossEntropyLoss2d
false
4,392
[ "Apache-2.0" ]
0
91454831fac6e27f894d55d320dd3bcec946ac0f
https://github.com/sudohainguyen/GLNet-pytorch/tree/91454831fac6e27f894d55d320dd3bcec946ac0f
AsymmetricLoss
import torch import torch.nn as nn import torch.nn.functional as F def reduce_loss(loss, reduction): """Reduce loss as specified. Args: loss (Tensor): Elementwise loss tensor. reduction (str): Options are "none", "mean" and "sum". Return: Tensor: Reduced loss tensor. """ ...
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...
Chrisfsj2051/my_tools
AsymmetricLoss
false
8,920
[ "MIT" ]
0
67355a46df6290aa2fdc1e0266c61daacced3ba1
https://github.com/Chrisfsj2051/my_tools/tree/67355a46df6290aa2fdc1e0266c61daacced3ba1