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
SuperpointDescriptor
import torch import torch.nn as nn class SuperpointDescriptor(nn.Module): """ Descriptor decoder based on the SuperPoint arcihtecture. """ def __init__(self, input_feat_dim=128): super(SuperpointDescriptor, self).__init__() self.relu = torch.nn.ReLU(inplace=True) self.convPa = torch.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 import torch.nn as nn assert_...
wx-b/SOLD2
SuperpointDescriptor
false
16,744
[ "MIT" ]
347
71c3243f9d3a695788d0a6bfd134b9849425900a
https://github.com/wx-b/SOLD2/tree/71c3243f9d3a695788d0a6bfd134b9849425900a
TLU
# AOT ID: ['0_forward'] from ctypes import c_void_p, c_long, c_int import torch import math import random import os import tempfile from math import inf, nan from torch._inductor.hooks import run_intermediate_hooks from torch._inductor.utils import maybe_profile from torch._inductor.codegen.memory_planning import _alig...
import torch import triton import triton.language as tl from torch._inductor.runtime.triton_heuristics import grid from torch._C import _cuda_getCurrentRawStream as get_raw_stream from torch._inductor.runtime import triton_helpers import torch.nn as nn import torch.utils.data.distributed assert_size_stride = torch._C._...
derwind/mxfont
TLU
false
10,127
[ "MIT" ]
0
0b6d4554a1e2208906230d3121d792d450ed28dd
https://github.com/derwind/mxfont/tree/0b6d4554a1e2208906230d3121d792d450ed28dd
FC_Layer
import torch import torch.nn as nn def standardize(param, assert_length): if type(param) is not list and type(param) is not tuple: param = [param] * assert_length assert len(param ) == assert_length, 'expect %s input params, got %s input parameter' % ( assert_length, len(param)) re...
import torch from torch._inductor.select_algorithm import extern_kernels import 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...
WorksApplications/omni_torch
FC_Layer
false
1,225
[ "Apache-2.0" ]
0
10b689d794c8f485e38c765303ef018da17bc641
https://github.com/WorksApplications/omni_torch/tree/10b689d794c8f485e38c765303ef018da17bc641
Conv2dBlock
import torch from torch.nn import functional as F from torch import nn from torch.nn.utils import spectral_norm class AdaptiveInstanceNorm2d(nn.Module): def __init__(self, num_features, eps=1e-05, momentum=0.1): super().__init__() self.num_features = num_features self.eps = eps 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.triton_helpers import libdevice from torch.nn impor...
CompVis/interactive-image2video-synthesis
Conv2dBlock
false
7,924
[ "MIT" ]
20
05ea449d3a2704b6d79a5f08683035220d615576
https://github.com/CompVis/interactive-image2video-synthesis/tree/05ea449d3a2704b6d79a5f08683035220d615576
DownBlock2d
import torch import torch.nn.functional as F from torch import nn class DownBlock2d(nn.Module): """ Downsampling block for use in encoder. """ def __init__(self, in_features, out_features, kernel_size=3, padding=1, groups=1): super(DownBlock2d, self).__init__() self.conv = 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....
KangweiiLiu/Thin-Plate-Spline-Motion-Model
DownBlock2d
false
5,435
[ "MIT" ]
1
0ec14f6c06f5beeef159340142ec5182a1be9bc7
https://github.com/KangweiiLiu/Thin-Plate-Spline-Motion-Model/tree/0ec14f6c06f5beeef159340142ec5182a1be9bc7
BasicBlock
# 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...
TomHeaven/Pixel-wise-Estimation-of-Signal-Dependent-Image-Noise-using-Deep-Residual-Learning
BasicBlock
false
17,996
[ "MIT" ]
10
7f2a57312f7cec76e5d7016825f75ee9bbd170f5
https://github.com/TomHeaven/Pixel-wise-Estimation-of-Signal-Dependent-Image-Noise-using-Deep-Residual-Learning/tree/7f2a57312f7cec76e5d7016825f75ee9bbd170f5
SoftArgmax2D
# 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 ...
InnovationLab-Top/Human-Path-Prediction
SoftArgmax2D
false
13,835
[ "MIT" ]
120
5da0e2bcfcfc59bf246a781be4fc3033a3855ef7
https://github.com/InnovationLab-Top/Human-Path-Prediction/tree/5da0e2bcfcfc59bf246a781be4fc3033a3855ef7
IrisClassifier
# 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....
dbinoy/pytorch-iris-sagemaker
IrisClassifier
false
9,974
[ "MIT-0" ]
0
afc5bd95f6dd0431338708bc179029fa08724a2f
https://github.com/dbinoy/pytorch-iris-sagemaker/tree/afc5bd95f6dd0431338708bc179029fa08724a2f
AdaptiveAvgPool
# 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 uuid import torch.utils.data import torch.utils.data.distributed from torch import nn import torch.nn.parallel import torch.optim ass...
Adlik/zen_nas
AdaptiveAvgPool
false
16,888
[ "Apache-2.0" ]
7
d820d5c7d5bbb6fd66a76d5f16513647d6ea7a57
https://github.com/Adlik/zen_nas/tree/d820d5c7d5bbb6fd66a76d5f16513647d6ea7a57
TwoLayerNet
import torch from torch import nn class TwoLayerNet(nn.Module): def __init__(self, input_dim, hidden_size, num_classes): """ :param input_dim: input feature dimension :param hidden_size: hidden dimension :param num_classes: total number of classes """ super(TwoLaye...
import torch from torch._inductor.select_algorithm import extern_kernels import triton import 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...
Kuga23/Deep-Learning
TwoLayerNet
false
2,467
[ "MIT" ]
0
86980338208c702b6bfcbcfffdb18498e389a56b
https://github.com/Kuga23/Deep-Learning/tree/86980338208c702b6bfcbcfffdb18498e389a56b
CombineSlices
import torch from torch import nn import torch.utils.data import torch.utils.data.distributed import torch.optim class CombineSlices(nn.Module): def __init__(self, slice_dim=2): super().__init__() self.slice_dim = slice_dim def forward(self, x): return torch.index_select(x, dim=self....
import torch import triton import triton.language as tl from torch._inductor.runtime.triton_heuristics import grid from torch._C import _cuda_getCurrentRawStream as get_raw_stream from torch import nn import torch.utils.data import torch.utils.data.distributed import torch.optim assert_size_stride = torch._C._dynamo.gu...
kapoor1992/fastMRI
CombineSlices
false
10,495
[ "MIT" ]
0
6b0af94663faa55a2dd901a6a5cbb7d7b5f4cf6d
https://github.com/kapoor1992/fastMRI/tree/6b0af94663faa55a2dd901a6a5cbb7d7b5f4cf6d
SALayer
# 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 ...
JiahangGu/RFN
SALayer
false
17,477
[ "MIT" ]
4
8f7b33e22bb0a9f4057476720e05cc694a46ec00
https://github.com/JiahangGu/RFN/tree/8f7b33e22bb0a9f4057476720e05cc694a46ec00
PFLDLoss
# AOT ID: ['0_inference'] from ctypes import c_void_p, c_long, c_int import torch import math import random import os import tempfile from math import inf, nan from torch._inductor.hooks import run_intermediate_hooks from torch._inductor.utils import maybe_profile from torch._inductor.codegen.memory_planning import _al...
import torch import triton import triton.language as tl from torch._inductor.runtime.triton_heuristics import grid from torch._C import _cuda_getCurrentRawStream as get_raw_stream from torch._inductor.runtime.triton_helpers import math as tl_math import torch.nn as nn import torch.nn.parallel import torch.optim import ...
rmfan/nni
PFLDLoss
false
10,937
[ "MIT" ]
0
727ee1ce47e070061fe3dab8a2da5d3cd5e55546
https://github.com/rmfan/nni/tree/727ee1ce47e070061fe3dab8a2da5d3cd5e55546
NormLoss
# 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 assert_size_stride = torch._...
Filco306/TopologyLayer
NormLoss
false
13,681
[ "MIT" ]
250
1d6261017a80cff0ee06bb896ded40777b0989b4
https://github.com/Filco306/TopologyLayer/tree/1d6261017a80cff0ee06bb896ded40777b0989b4
L2
# 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_...
Egazaga/flownet2-pytorch
L2
false
11,390
[ "Apache-2.0" ]
0
a9bdaf41a1d4b46a4b079bde4de97fe829edf93d
https://github.com/Egazaga/flownet2-pytorch/tree/a9bdaf41a1d4b46a4b079bde4de97fe829edf93d
Decoder
import torch from torch import nn from torch.nn import functional as F class Decoder(nn.Module): def __init__(self, latent_size): super().__init__() self.latent_size = latent_size self.fc1 = nn.Linear(latent_size, 1024) self.deconv1 = nn.ConvTranspose2d(1024, 128, 5, stride=2) ...
import torch from torch._inductor.select_algorithm import extern_kernels import triton import triton.language as tl from torch._inductor.runtime.triton_heuristics import grid from torch._C import _cuda_getCurrentRawStream as get_raw_stream from torch._inductor.runtime import triton_helpers from torch import nn assert_s...
jinyeom/ga-plastic-models
Decoder
false
3,755
[ "MIT" ]
0
e38b245ae51c35a5f32679cc9f215463a3d58f1a
https://github.com/jinyeom/ga-plastic-models/tree/e38b245ae51c35a5f32679cc9f215463a3d58f1a
Net4
# 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 from tor...
moritzschaefer/pavooc
Net4
false
7,283
[ "MIT" ]
1
735f5455f9a95a5734436a24e2aa92cf600c91af
https://github.com/moritzschaefer/pavooc/tree/735f5455f9a95a5734436a24e2aa92cf600c91af
Fcn8s
# 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...
jgibson2/crfasrnn_pytorch
Fcn8s
false
4,661
[ "MIT" ]
0
04c8477343bc1a186b3712f876b497f00e43ae72
https://github.com/jgibson2/crfasrnn_pytorch/tree/04c8477343bc1a186b3712f876b497f00e43ae72
FreqEncoder
import torch import torch.nn as nn class FreqEncoder(nn.Module): def __init__(self, input_dim, max_freq_log2, N_freqs, log_sampling=True, include_input=True, periodic_fns=(torch.sin, torch.cos)): super().__init__() self.input_dim = input_dim self.include_input = include_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.triton_helpers import math as tl_math import torch.nn as nn assert_size_stride = torch._C._dynamo.guards.assert...
wx-b/torch-ngp
FreqEncoder
false
10,948
[ "MIT" ]
0
b5799e90dca4e188b14f8c77abf0d420c0bac915
https://github.com/wx-b/torch-ngp/tree/b5799e90dca4e188b14f8c77abf0d420c0bac915
InverseDepthSmoothnessLoss
# AOT ID: ['0_inference'] from ctypes import c_void_p, c_long, c_int import torch import math import random import os import tempfile from math import inf, nan from torch._inductor.hooks import run_intermediate_hooks from torch._inductor.utils import maybe_profile from torch._inductor.codegen.memory_planning import _al...
import torch import triton import triton.language as tl from torch._inductor.runtime.triton_heuristics import grid from torch._C import _cuda_getCurrentRawStream as get_raw_stream from torch._inductor.runtime.triton_helpers import math as tl_math import torch.nn as nn assert_size_stride = torch._C._dynamo.guards.assert...
MareenaKunjachan/kornia
InverseDepthSmoothnessLoss
false
2,666
[ "Apache-2.0" ]
0
0a3cbb02850ac78059e0615da93144b5a64d3330
https://github.com/MareenaKunjachan/kornia/tree/0a3cbb02850ac78059e0615da93144b5a64d3330
ConvUpSample
import torch import torch.nn as nn class ConvUpSample(nn.Module): def __init__(self, in_channels, out_channels, kernel_size=1, stride=1, padding=0, scale_factor=2, mode='nearest'): super(ConvUpSample, self).__init__() self.upsample = nn.Upsample(scale_factor=scale_factor, mode=mode) ...
import torch from torch._inductor.select_algorithm import extern_kernels import 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...
hadonga/PMF_MOD
ConvUpSample
false
15,475
[ "MIT" ]
65
1875be9bd019a7e8a121d92831fa3cbd557e2ca1
https://github.com/hadonga/PMF_MOD/tree/1875be9bd019a7e8a121d92831fa3cbd557e2ca1
GraphConvolution
# AOT ID: ['0_forward'] from ctypes import c_void_p, c_long, c_int import torch import math import random import os import tempfile from math import inf, nan from torch._inductor.hooks import run_intermediate_hooks from torch._inductor.utils import maybe_profile from torch._inductor.codegen.memory_planning import _alig...
import torch from torch._inductor.select_algorithm import extern_kernels import triton import triton.language as tl from torch._inductor.runtime.triton_heuristics import grid from torch._C import _cuda_getCurrentRawStream as get_raw_stream from torch._inductor.runtime import triton_helpers from torch.nn import Module i...
IBM/graph4nlp
GraphConvolution
false
8,332
[ "Apache-2.0" ]
18
a9bf20b23fa1ec368d9bd40cc8c557f86a9f8297
https://github.com/IBM/graph4nlp/tree/a9bf20b23fa1ec368d9bd40cc8c557f86a9f8297
SimpleTanhModel
# 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.jit import torch.onnx import torch.nn assert_size_stride = torch._...
andreas-hommel/glow
SimpleTanhModel
false
3,357
[ "Apache-2.0" ]
0
2bbbf8188a2a941e85677c83f2146bbd076a262e
https://github.com/andreas-hommel/glow/tree/2bbbf8188a2a941e85677c83f2146bbd076a262e
AlexConv
import torch import torch.utils.data import torch.nn as nn import torch.nn.functional as F from inspect import isfunction def get_activation_layer(activation): """ Create activation layer from string/function. Parameters: ---------- activation : function, or str, or nn.Module Activation f...
import torch from torch._inductor.select_algorithm import extern_kernels import triton import triton.language as tl from torch._inductor.runtime.triton_heuristics import grid from torch._C import _cuda_getCurrentRawStream as get_raw_stream from torch._inductor.runtime import triton_helpers from torch._inductor.runtime....
HyperGAN/imgclsmob
AlexConv
false
17,672
[ "MIT" ]
9
88b9776a5a927dc9a54e85e31978c4a9ec5ecbf3
https://github.com/HyperGAN/imgclsmob/tree/88b9776a5a927dc9a54e85e31978c4a9ec5ecbf3
CollaborativeAttention
import math import torch import torch.utils.data from enum import Enum import torch.nn as nn class MixingMatrixInit(Enum): CONCATENATE = 1 ALL_ONES = 2 UNIFORM = 3 class CollaborativeAttention(nn.Module): def __init__(self, dim_input: 'int', dim_value_all: 'int', dim_key_query_all: 'int', 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....
prattcmp/NonAttentiveTacotron2
CollaborativeAttention
false
4,149
[ "BSD-3-Clause" ]
0
c65722133c392fba233b5003b480ee498fc0a44a
https://github.com/prattcmp/NonAttentiveTacotron2/tree/c65722133c392fba233b5003b480ee498fc0a44a
SuperPointNet
import torch import torch.optim import torch.utils.data class SuperPointNet(torch.nn.Module): """ Pytorch definition of SuperPoint Network. """ def __init__(self): super(SuperPointNet, self).__init__() self.relu = torch.nn.ReLU(inplace=True) self.pool = torch.nn.MaxPool2d(kernel_size=...
import torch from torch._inductor.select_algorithm import extern_kernels import triton import triton.language as tl from torch._inductor.runtime.triton_heuristics import grid from torch._C import _cuda_getCurrentRawStream as get_raw_stream from torch._inductor.runtime import triton_helpers from torch._inductor.runtime....
Dai-z/pytorch-superpoint
SuperPointNet
false
13,572
[ "MIT" ]
390
90e71045238fdcce13f9f0d02bdd0e1126145a10
https://github.com/Dai-z/pytorch-superpoint/tree/90e71045238fdcce13f9f0d02bdd0e1126145a10
RSubFloat
# AOT ID: ['0_inference'] from ctypes import c_void_p, c_long, c_int import torch import math import random import os import tempfile from math import inf, nan from torch._inductor.hooks import run_intermediate_hooks from torch._inductor.utils import maybe_profile from torch._inductor.codegen.memory_planning import _al...
import torch import triton import triton.language as tl from torch._inductor.runtime.triton_heuristics import grid from torch._C import _cuda_getCurrentRawStream as get_raw_stream assert_size_stride = torch._C._dynamo.guards.assert_size_stride empty_strided_cuda = torch._C._dynamo.guards._empty_strided_cuda @triton.j...
Akababa/torch2trt
RSubFloat
false
18,406
[ "MIT" ]
2
03063b74a7eb40f5aac88d49be6b8b5e4e4e92d7
https://github.com/Akababa/torch2trt/tree/03063b74a7eb40f5aac88d49be6b8b5e4e4e92d7
BahdanauAttention
import torch import torch.nn as nn class BahdanauAttention(nn.Module): """ Bahdanau Attention. Reference: https://blog.floydhub.com/attention-mechanism/#bahdanau-att-step1 --> Attention Mechanism https://github.com/sgrvinod/a-PyTorch-Tutorial-to-Image-Captioning --> PyTorch Image Captioning ""...
import torch from torch._inductor.select_algorithm import extern_kernels import triton import triton.language as tl from 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....
Ventu012/P2_Image_Captioning
BahdanauAttention
false
2,935
[ "MIT" ]
0
320e620145205efbc9222ad0f840469c0ec8d091
https://github.com/Ventu012/P2_Image_Captioning/tree/320e620145205efbc9222ad0f840469c0ec8d091
InputInjection
# 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._C import torch.serialization from torch import optim as optim assert_size_stride = torch._C._dynamo.guar...
Atten4Vis/DemystifyLocalViT
InputInjection
false
13,337
[ "MIT" ]
64
2e2327caec6d56ae2c8aa861b32bb62f3cdb786e
https://github.com/Atten4Vis/DemystifyLocalViT/tree/2e2327caec6d56ae2c8aa861b32bb62f3cdb786e
Upsample
# 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...
plexixx/rfml
Upsample
false
16,260
[ "BSD-3-Clause" ]
61
c00633b2c2005d38f991c6b9e3fd855ca25166c4
https://github.com/plexixx/rfml/tree/c00633b2c2005d38f991c6b9e3fd855ca25166c4
LayerNorm
# AOT ID: ['0_forward'] from ctypes import c_void_p, c_long, c_int import torch import math import random import os import tempfile from math import inf, nan from torch._inductor.hooks import run_intermediate_hooks from torch._inductor.utils import maybe_profile from torch._inductor.codegen.memory_planning import _alig...
import torch import triton import triton.language as tl from torch._inductor.runtime.triton_heuristics import grid from torch._C import _cuda_getCurrentRawStream as get_raw_stream from torch._inductor.runtime.triton_helpers import libdevice from torch import nn from torch.nn import Parameter from torch.nn.parameter imp...
FalconX777/CharacterBert_Multitasking
LayerNorm
false
11,509
[ "BSD-3-Clause" ]
0
eab566975871fffd0ec875a05ba478f1bce9b0ab
https://github.com/FalconX777/CharacterBert_Multitasking/tree/eab566975871fffd0ec875a05ba478f1bce9b0ab
SegmentationLoss
# 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 ...
ChristophReich1996/Cell-DETR
SegmentationLoss
false
13,668
[ "MIT" ]
55
4d0c3a2d3ffd19184c8443e5b3a6dccc053c77ea
https://github.com/ChristophReich1996/Cell-DETR/tree/4d0c3a2d3ffd19184c8443e5b3a6dccc053c77ea
EncoderImageWeightNormPrecomp
import torch from collections import OrderedDict import torch.nn as nn import torch.nn.init from torch.nn.utils.weight_norm import weight_norm def l2norm(X, dim=-1, eps=1e-12): """L2-normalize columns of X """ norm = torch.pow(X, 2).sum(dim=dim, keepdim=True).sqrt() + eps X = torch.div(X, norm) re...
import torch from torch._inductor.select_algorithm import extern_kernels import triton import triton.language 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 collections im...
BruceW91/CVSE
EncoderImageWeightNormPrecomp
false
13,428
[ "MIT" ]
152
20fa1ff50d1dcb4a7b3799071fa78038e52db804
https://github.com/BruceW91/CVSE/tree/20fa1ff50d1dcb4a7b3799071fa78038e52db804
PA
# 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 assert_size_stride = torch._C._dynamo.guards.assert_size_st...
Genevievekim/segformer
PA
false
17,318
[ "MIT" ]
10
4a0800746ade51101ec2573c683b06eccadb9683
https://github.com/Genevievekim/segformer/tree/4a0800746ade51101ec2573c683b06eccadb9683
DQN
import torch import torch.nn as nn import torch.nn.functional as F class DQN(nn.Module): def __init__(self, state_dim, action_dim, fc1_unit=64, fc2_unit=64, fc3_unit=128): super(DQN, self).__init__() self.fc1 = nn.Linear(state_dim, fc1_unit) self.fc2 = nn.Linear(fc1_unit, fc2_unit...
import torch from torch._inductor.select_algorithm import extern_kernels import triton import triton.language as tl from 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_...
ProfessorQu/Reinforcement-Learning
DQN
false
2,822
[ "MIT" ]
0
e1cd645fc5a7ce60248c1a96c560a38d1b9433cd
https://github.com/ProfessorQu/Reinforcement-Learning/tree/e1cd645fc5a7ce60248c1a96c560a38d1b9433cd
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 import torch.utils.data import torch.nn as nn import torch as torch assert_size_stride = ...
olivernina/nephi
MaxPooling
false
16,198
[ "MIT" ]
50
a25e74e58c24edb7dc051b79d106b3bc51c7a998
https://github.com/olivernina/nephi/tree/a25e74e58c24edb7dc051b79d106b3bc51c7a998
SelfCorrelationComputation
# 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...
dahyun-kang/renet
SelfCorrelationComputation
false
15,106
[ "MIT" ]
50
43a4e5af96b56c99a0cd63e35bd272db72f7f3a4
https://github.com/dahyun-kang/renet/tree/43a4e5af96b56c99a0cd63e35bd272db72f7f3a4
IPDFeature
import math import torch import torch as th import torch.nn as nn class IPDFeature(nn.Module): """ Compute inter-channel phase difference """ def __init__(self, ipd_index='1,0;2,0;3,0;4,0;5,0;6,0', cos=True, sin=False ): super(IPDFeature, self).__init__() def split_index(sstr...
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...
oucxlw/ConferencingSpeech2021
IPDFeature
false
16,205
[ "Apache-2.0" ]
98
617df8116c0510b2addadb1de374d7b50eea4f2b
https://github.com/oucxlw/ConferencingSpeech2021/tree/617df8116c0510b2addadb1de374d7b50eea4f2b
LSTMClassCriterion
# 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...
LeoZDong/shape2prog
LSTMClassCriterion
false
11,641
[ "BSD-2-Clause" ]
0
2185d1d4eb7a1c4c55e644c6af477fd8e8e70241
https://github.com/LeoZDong/shape2prog/tree/2185d1d4eb7a1c4c55e644c6af477fd8e8e70241
WeightedL2
import torch import torch.nn as nn class WeightedL2(nn.Module): def __init__(self): super(WeightedL2, self).__init__() def forward(self, x, target, w): return torch.sum(w * (x - target) ** 2) def get_inputs(): return [torch.rand([4, 4, 4, 4]), torch.rand([4, 4, 4, 4]), torch.rand( ...
import torch import triton import triton.language as tl from torch._inductor.runtime.triton_heuristics import grid from torch._C import _cuda_getCurrentRawStream as get_raw_stream from torch._inductor.runtime import triton_helpers import torch.nn as nn assert_size_stride = torch._C._dynamo.guards.assert_size_stride emp...
acrosson/dl
WeightedL2
false
1,360
[ "MIT" ]
0
94e68533b38f53f09e9bef460ba96fa389fc8eb4
https://github.com/acrosson/dl/tree/94e68533b38f53f09e9bef460ba96fa389fc8eb4
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 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...
CsekM8/dtu_mlops
Encoder
false
11,329
[ "Apache-2.0" ]
0
5c96a9afac0298fab57b7d47e4c08497f4a5d8d9
https://github.com/CsekM8/dtu_mlops/tree/5c96a9afac0298fab57b7d47e4c08497f4a5d8d9
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....
saman-aghazadeh/distiller
BahdanauAttention
false
4,260
[ "Apache-2.0" ]
0
7e8d3e6193c807f7c55d8453f64e1bc3c02eee30
https://github.com/saman-aghazadeh/distiller/tree/7e8d3e6193c807f7c55d8453f64e1bc3c02eee30
TorchSub
# AOT ID: ['0_inference'] from ctypes import c_void_p, c_long, c_int import torch import math import random import os import tempfile from math import inf, nan from torch._inductor.hooks import run_intermediate_hooks from torch._inductor.utils import maybe_profile from torch._inductor.codegen.memory_planning import _al...
import torch import triton import triton.language as tl from torch._inductor.runtime.triton_heuristics import grid from torch._C import _cuda_getCurrentRawStream as get_raw_stream assert_size_stride = torch._C._dynamo.guards.assert_size_stride empty_strided_cuda = torch._C._dynamo.guards._empty_strided_cuda @triton.j...
NVIDIA-AI-IOT-private/torch2trt
TorchSub
false
10,550
[ "MIT" ]
0
953d60039e0c81e90eea467c3df2e6e3f7040242
https://github.com/NVIDIA-AI-IOT-private/torch2trt/tree/953d60039e0c81e90eea467c3df2e6e3f7040242
Attention
import torch import torch.nn as nn import torch.nn.functional as F class Attention(nn.Module): """ Applies an attention mechanism on the output features from the decoder. .. math:: \\begin{array}{ll} x = context*output \\\\ attn = exp(x_i) / sum_j exp(x_j) \\\\ ...
import torch from torch._inductor.select_algorithm import extern_kernels import triton import triton.language as tl from 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....
Replie/replie-pythorch
Attention
false
5,769
[ "Apache-2.0" ]
1
b432f88fcd0b3275d18abee7e2909b997570a5dc
https://github.com/Replie/replie-pythorch/tree/b432f88fcd0b3275d18abee7e2909b997570a5dc
mlp_2layer
import torch import torch.nn as nn import torch.nn.functional as F class mlp_2layer(nn.Module): def __init__(self, in_ch, in_dim, width=1): super(mlp_2layer, self).__init__() self.fc1 = nn.Linear(in_ch * in_dim * in_dim, 256 * width) self.fc2 = nn.Linear(256 * width, 10) def forward(...
import torch from torch._inductor.select_algorithm import extern_kernels import triton import triton.language as tl from 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_...
mnmueller/auto_LiRPA
mlp_2layer
false
7,257
[ "BSD-3-Clause" ]
1
55cb270b0b99f07b74541d55706c69fbb9daff66
https://github.com/mnmueller/auto_LiRPA/tree/55cb270b0b99f07b74541d55706c69fbb9daff66
ContinuousLoss_L2
import torch import torch.nn as nn class ContinuousLoss_L2(nn.Module): """ Class to measure loss between continuous emotion dimension predictions and labels. Using l2 loss as base. """ def __init__(self, margin=1): super(ContinuousLoss_L2, self).__init__() self.margin = margin def forwar...
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 ...
Emilien-mipt/emotic
ContinuousLoss_L2
false
11,397
[ "MIT" ]
0
c27c0a4f4c8e7ef81edcd527f9f4aa4747ab72af
https://github.com/Emilien-mipt/emotic/tree/c27c0a4f4c8e7ef81edcd527f9f4aa4747ab72af
GAP
import torch import torch.nn as nn import torch.utils.data class GAP(nn.Module): def __init__(self, dimension=1): """ :param dimension: """ super(GAP, self).__init__() self.avg_pool = nn.AdaptiveAvgPool2d(1) def forward(self, x): """ :param 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 import torch.nn as nn import torch.utils.data assert_size_stride = torch._C._dynamo.guards.assert_size_stride empty_strided_cuda = torch._C....
CaptainEven/MCMOT-ByteTrack
GAP
false
7,835
[ "MIT" ]
20
e014275cfb25147dfa6f49cdbed24e91e5d6c41e
https://github.com/CaptainEven/MCMOT-ByteTrack/tree/e014275cfb25147dfa6f49cdbed24e91e5d6c41e
MakeFeatures
# 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...
AustenLamacraft/QuaRL
MakeFeatures
false
7,732
[ "MIT" ]
13
1764f0ccd0ba90d44e799b6ac908df76be14a52e
https://github.com/AustenLamacraft/QuaRL/tree/1764f0ccd0ba90d44e799b6ac908df76be14a52e
FFNet
# 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_...
amilanpathirana/FeedForwardNet
FFNet
false
6,194
[ "MIT" ]
1
bdf0ebe3f80233fe970e4c60754d0ffe13cadbe1
https://github.com/amilanpathirana/FeedForwardNet/tree/bdf0ebe3f80233fe970e4c60754d0ffe13cadbe1
OneTupleModule
import torch import torch.jit import torch.onnx import torch.nn class OneTupleModule(torch.nn.Module): def __init__(self): super(OneTupleModule, self).__init__() def forward(self, x): y = 2 * x return y, def get_inputs(): return [torch.rand([4, 4, 4, 4])] def get_init_inputs(...
import torch import triton import triton.language as tl from torch._inductor.runtime.triton_heuristics import grid from torch._C import _cuda_getCurrentRawStream as get_raw_stream import torch.jit import torch.onnx import torch.nn assert_size_stride = torch._C._dynamo.guards.assert_size_stride empty_strided_cuda = torc...
andreas-hommel/glow
OneTupleModule
false
3,313
[ "Apache-2.0" ]
0
2bbbf8188a2a941e85677c83f2146bbd076a262e
https://github.com/andreas-hommel/glow/tree/2bbbf8188a2a941e85677c83f2146bbd076a262e
FinalTanh
# 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....
lysuk96/rl_representations
FinalTanh
false
15,977
[ "MIT" ]
438
19de69305e40c9b3a1d746a7af26d232c9fb3f6f
https://github.com/lysuk96/rl_representations/tree/19de69305e40c9b3a1d746a7af26d232c9fb3f6f
segmentation_layer
# 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...
zhenpeiyang/RelativePose
segmentation_layer
false
16,815
[ "BSD-3-Clause" ]
144
2e9fdf5003c5952cf610f8c6d891519b9e9e014b
https://github.com/zhenpeiyang/RelativePose/tree/2e9fdf5003c5952cf610f8c6d891519b9e9e014b
GatedMaskedConv2d
import torch from torch import nn import torch.utils.data import torch.nn.functional as F class GatedMaskedConv2d(nn.Module): def __init__(self, in_dim, out_dim=None, kernel_size=3, mask='B'): super(GatedMaskedConv2d, self).__init__() if out_dim is None: out_dim = in_dim 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.triton_helpers import libdevice from torch import n...
sbarham/lv-nlm-he-2019
GatedMaskedConv2d
false
10,836
[ "MIT" ]
0
6fd1ce680675759d0a58878ac1fde31122712752
https://github.com/sbarham/lv-nlm-he-2019/tree/6fd1ce680675759d0a58878ac1fde31122712752
Unet
import torch import torch.nn as nn class ConvBlock(nn.Module): def __init__(self, in_channels, out_channels, dropout=False, norm= 'batch', residual=True, activation='leakyrelu', transpose=False): super(ConvBlock, self).__init__() self.dropout = dropout self.residual = residual ...
import torch from torch._inductor.select_algorithm import extern_kernels import 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...
XinweiYu/noise2self
Unet
false
3,008
[ "MIT" ]
0
04e0379a67e1cb0c807abd3f8d4fd1666db5a793
https://github.com/XinweiYu/noise2self/tree/04e0379a67e1cb0c807abd3f8d4fd1666db5a793
LabelSmoothingCrossEntropyV1
# 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 ...
dumpmemory/Pytorch-NLU
LabelSmoothingCrossEntropyV1
false
15,258
[ "Apache-2.0" ]
115
864fb9acc7751fc51abd3d05d24b5a9a7eab7110
https://github.com/dumpmemory/Pytorch-NLU/tree/864fb9acc7751fc51abd3d05d24b5a9a7eab7110
MultiHeadAttention
import math import torch from torch import nn from torch.nn import functional as F import torch.utils.data class MultiHeadAttention(nn.Module): def __init__(self, channels, out_channels, n_heads, window_size=None, heads_share=True, p_dropout=0.0, block_length=None, proximal_bias= False, proximal_...
import torch from torch._inductor.select_algorithm import extern_kernels import triton import triton.language as tl from 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....
AndreHe02/glow-tts
MultiHeadAttention
false
2,032
[ "MIT" ]
0
683f68f17790f2f46c23e9d3eadbcac352d82e2b
https://github.com/AndreHe02/glow-tts/tree/683f68f17790f2f46c23e9d3eadbcac352d82e2b
Highway
import torch import torch.nn as nn import torch.nn.utils class Highway(nn.Module): def __init__(self, conv_out_dim, e_word): super().__init__() self.conv_out_dim = conv_out_dim self.e_word = e_word self.linear_proj = nn.Linear(conv_out_dim, self.e_word) self.linear_gate = ...
import torch from torch._inductor.select_algorithm import extern_kernels import triton import triton.language as tl from 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 ...
LFhase/Learning_CS224N
Highway
false
17,557
[ "MIT" ]
5
21af6dd4f7b9dcb3f34aac9c2cebf4a02a17176f
https://github.com/LFhase/Learning_CS224N/tree/21af6dd4f7b9dcb3f34aac9c2cebf4a02a17176f
Net
import torch import torch.nn as nn import torch.nn.functional as F import torch.utils.data.distributed class Net(nn.Module): def __init__(self): super(Net, self).__init__() self.conv1 = nn.Conv2d(3, 32, (3, 3)) self.pool1 = nn.MaxPool2d((2, 2)) self.conv2 = nn.Conv2d(32, 32, (3, 3...
import torch from torch._inductor.select_algorithm import extern_kernels import triton import triton.language as tl from 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 ...
wikfeldt/intro-to-dl
Net
false
16,739
[ "MIT" ]
59
7fb1fb6c520941143000c5e1b46c48c95db17ed6
https://github.com/wikfeldt/intro-to-dl/tree/7fb1fb6c520941143000c5e1b46c48c95db17ed6
Net
import torch import torch.utils.data import torch.utils.data.distributed import torch.nn as nn import torch.nn.functional as F 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) ...
import torch from torch._inductor.select_algorithm import extern_kernels import triton import triton.language as tl from 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....
iquintero/sagemaker-pytorch-container
Net
false
10,251
[ "Apache-2.0" ]
0
70f64c87e549ae833d7f2ef2f15f01542ff5678e
https://github.com/iquintero/sagemaker-pytorch-container/tree/70f64c87e549ae833d7f2ef2f15f01542ff5678e
Log_Cosh_Loss
# 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 assert_size...
CODEJIN/RHRNet
Log_Cosh_Loss
false
4,927
[ "MIT" ]
1
71bd9d40a9951a7beabe9c3e802e74af22dd405d
https://github.com/CODEJIN/RHRNet/tree/71bd9d40a9951a7beabe9c3e802e74af22dd405d
Nreparameterize
import torch from torch import nn as nn import torch.nn.functional as F from torch.distributions import Normal class Nreparameterize(nn.Module): """Reparametrize Gaussian variable.""" def __init__(self, input_dim, z_dim): super().__init__() self.input_dim = input_dim self.z_dim = z_di...
import torch from torch._inductor.select_algorithm import extern_kernels import triton import triton.language 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 fr...
pimdh/lie-vae
Nreparameterize
false
16,257
[ "MIT" ]
83
0e0cc4d533c064fcfc405e8a75449f8b2f6cf8cf
https://github.com/pimdh/lie-vae/tree/0e0cc4d533c064fcfc405e8a75449f8b2f6cf8cf
AdaptiveInstanceNormalization
import torch import torch.nn as nn import torch.fft class AdaptiveInstanceNormalization(nn.Module): def and__init__(self): super(AdaptiveInstanceNormalization, self).__init__() def forward(self, x, mean, std): whitened_x = torch.nn.functional.instance_norm(x) return whitened_x * std ...
import torch import triton import triton.language as tl from torch._inductor.runtime.triton_heuristics import grid from torch._C import _cuda_getCurrentRawStream as get_raw_stream from torch._inductor.runtime.triton_helpers import libdevice import torch.nn as nn import torch.fft assert_size_stride = torch._C._dynamo.gu...
NejcHirci/material-addon
AdaptiveInstanceNormalization
false
17,771
[ "MIT" ]
4
c08e2081413c3319b712c2f7193ac8013f601382
https://github.com/NejcHirci/material-addon/tree/c08e2081413c3319b712c2f7193ac8013f601382
Conv2dSame
# 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 import torch.nn as nn from typing im...
infomon/meta_nas
Conv2dSame
false
6,883
[ "Apache-2.0" ]
1
b81b7de86d26ae1ec0d6646b4277f3c918e5e35d
https://github.com/infomon/meta_nas/tree/b81b7de86d26ae1ec0d6646b4277f3c918e5e35d
Net
import torch import torch.nn as nn import torch.nn.functional as F class Net(nn.Module): def __init__(self): super(Net, self).__init__() self.conv1 = nn.Conv2d(3, 6, 5) self.pool = nn.MaxPool2d(2, 2) self.conv2 = nn.Conv2d(6, 16, 5) self.fc1 = nn.Linear(16 * 5 * 5, 120) ...
import torch from torch._inductor.select_algorithm import extern_kernels import triton import triton.language as tl from 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_...
AlexHoffman9/HAET-2021-competition-baseline-code
Net
false
11,232
[ "MIT" ]
0
1d71c94c68c9903854eceda6caf07442930caa44
https://github.com/AlexHoffman9/HAET-2021-competition-baseline-code/tree/1d71c94c68c9903854eceda6caf07442930caa44
ClassificationModel
# 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_...
TobyChen0106/DeepQ_Final_B05901170
ClassificationModel
false
1,152
[ "Apache-2.0" ]
0
808a224c01272726a051eb7b7bb9e1b28887716e
https://github.com/TobyChen0106/DeepQ_Final_B05901170/tree/808a224c01272726a051eb7b7bb9e1b28887716e
NormalLogProb
# AOT ID: ['0_inference'] from ctypes import c_void_p, c_long, c_int import torch import math import random import os import tempfile from math import inf, nan from torch._inductor.hooks import run_intermediate_hooks from torch._inductor.utils import maybe_profile from torch._inductor.codegen.memory_planning import _al...
import torch import triton import triton.language as tl from torch._inductor.runtime.triton_heuristics import grid from torch._C import _cuda_getCurrentRawStream as get_raw_stream from torch._inductor.runtime.triton_helpers import math as tl_math import torch.nn as nn import torch.utils import torch.utils.data assert_s...
msunardi/vae_experiment
NormalLogProb
false
7,294
[ "MIT" ]
1
e3ce39e586f1189d157e753370a90c07713658b3
https://github.com/msunardi/vae_experiment/tree/e3ce39e586f1189d157e753370a90c07713658b3
BernoulliLayer
import abc import torch class ProbabilisticLayer(torch.nn.Module, metaclass=abc.ABCMeta): """Probabilistic layer to be used by the encoder/decoder of a Variational AutoEncoder. """ @abc.abstractmethod def forward(self, inputs): """Compute the parameters of the distribution conditioned on...
import torch from torch._inductor.select_algorithm import extern_kernels import 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 abc assert_size_stride = torch._C._dynamo.guards.assert_size_stride empty...
BUTSpeechFIT/beer
BernoulliLayer
false
16,963
[ "MIT" ]
6
43fb9027a859db28d2f2f8709260ca2ce9501e25
https://github.com/BUTSpeechFIT/beer/tree/43fb9027a859db28d2f2f8709260ca2ce9501e25
_VariableWeightsAndBiases
import torch import torch.nn as nn class _VariableWeightsAndBiases(nn.Module): def __init__(self, in_features, hidden_features, out_features): super(_VariableWeightsAndBiases, self).__init__() self.linear = nn.Linear(in_features, hidden_features) self.weights = nn.Linear(hidden_features, ...
import torch from torch._inductor.select_algorithm import extern_kernels import triton import triton.language as tl from torch._inductor.runtime.triton_heuristics import grid from torch._C import _cuda_getCurrentRawStream as get_raw_stream import torch.nn as nn assert_size_stride = torch._C._dynamo.guards.assert_size_s...
pjordan/dmch
_VariableWeightsAndBiases
false
4,125
[ "Apache-2.0" ]
0
84e04ddb0679007b15acfdc275e0e3f51e50d9f2
https://github.com/pjordan/dmch/tree/84e04ddb0679007b15acfdc275e0e3f51e50d9f2
Conv2dDynamicSamePadding
# 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...
Exdenta/torchsat
Conv2dDynamicSamePadding
false
13,660
[ "MIT" ]
316
70ea3db758757104fb3ba618ddf7997f0f3a75b4
https://github.com/Exdenta/torchsat/tree/70ea3db758757104fb3ba618ddf7997f0f3a75b4
SigmoidRange
# AOT ID: ['0_inference'] from ctypes import c_void_p, c_long, c_int import torch import math import random import os import tempfile from math import inf, nan from torch._inductor.hooks import run_intermediate_hooks from torch._inductor.utils import maybe_profile from torch._inductor.codegen.memory_planning import _al...
import torch import triton import triton.language as tl from torch._inductor.runtime.triton_heuristics import grid from torch._C import _cuda_getCurrentRawStream as get_raw_stream assert_size_stride = torch._C._dynamo.guards.assert_size_stride empty_strided_cuda = torch._C._dynamo.guards._empty_strided_cuda @triton.j...
BojarLab/glycowork
SigmoidRange
false
7,804
[ "MIT" ]
22
72d37d406ad70bb9def4a5632a6605778e295fbb
https://github.com/BojarLab/glycowork/tree/72d37d406ad70bb9def4a5632a6605778e295fbb
Fusion2_MinusFCLayer
import torch from torch import nn class Fusion2_MinusFCLayer(nn.Module): def __init__(self, input_dim): super(Fusion2_MinusFCLayer, self).__init__() self._norm_layer1 = nn.Linear(input_dim * 3, input_dim) def forward(self, input1, input2): norm_input = self._norm_layer1(torch.cat([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 import nn assert_size_stride = torch._C._dynamo.guards.assert_size_st...
RUCAIBox/WSDM2022-C2CRS
Fusion2_MinusFCLayer
false
17,842
[ "MIT" ]
4
8ef2fa7c44bdba1799ab79f379ae7394bd468c02
https://github.com/RUCAIBox/WSDM2022-C2CRS/tree/8ef2fa7c44bdba1799ab79f379ae7394bd468c02
Linear
import math import torch from torch import Tensor from torch.nn import Linear from torch.nn import Parameter import torch.utils.data def uniform(size, tensor): bound = 1.0 / math.sqrt(size) if tensor is not None: tensor.data.uniform_(-bound, bound) def kaiming_uniform(tensor, fan, a): if tensor ...
import torch from torch._inductor.select_algorithm import extern_kernels import triton import triton.language as tl from torch._inductor.runtime.triton_heuristics import grid from torch._C import _cuda_getCurrentRawStream as get_raw_stream import math from torch import Tensor from torch.nn import Parameter import torch...
pwycl/pytorch_geometric
Linear
false
10,774
[ "MIT" ]
0
ef7b1add2bb5a36a3a68cae7639c42000f629cac
https://github.com/pwycl/pytorch_geometric/tree/ef7b1add2bb5a36a3a68cae7639c42000f629cac
QuantLinear
from torch.autograd import Function import torch import torch.nn as nn import torch.nn.functional as F class Round(Function): @staticmethod def forward(self, input): sign = torch.sign(input) output = sign * torch.floor(torch.abs(input) + 0.5) return output @staticmethod def b...
import torch from torch._inductor.select_algorithm import extern_kernels import triton import triton.language as tl from 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....
XueYue404/QNN
QuantLinear
false
1,257
[ "MIT" ]
0
43cea970404156b591088d77672df58261edf1eb
https://github.com/XueYue404/QNN/tree/43cea970404156b591088d77672df58261edf1eb
Head
import torch import torch.nn as nn class Conv(nn.Module): def __init__(self, filters0, filters1, kernel_size, bn, bias=True): super().__init__() if bn: bias = False self.conv = nn.Conv2d(filters0, filters1, kernel_size, stride=1, padding=kernel_size // 2, bias=bias...
import torch from torch._inductor.select_algorithm import extern_kernels import triton import triton.language as tl from torch._inductor.runtime.triton_heuristics import grid from torch._C import _cuda_getCurrentRawStream as get_raw_stream import torch.nn as nn assert_size_stride = torch._C._dynamo.guards.assert_size_s...
Hiroki9759/HandyRL
Head
false
5,324
[ "MIT" ]
1
7d4dc869ba2f657d65fc461be4bed2d90dd0343b
https://github.com/Hiroki9759/HandyRL/tree/7d4dc869ba2f657d65fc461be4bed2d90dd0343b
Hidden2Discrete
# 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....
RoderickGu/Pretraining_GPT
Hidden2Discrete
false
17,855
[ "Apache-2.0" ]
4
0a3ecd38116dc271e273f57490b9b45b660bf401
https://github.com/RoderickGu/Pretraining_GPT/tree/0a3ecd38116dc271e273f57490b9b45b660bf401
TxtNet
# 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....
zzs1994/DJsRH
TxtNet
false
16,841
[ "MIT" ]
53
6041c2df810723dd0052e2e5b7c6bd33033f0f21
https://github.com/zzs1994/DJsRH/tree/6041c2df810723dd0052e2e5b7c6bd33033f0f21
RelPositionMultiHeadedAttention
# 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....
JJoving/wenet
RelPositionMultiHeadedAttention
false
9,182
[ "Apache-2.0" ]
0
4a2195744dba43fe4fb9ad8d46a2b90a80dbdc4e
https://github.com/JJoving/wenet/tree/4a2195744dba43fe4fb9ad8d46a2b90a80dbdc4e
resnet_block
import torch import torch.nn as nn import torch.nn.functional as F class resnet_block(nn.Module): def __init__(self, dim_in, dim_out): super(resnet_block, self).__init__() self.dim_in = dim_in self.dim_out = dim_out if self.dim_in == self.dim_out: self.conv_1 = nn.Conv...
import torch from torch._inductor.select_algorithm import extern_kernels import triton import triton.language 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 ...
czq142857/DECOR-GAN
resnet_block
false
15,102
[ "MIT" ]
55
79c80fc202b8af982989a3e3bb3afe85e606b71f
https://github.com/czq142857/DECOR-GAN/tree/79c80fc202b8af982989a3e3bb3afe85e606b71f
BiAffine
# 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.utils.data from torch.nn import Parameter asse...
LindaCY/fastNLP
BiAffine
false
17,622
[ "Apache-2.0" ]
4
3fa95b6cfc31211453bc21792e3eef87948858da
https://github.com/LindaCY/fastNLP/tree/3fa95b6cfc31211453bc21792e3eef87948858da
VitMlpHead
# 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 assert_size_stride ...
parsa-epfl/Megatron-LM
VitMlpHead
false
12,871
[ "MIT" ]
0
0301c00ce60b7c75f315e7aa4ff38238186762b1
https://github.com/parsa-epfl/Megatron-LM/tree/0301c00ce60b7c75f315e7aa4ff38238186762b1
TVLoss
import torch from torch import nn class TVLoss(nn.Module): def __init__(self, tvloss_weight=1): super(TVLoss, self).__init__() self.tvloss_weight = tvloss_weight def forward(self, generated): b, c, h, w = generated.size() h_tv = torch.pow(generated[:, :, 1:, :] - generated[:,...
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...
MKFMIKU/Enhancing-Loss.pytorch
TVLoss
false
17,634
[ "MIT" ]
6
1e8b7cbdc53f6ef912955c19193e0a538e38dc7e
https://github.com/MKFMIKU/Enhancing-Loss.pytorch/tree/1e8b7cbdc53f6ef912955c19193e0a538e38dc7e
FeatureCorrelation
import torch import torch.nn as nn import torch.nn def featureL2Norm(feature): epsilon = 1e-06 norm = torch.pow(torch.sum(torch.pow(feature, 2), 1) + epsilon, 0.5 ).unsqueeze(1).expand_as(feature) return torch.div(feature, norm) class FeatureCorrelation(torch.nn.Module): def __init__(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....
JiwonCocoder/matching1
FeatureCorrelation
false
648
[ "MIT" ]
0
75274312a4ab6ba318c3d241abc0eb292f6ce69c
https://github.com/JiwonCocoder/matching1/tree/75274312a4ab6ba318c3d241abc0eb292f6ce69c
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 from torch._inductor.runtime....
cyliu0204/petastorm
Net
false
3,376
[ "Apache-2.0" ]
0
589d40ce372c311382f37e4271a5169dafba5db1
https://github.com/cyliu0204/petastorm/tree/589d40ce372c311382f37e4271a5169dafba5db1
cnn_layer
# 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 ...
ciaochiaociao/CLNER
cnn_layer
false
3,374
[ "MIT" ]
0
a31fb1c3bfdaa5d62147dc892489d29a85e6b385
https://github.com/ciaochiaociao/CLNER/tree/a31fb1c3bfdaa5d62147dc892489d29a85e6b385
AgentReinforce
# 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_...
onimaru/Reinforcement_Learning
AgentReinforce
false
7,366
[ "MIT" ]
1
4c45b51a095cb0cb3c18f6a1542befdcab8a58a4
https://github.com/onimaru/Reinforcement_Learning/tree/4c45b51a095cb0cb3c18f6a1542befdcab8a58a4
Attention
import torch import torch.nn as nn class Attention(nn.Module): """ Applies attention mechanism on the `context` using the `query`. **Thank you** to IBM for their initial implementation of :class:`Attention`. Here is their `License <https://github.com/IBM/pytorch-seq2seq/blob/master/LICENSE>`__. ...
import torch from torch._inductor.select_algorithm import extern_kernels import triton import triton.language as tl from 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....
PattynR/PyTorch-NLP
Attention
false
945
[ "BSD-3-Clause" ]
0
8995774abf3734db6da174425843d883face5218
https://github.com/PattynR/PyTorch-NLP/tree/8995774abf3734db6da174425843d883face5218
BCEDiceLoss
# 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 ...
YinanZYN/pytorch-3dunet
BCEDiceLoss
false
11,997
[ "MIT" ]
0
d1494f421a836af54c3dde65c54e3e62d5c00800
https://github.com/YinanZYN/pytorch-3dunet/tree/d1494f421a836af54c3dde65c54e3e62d5c00800
SoftDiceLossSquared
import torch import numpy as np from torch import nn import torch.jit import torch.nn.functional def sum_tensor(inp, axes, keepdim=False): axes = np.unique(axes).astype(int) if keepdim: for ax in axes: inp = inp.sum(int(ax), keepdim=True) else: for ax in sorted(axes, reverse=Tr...
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 import torch.jit import torch.nn.functional assert_size_stride = torch._C._dynamo.guards.assert_size...
ShishuaiHu/DCAC
SoftDiceLossSquared
false
5,821
[ "MIT" ]
1
de04d00edde1b38385a8e5aade7541e2c22807e7
https://github.com/ShishuaiHu/DCAC/tree/de04d00edde1b38385a8e5aade7541e2c22807e7
AddcmulTestModule
# AOT ID: ['0_inference'] from ctypes import c_void_p, c_long, c_int import torch import math import random import os import tempfile from math import inf, nan from torch._inductor.hooks import run_intermediate_hooks from torch._inductor.utils import maybe_profile from torch._inductor.codegen.memory_planning import _al...
import torch import triton import triton.language as tl from torch._inductor.runtime.triton_heuristics import grid from torch._C import _cuda_getCurrentRawStream as get_raw_stream assert_size_stride = torch._C._dynamo.guards.assert_size_stride empty_strided_cuda = torch._C._dynamo.guards._empty_strided_cuda @triton.j...
jinfagang/torch2trt_dynamic
AddcmulTestModule
false
15,685
[ "MIT" ]
155
fad7a7845f13cb59c05de25fcb83e7591acb492c
https://github.com/jinfagang/torch2trt_dynamic/tree/fad7a7845f13cb59c05de25fcb83e7591acb492c
TokenEmbedding
# 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.fft assert_size_stride = torch._C._dynamo.gua...
jianzhnie/TsFormer
TokenEmbedding
false
3,727
[ "Apache-2.0" ]
0
47e362f02445ba00d5ab8db206667767e72faca7
https://github.com/jianzhnie/TsFormer/tree/47e362f02445ba00d5ab8db206667767e72faca7
_GatedResidualNetwork
import torch from torch import Tensor from torch import nn as nn import torch.nn.functional as F class MonteCarloDropout(nn.Dropout): """ Defines Monte Carlo dropout Module as defined in the paper https://arxiv.org/pdf/1506.02142.pdf. In summary, This technique uses the regular dropout which can b...
import torch from torch._inductor.select_algorithm import extern_kernels import triton import triton.language 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 T...
gdevos010/darts
_GatedResidualNetwork
false
3,671
[ "Apache-2.0" ]
0
96c97c1e241500ae7b91d32bbfa21d811e4a7d71
https://github.com/gdevos010/darts/tree/96c97c1e241500ae7b91d32bbfa21d811e4a7d71
Value
import torch import torch.nn as nn import torch.nn.functional as F import torch.utils.data class Value(nn.Module): def __init__(self, state_dim, action_dim): super(Value, self).__init__() self.l1 = nn.Linear(state_dim, 400) self.l2 = nn.Linear(400, 300) self.l3 = nn.Linear(300, 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 import torch.nn as nn import ...
Altriaex/d4rl_evaluations
Value
false
8,953
[ "Apache-2.0" ]
0
ceb34c04e98af9332c6338a1414c0c2aa5fea68b
https://github.com/Altriaex/d4rl_evaluations/tree/ceb34c04e98af9332c6338a1414c0c2aa5fea68b
BasicBlock
# 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...
HappyBelief/ContraD
BasicBlock
false
13,753
[ "MIT" ]
168
abb72562ddac8d8ab37fe9af6ac4c44c61e8ea0f
https://github.com/HappyBelief/ContraD/tree/abb72562ddac8d8ab37fe9af6ac4c44c61e8ea0f
EqualConv2d
import math import torch from torch import nn from torch.nn import functional as F class EqualConv2d(nn.Module): def __init__(self, in_channel, out_channel, kernel_size, stride=1, padding=0, bias=True): super().__init__() self.weight = nn.Parameter(torch.randn(out_channel, in_channel, ...
import torch from torch._inductor.select_algorithm import extern_kernels import triton import triton.language as tl from torch._inductor.runtime.triton_heuristics import grid from torch._C import _cuda_getCurrentRawStream as get_raw_stream import math from torch import nn assert_size_stride = torch._C._dynamo.guards.as...
BinahHu/stylegan2-pytorch
EqualConv2d
false
166
[ "MIT", "BSD-2-Clause", "Apache-2.0" ]
0
9975707ffd93872fce02f7e3654eb588a09e23e4
https://github.com/BinahHu/stylegan2-pytorch/tree/9975707ffd93872fce02f7e3654eb588a09e23e4
NormedMSE
import torch import torch.nn as nn import torch.utils.data class NormedMSE(nn.MSELoss): def forward(self, inp, tgt, *args, **kwargs): """ Args: inp: (*, C) tgt: (*, C) Will normalize the input before the loss """ inp = nn.functional.normalize(in...
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...
gongda0e/AVT
NormedMSE
false
15,444
[ "Apache-2.0" ]
102
d6a7032b86416e852c76cc04a20ccabe34f111dc
https://github.com/gongda0e/AVT/tree/d6a7032b86416e852c76cc04a20ccabe34f111dc
LogSumExpPool
# AOT ID: ['0_inference'] from ctypes import c_void_p, c_long, c_int import torch import math import random import os import tempfile from math import inf, nan from torch._inductor.hooks import run_intermediate_hooks from torch._inductor.utils import maybe_profile from torch._inductor.codegen.memory_planning import _al...
import torch import triton import triton.language as tl from torch._inductor.runtime.triton_heuristics import grid from torch._C import _cuda_getCurrentRawStream as get_raw_stream from torch._inductor.runtime import triton_helpers from torch._inductor.runtime.triton_helpers import math as tl_math from torch import nn a...
Tarandro/Chexpert
LogSumExpPool
false
11,927
[ "Apache-2.0" ]
0
6bc51f899a479f8dbad8a64c92f35ed4632377b3
https://github.com/Tarandro/Chexpert/tree/6bc51f899a479f8dbad8a64c92f35ed4632377b3
ConvertPointsFromHomogeneous
# 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
ConvertPointsFromHomogeneous
false
14,149
[ "BSD-3-Clause" ]
1,612
b8bb7b587c0841b9292edb147729de581c66054c
https://github.com/Paultool/frankmocap/tree/b8bb7b587c0841b9292edb147729de581c66054c
Attention
# AOT ID: ['0_forward'] from ctypes import c_void_p, c_long, c_int import torch import math import random import os import tempfile from math import inf, nan from torch._inductor.hooks import run_intermediate_hooks from torch._inductor.utils import maybe_profile from torch._inductor.codegen.memory_planning import _alig...
import torch from torch._inductor.select_algorithm import extern_kernels import triton import triton.language as tl from torch._inductor.runtime.triton_heuristics import grid from torch._C import _cuda_getCurrentRawStream as get_raw_stream from torch._inductor.runtime import triton_helpers from torch._inductor.runtime....
zhongerqiandan/OpenDialog
Attention
false
16,814
[ "MIT" ]
98
f478b2a912c8c742da5ced510ac40da59217ddb3
https://github.com/zhongerqiandan/OpenDialog/tree/f478b2a912c8c742da5ced510ac40da59217ddb3
HardNegativeContrastiveLoss
import torch import torch.nn as nn class HardNegativeContrastiveLoss(nn.Module): def __init__(self, nmax=1, margin=0.2): super(HardNegativeContrastiveLoss, self).__init__() self.margin = margin self.nmax = nmax def forward(self, imgs, caps): scores = torch.mm(imgs, caps.t()) ...
import torch from torch._inductor.select_algorithm import extern_kernels import triton import triton.language as tl from 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_...
debayan/dsve-loc
HardNegativeContrastiveLoss
false
3,407
[ "BSD-3-Clause-Clear" ]
0
21b1e1837668b6daa0881514d0756e9bec039fcb
https://github.com/debayan/dsve-loc/tree/21b1e1837668b6daa0881514d0756e9bec039fcb
HouseHolderFlow
import torch import torch.utils.data import torch.nn as nn class HouseHolderFlow(nn.Module): def forward(self, v, z): """ :param v: batch_size (B) x latent_size (L) :param z: batch_size (B) x latent_size (L) :return: z_new = z - 2* v v_T / norm(v,2) * z """ vvT = t...
import torch from torch._inductor.select_algorithm import extern_kernels import triton import triton.language as tl from torch._inductor.runtime.triton_heuristics import grid from torch._C import _cuda_getCurrentRawStream as get_raw_stream import torch.utils.data import torch.nn as nn assert_size_stride = torch._C._dyn...
gpoesia/variational-item-response-theory-public
HouseHolderFlow
false
12,465
[ "MIT" ]
0
6a0db81068695422dddec8832ce353879c5acb82
https://github.com/gpoesia/variational-item-response-theory-public/tree/6a0db81068695422dddec8832ce353879c5acb82