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
AsymmetricLoss
import torch from torchvision import datasets as datasets import torch.nn as nn import torch.nn.parallel import torch.optim import torch.utils.data.distributed class AsymmetricLoss(nn.Module): def __init__(self, gamma_neg=4, gamma_pos=1, clip=0.05, eps=1e-08, disable_torch_grad_focal_loss=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 from torch._inductor.runtime.triton_helpers import libdevice, math as tl_math from torchv...
MinliangLin/ASL
AsymmetricLoss
false
2,921
[ "MIT" ]
0
beda0989a8e30ac51a7ce9f9e247a12bbe84ec96
https://github.com/MinliangLin/ASL/tree/beda0989a8e30ac51a7ce9f9e247a12bbe84ec96
RobertaMaskLeanerHead
import torch import torch.nn.functional as F import torch.nn as nn import torch.utils.data import torch.onnx.operators import torch.optim import torch.optim.lr_scheduler class RobertaMaskLeanerHead(nn.Module): """ Head for mask leaner. input: (batch, src_lens, embed_dim) output: (batch, src_lens,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....
ChanLiang/MAP-BERT
RobertaMaskLeanerHead
false
275
[ "MIT" ]
0
c3f95a925002061463dbb68608ff7c67ff353b5d
https://github.com/ChanLiang/MAP-BERT/tree/c3f95a925002061463dbb68608ff7c67ff353b5d
EltwiseProdScoring
import torch import torch.nn as nn class EltwiseProdScoring(nn.Module): """ Linearly mapping h and v to the same dimension, and do a elementwise multiplication and a linear scoring """ def __init__(self, h_dim, a_dim, dot_dim=256): """Initialize layer.""" super(EltwiseProdScoring,...
import torch from torch._inductor.select_algorithm import extern_kernels import 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...
cacosandon/speaker_follower_with_objects
EltwiseProdScoring
false
12,194
[ "BSD-2-Clause", "MIT" ]
0
f3d454fdbd1c8129887cf4ecc4743d231c7b9555
https://github.com/cacosandon/speaker_follower_with_objects/tree/f3d454fdbd1c8129887cf4ecc4743d231c7b9555
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 from torch._inductor.runtime import triton_helpers import torch.nn as nn import torch.nn.init assert_size_stride = torch._C._dynamo.guards.a...
MichoelSnow/data_science
AdaptiveConcatPool2d
false
9,865
[ "MIT" ]
0
7f6c054624268308ec4126a601c9fa8bc5de157c
https://github.com/MichoelSnow/data_science/tree/7f6c054624268308ec4126a601c9fa8bc5de157c
FunctionalRelu6
# AOT ID: ['0_inference'] from ctypes import c_void_p, c_long, c_int import torch import math import random import os import tempfile from math import inf, nan from torch._inductor.hooks import run_intermediate_hooks from torch._inductor.utils import maybe_profile from torch._inductor.codegen.memory_planning import _al...
import torch import triton import triton.language as tl from torch._inductor.runtime.triton_heuristics import grid from torch._C import _cuda_getCurrentRawStream as get_raw_stream from torch._inductor.runtime import triton_helpers assert_size_stride = torch._C._dynamo.guards.assert_size_stride empty_strided_cuda = torc...
Ilyabasharov/torch2trt
FunctionalRelu6
false
2,511
[ "MIT" ]
0
76bf298b3da408509665e23e2494922b131afb10
https://github.com/Ilyabasharov/torch2trt/tree/76bf298b3da408509665e23e2494922b131afb10
Perceptron
# 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_...
negotiatorvivian/PDP-SP
Perceptron
false
4,065
[ "MIT" ]
0
0fa4c1145c2b881c1fde4ed8d9f0845b7967f857
https://github.com/negotiatorvivian/PDP-SP/tree/0fa4c1145c2b881c1fde4ed8d9f0845b7967f857
MiniBatchStddevLayer
import torch import torch.nn as nn import torch.distributed as dist import torch.autograd as autograd class AllGatherLayer(autograd.Function): """All gather layer with backward propagation path. Indeed, this module is to make ``dist.all_gather()`` in the backward graph. Such kind of operation has been wi...
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.distributed as dist import torch.autograd as...
HXWAndCL/mmgeneration
MiniBatchStddevLayer
false
5,253
[ "Apache-2.0" ]
1
9afb1d740bf56a4ecde5064d5bb2a4e2d777638b
https://github.com/HXWAndCL/mmgeneration/tree/9afb1d740bf56a4ecde5064d5bb2a4e2d777638b
EqualConv2d
# AOT ID: ['0_forward'] from ctypes import c_void_p, c_long, c_int import torch import math import random import os import tempfile from math import inf, nan from torch._inductor.hooks import run_intermediate_hooks from torch._inductor.utils import maybe_profile from torch._inductor.codegen.memory_planning import _alig...
import torch from torch._inductor.select_algorithm import extern_kernels import triton import triton.language as tl from torch._inductor.runtime.triton_heuristics import grid from torch._C import _cuda_getCurrentRawStream as get_raw_stream from torch import nn from math import sqrt assert_size_stride = torch._C._dynamo...
hologerry/style-based-gan-pytorch
EqualConv2d
false
3,623
[ "MIT" ]
0
1a694fb3ea0288f1aaaa43aa67a570d908d9dc27
https://github.com/hologerry/style-based-gan-pytorch/tree/1a694fb3ea0288f1aaaa43aa67a570d908d9dc27
ActivationQuantizer
# AOT ID: ['0_inference'] from ctypes import c_void_p, c_long, c_int import torch import math import random import os import tempfile from math import inf, nan from torch._inductor.hooks import run_intermediate_hooks from torch._inductor.utils import maybe_profile from torch._inductor.codegen.memory_planning import _al...
import torch import triton import triton.language as tl from torch._inductor.runtime.triton_heuristics import grid from torch._C import _cuda_getCurrentRawStream as get_raw_stream from torch._inductor.runtime import triton_helpers from torch._inductor.runtime.triton_helpers import libdevice from torch.autograd import F...
RiccardoRuggiero/micronet
ActivationQuantizer
false
5,766
[ "MIT" ]
1
bfdac2a50a5f0f8484a253b356c06a166bf7e6a0
https://github.com/RiccardoRuggiero/micronet/tree/bfdac2a50a5f0f8484a253b356c06a166bf7e6a0
DiceLoss
import torch import torch.nn as nn def f_score(pr, gt, beta=1, eps=1e-07, threshold=None, activation='sigmoid'): activation_fn = torch.nn.Sigmoid() pr = activation_fn(pr) if threshold is not None: pr = (pr > threshold).float() tp = torch.sum(gt * pr) fp = torch.sum(pr) - tp fn = torch....
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...
LovreAB17/Eff-UNet
DiceLoss
false
17,601
[ "MIT" ]
5
b1e76a68d96e55324b6859c64ad2367653143e5e
https://github.com/LovreAB17/Eff-UNet/tree/b1e76a68d96e55324b6859c64ad2367653143e5e
eSEModule
# AOT ID: ['0_forward'] from ctypes import c_void_p, c_long, c_int import torch import math import random import os import tempfile from math import inf, nan from torch._inductor.hooks import run_intermediate_hooks from torch._inductor.utils import maybe_profile from torch._inductor.codegen.memory_planning import _alig...
import torch from torch._inductor.select_algorithm import extern_kernels import triton import triton.language as tl from torch._inductor.runtime.triton_heuristics import grid from torch._C import _cuda_getCurrentRawStream as get_raw_stream from torch._inductor.runtime import triton_helpers from torch import nn import t...
UWO-CCPL/AdelaiDet
eSEModule
false
9,565
[ "BSD-2-Clause" ]
0
29a59575697dbbb4cfe7b7ab821805913348cf61
https://github.com/UWO-CCPL/AdelaiDet/tree/29a59575697dbbb4cfe7b7ab821805913348cf61
NoNorm
import torch from torch import nn import torch.utils.checkpoint class NoNorm(nn.Module): def __init__(self, feat_size, eps=None): super().__init__() self.bias = nn.Parameter(torch.zeros(feat_size)) self.weight = nn.Parameter(torch.ones(feat_size)) def forward(self, input_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 import nn import torch.utils.checkpoint assert_size_stride = torch._C._dynamo.guards.assert_size_stride empty_strided_cuda = torc...
Clemens123/transformers
NoNorm
false
11,500
[ "Apache-2.0" ]
0
22abe7bbc587c16ec30f9d1aa549dcbeba6e9e26
https://github.com/Clemens123/transformers/tree/22abe7bbc587c16ec30f9d1aa549dcbeba6e9e26
RED_CNN
# AOT ID: ['0_forward'] from ctypes import c_void_p, c_long, c_int import torch import math import random import os import tempfile from math import inf, nan from torch._inductor.hooks import run_intermediate_hooks from torch._inductor.utils import maybe_profile from torch._inductor.codegen.memory_planning import _alig...
import torch from torch._inductor.select_algorithm import extern_kernels import triton import triton.language as tl from torch._inductor.runtime.triton_heuristics import grid from torch._C import _cuda_getCurrentRawStream as get_raw_stream from torch._inductor.runtime import triton_helpers import torch.nn as nn assert_...
BennyZhang-Codes/LDCT-denoising-with-DL-Methods-and-Dicom-Viewer-by-Benny
RED_CNN
false
17,036
[ "MIT" ]
7
07e3dc1e3c6dcdea314b2a9e3cf9ac1036cf5eb6
https://github.com/BennyZhang-Codes/LDCT-denoising-with-DL-Methods-and-Dicom-Viewer-by-Benny/tree/07e3dc1e3c6dcdea314b2a9e3cf9ac1036cf5eb6
TKipfGCN
import math import torch import torch.utils.data import torch.nn as nn import torch.nn.functional as F from torch.nn.parameter import Parameter from torch.nn import Parameter class BaseModel(nn.Module): @staticmethod def add_args(parser): """Add model-specific arguments to the parser.""" pass...
import torch from torch._inductor.select_algorithm import extern_kernels import triton import triton.language as tl from 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....
zxhhh97/cogdl
TKipfGCN
false
4,682
[ "MIT" ]
0
de21c78d9bbbf0c6cafbc72ff241cda35693ec37
https://github.com/zxhhh97/cogdl/tree/de21c78d9bbbf0c6cafbc72ff241cda35693ec37
CausualConv
# 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...
shaun95/StarGANv2-VC
CausualConv
false
16,394
[ "MIT" ]
116
ed20538971a03d699351a349a3631767333baeb7
https://github.com/shaun95/StarGANv2-VC/tree/ed20538971a03d699351a349a3631767333baeb7
AvgPool2d
# 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.nn import Module assert_size_stride = torch._C._dynamo.guards.assert_size_stride empty_strided_cuda = torch._C._dynamo.guards._em...
Prince326/PySyft
AvgPool2d
false
9,357
[ "Apache-2.0" ]
0
c7167680e9020853c353a2a725ff79f3df2bef05
https://github.com/Prince326/PySyft/tree/c7167680e9020853c353a2a725ff79f3df2bef05
down
# 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...
Remosy/v2e
down
false
11,836
[ "MIT" ]
0
efc81cbcc113ca55d1631603323150be5ef8eb30
https://github.com/Remosy/v2e/tree/efc81cbcc113ca55d1631603323150be5ef8eb30
SelfAttention
import torch import torch.nn as nn import torch.nn.functional as F class SelfAttention(nn.Module): def __init__(self, k, heads=8): super().__init__() self.k = k self.heads = heads self.to_keys = nn.Linear(k, k * heads, bias=False) self.to_queries = nn.Linear(k, k * heads, ...
import torch from torch._inductor.select_algorithm import extern_kernels import triton import triton.language as tl from 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....
dogeplusplus/sandbox
SelfAttention
false
1,864
[ "MIT" ]
0
c9041c06da9454f6c3cec622abbbf918c9f13bdc
https://github.com/dogeplusplus/sandbox/tree/c9041c06da9454f6c3cec622abbbf918c9f13bdc
qd
# 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_...
sautami26/DIVA
qd
false
4,266
[ "MIT" ]
0
52af683db216cb6e2ac777597fd9ec744ce7c8f2
https://github.com/sautami26/DIVA/tree/52af683db216cb6e2ac777597fd9ec744ce7c8f2
FiLM
import torch import torch.nn as nn class FiLM(nn.Module): def __init__(self, zdim, maskdim): super(FiLM, self).__init__() self.gamma = nn.Linear(zdim, maskdim) self.beta = nn.Linear(zdim, maskdim) def forward(self, x, z): gamma = self.gamma(z).unsqueeze(-1).unsqueeze(-1) ...
import torch from torch._inductor.select_algorithm import extern_kernels import triton import triton.language as tl from torch._inductor.runtime.triton_heuristics import grid from torch._C import _cuda_getCurrentRawStream as get_raw_stream import torch.nn as nn assert_size_stride = torch._C._dynamo.guards.assert_size_s...
CPJKU/audio_conditioned_unet
FiLM
false
7,821
[ "MIT" ]
20
68f20f5280079e99be260f9fe9933c0064eb2d7f
https://github.com/CPJKU/audio_conditioned_unet/tree/68f20f5280079e99be260f9fe9933c0064eb2d7f
GatedConv
import torch import torch.nn as nn class GatedConv(nn.Module): def __init__(self, in_channels, out_channels, kernel_size, stride=1, padding=0, groups=1): super(GatedConv, self).__init__() self.layer_f = nn.Conv2d(in_channels, out_channels, kernel_size, stride=stride, padding=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 import torch.nn as nn assert_size_stride = torch._C._dynamo.guards.assert_size_s...
D-hash-code/ffjord-rnode-finalweek-mnist
GatedConv
false
2,148
[ "MIT" ]
0
4cabcbadda79c68df53ec25f1f8fe03cfeee78f9
https://github.com/D-hash-code/ffjord-rnode-finalweek-mnist/tree/4cabcbadda79c68df53ec25f1f8fe03cfeee78f9
InceptionD
# 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 ...
Galaxies99/inception-cuda
InceptionD
false
11,447
[ "MIT" ]
0
ed8fdbe3caef415e60b52e671273be90e9423e44
https://github.com/Galaxies99/inception-cuda/tree/ed8fdbe3caef415e60b52e671273be90e9423e44
CasualConv1d
import torch import torch.nn as nn class CasualConv1d(nn.Module): def __init__(self, in_channels, out_channels, kernel_size, stride=1, dilation=1, groups=1, bias=True): super(CasualConv1d, self).__init__() self.dilation = dilation padding = dilation * (kernel_size - 1) 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 import torch.nn as nn assert_size_stride = torch._C._dynamo.guards.assert_size_s...
Asichurter/Few-Shot-Project
CasualConv1d
false
80
[ "MIT" ]
0
865cd6aa7b996c518dfa48dcc9ffad90445f9efe
https://github.com/Asichurter/Few-Shot-Project/tree/865cd6aa7b996c518dfa48dcc9ffad90445f9efe
LinearWeightNorm
import torch import torch.nn as nn class LinearWeightNorm(nn.Module): def __init__(self, in_features, out_features, bias=True): super(LinearWeightNorm, self).__init__() self.linear = nn.Linear(in_features, out_features, bias=bias) self.reset_parameters() def reset_parameters(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 import torch.nn as ...
XuezheMax/macow
LinearWeightNorm
false
14,613
[ "Apache-2.0" ]
60
6de247c09b590a037c9eec2d6b1248845f6efb31
https://github.com/XuezheMax/macow/tree/6de247c09b590a037c9eec2d6b1248845f6efb31
GaussianKernel
# 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 from torch import nn assert_size_stride = torch._C._dynamo.guards.assert_...
amberhuang01/LearningFromFactCheckers
GaussianKernel
false
18,299
[ "MIT" ]
9
3c21684709bf5e331c4585c7d62596960dd44732
https://github.com/amberhuang01/LearningFromFactCheckers/tree/3c21684709bf5e331c4585c7d62596960dd44732
sSE
# 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...
mattroz/yatopi
sSE
false
3,988
[ "MIT" ]
0
278bac6f3d2f13916ae9d43309b9f38b608426bd
https://github.com/mattroz/yatopi/tree/278bac6f3d2f13916ae9d43309b9f38b608426bd
PositionwiseFeedForward
# 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....
chenghaoliu89/TSForecasting_FT
PositionwiseFeedForward
false
9,995
[ "MIT" ]
0
e29227e67f754919672eab9002a1b37b13ed28a0
https://github.com/chenghaoliu89/TSForecasting_FT/tree/e29227e67f754919672eab9002a1b37b13ed28a0
BertLayerNorm
import torch from torch import nn class BertLayerNorm(nn.Module): def __init__(self, hidden_size, eps=1e-12): """Construct a layernorm module in the TF style (epsilon inside the square root). """ super(BertLayerNorm, self).__init__() self.weight = nn.Parameter(torch.ones(hidden_si...
import torch import triton import triton.language as tl from torch._inductor.runtime.triton_heuristics import grid from torch._C import _cuda_getCurrentRawStream as get_raw_stream from torch._inductor.runtime.triton_helpers import libdevice from torch import nn assert_size_stride = torch._C._dynamo.guards.assert_size_s...
AdrianVandierAst/fast-bert
BertLayerNorm
false
8,854
[ "Apache-2.0" ]
0
f5adb426accee4a1882cdd4372fced4ef922c978
https://github.com/AdrianVandierAst/fast-bert/tree/f5adb426accee4a1882cdd4372fced4ef922c978
FaceMask
import torch import torch.nn as nn import torch.nn.functional as F def accuracy(outputs, labels): _, preds = torch.max(outputs, dim=1) return torch.tensor(torch.sum(preds == labels).item() / len(preds)) class FaceMask(nn.Module): def __init__(self, input_size, out_size): 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 from torch._inductor.runtime import triton_helpers import torch.nn as nn import ...
VrajeshPatel20/FaceMask-Detection
FaceMask
false
11,958
[ "MIT" ]
0
1527f47a94a1b40b470eab633cf4a655c9a3e44e
https://github.com/VrajeshPatel20/FaceMask-Detection/tree/1527f47a94a1b40b470eab633cf4a655c9a3e44e
LevelVariabilityLoss
import torch import torch.nn as nn class LevelVariabilityLoss(nn.Module): """ Level Variability Loss Computes the variability penalty for the level. Parameters ---------- levels: tensor with shape (batch, n_time) levels obtained from exponential smoothing component of ESRNN level_variability_penalt...
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...
FedericoGarza/esrnn_torch
LevelVariabilityLoss
false
11,428
[ "MIT" ]
0
9f28f38e27dc0ba12cc965e60f7e08e635c8b19d
https://github.com/FedericoGarza/esrnn_torch/tree/9f28f38e27dc0ba12cc965e60f7e08e635c8b19d
Parseval_Conv2d
import torch import numpy as np import torch.nn.functional as F import torch.nn as nn class Parseval_Conv2d(nn.Conv2d): def forward(self, input): new_weight = self.weight / np.sqrt(2 * self.kernel_size[0] * self. kernel_size[1] + 1) return F.conv2d(input, new_weight, self.bias, self.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 import torch.nn as nn assert_size_stride = torch._C._dynamo.guards.assert_size_s...
cadurosar/laplacian_networks
Parseval_Conv2d
false
6,371
[ "MIT" ]
1
27f6f2d7145426b38f578e9c1beecae3e7392f1b
https://github.com/cadurosar/laplacian_networks/tree/27f6f2d7145426b38f578e9c1beecae3e7392f1b
AttDistance
# 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 assert_size_stride = t...
ishine/NISQA
AttDistance
false
15,632
[ "MIT" ]
223
2c8917f30c4e4bbca3a48e9852301f1e2480a741
https://github.com/ishine/NISQA/tree/2c8917f30c4e4bbca3a48e9852301f1e2480a741
DiceLoss
import torch from torch import nn class DiceLoss(nn.Module): def __init__(self, epsilon=1e-09): """Dice-Loss, 切块损失, 用于不均衡数据, 但是收敛困难, 不太稳定 paper: Dice Loss for Data-imbalanced NLP Tasks url: https://arxiv.org/pdf/1911.02855.pdf args: reduction: str, Specifies the reduct...
import torch import triton import triton.language as tl from torch._inductor.runtime.triton_heuristics import grid from torch._C import _cuda_getCurrentRawStream as get_raw_stream from torch._inductor.runtime import triton_helpers from torch import nn assert_size_stride = torch._C._dynamo.guards.assert_size_stride empt...
dumpmemory/Pytorch-NLU
DiceLoss
false
15,240
[ "Apache-2.0" ]
115
864fb9acc7751fc51abd3d05d24b5a9a7eab7110
https://github.com/dumpmemory/Pytorch-NLU/tree/864fb9acc7751fc51abd3d05d24b5a9a7eab7110
OverHaulLoss
import torch import torch.nn as nn from torch.nn import functional as F class LabelSmoothingLoss(nn.Module): def __init__(self, classes, smoothing=0.0, dim=-1): super(LabelSmoothingLoss, self).__init__() self.confidence = 1.0 - smoothing self.smoothing = smoothing self.cls = class...
import torch import triton import triton.language as tl from torch._inductor.runtime.triton_heuristics import grid from torch._C import _cuda_getCurrentRawStream as get_raw_stream from torch._inductor.runtime import triton_helpers from torch._inductor.runtime.triton_helpers import math as tl_math import torch.nn as nn ...
Lee-Gihun/Micronet_GSJ
OverHaulLoss
false
8,460
[ "MIT" ]
12
72289bb66507b6c3b4d14f2e5916dec718a1b198
https://github.com/Lee-Gihun/Micronet_GSJ/tree/72289bb66507b6c3b4d14f2e5916dec718a1b198
TextureSegmentation
# 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....
paucarre/staal
TextureSegmentation
false
4,123
[ "MIT" ]
0
1635e514f0ed978a08c078afd258980bcb6f0cec
https://github.com/paucarre/staal/tree/1635e514f0ed978a08c078afd258980bcb6f0cec
M1
import torch import torch.nn as nn import torch.nn.functional as F class Conv2D(nn.Module): def __init__(self, in_channels, out_channels, kernel_size, same_padding =False, stride=1, relu=True, bn=False): super(Conv2D, self).__init__() padding = int((kernel_size - 1) / 2) if same_padding e...
import torch from torch._inductor.select_algorithm import extern_kernels import triton import triton.language as tl from torch._inductor.runtime.triton_heuristics import grid from torch._C import _cuda_getCurrentRawStream as get_raw_stream from torch._inductor.runtime import triton_helpers import torch.nn as nn assert_...
Juggernaut93/SSH-pytorch
M1
false
13,986
[ "MIT" ]
63
8ea205fb1a3adfc32b5a4e35f68ed4d385ddbc31
https://github.com/Juggernaut93/SSH-pytorch/tree/8ea205fb1a3adfc32b5a4e35f68ed4d385ddbc31
complex_relu_layer
import torch import torch.nn as nn class complex_relu_layer(nn.Module): def __init__(self): super(complex_relu_layer, self).__init__() def complex_relu(self, real, img): mask = 1.0 * (real >= 0) return mask * real, mask * img def forward(self, real, img=None): if img is ...
import torch import triton import triton.language as tl from torch._inductor.runtime.triton_heuristics import grid from torch._C import _cuda_getCurrentRawStream as get_raw_stream import torch.nn as nn assert_size_stride = torch._C._dynamo.guards.assert_size_stride empty_strided_cuda = torch._C._dynamo.guards._empty_st...
RemyLau/SimpleMagNet
complex_relu_layer
false
2,742
[ "MIT" ]
0
ee3cc5fc9a7793d2e2cf5a4b635fb690bb5b988e
https://github.com/RemyLau/SimpleMagNet/tree/ee3cc5fc9a7793d2e2cf5a4b635fb690bb5b988e
SymLinear
# 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.utils.data import torch.nn as nn from torch.nn.paramete...
Waasem/graph2nn
SymLinear
false
14,563
[ "MIT" ]
133
b112eb6c6805a1813e433442b0b1f5cabb4ad1a2
https://github.com/Waasem/graph2nn/tree/b112eb6c6805a1813e433442b0b1f5cabb4ad1a2
MegatronGelu
# AOT ID: ['0_inference'] from ctypes import c_void_p, c_long, c_int import torch import math import random import os import tempfile from math import inf, nan from torch._inductor.hooks import run_intermediate_hooks from torch._inductor.utils import maybe_profile from torch._inductor.codegen.memory_planning import _al...
import torch import triton import triton.language as tl from torch._inductor.runtime.triton_heuristics import grid from torch._C import _cuda_getCurrentRawStream as get_raw_stream from torch._inductor.runtime.triton_helpers import libdevice import torch.nn import torch.onnx assert_size_stride = torch._C._dynamo.guards....
RyanUnderhill/onnxruntime
MegatronGelu
false
11,816
[ "MIT" ]
0
6df4e293ffbb47d739d2dedfbb87fa6234b8c37c
https://github.com/RyanUnderhill/onnxruntime/tree/6df4e293ffbb47d739d2dedfbb87fa6234b8c37c
h_sigmoid
# AOT ID: ['0_inference'] from ctypes import c_void_p, c_long, c_int import torch import math import random import os import tempfile from math import inf, nan from torch._inductor.hooks import run_intermediate_hooks from torch._inductor.utils import maybe_profile from torch._inductor.codegen.memory_planning import _al...
import torch import triton import triton.language as tl from torch._inductor.runtime.triton_heuristics import grid from torch._C import _cuda_getCurrentRawStream as get_raw_stream from torch._inductor.runtime import triton_helpers import torch.nn as nn assert_size_stride = torch._C._dynamo.guards.assert_size_stride emp...
EileenWang90/mmpose
h_sigmoid
false
2,173
[ "Apache-2.0" ]
0
3fa1328a3b6351bf9b35df60d4d959973a6f8a71
https://github.com/EileenWang90/mmpose/tree/3fa1328a3b6351bf9b35df60d4d959973a6f8a71
Decoder
# 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_...
Lauu1023/torchdiffeq
Decoder
false
9,354
[ "MIT" ]
0
f4f3184a4c1b657da959c7d15bc8f727f1c25bd8
https://github.com/Lauu1023/torchdiffeq/tree/f4f3184a4c1b657da959c7d15bc8f727f1c25bd8
GumbelQuantize
import torch import torch.nn as nn import torch.nn.functional as F from torch import einsum class GumbelQuantize(nn.Module): """ Reference: Categorical Reparameterization with Gumbel-Softmax, Jang et al. 2016 https://arxiv.org/abs/1611.01144 """ def __init__(self, hidden_channel, n_e, e_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....
PeikeLi/pytorch-vector-quantization
GumbelQuantize
false
17,823
[ "MIT" ]
6
48ce6a74ec56b9d8c11dde2cd35b055a925c3070
https://github.com/PeikeLi/pytorch-vector-quantization/tree/48ce6a74ec56b9d8c11dde2cd35b055a925c3070
VarianceNorm2d
import torch import torch.nn as nn class VarianceNorm2d(nn.Module): def __init__(self, num_features, bias=False): super().__init__() self.num_features = num_features self.bias = bias self.alpha = nn.Parameter(torch.zeros(num_features)) self.alpha.data.normal_(1, 0.02) ...
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_...
Sriram-Ravula/Inverse_Meta
VarianceNorm2d
false
2,852
[ "MIT" ]
0
c6c1e4ae0d670093156249c60d74373b22d61f01
https://github.com/Sriram-Ravula/Inverse_Meta/tree/c6c1e4ae0d670093156249c60d74373b22d61f01
CCAMDec
from torch.nn import Module import torch from torchvision.datasets import * from torch.nn import Parameter from torch.nn import Softmax from torchvision.transforms import * class CCAMDec(Module): """ CCAM decoding module """ def __init__(self): super(CCAMDec, self).__init__() self.sof...
import torch from torch._inductor.select_algorithm import extern_kernels import triton import triton.language as tl from 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....
tousifulhaque/DANet
CCAMDec
false
4,464
[ "MIT" ]
0
1a0c91f0e551a071b5e335b4157313780a8a1b1a
https://github.com/tousifulhaque/DANet/tree/1a0c91f0e551a071b5e335b4157313780a8a1b1a
GlobalAvgPool2d
import torch import torch.nn as nn class GlobalAvgPool2d(nn.Module): def __init__(self): """Global average pooling over the input's spatial dimensions""" super(GlobalAvgPool2d, self).__init__() def forward(self, inputs): in_size = inputs.size() return inputs.view((in_size[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 import torch.nn as nn assert_size_stride = torch._C._dynamo.guards.assert_size_stride empty_strided_cuda = torch._C._dynamo.guards._empty_st...
AwaleSajil/BiSeNet
GlobalAvgPool2d
false
11,224
[ "MIT" ]
0
2724941ef4052224c5581e6e42389e71a7c5cd5d
https://github.com/AwaleSajil/BiSeNet/tree/2724941ef4052224c5581e6e42389e71a7c5cd5d
SpatialGatherModule
# 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....
AlexanderDokuchaev/mmsegmentation
SpatialGatherModule
false
11,205
[ "Apache-2.0" ]
0
0c443ee370cce6227661b802184072174c4e3f64
https://github.com/AlexanderDokuchaev/mmsegmentation/tree/0c443ee370cce6227661b802184072174c4e3f64
CustomInverse
# AOT ID: ['0_inference'] from ctypes import c_void_p, c_long, c_int import torch import math import random import os import tempfile from math import inf, nan from torch._inductor.hooks import run_intermediate_hooks from torch._inductor.utils import maybe_profile from torch._inductor.codegen.memory_planning import _al...
import torch import triton import triton.language as tl from torch._inductor.runtime.triton_heuristics import grid from torch._C import _cuda_getCurrentRawStream as get_raw_stream from torch._inductor.runtime import triton_helpers assert_size_stride = torch._C._dynamo.guards.assert_size_stride empty_strided_cuda = torc...
QPC-database/onnxruntime-extensions
CustomInverse
false
5,721
[ "MIT" ]
1
7fd96c8e9700425335b479ca042b16fe92f8b8e8
https://github.com/QPC-database/onnxruntime-extensions/tree/7fd96c8e9700425335b479ca042b16fe92f8b8e8
ResidualDenseBlock_3C
# AOT ID: ['0_forward'] from ctypes import c_void_p, c_long, c_int import torch import math import random import os import tempfile from math import inf, nan from torch._inductor.hooks import run_intermediate_hooks from torch._inductor.utils import maybe_profile from torch._inductor.codegen.memory_planning import _alig...
import torch from torch._inductor.select_algorithm import extern_kernels import triton import triton.language as tl from torch._inductor.runtime.triton_heuristics import grid from torch._C import _cuda_getCurrentRawStream as get_raw_stream import torch.nn as nn from torch.nn import Parameter assert_size_stride = torch....
LenKerr/Semantic-Colorization-GAN
ResidualDenseBlock_3C
false
5,536
[ "MIT" ]
1
2ce52406ca6fc92e69692b451b1c9ae66ba3b76f
https://github.com/LenKerr/Semantic-Colorization-GAN/tree/2ce52406ca6fc92e69692b451b1c9ae66ba3b76f
RWKV_TimeMix
from _paritybench_helpers import _mock_config import torch import torch.nn as nn class RWKV_TimeMix(nn.Module): def __init__(self, config, layer_id): super().__init__() assert config.n_attn % config.n_head == 0 self.layer_id = layer_id self.ctx_len = config.ctx_len self.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....
YUASDS/AI-Writer
RWKV_TimeMix
false
6,013
[ "BSD-3-Clause" ]
1
6ec1e9548802ed5b5a2f1fd297595a52cb605266
https://github.com/YUASDS/AI-Writer/tree/6ec1e9548802ed5b5a2f1fd297595a52cb605266
GAT
# 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....
RidongHan/GHE-LPC
GAT
false
17,852
[ "MIT" ]
4
2a10f423d747aa28560a3bcbf29f7ec87422beb8
https://github.com/RidongHan/GHE-LPC/tree/2a10f423d747aa28560a3bcbf29f7ec87422beb8
KeyValueAttention
# 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....
ChrisGeishauser/ConvLab-2
KeyValueAttention
false
2,258
[ "Apache-2.0" ]
0
8f55d033c6e2453fdc092c4f504be3973a55e7ea
https://github.com/ChrisGeishauser/ConvLab-2/tree/8f55d033c6e2453fdc092c4f504be3973a55e7ea
PReLU
# AOT ID: ['0_forward'] from ctypes import c_void_p, c_long, c_int import torch import math import random import os import tempfile from math import inf, nan from torch._inductor.hooks import run_intermediate_hooks from torch._inductor.utils import maybe_profile from torch._inductor.codegen.memory_planning import _alig...
import torch import triton import triton.language as tl from torch._inductor.runtime.triton_heuristics import grid from torch._C import _cuda_getCurrentRawStream as get_raw_stream import torch.nn as nn assert_size_stride = torch._C._dynamo.guards.assert_size_stride empty_strided_cuda = torch._C._dynamo.guards._empty_st...
yifanpu001/PytorchToCaffe
PReLU
false
4,715
[ "MIT" ]
0
37c1ebfc3547e93b1c174721036d03c831c60e48
https://github.com/yifanpu001/PytorchToCaffe/tree/37c1ebfc3547e93b1c174721036d03c831c60e48
TReLU
import torch import torch.nn as nn import torch.nn.functional as F class TReLU(nn.Module): def __init__(self): super(TReLU, self).__init__() self.alpha = nn.Parameter(torch.FloatTensor(1), requires_grad=True) self.alpha.data.fill_(0) def forward(self, x): x = F.relu(x - self....
import torch import triton import triton.language as tl from torch._inductor.runtime.triton_heuristics import grid from torch._C import _cuda_getCurrentRawStream as get_raw_stream from torch._inductor.runtime import triton_helpers import torch.nn as nn assert_size_stride = torch._C._dynamo.guards.assert_size_stride emp...
archiroid003/ICCV2019-LearningToPaint
TReLU
false
12,110
[ "MIT" ]
0
4b5fc263e4843c159a61e5956956b3f7812693f8
https://github.com/archiroid003/ICCV2019-LearningToPaint/tree/4b5fc263e4843c159a61e5956956b3f7812693f8
EqualLinear
from torch.autograd import Function import math import torch import torch.nn as nn import torch.nn.functional as F from torch.nn import init as init from torchvision.models import vgg as vgg from torch import autograd as autograd def fused_leaky_relu(input, bias, negative_slope=0.2, scale=2 ** 0.5): return FusedL...
import torch from torch._inductor.select_algorithm import extern_kernels import triton import triton.language as tl from torch._inductor.runtime.triton_heuristics import grid from torch._C import _cuda_getCurrentRawStream as get_raw_stream from torch.autograd import Function import math import torch.nn as nn from torch...
cyysc1998/EDVRDarts
EqualLinear
false
6,512
[ "MIT" ]
1
201badbc8c6469b519647a8869c3782ebe1176cf
https://github.com/cyysc1998/EDVRDarts/tree/201badbc8c6469b519647a8869c3782ebe1176cf
LSoftLoss
# 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 ...
Vanova/argus-freesound
LSoftLoss
false
11,948
[ "MIT" ]
0
55f6e1b5ca1fd95c985f88a3e3fb0c81f8317b9d
https://github.com/Vanova/argus-freesound/tree/55f6e1b5ca1fd95c985f88a3e3fb0c81f8317b9d
SqueezeExcite
import torch import torch.nn.functional as F import torch.nn as nn import torch._utils from itertools import product as product import torch.utils.data.distributed def _make_divisible(v, divisor, min_value=None): """ This function is taken from the original tf repo. It ensures that all layers have a chann...
import torch from torch._inductor.select_algorithm import extern_kernels import triton import triton.language as tl from torch._inductor.runtime.triton_heuristics import grid from torch._C import _cuda_getCurrentRawStream as get_raw_stream from torch._inductor.runtime import triton_helpers import torch.nn.functional as...
Capetian/FaceX-Zoo
SqueezeExcite
false
4,988
[ "Apache-2.0" ]
1
029786c40d8aba15d891d33973de25fcd7e5399a
https://github.com/Capetian/FaceX-Zoo/tree/029786c40d8aba15d891d33973de25fcd7e5399a
MinibatchStdDev
import torch class MinibatchStdDev(torch.nn.Module): """ Concatenate a constant statistic calculated across the minibatch to each pixel location (i, j) as a new channel. Here the standard deviation averaged over channels and locations. This is to increase variation of images produced by the generator....
import torch import triton import triton.language as tl from torch._inductor.runtime.triton_heuristics import grid from torch._C import _cuda_getCurrentRawStream as get_raw_stream from torch._inductor.runtime.triton_helpers import libdevice assert_size_stride = torch._C._dynamo.guards.assert_size_stride empty_strided_c...
leogeier/dl-2020-prog-gan
MinibatchStdDev
false
3,901
[ "MIT" ]
0
12f28353548188af31cc14ee18a5444ad3d95a0c
https://github.com/leogeier/dl-2020-prog-gan/tree/12f28353548188af31cc14ee18a5444ad3d95a0c
A2CCritic
import torch import torch as t import torch.nn as nn class A2CCritic(nn.Module): def __init__(self, state_dim): super().__init__() self.fc1 = nn.Linear(state_dim, 16) self.fc2 = nn.Linear(16, 16) self.fc3 = nn.Linear(16, 1) def forward(self, state): v = t.relu(self.fc...
import torch from torch._inductor.select_algorithm import extern_kernels import triton import triton.language as tl from 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_...
iffiX/machin
A2CCritic
false
15,587
[ "MIT" ]
287
7fa986b1bafdefff117d6ff73d14644a5488de9d
https://github.com/iffiX/machin/tree/7fa986b1bafdefff117d6ff73d14644a5488de9d
TorchGloVeLoss
import torch import torch.nn as nn import torch.utils.data class TorchGloVeLoss(nn.Module): def __init__(self): super().__init__() self.reduction = 'sum' def forward(self, diffs, weights): return torch.sum(0.5 * torch.mul(weights, diffs ** 2)) def get_inputs(): return [torch.ra...
import torch import triton import triton.language as tl from torch._inductor.runtime.triton_heuristics import grid from torch._C import _cuda_getCurrentRawStream as get_raw_stream from torch._inductor.runtime import triton_helpers import torch.nn as nn import torch.utils.data assert_size_stride = torch._C._dynamo.guard...
ammarhusain/cs224u
TorchGloVeLoss
false
6,180
[ "Apache-2.0" ]
1
bbdb0aaa6b7437481e2e1fab8e12bbf1996eecd1
https://github.com/ammarhusain/cs224u/tree/bbdb0aaa6b7437481e2e1fab8e12bbf1996eecd1
ECA
# 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...
Jiannan-Liu/nCoVSegNet
ECA
false
17,490
[ "MIT" ]
5
7543e68edff011a7f7b694c97cf0f185d441fd6b
https://github.com/Jiannan-Liu/nCoVSegNet/tree/7543e68edff011a7f7b694c97cf0f185d441fd6b
ScoreCap
# AOT ID: ['0_inference'] from ctypes import c_void_p, c_long, c_int import torch import math import random import os import tempfile from math import inf, nan from torch._inductor.hooks import run_intermediate_hooks from torch._inductor.utils import maybe_profile from torch._inductor.codegen.memory_planning import _al...
import torch import triton import triton.language as tl from torch._inductor.runtime.triton_heuristics import grid from torch._C import _cuda_getCurrentRawStream as get_raw_stream from torch._inductor.runtime import triton_helpers from torch import nn import torch.nn import torch.optim assert_size_stride = torch._C._dy...
BerenLuthien/ReAgent
ScoreCap
false
13,382
[ "BSD-3-Clause" ]
1,156
52f666670a7fa03206812ef48949f6b934d400f7
https://github.com/BerenLuthien/ReAgent/tree/52f666670a7fa03206812ef48949f6b934d400f7
BCEFocalLoss
import torch from torch import nn import torch.nn.functional as F class BCEFocalLoss(nn.Module): def __init__(self, alpha=-1, gamma=2.0, reduction='mean'): super(BCEFocalLoss, self).__init__() self.alpha = alpha self.gamma = gamma self.reduction = reduction def forward(self, ...
import torch import triton import triton.language as tl from torch._inductor.runtime.triton_heuristics import grid from torch._C import _cuda_getCurrentRawStream as get_raw_stream from torch._inductor.runtime import triton_helpers from torch._inductor.runtime.triton_helpers import libdevice, math as tl_math from torch ...
Stochastic-Adventure/ClinicalTransformerRelationExtraction
BCEFocalLoss
false
14,440
[ "MIT" ]
78
eef956bbfbd64b008014ef7cac5f818087816725
https://github.com/Stochastic-Adventure/ClinicalTransformerRelationExtraction/tree/eef956bbfbd64b008014ef7cac5f818087816725
IndepAnisotropicGaussianUVLoss
# AOT ID: ['0_inference'] from ctypes import c_void_p, c_long, c_int import torch import math import random import os import tempfile from math import inf, nan from torch._inductor.hooks import run_intermediate_hooks from torch._inductor.utils import maybe_profile from torch._inductor.codegen.memory_planning import _al...
import torch import triton import triton.language as tl from torch._inductor.runtime.triton_heuristics import grid from torch._C import _cuda_getCurrentRawStream as get_raw_stream from torch._inductor.runtime import triton_helpers from torch._inductor.runtime.triton_helpers import libdevice, math as tl_math import math...
BUPT-PRIV/detectron2
IndepAnisotropicGaussianUVLoss
false
11,239
[ "Apache-2.0" ]
0
3163664cd5f43d50ea1966f410dc82410b9ccbf4
https://github.com/BUPT-PRIV/detectron2/tree/3163664cd5f43d50ea1966f410dc82410b9ccbf4
LeNet_300_100
# 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_...
htt-trangtran/smg
LeNet_300_100
false
6,820
[ "MIT" ]
1
b7a49055e7d48ec456bac67ab473db2183d2f597
https://github.com/htt-trangtran/smg/tree/b7a49055e7d48ec456bac67ab473db2183d2f597
MinPool
# AOT ID: ['0_inference'] from ctypes import c_void_p, c_long, c_int import torch import math import random import os import tempfile from math import inf, nan from torch._inductor.hooks import run_intermediate_hooks from torch._inductor.utils import maybe_profile from torch._inductor.codegen.memory_planning import _al...
import torch import triton import triton.language as tl from torch._inductor.runtime.triton_heuristics import grid from torch._C import _cuda_getCurrentRawStream as get_raw_stream from torch._inductor.runtime import triton_helpers import torch.nn as nn import torch.nn assert_size_stride = torch._C._dynamo.guards.assert...
BeautyOfWeb/OPP_Analysis
MinPool
false
141
[ "MIT" ]
0
59b2dbc91e07fc14b3a130bff6fadaa19cd36b42
https://github.com/BeautyOfWeb/OPP_Analysis/tree/59b2dbc91e07fc14b3a130bff6fadaa19cd36b42
EnergyEstimateWidthRescale
import torch from torch import nn as nn from torch.nn.parameter import Parameter class EnergyEstimateWidthRescale(nn.Module): def __init__(self, scales): super(EnergyEstimateWidthRescale, self).__init__() self.scales = Parameter(torch.tensor(scales, dtype=torch.float32), requires_grad...
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 as nn from torch.nn.parameter import Parameter assert_size_stride = torch._C._dynamo.guards.assert_size_stride empty_st...
zhanhuijing/ECC_PYCHARM
EnergyEstimateWidthRescale
false
4,656
[ "MIT" ]
0
c5e8fb747d70a2548e9866356f8dacc8df26a077
https://github.com/zhanhuijing/ECC_PYCHARM/tree/c5e8fb747d70a2548e9866356f8dacc8df26a077
AttentionConv
# AOT ID: ['0_forward'] from ctypes import c_void_p, c_long, c_int import torch import math import random import os import tempfile from math import inf, nan from torch._inductor.hooks import run_intermediate_hooks from torch._inductor.utils import maybe_profile from torch._inductor.codegen.memory_planning import _alig...
import torch from torch._inductor.select_algorithm import extern_kernels import triton import triton.language as tl from torch._inductor.runtime.triton_heuristics import grid from torch._C import _cuda_getCurrentRawStream as get_raw_stream from torch._inductor.runtime.triton_helpers import math as tl_math import torch....
jhvics1/pytorch-stand-alone-self-attention
AttentionConv
false
10,307
[ "MIT" ]
0
77375d99250ab9d8089e73bd4803afae30843748
https://github.com/jhvics1/pytorch-stand-alone-self-attention/tree/77375d99250ab9d8089e73bd4803afae30843748
LSoftLoss
# AOT ID: ['0_inference'] from ctypes import c_void_p, c_long, c_int import torch import math import random import os import tempfile from math import inf, nan from torch._inductor.hooks import run_intermediate_hooks from torch._inductor.utils import maybe_profile from torch._inductor.codegen.memory_planning import _al...
import torch import triton import triton.language as tl from torch._inductor.runtime.triton_heuristics import grid from torch._C import _cuda_getCurrentRawStream as get_raw_stream from torch._inductor.runtime import triton_helpers from torch._inductor.runtime.triton_helpers import libdevice, math as tl_math import torc...
advian123/kaggle-birdsong-recognition
LSoftLoss
false
9,933
[ "MIT" ]
0
a4ca8ab81e166b919452fb5d6ca4c2912c65e904
https://github.com/advian123/kaggle-birdsong-recognition/tree/a4ca8ab81e166b919452fb5d6ca4c2912c65e904
GatedLinear
import torch import torch.nn as nn import torch.utils.data class GatedLinear(nn.Module): def __init__(self, in_features, out_features): super(GatedLinear, self).__init__() self.layer_f = nn.Linear(in_features, out_features) self.layer_g = nn.Linear(in_features, out_features) def forw...
import torch from torch._inductor.select_algorithm import extern_kernels import 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...
ClaraBing/ffjord
GatedLinear
false
13,521
[ "MIT" ]
518
a97c34ff546a063316828f53bd041555e663428d
https://github.com/ClaraBing/ffjord/tree/a97c34ff546a063316828f53bd041555e663428d
SoftMaxLayer
# 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 ...
nicofirst1/lucent
SoftMaxLayer
false
12,913
[ "Apache-2.0" ]
0
1e249918e91cc04117368826cd7a192bd8cf2046
https://github.com/nicofirst1/lucent/tree/1e249918e91cc04117368826cd7a192bd8cf2046
GTXCrossAttentionLayer
# 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....
rsgit95/med_kg_txt_multimodal
GTXCrossAttentionLayer
false
4,220
[ "Apache-2.0" ]
0
80355b0cf58e0571531ad6f9728c533110ca996d
https://github.com/rsgit95/med_kg_txt_multimodal/tree/80355b0cf58e0571531ad6f9728c533110ca996d
CELoss
import torch import torch.nn as nn import torch.nn.parallel import torch.optim import torch.utils.data import torch.nn.functional as F class CELoss(nn.Module): def __init__(self, ratio=1, weight=None, size_average=None, ignore_index=-100, reduce=None, reduction='mean'): super(CELoss, self).__init...
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 ...
Dogacel/mmfashion
CELoss
false
11,417
[ "Apache-2.0" ]
0
e49613245c8501042edd7aeeaa8fb93e5ea13238
https://github.com/Dogacel/mmfashion/tree/e49613245c8501042edd7aeeaa8fb93e5ea13238
AGELU
# 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 math import torch.utils.data import torch.cuda import torch.utils.checkp...
Dan-hbd/NMTGMinor
AGELU
false
5,146
[ "MIT" ]
1
84e59ac8391ee78852d7c71afc60c3c8b8e3d44d
https://github.com/Dan-hbd/NMTGMinor/tree/84e59ac8391ee78852d7c71afc60c3c8b8e3d44d
CMVN
# 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_...
ana-kuznetsova/s3prl
CMVN
false
6,196
[ "Apache-2.0" ]
1
1fd3309f693f9cd765f56b12375ed0e7c41ef093
https://github.com/ana-kuznetsova/s3prl/tree/1fd3309f693f9cd765f56b12375ed0e7c41ef093
GlobalAveragePooling
# 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.nn.parallel import torch.optim assert_size_stride = torch._C._dynamo.guards.assert_size_stride empty_stri...
kristinakupf/FeatureLearningRotNet
GlobalAveragePooling
false
12,686
[ "MIT" ]
0
d495bcfaed3e7a3ca92b7434f8ad6d7584ab173d
https://github.com/kristinakupf/FeatureLearningRotNet/tree/d495bcfaed3e7a3ca92b7434f8ad6d7584ab173d
GroupScaling1D
import torch from torch import nn class GroupScaling1D(nn.Module): """Scales inputs by the second moment for the entire layer.""" def __init__(self, eps=1e-05, group_num=4): super(GroupScaling1D, self).__init__() self.eps = eps self.group_num = group_num def extra_repr(self): ...
import torch import triton import triton.language as tl from torch._inductor.runtime.triton_heuristics import grid from torch._C import _cuda_getCurrentRawStream as get_raw_stream from torch._inductor.runtime.triton_helpers import libdevice from torch import nn assert_size_stride = torch._C._dynamo.guards.assert_size_s...
Piki1989/spacetimeformer
GroupScaling1D
false
14,177
[ "MIT" ]
209
7e0caf17dd03e5d25e2766c4f7132805779bcc40
https://github.com/Piki1989/spacetimeformer/tree/7e0caf17dd03e5d25e2766c4f7132805779bcc40
RNN
# 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_...
Thytu/earthquakePrediction
RNN
false
11,942
[ "MIT" ]
0
95777022e492bd21aa2107c2b5af7a80b38abc2f
https://github.com/Thytu/earthquakePrediction/tree/95777022e492bd21aa2107c2b5af7a80b38abc2f
ListEnvEncoder
import torch import torch.nn.functional as F import torch.nn as nn class ListEnvEncoder(nn.Module): """ Implement an encoder (f_enc) specific to the List environment. It encodes observations e_t into vectors s_t of size D = encoding_dim. """ def __init__(self, observation_dim, encoding_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....
geektoni/AlphaNPI
ListEnvEncoder
false
3,532
[ "MIT" ]
0
ab48cb9cfb74f3960e264da4f3eb2d6917bfb9c9
https://github.com/geektoni/AlphaNPI/tree/ab48cb9cfb74f3960e264da4f3eb2d6917bfb9c9
TagLineLoss
import torch from torch import nn class TagLineLoss(nn.Module): def __init__(self): super(TagLineLoss, self).__init__() self.criterion = torch.nn.CrossEntropyLoss() def forward(self, output, target): return self.criterion(input=output, target=target) def get_inputs(): return [t...
import torch import triton import triton.language as tl from torch._inductor.runtime.triton_heuristics import grid from torch._C import _cuda_getCurrentRawStream as get_raw_stream from torch._inductor.runtime import triton_helpers from torch._inductor.runtime.triton_helpers import math as tl_math from torch import nn a...
Benjamintdk/DSAI-Project
TagLineLoss
false
8,839
[ "Apache-2.0" ]
0
684b74fcef43972e3f4d308f006fb3b4c8191b18
https://github.com/Benjamintdk/DSAI-Project/tree/684b74fcef43972e3f4d308f006fb3b4c8191b18
CosineLoss
import torch import torch.nn.functional as F class CosineLoss(torch.nn.Module): def __init__(self): super(CosineLoss, self).__init__() self.metrics = lambda x, y: 1 - torch.mean(F.cosine_similarity(x, y, dim=-1)) def forward(self, x, label): return self.metrics(x, label) ...
import torch import triton import triton.language as tl from torch._inductor.runtime.triton_heuristics import grid from torch._C import _cuda_getCurrentRawStream as get_raw_stream from torch._inductor.runtime import triton_helpers from torch._inductor.runtime.triton_helpers import libdevice import torch.nn.functional a...
ackness/eth-xgaze-estimator
CosineLoss
false
9,644
[ "MIT" ]
0
b617cda6505885942c81b7f2d41399b62985b9a7
https://github.com/ackness/eth-xgaze-estimator/tree/b617cda6505885942c81b7f2d41399b62985b9a7
UNETWithoutPooling
import torch from torch import nn class UNETWithoutPooling(nn.Module): """UNET without pooling""" def __init__(self): super(UNETWithoutPooling, self).__init__() self.conv1_1 = nn.Conv2d(in_channels=3, out_channels=16, kernel_size=3, stride=1, padding=1) self.conv1_2 = nn.C...
import torch from torch._inductor.select_algorithm import extern_kernels import triton import triton.language as tl from torch._inductor.runtime.triton_heuristics import grid from torch._C import _cuda_getCurrentRawStream as get_raw_stream from torch._inductor.runtime import triton_helpers from torch import nn assert_s...
quenting44/semantic_segmentation
UNETWithoutPooling
false
10,824
[ "MIT" ]
0
bd197ddda3c6891d69ff7e552a0c224c7ec1269a
https://github.com/quenting44/semantic_segmentation/tree/bd197ddda3c6891d69ff7e552a0c224c7ec1269a
GELU
# 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 import torch.optim import torch._utils import torch.nn as...
ModelTC/EOD
GELU
false
14,060
[ "Apache-2.0" ]
196
164bff80486e9ae6a095a97667b365c46ceabd86
https://github.com/ModelTC/EOD/tree/164bff80486e9ae6a095a97667b365c46ceabd86
Net
import torch import torch.nn as nn import torch.nn.functional as F from torch import save as save from torch import load as load class Net(nn.Module): def __init__(self): super(Net, self).__init__() self.l1 = nn.Linear(784, 520) self.l2 = nn.Linear(520, 320) self.l3 = nn.Linear(32...
import torch from torch._inductor.select_algorithm import extern_kernels import triton import triton.language as tl from torch._inductor.runtime.triton_heuristics import grid from torch._C import _cuda_getCurrentRawStream as get_raw_stream from torch._inductor.runtime import triton_helpers import torch.nn as nn from to...
UoA-sjer215/2021-python-41
Net
false
2,941
[ "Apache-2.0" ]
0
b27094f5915395636fa85ad6a4a9751c7224c345
https://github.com/UoA-sjer215/2021-python-41/tree/b27094f5915395636fa85ad6a4a9751c7224c345
BackprojectDepth
import torch import torch.nn as nn class BackprojectDepth(nn.Module): """Layer to transform a depth image into a point cloud """ def __init__(self, batch_size, height, width): super(BackprojectDepth, self).__init__() self.batch_size = batch_size self.height = height self.w...
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...
HalleyJiang/PLNet
BackprojectDepth
false
8,228
[ "MIT" ]
16
a02bd5f343b9e4766891fd234e3a338c1eaa26ff
https://github.com/HalleyJiang/PLNet/tree/a02bd5f343b9e4766891fd234e3a338c1eaa26ff
CE_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 math as tl_math from torch import nn i...
BlakeDai/FedML-test
CE_Loss
false
9,205
[ "Apache-2.0" ]
0
3cb9a7234f3f0294f3137e4be572153ba7b62f8f
https://github.com/BlakeDai/FedML-test/tree/3cb9a7234f3f0294f3137e4be572153ba7b62f8f
outconv
# AOT ID: ['0_forward'] from ctypes import c_void_p, c_long, c_int import torch import math import random import os import tempfile from math import inf, nan from torch._inductor.hooks import run_intermediate_hooks from torch._inductor.utils import maybe_profile from torch._inductor.codegen.memory_planning import _alig...
import torch from torch._inductor.select_algorithm import extern_kernels import triton import triton.language as tl from torch._inductor.runtime.triton_heuristics import grid from torch._C import _cuda_getCurrentRawStream as get_raw_stream from torch._inductor.runtime.triton_helpers import math as tl_math import torch....
ExplorativeEngineering/LFMNet2
outconv
false
13,661
[ "Apache-2.0" ]
46
3f190be0f047b9e05c69b0a11f99218fd4fc510c
https://github.com/ExplorativeEngineering/LFMNet2/tree/3f190be0f047b9e05c69b0a11f99218fd4fc510c
PriorDiscriminator
import torch import torch.nn as nn import torch.nn.functional as F import torch.optim class PriorDiscriminator(nn.Module): """The prior discriminator class. This discriminate between a vector drawn from random uniform, and the vector y obtained as output of the encoder. It enforces y to be close to a...
import torch from torch._inductor.select_algorithm import extern_kernels import triton import triton.language as tl from 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 ...
neuralsyn/self-supervised-relational-reasoning
PriorDiscriminator
false
16,164
[ "MIT" ]
130
6ecfafcf4a36c2eacef7ddd5bd1b23c28fbb14c8
https://github.com/neuralsyn/self-supervised-relational-reasoning/tree/6ecfafcf4a36c2eacef7ddd5bd1b23c28fbb14c8
DQN
# 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...
TejaswiniMedi/DRL
DQN
false
5,879
[ "MIT" ]
1
d4a694c5e505822e6e8627be52afd0ccc60f80ef
https://github.com/TejaswiniMedi/DRL/tree/d4a694c5e505822e6e8627be52afd0ccc60f80ef
GRUCell
import torch import numpy as np from torch import nn import torch.nn.functional as F class GRUCell(nn.Module): def __init__(self, input_size, hidden_size, bias=True): super(GRUCell, self).__init__() self.input_size = input_size self.hidden_size = hidden_size self.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 from torch._inductor.runtime.triton_helpers import libdevice import numpy as np ...
OlhaKi/PySyft
GRUCell
false
5,688
[ "Apache-2.0" ]
1
c9e16835ba0f05c3ff391e17a33d56a5c2ceb459
https://github.com/OlhaKi/PySyft/tree/c9e16835ba0f05c3ff391e17a33d56a5c2ceb459
ActionAttentionV3
# AOT ID: ['0_forward'] from ctypes import c_void_p, c_long, c_int import torch import math import random import os import tempfile from math import inf, nan from torch._inductor.hooks import run_intermediate_hooks from torch._inductor.utils import maybe_profile from torch._inductor.codegen.memory_planning import _alig...
import torch from torch._inductor.select_algorithm import extern_kernels import triton import triton.language as tl from torch._inductor.runtime.triton_heuristics import grid from torch._C import _cuda_getCurrentRawStream as get_raw_stream from torch._inductor.runtime.triton_helpers import libdevice import torch.nn as ...
footoredo/pymarl
ActionAttentionV3
false
3,505
[ "Apache-2.0" ]
0
9c62dda7a7ed984e020f2cafab93601342305af2
https://github.com/footoredo/pymarl/tree/9c62dda7a7ed984e020f2cafab93601342305af2
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_...
eight0153/flownet2-pytorch
L2
false
3,453
[ "Apache-2.0" ]
0
cc2964233cd18c8db05d1751281c6ab9d3165da6
https://github.com/eight0153/flownet2-pytorch/tree/cc2964233cd18c8db05d1751281c6ab9d3165da6
SurfaceLoss
import torch import torch.nn as nn class SurfaceLoss(nn.Module): def __init__(self, epsilon=1e-05, softmax=True): super(SurfaceLoss, self).__init__() self.weight_map = [] def forward(self, x, distmap): x = torch.softmax(x, dim=1) self.weight_map = distmap score = x.fl...
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 ...
ArmandB/RITnet
SurfaceLoss
false
76
[ "MIT" ]
0
afe9524fdd795982c7e52761da68af2dfda589ea
https://github.com/ArmandB/RITnet/tree/afe9524fdd795982c7e52761da68af2dfda589ea
ReviewClassifier
import torch import torch.nn.functional as F import torch.nn as nn class ReviewClassifier(nn.Module): def __init__(self, n_feature): super(ReviewClassifier, self).__init__() self.lf = nn.Linear(n_feature, 1, dtype=torch.float32) def forward(self, x): out = self.lf(x) out = 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 import torch.nn as nn assert_size_stride = torch._C._dynamo.guards.assert_size_s...
AnissHal/tal
ReviewClassifier
false
1,949
[ "MIT" ]
0
6e96ffa367be6da54383ae9e6b0f56f7b5cf9a92
https://github.com/AnissHal/tal/tree/6e96ffa367be6da54383ae9e6b0f56f7b5cf9a92
GaussianSample
import torch import torch.nn as nn class Stochastic(nn.Module): """ Base stochastic layer that uses the reparametrization trick [Kingma 2013] to draw a sample from a distribution parametrised by mu and log_var. """ def reparametrize(self, mu, logvar): epsilon = torch.randn(mu.size...
import torch from torch import device from torch._inductor.select_algorithm import extern_kernels import triton import triton.language as tl from torch._inductor.runtime.triton_heuristics import grid from torch._C import _cuda_getCurrentRawStream as get_raw_stream from torch._inductor.runtime.triton_helpers import math...
ericli0419/SCALEX
GaussianSample
false
6,656
[ "MIT" ]
1
2fedbe4c3287cf86de7b786c98122fe45707416e
https://github.com/ericli0419/SCALEX/tree/2fedbe4c3287cf86de7b786c98122fe45707416e
Autoencoder
from torch.nn import Module import torch import torch.nn.functional as F import torch.optim as optim import torch as T from torch.nn import Conv2d from torch.nn import MaxPool2d from torch.nn import BCELoss class Autoencoder(Module): def __init__(self, lr=0.002): super(Autoencoder, 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.nn import Module i...
ShivangMathur1/Small-Pytorch-Projects
Autoencoder
false
1,895
[ "MIT" ]
0
aebc6e81103fe2a6830caeedc1b17227e211a6e5
https://github.com/ShivangMathur1/Small-Pytorch-Projects/tree/aebc6e81103fe2a6830caeedc1b17227e211a6e5
RgbaToRgb
import torch import torch.nn as nn def rgba_to_rgb(image: 'torch.Tensor') ->torch.Tensor: """Convert image from RGBA to RGB. See :class:`~kornia.color.RgbaToRgb` for details. Args: image (torch.Tensor): RGBA Image to be converted to RGB. Returns: torch.Tensor: RGB version of the ima...
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...
connorlee77/kornia
RgbaToRgb
false
6,473
[ "ECL-2.0", "Apache-2.0" ]
1
af5b1f76bedf2a7fc0e0da2386b1be3032b6534f
https://github.com/connorlee77/kornia/tree/af5b1f76bedf2a7fc0e0da2386b1be3032b6534f
Decoder
# 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 from ...
MaurizioFD/recsys-challenge-2020-twitter
Decoder
false
8,537
[ "Apache-2.0" ]
44
95dc024fb4f8777aa62e1304536daece640428de
https://github.com/MaurizioFD/recsys-challenge-2020-twitter/tree/95dc024fb4f8777aa62e1304536daece640428de
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 assert_size_stride = torch._C...
cheng-xie/dpgfddagger
Actor
false
3,282
[ "MIT" ]
0
5264d5b9e0ab76fc9620da63bcfd78b25dadcbec
https://github.com/cheng-xie/dpgfddagger/tree/5264d5b9e0ab76fc9620da63bcfd78b25dadcbec
Memory
# 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....
JoonHong-Kim/T2I_CL
Memory
false
8,382
[ "MIT" ]
35
c52aa73da903d6e4174eeef2663e5bc1163785b1
https://github.com/JoonHong-Kim/T2I_CL/tree/c52aa73da903d6e4174eeef2663e5bc1163785b1
NaiveTorchNet
import torch from torch.autograd import Variable import torch.nn as nn import torch.autograd import torch.optim as optim class NaiveTorchNet(nn.Module): """A reimplementation of from-scratch NaiveNet using PyTorch""" def __init__(self, input_nodes, hidden_nodes, output_nodes, learn_rate=0.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.autograd import Variable import torch.nn as nn import torch.autograd ...
deo1/deo1
NaiveTorchNet
false
1,836
[ "MIT" ]
0
36671f12269d3bd662d746e8b9f66c22255c9df7
https://github.com/deo1/deo1/tree/36671f12269d3bd662d746e8b9f66c22255c9df7