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
QNet
# AOT ID: ['0_forward'] from ctypes import c_void_p, c_long, c_int import torch import math import random import os import tempfile from math import inf, nan from torch._inductor.hooks import run_intermediate_hooks from torch._inductor.utils import maybe_profile from torch._inductor.codegen.memory_planning import _alig...
import torch from torch._inductor.select_algorithm import extern_kernels import triton import triton.language as tl from torch._inductor.runtime.triton_heuristics import grid from torch._C import _cuda_getCurrentRawStream as get_raw_stream from torch._inductor.runtime import triton_helpers assert_size_stride = torch._C...
Lovestarni/Reinforcement-learning-with-tensorflow
QNet
false
9,288
[ "MIT" ]
0
822a4ae812b044687c11138ef9c9db1e1190f98c
https://github.com/Lovestarni/Reinforcement-learning-with-tensorflow/tree/822a4ae812b044687c11138ef9c9db1e1190f98c
CQAttention
# 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....
timgianitsos/squad
CQAttention
false
13,197
[ "MIT" ]
0
6ab502652e3528cfeeddfb8eba05221443a35294
https://github.com/timgianitsos/squad/tree/6ab502652e3528cfeeddfb8eba05221443a35294
SmoothL1Loss
import functools import torch import torch.nn as nn import torch.nn.functional as F def reduce_loss(loss, reduction): """Reduce loss as specified. Args: loss (Tensor): Elementwise loss tensor. reduction (str): Options are "none", "mean" and "sum". Return: Tensor: Reduced loss ten...
import torch import triton import triton.language as tl from torch._inductor.runtime.triton_heuristics import grid from torch._C import _cuda_getCurrentRawStream as get_raw_stream from torch._inductor.runtime import triton_helpers from torch._inductor.runtime.triton_helpers import math as tl_math import functools impor...
AtticusJohnson/mmdetection
SmoothL1Loss
false
11,245
[ "Apache-2.0" ]
0
d8d89bafcce13d3b32b1fb3366be3bb9830546c2
https://github.com/AtticusJohnson/mmdetection/tree/d8d89bafcce13d3b32b1fb3366be3bb9830546c2
MultiHeadAttentionBlock
# 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....
EGO4D/episodic-memory
MultiHeadAttentionBlock
false
8,121
[ "MIT" ]
27
2a3464882cd4f665c358c1b05a6397339e33c2e1
https://github.com/EGO4D/episodic-memory/tree/2a3464882cd4f665c358c1b05a6397339e33c2e1
SReLU
import torch from torch import nn from torch.nn.parameter import Parameter class SReLU(nn.Module): """ SReLU (S-shaped Rectified Linear Activation Unit): a combination of three linear functions, which perform mapping R → R with the following formulation: .. math:: h(x_i) = \\left\\{\\begin{matri...
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 from torch.nn.parameter import Parameter assert_size_stride = torch._C._dynamo.guards.assert_size_stride empty_strided_...
THEFASHIONGEEK/Echo
SReLU
false
11,911
[ "MIT" ]
0
8dcf279ca528f2bfd255f79de07c1a221512c6a0
https://github.com/THEFASHIONGEEK/Echo/tree/8dcf279ca528f2bfd255f79de07c1a221512c6a0
ToRGB
# 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.autograd import Function import math import torch.utils.data from tor...
WoojunePark/BasicSR
ToRGB
false
18,121
[ "Apache-2.0" ]
9
e0910b022b924bb913045fc412a5470dc2242cf0
https://github.com/WoojunePark/BasicSR/tree/e0910b022b924bb913045fc412a5470dc2242cf0
Conv
# AOT ID: ['0_forward'] from ctypes import c_void_p, c_long, c_int import torch import math import random import os import tempfile from math import inf, nan from torch._inductor.hooks import run_intermediate_hooks from torch._inductor.utils import maybe_profile from torch._inductor.codegen.memory_planning import _alig...
import torch from torch._inductor.select_algorithm import extern_kernels import triton import triton.language as tl from torch._inductor.runtime.triton_heuristics import grid from torch._C import _cuda_getCurrentRawStream as get_raw_stream from torch._inductor.runtime import triton_helpers from torch import nn import t...
LindaCY/fastNLP
Conv
false
17,624
[ "Apache-2.0" ]
4
3fa95b6cfc31211453bc21792e3eef87948858da
https://github.com/LindaCY/fastNLP/tree/3fa95b6cfc31211453bc21792e3eef87948858da
BCEDiceLoss
import torch import torch.nn as nn import torch.nn.functional as F def dice_loss(smooth=1): """Create Dice Loss. Args: smooth (float, optional): Smoothing value. A larger smooth value (also known as Laplace smooth, or Additive smooth) can be used to avoid overfitting. ...
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...
Pandinosaurus/Depth-Estimation-Segmentation
BCEDiceLoss
false
17,801
[ "MIT" ]
4
2eea883c96bf106774ea94464fc16c6baea86a95
https://github.com/Pandinosaurus/Depth-Estimation-Segmentation/tree/2eea883c96bf106774ea94464fc16c6baea86a95
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....
Columbine21/PyTorch-NLP
Attention
false
8,907
[ "BSD-3-Clause" ]
0
63460d0951a0406b4b7cb99d3a290dcef0721eff
https://github.com/Columbine21/PyTorch-NLP/tree/63460d0951a0406b4b7cb99d3a290dcef0721eff
MultiHeadAttention
import math import torch from torch import nn class ScaledDotProductAttention(nn.Module): """ Scaled Dot-Product Attention Layer Attributes ---------- softmax : nn.Functional softmax function applied at the last dimension """ def __init__(self, dropout=0.1): super(ScaledD...
import torch from torch._inductor.select_algorithm import extern_kernels import 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...
dugusword/transformer
MultiHeadAttention
false
6,612
[ "MIT" ]
1
7aa10968f0e60d545bbd17f1f8c1dfb7ee88c62b
https://github.com/dugusword/transformer/tree/7aa10968f0e60d545bbd17f1f8c1dfb7ee88c62b
TokenClassifier
import torch import torch.nn as nn def transformer_weights_init(module, std_init_range=0.02, xavier=True): """ Initialize different weights in Transformer model. Args: module: torch.nn.Module to be initialized std_init_range: standard deviation of normal initializer xavier: if True...
import torch from torch._inductor.select_algorithm import extern_kernels import triton import triton.language as tl from torch._inductor.runtime.triton_heuristics import grid from torch._C import _cuda_getCurrentRawStream as get_raw_stream from torch._inductor.runtime import triton_helpers from torch._inductor.runtime....
ngxingyu/Domain-Transfer-for-Punctuation-Retrieval
TokenClassifier
false
7,332
[ "Apache-2.0" ]
1
f5aa0ea0946c68aaf7fcf49a5085e6c823766a2f
https://github.com/ngxingyu/Domain-Transfer-for-Punctuation-Retrieval/tree/f5aa0ea0946c68aaf7fcf49a5085e6c823766a2f
AlbertAttentionWithoutSkipConnection
# 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....
twistedcubic/attention-rank-collapse
AlbertAttentionWithoutSkipConnection
false
16,646
[ "Apache-2.0" ]
118
38b5df6dc2add25f6d945e48a6baf96862368c20
https://github.com/twistedcubic/attention-rank-collapse/tree/38b5df6dc2add25f6d945e48a6baf96862368c20
ContrastiveLoss
# 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._...
AssassionXY/HOR
ContrastiveLoss
false
63
[ "Apache-2.0" ]
0
a4c91d90a59eb2b144d827afff626b7eac907320
https://github.com/AssassionXY/HOR/tree/a4c91d90a59eb2b144d827afff626b7eac907320
cSEmodule
# 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_...
HwangJohn/feature_representation
cSEmodule
false
2,356
[ "MIT" ]
0
27389caacc9c026b65f47ab0cbb4e6d0465e6a60
https://github.com/HwangJohn/feature_representation/tree/27389caacc9c026b65f47ab0cbb4e6d0465e6a60
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 import torch.nn as nn assert_size_stride = torch._C._dynamo.guards.assert_size_s...
Kanaricc/TDRG
GraphConvolution
false
8,391
[ "Apache-2.0" ]
16
91416976c8887877775f516ebee60469449e7e5f
https://github.com/Kanaricc/TDRG/tree/91416976c8887877775f516ebee60469449e7e5f
softCrossEntropy
# 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...
Benjamin-Lee/cyphercat
softCrossEntropy
false
8,951
[ "Apache-2.0" ]
0
d8df0544337d4e7e14c2463264c008b7811d35b3
https://github.com/Benjamin-Lee/cyphercat/tree/d8df0544337d4e7e14c2463264c008b7811d35b3
SoftmaxLoss
import torch import torch.nn as nn class SoftmaxLoss(nn.Module): def __init__(self, hidden_dim, speaker_num, **kwargs): """ Softmax Loss """ super(SoftmaxLoss, self).__init__() self.fc = nn.Linear(hidden_dim, speaker_num) self.loss = nn.CrossEntropyLoss() def ...
import torch from torch._inductor.select_algorithm import extern_kernels import triton import triton.language as tl from torch._inductor.runtime.triton_heuristics import grid from torch._C import _cuda_getCurrentRawStream as get_raw_stream from torch._inductor.runtime import triton_helpers from torch._inductor.runtime....
gcambara/s3prl
SoftmaxLoss
false
15,416
[ "MIT" ]
856
33284ebde3a903ed8604d6dae85669d0174ae1d3
https://github.com/gcambara/s3prl/tree/33284ebde3a903ed8604d6dae85669d0174ae1d3
SeparableConv2d_same
import torch import torch.nn as nn import torch.nn.functional as F def fixed_padding(inputs, kernel_size, rate): kernel_size_effective = kernel_size + (kernel_size - 1) * (rate - 1) pad_total = kernel_size_effective - 1 pad_beg = pad_total // 2 pad_end = pad_total - pad_beg padded_inputs = F.pad(i...
import torch from torch._inductor.select_algorithm import extern_kernels import triton import triton.language as tl from torch._inductor.runtime.triton_heuristics import grid from torch._C import _cuda_getCurrentRawStream as get_raw_stream import torch.nn as nn import torch.nn.functional as F assert_size_stride = torch...
Mnsy-Syl/new_20201103
SeparableConv2d_same
false
14,057
[ "MIT" ]
46
9ee39f1c69a4cba896b30f007560fcbe8ac89c02
https://github.com/Mnsy-Syl/new_20201103/tree/9ee39f1c69a4cba896b30f007560fcbe8ac89c02
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 import torch.nn as nn from torch.nn.parameter import Parameter assert_size_stride = torch._C._dynamo.guards.assert_size_stride empty_strided...
cwxcwx0319/Dictionary
LayerNorm
false
15,097
[ "Apache-2.0" ]
82
55fb9a602a212f9c3a69a318fec31da1d07279df
https://github.com/cwxcwx0319/Dictionary/tree/55fb9a602a212f9c3a69a318fec31da1d07279df
Actor
import torch import numpy as np import torch.nn.functional as F import torch.nn as nn def hidden_init(layer): fan_in = layer.weight.data.size()[0] lim = 1.0 / np.sqrt(fan_in) return -lim, lim class Actor(nn.Module): """Actor (Policy) Model.""" def __init__(self, state_size, action_size, seed, f...
import torch from torch._inductor.select_algorithm import extern_kernels import triton import triton.language as tl from torch._inductor.runtime.triton_heuristics import grid from torch._C import _cuda_getCurrentRawStream as get_raw_stream from torch._inductor.runtime.triton_helpers import libdevice import numpy as np ...
rbak/deep-rl-udacity-project-3
Actor
false
12,930
[ "MIT" ]
0
4bf2aec6b0ef27636ebd11dfd4b442554208cffb
https://github.com/rbak/deep-rl-udacity-project-3/tree/4bf2aec6b0ef27636ebd11dfd4b442554208cffb
L2Norm
import torch import torch.nn as nn class L2Norm(nn.Module): def __init__(self, n_dims, scale=20.0, eps=1e-10): """L2 normalization layer. Args: n_dims (int): Number of dimensions to be normalized scale (float, optional): Defaults to 20.. eps (float, optional):...
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_...
ChengBo5/mask-text-detector
L2Norm
false
250
[ "Apache-2.0" ]
0
ce93e45ed1d982ec0ef6ad977c02e49326bf255a
https://github.com/ChengBo5/mask-text-detector/tree/ce93e45ed1d982ec0ef6ad977c02e49326bf255a
NonLocal
import torch import torch._C import torch.serialization from torch import nn from typing import * def int_size(x): size = tuple(int(s) for s in x.size()) return size class NonLocal(nn.Module): def __init__(self, in_channels): super(NonLocal, self).__init__() self.inter_channel = in_chan...
import torch from torch._inductor.select_algorithm import extern_kernels import triton import triton.language as tl from 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....
shuaizzZ/mmsegmentation
NonLocal
false
4,332
[ "Apache-2.0" ]
0
a6c6b348dbf8c4a0a39ffbdb832a1e82309c533c
https://github.com/shuaizzZ/mmsegmentation/tree/a6c6b348dbf8c4a0a39ffbdb832a1e82309c533c
PixelNorm
# 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 from torch import nn assert_size_stride = torch._C._dynamo.guards.assert_size_s...
ArashVahabpour/encoder4editing
PixelNorm
false
1,963
[ "MIT" ]
0
819b90ecd7397fbe2ab7cb30eb451dab0f3149fd
https://github.com/ArashVahabpour/encoder4editing/tree/819b90ecd7397fbe2ab7cb30eb451dab0f3149fd
SqueezeAndExcitation
import torch import torch.nn as nn import torch.nn.parallel import torch.optim import torch.utils.data import torch.utils.data.distributed class SqueezeAndExcitation(nn.Module): def __init__(self, planes, squeeze): super(SqueezeAndExcitation, self).__init__() self.squeeze = nn.Linear(planes, sque...
import torch from torch._inductor.select_algorithm import extern_kernels import triton import triton.language as tl from 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 ...
FujitsuLaboratories/CAC
SqueezeAndExcitation
false
17,303
[ "Apache-2.0" ]
8
d12df8e47f61eaf7d7b0ed355e2d1aa296453f86
https://github.com/FujitsuLaboratories/CAC/tree/d12df8e47f61eaf7d7b0ed355e2d1aa296453f86
LinearModel
# 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....
learniotai/iotai-sensor-classifications
LinearModel
false
3,891
[ "Apache-2.0" ]
0
ba2527cb317afa30a5c495d1cddc16f7dc2936ed
https://github.com/learniotai/iotai-sensor-classifications/tree/ba2527cb317afa30a5c495d1cddc16f7dc2936ed
tofp16
import torch import torch.nn as nn import torch.nn.parallel class tofp16(nn.Module): def __init__(self): super(tofp16, self).__init__() def forward(self, input): return input.half() def get_inputs(): return [torch.rand([4, 4, 4, 4])] def get_init_inputs(): return [[], {}]
import torch import triton import triton.language as tl from torch._inductor.runtime.triton_heuristics import grid from torch._C import _cuda_getCurrentRawStream as get_raw_stream import torch.nn as nn import torch.nn.parallel assert_size_stride = torch._C._dynamo.guards.assert_size_stride empty_strided_cuda = torch._C...
HuaijiaLin/AGSS-VOS
tofp16
false
8,245
[ "MIT" ]
11
e9272365aa45bf098316d7111238fe0ab8df8a17
https://github.com/HuaijiaLin/AGSS-VOS/tree/e9272365aa45bf098316d7111238fe0ab8df8a17
CumMax
import torch import torch.nn as nn class CumMax(nn.Module): def __init__(self): super(CumMax, self).__init__() def forward(self, input): return torch.cumsum(nn.Softmax(dim=-1)(input), -1) def get_inputs(): return [torch.rand([4, 4, 4, 4])] def get_init_inputs(): return [[], {}]
import torch import triton import triton.language as tl from torch._inductor.runtime.triton_heuristics import grid from torch._C import _cuda_getCurrentRawStream as get_raw_stream from torch._inductor.runtime import triton_helpers from torch._inductor.runtime.triton_helpers import math as tl_math import torch.nn as nn ...
Hritikbansal/RNNs_SVA_OOD
CumMax
false
17,388
[ "MIT" ]
4
a1c73955342d9d35c49da5fcb7b315e37b0f75d1
https://github.com/Hritikbansal/RNNs_SVA_OOD/tree/a1c73955342d9d35c49da5fcb7b315e37b0f75d1
ReferenceWeightBinarizationModule
# 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 from torchvision import models as models import torc...
JinYAnGHe/openvino_training_extensions
ReferenceWeightBinarizationModule
false
3,024
[ "Apache-2.0" ]
0
a0b4456a3c9fe6c1b7eabc9d5eb4e74d01453dee
https://github.com/JinYAnGHe/openvino_training_extensions/tree/a0b4456a3c9fe6c1b7eabc9d5eb4e74d01453dee
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...
Rahul-160/PySyft
AvgPool2d
false
17,833
[ "Apache-2.0" ]
7
182627db2369d6f93aa0667f5ea2abee5b878d58
https://github.com/Rahul-160/PySyft/tree/182627db2369d6f93aa0667f5ea2abee5b878d58
CrossEntropy
# 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...
shinoyuki222/torch-light
CrossEntropy
false
16,418
[ "MIT" ]
310
4799805d9bcae82a9f12a574dcf9fdd838c92ee9
https://github.com/shinoyuki222/torch-light/tree/4799805d9bcae82a9f12a574dcf9fdd838c92ee9
CELoss
# 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....
Wadaboa/titanet
CELoss
false
18,084
[ "MIT" ]
4
b07e3074e79ea8c1129fb0adb8315e06bb4943ea
https://github.com/Wadaboa/titanet/tree/b07e3074e79ea8c1129fb0adb8315e06bb4943ea
ActorCritic
# 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....
rmfan/nni
ActorCritic
false
10,969
[ "MIT" ]
0
727ee1ce47e070061fe3dab8a2da5d3cd5e55546
https://github.com/rmfan/nni/tree/727ee1ce47e070061fe3dab8a2da5d3cd5e55546
MLP
import torch from torch import Tensor from torch import nn class MLP(nn.Module): def __init__(self, dim, embed_dim): super().__init__() self.proj = nn.Linear(dim, embed_dim) def forward(self, x: 'Tensor') ->Tensor: x = x.flatten(2).transpose(1, 2) x = self.proj(x) ret...
import torch from torch._inductor.select_algorithm import extern_kernels import triton import 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
MLP
false
17,326
[ "MIT" ]
10
4a0800746ade51101ec2573c683b06eccadb9683
https://github.com/Genevievekim/segformer/tree/4a0800746ade51101ec2573c683b06eccadb9683
location_network
import torch import torch.nn as nn import torch.nn.functional as F from torch.distributions import Normal class location_network(nn.Module): """ Uses the internal state `h_t` of the core network to produce the location coordinates `l_t` for the next time step. Concretely, feeds the hidden state `...
import torch from torch._inductor.select_algorithm import extern_kernels import triton import triton.language as tl from 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....
felixnon/foveated-visual-attention
location_network
false
12,371
[ "MIT" ]
0
7e7d9a5ef24ec42eb76ba72f783bb2227bdb4851
https://github.com/felixnon/foveated-visual-attention/tree/7e7d9a5ef24ec42eb76ba72f783bb2227bdb4851
hsigmoid
import torch import torch.onnx import torch import torch.nn as nn import torch.nn.functional as F class hsigmoid(nn.Module): def forward(self, x): out = F.relu6(x + 3, inplace=True) / 6 return out def get_inputs(): return [torch.rand([4, 4, 4, 4])] def get_init_inputs(): return [[], {...
import torch import triton import triton.language as tl from torch._inductor.runtime.triton_heuristics import grid from torch._C import _cuda_getCurrentRawStream as get_raw_stream from torch._inductor.runtime import triton_helpers import torch.onnx import torch import torch.nn as nn assert_size_stride = torch._C._dynam...
LukasKratochvila/pytorch-ssd
hsigmoid
false
2,583
[ "MIT" ]
0
de6ed2be6ce0b03634d4cbf41622cfe5c87d077c
https://github.com/LukasKratochvila/pytorch-ssd/tree/de6ed2be6ce0b03634d4cbf41622cfe5c87d077c
Mnist_CNN
import torch import torch.nn as nn import torch.nn.functional as F import torch.quantization import torch.onnx import torch.nn.parallel import torch.optim import torch.utils.data import torch.utils.data.distributed class Mnist_CNN(nn.Module): def __init__(self): super().__init__() self.conv1 = nn...
import torch from torch._inductor.select_algorithm import extern_kernels import triton import triton.language as tl from torch._inductor.runtime.triton_heuristics import grid from torch._C import _cuda_getCurrentRawStream as get_raw_stream from torch._inductor.runtime import triton_helpers import torch.nn as nn import ...
voyageth/PyTorch-tutorials-kr
Mnist_CNN
false
4,514
[ "BSD-3-Clause" ]
0
05d2dd5931abfca6ce1e0b297f4ceb7f4eae6239
https://github.com/voyageth/PyTorch-tutorials-kr/tree/05d2dd5931abfca6ce1e0b297f4ceb7f4eae6239
GT
import torch class GT(torch.nn.Module): def __init__(self): super(GT, self).__init__() def forward(self, x, y): return x > y def get_inputs(): return [torch.rand([4, 4, 4, 4]), torch.rand([4, 4, 4, 4])] def get_init_inputs(): return [[], {}]
import torch import triton import triton.language as tl from torch._inductor.runtime.triton_heuristics import grid from torch._C import _cuda_getCurrentRawStream as get_raw_stream assert_size_stride = torch._C._dynamo.guards.assert_size_stride empty_strided_cuda = torch._C._dynamo.guards._empty_strided_cuda @triton.j...
PogChamper/torch2trt
GT
false
14,189
[ "MIT" ]
3,363
43b12627ec0de4d212efb6d02b07570205085ccc
https://github.com/PogChamper/torch2trt/tree/43b12627ec0de4d212efb6d02b07570205085ccc
GroupedChannelNorm
# 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.utils.data import torch import torch.nn as nn assert_size_stride =...
Theomat/colorization-av-enseirb-2020
GroupedChannelNorm
false
14,468
[ "Apache-2.0" ]
1,422
c54c2388ea39a62289fa2f1c51b4757bf55d3c4f
https://github.com/Theomat/colorization-av-enseirb-2020/tree/c54c2388ea39a62289fa2f1c51b4757bf55d3c4f
ResnetBlockConv2d
import torch import numpy as np import torch.nn as nn import torch.nn.functional as F def pixel_norm(x): sigma = x.norm(dim=1, keepdim=True) out = x / (sigma + 1e-05) return out class EqualizedLR(nn.Module): def __init__(self, module): super().__init__() self.module = module ...
import torch from torch._inductor.select_algorithm import extern_kernels import triton import triton.language as tl from 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...
DveloperY0115/texture_fields
ResnetBlockConv2d
false
13,621
[ "MIT" ]
78
28c277696e0a658ffff3496892810d5a0ef03f65
https://github.com/DveloperY0115/texture_fields/tree/28c277696e0a658ffff3496892810d5a0ef03f65
ModMBStddevLayer
# 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.distributed as dist import torch.autograd as...
jiangwenj02/mmgeneration
ModMBStddevLayer
false
12,609
[ "Apache-2.0" ]
0
da9ad377ae19260467fc332ddb88f505c38a915a
https://github.com/jiangwenj02/mmgeneration/tree/da9ad377ae19260467fc332ddb88f505c38a915a
MLP
import torch import torch.nn as nn import torch.nn.functional as F import torch.nn class MLP(nn.Module): """ This is just an MLP with 1 hidden layer """ def __init__(self, n_units, dropout=0.1): super(MLP, self).__init__() self.w_1 = nn.Linear(n_units, 2048) self.w_2 = nn.Line...
import torch from torch._inductor.select_algorithm import extern_kernels import triton import triton.language as tl from 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 ...
adijo/ift6135-rnn
MLP
false
9,657
[ "Apache-2.0" ]
0
88ebcd621cea4042f5ada688f2452ce25d02b761
https://github.com/adijo/ift6135-rnn/tree/88ebcd621cea4042f5ada688f2452ce25d02b761
PEScaling
# 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 f...
M4rt1nM4yr/recipient_line_detection_DAS22
PEScaling
false
809
[ "MIT" ]
0
be5ed87940ff2c2740cf86130743538a2ba6ac4b
https://github.com/M4rt1nM4yr/recipient_line_detection_DAS22/tree/be5ed87940ff2c2740cf86130743538a2ba6ac4b
SeparableBlock
from torch.nn import Module import torch from torch.nn import Linear class SeparableBlock(Module): def __init__(self, input_size, kernel_channels_in, kernel_channels_out, kernel_size): super(SeparableBlock, self).__init__() self.input_size = input_size self.kernel_size = kernel_si...
import torch from torch._inductor.select_algorithm import extern_kernels import triton import triton.language as tl from torch._inductor.runtime.triton_heuristics import grid from torch._C import _cuda_getCurrentRawStream as get_raw_stream from torch.nn import Module from torch.nn import Linear assert_size_stride = tor...
morzh/hyperstyle
SeparableBlock
false
16,116
[ "MIT" ]
692
ed87f620143d045f374aa42712a43abd751a90e6
https://github.com/morzh/hyperstyle/tree/ed87f620143d045f374aa42712a43abd751a90e6
TagLineLoss
# 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...
Benjamintdk/DSAI-Project
TagLineLoss
false
8,839
[ "Apache-2.0" ]
0
684b74fcef43972e3f4d308f006fb3b4c8191b18
https://github.com/Benjamintdk/DSAI-Project/tree/684b74fcef43972e3f4d308f006fb3b4c8191b18
SELayer_ECA
import torch import torch.nn as nn class SELayer_ECA(nn.Module): """Constructs a ECA module. Args: channel: Number of channels of the input feature map k_size: Adaptive selection of kernel size """ def __init__(self, channel, k_size=3): super(SELayer_ECA, 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 import torch.nn as nn assert_size_stride = torch._C._dynamo.guards.assert_size_s...
rahulmangalampalli/esvit
SELayer_ECA
false
12,922
[ "MIT" ]
0
5caf6e36b088ae2e7aaa4100b307eec991078e3e
https://github.com/rahulmangalampalli/esvit/tree/5caf6e36b088ae2e7aaa4100b307eec991078e3e
StochasticGate
# 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...
SharhadBashar/1-stage-wseg
StochasticGate
false
5,817
[ "Apache-2.0" ]
1
83bf13444f5039ffed2de1605f09b3f90b525586
https://github.com/SharhadBashar/1-stage-wseg/tree/83bf13444f5039ffed2de1605f09b3f90b525586
Fair
# 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 ...
SimoneDutto/EDSR
Fair
false
11,882
[ "MIT" ]
0
a13fd4e4950649f9a33aa2089c6db4e3920ea4d2
https://github.com/SimoneDutto/EDSR/tree/a13fd4e4950649f9a33aa2089c6db4e3920ea4d2
GreedySearch
import torch import torch.nn as nn def cuda(): return torch.cuda.is_available() def get_device(): return torch.device('cuda' if cuda() else 'cpu') class Search(nn.Module): """Base search class.""" def __init__(self, *args, **kwargs): super().__init__() self.device = get_device() ...
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...
PaccMann/paccmann_chemistry
GreedySearch
false
18,366
[ "MIT" ]
9
f7e9735aafb936f837c38b5055c654be178f385f
https://github.com/PaccMann/paccmann_chemistry/tree/f7e9735aafb936f837c38b5055c654be178f385f
SelfAttention_naive
import math import torch from torch import nn import torch.nn.functional as F class SelfAttention_naive(nn.Module): def __init__(self, dim_emb, dim_internal, heads=8, mask=False, dropout= 0.0, dtype=torch.float32): """ A single self attention block :param dim_emb: embedding dimen...
import torch from torch._inductor.select_algorithm import extern_kernels import triton import triton.language as tl from 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....
insop/transformer_simple
SelfAttention_naive
false
6,884
[ "Apache-2.0" ]
1
d07e6c3b9ddc9687d332ac3a980bbce22880ad46
https://github.com/insop/transformer_simple/tree/d07e6c3b9ddc9687d332ac3a980bbce22880ad46
GradLoss
# 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 ...
Khoronus/MonoDepth-FPN-PyTorch
GradLoss
false
721
[ "MIT" ]
0
6e41e297723d1490c537e04afff905c61d6f0ff8
https://github.com/Khoronus/MonoDepth-FPN-PyTorch/tree/6e41e297723d1490c537e04afff905c61d6f0ff8
EqualizedLinear
import torch from torch import nn import torch.nn.functional as F class EqualizedLinear(nn.Module): def __init__(self, input_size, output_size, gain=2 ** 0.5, lrmul=0.01): super().__init__() he_std = gain * input_size ** -0.5 init_std = 1.0 / lrmul self.w_mul = he_std * lrmul ...
import torch from torch._inductor.select_algorithm import extern_kernels import triton import 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...
hejj16/Landscape-StyleGAN
EqualizedLinear
false
6,793
[ "MIT" ]
1
a93cd32b588ab21da9d7589e705ca6f09db18408
https://github.com/hejj16/Landscape-StyleGAN/tree/a93cd32b588ab21da9d7589e705ca6f09db18408
Debayer3x3
import torch import torch.nn import torch.nn.functional class Debayer3x3(torch.nn.Module): """Demosaicing of Bayer images using 3x3 convolutions. Requires BG-Bayer color filter array layout. That is, the image[1,1]='B', image[1,2]='G'. This corresponds to OpenCV naming conventions. Compared to D...
import torch from torch._inductor.select_algorithm import extern_kernels import triton import triton.language as tl from torch._inductor.runtime.triton_heuristics import grid from torch._C import _cuda_getCurrentRawStream as get_raw_stream import torch.nn import torch.nn.functional assert_size_stride = torch._C._dynamo...
tasptz/pytorch-debayer
Debayer3x3
false
13,026
[ "MIT" ]
0
ec35f34a57c045eb2319f4ef87f371d95f7394c3
https://github.com/tasptz/pytorch-debayer/tree/ec35f34a57c045eb2319f4ef87f371d95f7394c3
_ImpalaCNN
import torch from typing import Tuple from torch import nn class _ImpalaResBlock(nn.Module): def __init__(self, n_channels: 'int'): super().__init__() self.n_channels = n_channels kernel_size = 3 padding = 1 self.relu = nn.ReLU() self.relu_inplace = nn.ReLU() ...
import torch from torch._inductor.select_algorithm import extern_kernels import triton import triton.language as tl from torch._inductor.runtime.triton_heuristics import grid from torch._C import _cuda_getCurrentRawStream as get_raw_stream from torch._inductor.runtime import triton_helpers from typing import Tuple from...
IBM/vsrl-framework
_ImpalaCNN
false
8,511
[ "MIT" ]
44
42e0853bffb5efbb66cd97178aff9e10ad18c5a9
https://github.com/IBM/vsrl-framework/tree/42e0853bffb5efbb66cd97178aff9e10ad18c5a9
chroma_subsampling
# 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...
mlomnitz/DifferentiableJPEG
chroma_subsampling
false
16,096
[ "MIT" ]
86
a5767feba955a1bcb78600135a09c36a806f6249
https://github.com/mlomnitz/DifferentiableJPEG/tree/a5767feba955a1bcb78600135a09c36a806f6249
LandmarkHead
# 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 itertools import product as product import torch.nn as nn assert_size_strid...
Jung-Jun-Uk/mixface
LandmarkHead
false
17,538
[ "MIT" ]
10
cee17f99d5e22bf962d9bccbda44a57ab8493173
https://github.com/Jung-Jun-Uk/mixface/tree/cee17f99d5e22bf962d9bccbda44a57ab8493173
PCENlr
import torch import torch.nn as nn class PCENlr(nn.Module): """ A Low-rank version for per-channel energy normalization. """ def __init__(self, N, T): super(PCENlr, self).__init__() self.N = N self.T = T self.lr_enc = nn.Linear(self.T, 1, bias=False) self.l...
import torch from torch._inductor.select_algorithm import extern_kernels import triton import triton.language as tl from 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....
Js-Mim/wagner_vad
PCENlr
false
5,410
[ "MIT" ]
1
cc682bd7a8f496a26fe4be39ea2b2d68e493c5ba
https://github.com/Js-Mim/wagner_vad/tree/cc682bd7a8f496a26fe4be39ea2b2d68e493c5ba
F_conv
import torch import warnings import torch.nn as nn import torch.nn.functional as F import torch.optim class F_conv(nn.Module): """ResNet transformation, not itself reversible, just used below""" def __init__(self, in_channels, channels, channels_hidden=None, stride= None, kernel_size=3, leaky_slope=0...
import torch from torch._inductor.select_algorithm import extern_kernels import triton import triton.language as tl from torch._inductor.runtime.triton_heuristics import grid from torch._C import _cuda_getCurrentRawStream as get_raw_stream import warnings import torch.nn as nn import torch.optim assert_size_stride = to...
zimmerrol/FrEIA
F_conv
false
4,672
[ "MIT" ]
0
73d01ab8c90e0deb5e242d66405bd168db06dc19
https://github.com/zimmerrol/FrEIA/tree/73d01ab8c90e0deb5e242d66405bd168db06dc19
L1_Charbonnier_loss
import torch from torch.nn import init as init from torch.nn.modules.loss import _Loss class L1_Charbonnier_loss(_Loss): """ L1 Charbonnierloss """ def __init__(self, para): super(L1_Charbonnier_loss, self).__init__() self.eps = 0.001 def forward(self, X, Y): diff = 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 from torch._inductor.runtime.triton_helpers import libdevice from torch.nn import init as...
RunqiuBao/Event_ESTRNN
L1_Charbonnier_loss
false
14,329
[ "MIT" ]
180
6d156cc42a3a33bd0b4b7c4c4be98f943ff53acb
https://github.com/RunqiuBao/Event_ESTRNN/tree/6d156cc42a3a33bd0b4b7c4c4be98f943ff53acb
LSTM
import torch from typing import Tuple import torch.nn as nn class LSTM(nn.Module): """Implementation of the standard LSTM. TODO: Include ref and LaTeX equations Parameters ---------- input_size : int Number of input features hidden_size : int Number of hidden/memory cells. ...
import torch from torch._inductor.select_algorithm import extern_kernels import triton import triton.language 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 ...
danielsuo/toy_flood
LSTM
false
15,134
[ "MIT" ]
49
471d3c4091d86d4a00fbf910937d4e60fdaf79a1
https://github.com/danielsuo/toy_flood/tree/471d3c4091d86d4a00fbf910937d4e60fdaf79a1
FPELU
# 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 random import torch.nn as nn assert_size_stride = torch._C._dynamo.guard...
dawnclaude/onnx2keras
FPELU
false
15,138
[ "MIT" ]
115
3d2a47c0a228b91fd434232274e216e491da36e3
https://github.com/dawnclaude/onnx2keras/tree/3d2a47c0a228b91fd434232274e216e491da36e3
Upsample
import torch import torch.nn as nn import torch.nn.functional as F class Upsample(nn.Module): """ nn.Upsample is deprecated """ def __init__(self, scale_factor, mode='nearest'): super(Upsample, self).__init__() self.scale_factor = scale_factor self.mode = mode def forward(self, x...
import torch import triton import triton.language as tl from torch._inductor.runtime.triton_heuristics import grid from torch._C import _cuda_getCurrentRawStream as get_raw_stream import torch.nn as nn assert_size_stride = torch._C._dynamo.guards.assert_size_stride empty_strided_cuda = torch._C._dynamo.guards._empty_st...
AIplayblocks/littlecarroute
Upsample
false
4,765
[ "MIT" ]
1
e20b4a318746637dd1e2170b175201bd8ba1e7d5
https://github.com/AIplayblocks/littlecarroute/tree/e20b4a318746637dd1e2170b175201bd8ba1e7d5
ChannelSELayer3D
import torch import torch.nn as nn class ChannelSELayer3D(nn.Module): """ 3D extension of Squeeze-and-Excitation (SE) block described in: *Hu et al., Squeeze-and-Excitation Networks, arXiv:1709.01507* *Zhu et al., AnatomyNet, arXiv:arXiv:1808.05238* """ def __init__(self, num_channels...
import torch from torch._inductor.select_algorithm import extern_kernels import triton import triton.language as tl from torch._inductor.runtime.triton_heuristics import grid from torch._C import _cuda_getCurrentRawStream as get_raw_stream from torch._inductor.runtime import triton_helpers import torch.nn as nn assert_...
Jianrong-Lu/Head-and-Neck-Tumour-Segmentation-and-Prediction-of-Patient-Survival
ChannelSELayer3D
false
655
[ "MIT" ]
0
257cf17ce6d405166dd8449f3b34e305cb5103b2
https://github.com/Jianrong-Lu/Head-and-Neck-Tumour-Segmentation-and-Prediction-of-Patient-Survival/tree/257cf17ce6d405166dd8449f3b34e305cb5103b2
TransposeConv2dLayer
# AOT ID: ['0_forward'] from ctypes import c_void_p, c_long, c_int import torch import math import random import os import tempfile from math import inf, nan from torch._inductor.hooks import run_intermediate_hooks from torch._inductor.utils import maybe_profile from torch._inductor.codegen.memory_planning import _alig...
import torch from torch._inductor.select_algorithm import extern_kernels import triton import triton.language as tl from torch._inductor.runtime.triton_heuristics import grid from torch._C import _cuda_getCurrentRawStream as get_raw_stream import torch.nn as nn from torch.nn import Parameter assert_size_stride = torch....
kangzhiq/DeepFillv2_Pytorch
TransposeConv2dLayer
false
10,433
[ "MIT" ]
0
9c7ed61b25bb995713f89108b712490737abe1b1
https://github.com/kangzhiq/DeepFillv2_Pytorch/tree/9c7ed61b25bb995713f89108b712490737abe1b1
Nreparameterize
# AOT ID: ['0_forward'] from ctypes import c_void_p, c_long, c_int import torch import math import random import os import tempfile from math import inf, nan from torch._inductor.hooks import run_intermediate_hooks from torch._inductor.utils import maybe_profile from torch._inductor.codegen.memory_planning import _alig...
import torch from torch._inductor.select_algorithm import extern_kernels import triton import triton.language as tl from torch._inductor.runtime.triton_heuristics import grid from torch._C import _cuda_getCurrentRawStream as get_raw_stream from torch._inductor.runtime.triton_helpers import libdevice, math as tl_math fr...
pimdh/lie-vae
Nreparameterize
false
16,257
[ "MIT" ]
83
0e0cc4d533c064fcfc405e8a75449f8b2f6cf8cf
https://github.com/pimdh/lie-vae/tree/0e0cc4d533c064fcfc405e8a75449f8b2f6cf8cf
CNNPolicy
# 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....
anindex/deepRL-projects
CNNPolicy
false
1,471
[ "MIT" ]
0
bed03d1f985c8340fc75f715028b632bdce40641
https://github.com/anindex/deepRL-projects/tree/bed03d1f985c8340fc75f715028b632bdce40641
LINEAR_LOGSOFTMAX
import torch import torch.nn as nn class LINEAR_LOGSOFTMAX(nn.Module): def __init__(self, input_dim, nclass): super(LINEAR_LOGSOFTMAX, self).__init__() self.fc = nn.Linear(input_dim, nclass) self.logic = nn.LogSoftmax(dim=1) def forward(self, x): o = self.logic(self.fc(x)) ...
import torch from torch._inductor.select_algorithm import extern_kernels import triton import triton.language as tl from torch._inductor.runtime.triton_heuristics import grid from torch._C import _cuda_getCurrentRawStream as get_raw_stream from torch._inductor.runtime import triton_helpers from torch._inductor.runtime....
Huihui-z/CE-GZSL
LINEAR_LOGSOFTMAX
false
13,817
[ "MIT" ]
58
7bf5358ac4727ea1dc2dc9dec2f453b014500bd8
https://github.com/Huihui-z/CE-GZSL/tree/7bf5358ac4727ea1dc2dc9dec2f453b014500bd8
WaveletConv
import torch import torch.nn as nn class WaveletConv(nn.Module): def __init__(self, in_features, out_features, num_nodes, bias=False): super().__init__() self.in_features = in_features self.out_features = out_features self.w = nn.Linear(in_features, out_features, 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...
EdisonLeeeee/GraphGallery
WaveletConv
false
13,643
[ "MIT" ]
300
4eec9c5136bda14809bd22584b26cc346cdb633b
https://github.com/EdisonLeeeee/GraphGallery/tree/4eec9c5136bda14809bd22584b26cc346cdb633b
LanguageModelCriterion
# 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 from torch.autograd import * assert_size_stride = torch._C._dynamo.guards.assert_size_stride empty_strided_cuda = torc...
SunZongdi/self-critical.pytorch
LanguageModelCriterion
false
5,861
[ "MIT" ]
1
6cecbeb949e68007b72e84198cf74f9fb288aeda
https://github.com/SunZongdi/self-critical.pytorch/tree/6cecbeb949e68007b72e84198cf74f9fb288aeda
RGAN_D
import torch import torch.nn as nn import torch.nn.functional as F from torch.utils.data import DataLoader as DataLoader class RGAN_D(nn.Module): def __init__(self, in_size, hidden_size, num_outcomes): super(RGAN_D, self).__init__() self.L1 = nn.Linear(in_size, hidden_size) self.L2 = nn.L...
import torch from torch._inductor.select_algorithm import extern_kernels import triton import triton.language as tl from 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....
COMP6248-Reproducability-Challenge/Reproducible-Or-Not-Reproducible-That-Is-The-Question
RGAN_D
false
4,954
[ "MIT" ]
1
7e2e632189a3669397f67efa99c8de4924967968
https://github.com/COMP6248-Reproducability-Challenge/Reproducible-Or-Not-Reproducible-That-Is-The-Question/tree/7e2e632189a3669397f67efa99c8de4924967968
ConvMLPStage
from torch.nn import Module import torch import torch.nn as nn from torch.nn import Linear from torch.nn import LayerNorm from torch.nn import Conv2d from torch.nn import GELU from torch.nn import Identity def drop_path(x, drop_prob: 'float'=0.0, training: 'bool'=False): """ Obtained from: github.com:rwightma...
import torch from torch._inductor.select_algorithm import extern_kernels import triton import triton.language 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...
dumpmemory/Convolutional-MLPs
ConvMLPStage
false
15,267
[ "Apache-2.0" ]
117
89008c686e48803c012038f21f97e56276aa84ad
https://github.com/dumpmemory/Convolutional-MLPs/tree/89008c686e48803c012038f21f97e56276aa84ad
DownBlock
# 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...
MatusBako/MakeFacesGreatAgain
DownBlock
false
834
[ "MIT" ]
0
e4941a8460db79dec566ed02d4b23eafb416a6db
https://github.com/MatusBako/MakeFacesGreatAgain/tree/e4941a8460db79dec566ed02d4b23eafb416a6db
FocalLoss
# AOT ID: ['0_inference'] from ctypes import c_void_p, c_long, c_int import torch import math import random import os import tempfile from math import inf, nan from torch._inductor.hooks import run_intermediate_hooks from torch._inductor.utils import maybe_profile from torch._inductor.codegen.memory_planning import _al...
import torch import triton import triton.language as tl from torch._inductor.runtime.triton_heuristics import grid from torch._C import _cuda_getCurrentRawStream as get_raw_stream from torch._inductor.runtime import triton_helpers from torch._inductor.runtime.triton_helpers import libdevice, math as tl_math from torch ...
cxz/tgs-salt-identification-challenge
FocalLoss
false
6,516
[ "MIT" ]
1
859f3d7f2d3184532c42c34444500eec3b03b1c8
https://github.com/cxz/tgs-salt-identification-challenge/tree/859f3d7f2d3184532c42c34444500eec3b03b1c8
GHMR
import torch import torch.nn as nn class GHMR(nn.Module): """GHM Regression Loss. Details of the theorem can be viewed in the paper "Gradient Harmonized Single-stage Detector" https://arxiv.org/abs/1811.05181 Args: mu (float): The parameter for the Authentic Smooth L1 loss. bins ...
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...
CK-er/mmdet
GHMR
false
2,094
[ "Apache-2.0" ]
0
9bea4068efbcf7bf739dbe41917a68d525c29868
https://github.com/CK-er/mmdet/tree/9bea4068efbcf7bf739dbe41917a68d525c29868
SineLayer
# AOT ID: ['0_forward'] from ctypes import c_void_p, c_long, c_int import torch import math import random import os import tempfile from math import inf, nan from torch._inductor.hooks import run_intermediate_hooks from torch._inductor.utils import maybe_profile from torch._inductor.codegen.memory_planning import _alig...
import torch from torch._inductor.select_algorithm import extern_kernels import triton import triton.language as tl from torch._inductor.runtime.triton_heuristics import grid from torch._C import _cuda_getCurrentRawStream as get_raw_stream from torch._inductor.runtime.triton_helpers import math as tl_math import numpy ...
ccxiaotoancai/Anim-NeRF
SineLayer
false
6,398
[ "MIT" ]
1
1342a9e2d02411a09acecac40ac325f38708b9c9
https://github.com/ccxiaotoancai/Anim-NeRF/tree/1342a9e2d02411a09acecac40ac325f38708b9c9
GlobalAttention
# 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....
GraphGrailAi/summ-abs-dev
GlobalAttention
false
2,321
[ "MIT" ]
0
512f253bf72b6529589b29d06959b560b79f1cde
https://github.com/GraphGrailAi/summ-abs-dev/tree/512f253bf72b6529589b29d06959b560b79f1cde
SelfAttention
# 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....
shahrukhx01/transformers-bisected
SelfAttention
false
10,797
[ "Apache-2.0" ]
0
a97647aca7963e6f9d4fce5a067ba68d393072d6
https://github.com/shahrukhx01/transformers-bisected/tree/a97647aca7963e6f9d4fce5a067ba68d393072d6
EntropyLoss
import math import torch from torch import nn import torch.utils.data class EntropyLoss(nn.Module): def __init__(self): super().__init__() def forward(self, x, eps=1e-08): logN = math.log(float(x.shape[0])) x = x * (x + eps).log() / logN neg_entropy = x.sum(1) return ...
import torch import triton import triton.language as tl from torch._inductor.runtime.triton_heuristics import grid from torch._C import _cuda_getCurrentRawStream as get_raw_stream from torch._inductor.runtime.triton_helpers import math as tl_math from torch import nn import torch.utils.data assert_size_stride = torch._...
Joshua-Schroijen/deepproblog
EntropyLoss
false
672
[ "Apache-2.0" ]
0
4ae56f1e860010b7857b29d5bd76fb1555d5e19d
https://github.com/Joshua-Schroijen/deepproblog/tree/4ae56f1e860010b7857b29d5bd76fb1555d5e19d
RGBDiff
import torch from torch import nn from torchvision import models as models import torch.onnx import torch.nn class RGBDiff(nn.Module): def __init__(self, dim=1): super().__init__() self.dim = dim def forward(self, image): """ Args: image (torch.Tensor): (N x T x ...
import torch import triton import triton.language as tl from torch._inductor.runtime.triton_heuristics import grid from torch._C import _cuda_getCurrentRawStream as get_raw_stream from torch import nn from torchvision import models as models import torch.onnx import torch.nn assert_size_stride = torch._C._dynamo.guards...
krodyush/training_extensions
RGBDiff
false
10,973
[ "Apache-2.0" ]
0
542f4004dfbc6fc62a622065367ba4f85a703dd3
https://github.com/krodyush/training_extensions/tree/542f4004dfbc6fc62a622065367ba4f85a703dd3
AttentionSet
# 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....
marcos0318/query2box
AttentionSet
false
16,019
[ "MIT" ]
140
cc8b47e21a5addf17ee5a3c68412b638ef3956f3
https://github.com/marcos0318/query2box/tree/cc8b47e21a5addf17ee5a3c68412b638ef3956f3
AttnLayer
import torch import torch.nn.functional as F import torch.nn as nn class AttnLayer(nn.Module): """Attention layer. w is context vector. Formula: $$ v_i=tanh(Wh_i+b)\\ lpha_i = v_i^Tw\\ lpha_i = softmax(lpha_i)\\ Vec = \\sum_0^L lpha_ih_i $$ """ ...
import torch from torch._inductor.select_algorithm import extern_kernels import triton import triton.language as tl from torch._inductor.runtime.triton_heuristics import grid from torch._C import _cuda_getCurrentRawStream as get_raw_stream from torch._inductor.runtime import triton_helpers from torch._inductor.runtime....
WiseDoge/Text-Classification-PyTorch
AttnLayer
false
18,070
[ "MIT" ]
6
9371eeed6bd7ecf1d529c8f2a6c997fcde67a559
https://github.com/WiseDoge/Text-Classification-PyTorch/tree/9371eeed6bd7ecf1d529c8f2a6c997fcde67a559
SpatialPyramidPooling
# 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...
IDayday/YOLOv4_CAM
SpatialPyramidPooling
false
8,296
[ "Apache-2.0" ]
34
8df61f1c59c197126f0385c1ec1cf65a29a80cec
https://github.com/IDayday/YOLOv4_CAM/tree/8df61f1c59c197126f0385c1ec1cf65a29a80cec
WNConv2d
# AOT ID: ['0_forward'] from ctypes import c_void_p, c_long, c_int import torch import math import random import os import tempfile from math import inf, nan from torch._inductor.hooks import run_intermediate_hooks from torch._inductor.utils import maybe_profile from torch._inductor.codegen.memory_planning import _alig...
import torch from torch._inductor.select_algorithm import extern_kernels import triton import triton.language as tl from torch._inductor.runtime.triton_heuristics import grid from torch._C import _cuda_getCurrentRawStream as get_raw_stream from torch._inductor.runtime.triton_helpers import libdevice from torch import n...
Shivanshu-Gupta/KaoKore-VQ-VAE2
WNConv2d
false
1,093
[ "MIT" ]
0
38a88ba312dee3c0e2c1aaf02e1c1754ba19ac0c
https://github.com/Shivanshu-Gupta/KaoKore-VQ-VAE2/tree/38a88ba312dee3c0e2c1aaf02e1c1754ba19ac0c
RNNAgent
# 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_...
benellis3/pymarl2
RNNAgent
false
14,948
[ "Apache-2.0" ]
401
0875995a0e0b9692ea64484478b369c7f6c0cf44
https://github.com/benellis3/pymarl2/tree/0875995a0e0b9692ea64484478b369c7f6c0cf44
marginLoss
# 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...
DSRnD/UMLs
marginLoss
false
2,121
[ "MIT" ]
0
a524bc45bc3f2dc8b4a90f73f69e23ee36ba8be9
https://github.com/DSRnD/UMLs/tree/a524bc45bc3f2dc8b4a90f73f69e23ee36ba8be9
MultiNonLinearClassifier
# 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...
qhjqhj00/NLI
MultiNonLinearClassifier
false
12,910
[ "Apache-2.0" ]
0
a5baaf1903e6a22a7bdd1d68a4aaf1680c57d265
https://github.com/qhjqhj00/NLI/tree/a5baaf1903e6a22a7bdd1d68a4aaf1680c57d265
ChannelNorm
import torch import torch.nn as nn def channel_norm(image): img = image.flatten(2) avg = img.mean(-1)[:, :, None, None] var = img.var(-1)[:, :, None, None] return (image - avg) / torch.sqrt(var + 1e-06) class ChannelNorm(nn.Module): def forward(self, image): return channel_norm(image) ...
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_...
rlmwang/torch-tools
ChannelNorm
false
10,795
[ "MIT" ]
0
822132534d73414f26045bad38a0a345661b057f
https://github.com/rlmwang/torch-tools/tree/822132534d73414f26045bad38a0a345661b057f
MultiClassDiceLoss
import torch import torch.nn as nn class DiceLoss(nn.Module): """DiceLoss. .. seealso:: Milletari, Fausto, Nassir Navab, and Seyed-Ahmad Ahmadi. "V-net: Fully convolutional neural networks for volumetric medical image segmentation." 2016 fourth international conference on 3D vision (3DV). IEE...
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...
ivadomed-profile-analysis-project/ivadomed
MultiClassDiceLoss
false
15,653
[ "MIT" ]
87
3b53e2cb2b210511943da439401e2471fd387876
https://github.com/ivadomed-profile-analysis-project/ivadomed/tree/3b53e2cb2b210511943da439401e2471fd387876
OutputLayer
# 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.cuda from torch import nn assert_size_stride = torch._C._dynamo.guards.assert_size_stride empty_strided_cuda = torch._C._dynamo...
CoyoteLeo/QANet-pytorch
OutputLayer
false
2,119
[ "MIT" ]
0
a2d5290915c91c4bc84db142e8ce50c47a7a37d0
https://github.com/CoyoteLeo/QANet-pytorch/tree/a2d5290915c91c4bc84db142e8ce50c47a7a37d0
DiceLoss
# AOT ID: ['0_inference'] from ctypes import c_void_p, c_long, c_int import torch import math import random import os import tempfile from math import inf, nan from torch._inductor.hooks import run_intermediate_hooks from torch._inductor.utils import maybe_profile from torch._inductor.codegen.memory_planning import _al...
import torch import triton import triton.language as tl from torch._inductor.runtime.triton_heuristics import grid from torch._C import _cuda_getCurrentRawStream as get_raw_stream from torch._inductor.runtime import triton_helpers import torch.nn as nn assert_size_stride = torch._C._dynamo.guards.assert_size_stride emp...
hlesmqh/WS3D
DiceLoss
false
15,522
[ "MIT" ]
100
6816eeb135923a59de34ee5d94be2d0fd3ec83f9
https://github.com/hlesmqh/WS3D/tree/6816eeb135923a59de34ee5d94be2d0fd3ec83f9
SymKlCriterion
import torch import torch.nn.functional as F from torch.nn.modules.loss import _Loss from torch.optim.lr_scheduler import * class Criterion(_Loss): def __init__(self, alpha=1.0, name='criterion'): super().__init__() """Alpha is used to weight each loss term """ self.alpha = alpha ...
import torch import triton import triton.language as tl from torch._inductor.runtime.triton_heuristics import grid from torch._C import _cuda_getCurrentRawStream as get_raw_stream from torch._inductor.runtime import triton_helpers from torch._inductor.runtime.triton_helpers import libdevice, math as tl_math from torch....
johnson7788/mt-dnn
SymKlCriterion
false
3,905
[ "MIT" ]
0
26e5c4a5bfdbf1a1dd1c903e606db1c070568237
https://github.com/johnson7788/mt-dnn/tree/26e5c4a5bfdbf1a1dd1c903e606db1c070568237
TransformerNet2
import torch class TransformerNet2(torch.nn.Module): def __init__(self): super(TransformerNet2, self).__init__() self.tanh = torch.nn.Tanh() self.a = 10 def forward(self, r, p): m = -0.5 * self.tanh(self.a * (p - 2 * r)) + 0.5 * self.tanh(self.a * (p - 2 * (1 - r)...
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...
Ekko-zn/StegoAdv
TransformerNet2
false
5,110
[ "MIT" ]
1
2852dbc85d66f30efb7127695c0d75806bf4aa4c
https://github.com/Ekko-zn/StegoAdv/tree/2852dbc85d66f30efb7127695c0d75806bf4aa4c
L2Norm
# AOT ID: ['0_forward'] from ctypes import c_void_p, c_long, c_int import torch import math import random import os import tempfile from math import inf, nan from torch._inductor.hooks import run_intermediate_hooks from torch._inductor.utils import maybe_profile from torch._inductor.codegen.memory_planning import _alig...
import torch import triton import triton.language as tl from torch._inductor.runtime.triton_heuristics import grid from torch._C import _cuda_getCurrentRawStream as get_raw_stream from torch._inductor.runtime.triton_helpers import libdevice import torch.nn as nn from math import sqrt as sqrt from itertools import produ...
robtu328/TextDetCorner
L2Norm
false
16,331
[ "Python-2.0", "OLDAP-2.7" ]
331
f37ef0e1d2068c5fbd643855acd21787a2c122c5
https://github.com/robtu328/TextDetCorner/tree/f37ef0e1d2068c5fbd643855acd21787a2c122c5
FusedLeakyReLU
# 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 import torch.nn.functional as F import torch.utils.data assert_size_stride = torch._C._dynamo.guards.assert_size_strid...
HappyBelief/ContraD
FusedLeakyReLU
false
13,747
[ "MIT" ]
168
abb72562ddac8d8ab37fe9af6ac4c44c61e8ea0f
https://github.com/HappyBelief/ContraD/tree/abb72562ddac8d8ab37fe9af6ac4c44c61e8ea0f
CGRU_cell
import torch import torch.nn as nn from torch.autograd import Variable import torch.nn.functional as f from math import sqrt as sqrt from itertools import product as product class CGRU_cell(nn.Module): """Initialize a basic Conv GRU cell. Args: filter_size: int that is the height and width of the filter...
import torch from torch._inductor.select_algorithm import extern_kernels import triton import triton.language 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 ...
zhujiagang/realtime-refined-random
CGRU_cell
false
11,041
[ "MIT" ]
0
3aa8169049ab8be8b1ea5a78bbe9b89ac6c15593
https://github.com/zhujiagang/realtime-refined-random/tree/3aa8169049ab8be8b1ea5a78bbe9b89ac6c15593
IOUloss
import torch import torch.nn as nn class IOUloss(nn.Module): def __init__(self, reduction='none', loss_type='iou'): super(IOUloss, self).__init__() self.reduction = reduction self.loss_type = loss_type def forward(self, pred, target): assert pred.shape[0] == target.shape[0] ...
import torch import triton import triton.language as tl from torch._inductor.runtime.triton_heuristics import grid from torch._C import _cuda_getCurrentRawStream as get_raw_stream from torch._inductor.runtime import triton_helpers import torch.nn as nn assert_size_stride = torch._C._dynamo.guards.assert_size_stride emp...
Chris-hughes10/YOLOX
IOUloss
false
5,003
[ "Apache-2.0" ]
1
981df30285839469a23cb925ed0a0f3714e46514
https://github.com/Chris-hughes10/YOLOX/tree/981df30285839469a23cb925ed0a0f3714e46514
MSELossWithIgnore
# 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.functional from torch import nn assert_size_stride = torch._C._dynamo.gua...
drivendataorg/DrivenData-2021-Geopose-Solution
MSELossWithIgnore
false
6,600
[ "MIT" ]
1
fc1dead0aeb1ade9e9d87b55f56e631c57e966a6
https://github.com/drivendataorg/DrivenData-2021-Geopose-Solution/tree/fc1dead0aeb1ade9e9d87b55f56e631c57e966a6
Get_gradient_nopadding
# AOT ID: ['0_inference'] from ctypes import c_void_p, c_long, c_int import torch import math import random import os import tempfile from math import inf, nan from torch._inductor.hooks import run_intermediate_hooks from torch._inductor.utils import maybe_profile from torch._inductor.codegen.memory_planning import _al...
import torch from torch._inductor.select_algorithm import extern_kernels import triton import triton.language as tl from torch._inductor.runtime.triton_heuristics import grid from torch._C import _cuda_getCurrentRawStream as get_raw_stream from torch._inductor.runtime.triton_helpers import libdevice import torch.nn as ...
mansum6/ESRGAN
Get_gradient_nopadding
false
3,978
[ "Apache-2.0" ]
0
8a6b2ce20600840490ee0525cb105617b8e85c73
https://github.com/mansum6/ESRGAN/tree/8a6b2ce20600840490ee0525cb105617b8e85c73
TripletMarginCosineLoss
from torch.nn import Module import torch from torch.nn.functional import cosine_similarity def triplet_margin_cosine_loss(anchor, positive, negative, margin=1.0, eps= 1e-08, sum_loss=False): 'Creates a criterion that measures the triplet cosine loss given input\n tensors x1, x2, x3 and a margin with a valu...
import torch import triton import triton.language as tl from torch._inductor.runtime.triton_heuristics import grid from torch._C import _cuda_getCurrentRawStream as get_raw_stream from torch._inductor.runtime import triton_helpers from torch._inductor.runtime.triton_helpers import libdevice from torch.nn import Module ...
ZhangShiyue/oposum
TripletMarginCosineLoss
false
14,724
[ "Apache-2.0" ]
97
5aefea20c5c0846b4cf09a5b4643ffb0b2ff39d8
https://github.com/ZhangShiyue/oposum/tree/5aefea20c5c0846b4cf09a5b4643ffb0b2ff39d8
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 import torc...
ppomelo/Attentive-Transformation-Based-Normalization
BCEDiceLoss
false
4,133
[ "Apache-2.0" ]
0
62ad02eb025613e90f4fe0e0a9f0f85839e53092
https://github.com/ppomelo/Attentive-Transformation-Based-Normalization/tree/62ad02eb025613e90f4fe0e0a9f0f85839e53092
Accuracy
# 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.functi...
HelenGuohx/cv-ferattn-code
Accuracy
false
5,306
[ "MIT" ]
1
faa9b7850fe2a0f8c08193bb129b5fec4639d616
https://github.com/HelenGuohx/cv-ferattn-code/tree/faa9b7850fe2a0f8c08193bb129b5fec4639d616