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
MeanMaxPooling
# 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 assert_size_stride = torch._C._dynamo.guards.assert_size_stride empt...
jennybae1024/DFGN-pytorch
MeanMaxPooling
false
15,681
[ "MIT" ]
191
056d9317f772cd10bdd215bfafdbac5cbd330026
https://github.com/jennybae1024/DFGN-pytorch/tree/056d9317f772cd10bdd215bfafdbac5cbd330026
SpatialSELayer1d
# 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...
ioanvl/1d_squeeze_excitation
SpatialSELayer1d
false
10,245
[ "MIT" ]
0
f422dc4b8e7de6239a6fb7d1688048db5053e733
https://github.com/ioanvl/1d_squeeze_excitation/tree/f422dc4b8e7de6239a6fb7d1688048db5053e733
CosineClassifier
# 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....
ZRJMoon/OMIT
CosineClassifier
false
9,630
[ "MIT" ]
0
bb063b4ac5d4fd60b28b17cb8d2119da92f936f4
https://github.com/ZRJMoon/OMIT/tree/bb063b4ac5d4fd60b28b17cb8d2119da92f936f4
SE
# 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_...
Alessiacosmos/Basic-RegNet-pytorch
SE
false
18,408
[ "MIT" ]
2
fd6b9a67599dcea6c90ba247f532a7624252b33c
https://github.com/Alessiacosmos/Basic-RegNet-pytorch/tree/fd6b9a67599dcea6c90ba247f532a7624252b33c
Dummy
import torch from torch import nn class Dummy(nn.Module): def forward(self, input): x = input return x + 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 import nn assert_size_stride = torch._C._dynamo.guards.assert_size_stride empty_strided_cuda = torch._C._dynamo.guards._empty_str...
FynnBe/tiktorch
Dummy
false
11,430
[ "MIT" ]
0
60c6fa9700e7ff73e44338e8755c56c6e8846f2f
https://github.com/FynnBe/tiktorch/tree/60c6fa9700e7ff73e44338e8755c56c6e8846f2f
Transform
import torch from torch import nn class Transform(nn.Module): """ A Vertex Transformation module Permutation invariant transformation: (N, k, d) -> (N, k, d) """ def __init__(self, dim_in, k): """ :param dim_in: input feature dimension :param k: k neighbors """ ...
import torch from torch._inductor.select_algorithm import extern_kernels import triton import triton.language as tl from 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....
weiyx15/DHGNN
Transform
false
16,711
[ "MIT" ]
124
870a1763c34af6ee9a7a3207fed4a5e6bdb95d23
https://github.com/weiyx15/DHGNN/tree/870a1763c34af6ee9a7a3207fed4a5e6bdb95d23
SimpleFloorModule
# AOT ID: ['0_inference'] from ctypes import c_void_p, c_long, c_int import torch import math import random import os import tempfile from math import inf, nan from torch._inductor.hooks import run_intermediate_hooks from torch._inductor.utils import maybe_profile from torch._inductor.codegen.memory_planning import _al...
import torch import triton import triton.language as tl from torch._inductor.runtime.triton_heuristics import grid from torch._C import _cuda_getCurrentRawStream as get_raw_stream from torch._inductor.runtime.triton_helpers import libdevice import torch.jit import torch.onnx import torch.nn assert_size_stride = torch._...
YaronBenAtar/glow
SimpleFloorModule
false
14,661
[ "Apache-2.0" ]
2,838
a13706a4239fa7eaf059c670dc573e3eb0768f86
https://github.com/YaronBenAtar/glow/tree/a13706a4239fa7eaf059c670dc573e3eb0768f86
MaxPoolStride1
import torch import torch.nn as nn import torch.nn.functional as F class MaxPoolStride1(nn.Module): def __init__(self): super(MaxPoolStride1, self).__init__() def forward(self, x): x_pad = F.pad(x, (0, 1, 0, 1), mode='replicate') x = F.max_pool2d(x_pad, 2, stride=1) return x ...
import torch import triton import triton.language as tl from torch._inductor.runtime.triton_heuristics import grid from torch._C import _cuda_getCurrentRawStream as get_raw_stream from torch._inductor.runtime import triton_helpers import torch.nn as nn assert_size_stride = torch._C._dynamo.guards.assert_size_stride emp...
CharlesPikachu/YOLO
MaxPoolStride1
false
13,452
[ "MIT" ]
57
950b11c35517c1c3d7d7856b5768c4023c1f89eb
https://github.com/CharlesPikachu/YOLO/tree/950b11c35517c1c3d7d7856b5768c4023c1f89eb
Theta
from torch.autograd import Function import torch import torch.nn as nn from typing import Tuple from typing import Optional from typing import Any import torch.utils.data class GradientReverseFunction(Function): @staticmethod def forward(ctx: 'Any', input: 'torch.Tensor', coeff: 'Optional[float]'=1.0 ...
import torch from torch._inductor.select_algorithm import extern_kernels import triton import triton.language as tl from torch._inductor.runtime.triton_heuristics import grid from torch._C import _cuda_getCurrentRawStream as get_raw_stream from torch.autograd import Function import torch.nn as nn from typing import Tup...
XianyuanLiu/Transfer-Learning-Library
Theta
false
10,142
[ "MIT" ]
0
25f83f32437032df88ca6101ecd1f63ec7a0aa2c
https://github.com/XianyuanLiu/Transfer-Learning-Library/tree/25f83f32437032df88ca6101ecd1f63ec7a0aa2c
HardtanhBoundToPOTNet
import torch from torch.nn.functional import relu from torch.nn import Conv2d from torch.nn import Hardtanh from torch.nn.functional import hardtanh import torch.nn.functional class HardtanhBoundToPOTNet(torch.nn.Module): def __init__(self): super(HardtanhBoundToPOTNet, self).__init__() self.conv...
import torch from torch._inductor.select_algorithm import extern_kernels import triton import triton.language as tl from torch._inductor.runtime.triton_heuristics import grid from torch._C import _cuda_getCurrentRawStream as get_raw_stream from torch._inductor.runtime import triton_helpers from torch.nn import Conv2d f...
elad-c/model_optimization
HardtanhBoundToPOTNet
false
10,658
[ "Apache-2.0" ]
0
b0ecf41c3f9434008d57d7fe724ff8585e19d4cc
https://github.com/elad-c/model_optimization/tree/b0ecf41c3f9434008d57d7fe724ff8585e19d4cc
GKDLoss
import torch import torch.nn as nn import torch.nn.parallel import torch.optim import torch.nn.functional as F class GKDLoss(nn.Module): """Knowledge Distillation Loss""" def __init__(self, T): super().__init__() self.t = T def forward(self, stu_pred, tea_pred, label): stu_pred_l...
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 ...
carol007/pytorch-ImageNet-CIFAR-COCO-VOC-training
GKDLoss
false
6,402
[ "MIT" ]
1
e8b37046e6fbe914f6a68bbde1fe419c46373c1d
https://github.com/carol007/pytorch-ImageNet-CIFAR-COCO-VOC-training/tree/e8b37046e6fbe914f6a68bbde1fe419c46373c1d
ScaledLeakyReLU
import math import torch import torch.nn as nn from torch.nn import functional as F class ScaledLeakyReLU(nn.Module): """Scaled LeakyReLU. Args: negative_slope (float): Negative slope. Default: 0.2. """ def __init__(self, negative_slope=0.2): super(ScaledLeakyReLU, 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 import torch.nn as nn assert_size_stride = torch._C._dynamo.guards.assert_size_stride empty_strided_cuda = torch._C._dynamo.guards._empty_st...
ArdWang/GFPGAN
ScaledLeakyReLU
false
11,243
[ "BSD-3-Clause" ]
0
f984ec32754190fad0b9b7a60d372aac84e57173
https://github.com/ArdWang/GFPGAN/tree/f984ec32754190fad0b9b7a60d372aac84e57173
PolicyAHG
import torch import numpy as np import torch as tor from torch import nn class SaveableModel(object): def save(self, path): tor.save(self, path) @classmethod def load(cls, path): return tor.load(path) @classmethod def load_best(cls, path): assert os.path.isdir(path) ...
import torch from torch._inductor.select_algorithm import extern_kernels import triton import triton.language as tl from 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....
JimmyMVP/plain_rl
PolicyAHG
false
17,495
[ "MIT" ]
10
4780f05fffb62533a339197b49de487cdc9d9954
https://github.com/JimmyMVP/plain_rl/tree/4780f05fffb62533a339197b49de487cdc9d9954
Flatten
# AOT ID: ['0_inference'] from ctypes import c_void_p, c_long, c_int import torch import math import random import os import tempfile from math import inf, nan from torch._inductor.hooks import run_intermediate_hooks from torch._inductor.utils import maybe_profile from torch._inductor.codegen.memory_planning import _al...
import torch import triton import triton.language as tl from torch._inductor.runtime.triton_heuristics import grid from torch._C import _cuda_getCurrentRawStream as get_raw_stream from torch import nn assert_size_stride = torch._C._dynamo.guards.assert_size_stride empty_strided_cuda = torch._C._dynamo.guards._empty_str...
DeepVoodooFX/pixel2style2pixel
Flatten
false
11,341
[ "Apache-2.0", "BSD-2-Clause", "MIT" ]
0
0254c32400d55f7e400ead15b02ad6a992ba1e21
https://github.com/DeepVoodooFX/pixel2style2pixel/tree/0254c32400d55f7e400ead15b02ad6a992ba1e21
GraphLinear
import torch import torch.nn as nn class GraphLinear(nn.Module): """ Generalization of 1x1 convolutions on Graphs """ def __init__(self, in_channels, out_channels): super(GraphLinear, self).__init__() self.in_channels = in_channels self.out_channels = out_channels 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 import torch.nn as nn assert_size_stride = torch._C._dynamo.guards.assert_size_s...
GentleDell/DEBOR
GraphLinear
false
17,295
[ "BSD-3-Clause" ]
4
cd566f173599fe7419e7baf312f63830c28d5de2
https://github.com/GentleDell/DEBOR/tree/cd566f173599fe7419e7baf312f63830c28d5de2
PointerHead
import torch import torch.quantization from torch import nn class PointerHead(nn.Module): """Head for pointer ordering task.""" def __init__(self, embed_dim, bias=True): super().__init__() self.embed_dim = embed_dim self.scaling = self.embed_dim ** -0.5 self.k_proj = nn.Linear...
import torch from torch._inductor.select_algorithm import extern_kernels import 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.quantization from torch import nn assert_size_stride = torch._C._dy...
airKlizz/passage-ordering
PointerHead
false
6,132
[ "MIT" ]
1
f63b993dfd5b7e6475e7fb8950c23c3f22951979
https://github.com/airKlizz/passage-ordering/tree/f63b993dfd5b7e6475e7fb8950c23c3f22951979
CRF
# 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.utils.data.dataloader import torch.nn assert_size_stride = torch._C._dynamo.guards.assert_size_stride empty_strided_cuda = torc...
OatsProduction/flair
CRF
false
11,760
[ "MIT" ]
0
1cf2c9a9ae487e279dce9f6b92c41fa32c4563cf
https://github.com/OatsProduction/flair/tree/1cf2c9a9ae487e279dce9f6b92c41fa32c4563cf
BertSelfAttention
from _paritybench_helpers import _mock_config import math import torch from torch import nn class BertSelfAttention(nn.Module): def __init__(self, config): super(BertSelfAttention, self).__init__() if config.hidden_size % config.num_attention_heads != 0: raise ValueError( ...
import torch from torch._inductor.select_algorithm import extern_kernels import triton import triton.language as tl from 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....
johnson7788/TextBrewer
BertSelfAttention
false
6,983
[ "Apache-2.0" ]
1
fa7fa4d4a2a8debde5b148d448238f3b4fa1aa9a
https://github.com/johnson7788/TextBrewer/tree/fa7fa4d4a2a8debde5b148d448238f3b4fa1aa9a
MultiHeadAttention
# AOT ID: ['0_forward'] from ctypes import c_void_p, c_long, c_int import torch import math import random import os import tempfile from math import inf, nan from torch._inductor.hooks import run_intermediate_hooks from torch._inductor.utils import maybe_profile from torch._inductor.codegen.memory_planning import _alig...
import torch from torch._inductor.select_algorithm import extern_kernels import triton import triton.language as tl from torch._inductor.runtime.triton_heuristics import grid from torch._C import _cuda_getCurrentRawStream as get_raw_stream from torch._inductor.runtime import triton_helpers from torch._inductor.runtime....
JINHXu/NeMo
MultiHeadAttention
false
11,637
[ "Apache-2.0" ]
0
835db62e39919436824ce022fd3b3f6bac301cd6
https://github.com/JINHXu/NeMo/tree/835db62e39919436824ce022fd3b3f6bac301cd6
LBM
# 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 math as tl_math import torch.nn as nn assert_size_stride = torch._C._dynamo.guards.assert...
jinfenglin/TaxoExpan
LBM
false
15,688
[ "Apache-2.0" ]
55
86bd3f805508d03367539f2fdd43889fc0a4f6b2
https://github.com/jinfenglin/TaxoExpan/tree/86bd3f805508d03367539f2fdd43889fc0a4f6b2
LogCoshLoss
import torch import torch.utils.cpp_extension class LogCoshLoss(torch.nn.Module): def __init__(self): super().__init__() def forward(self, true, pred): loss = true - pred return torch.mean(torch.log(torch.cosh(loss + 1e-12))) def get_inputs(): return [torch.rand([4, 4, 4, 4]), ...
import torch import triton import triton.language as tl from torch._inductor.runtime.triton_heuristics import grid from torch._C import _cuda_getCurrentRawStream as get_raw_stream from torch._inductor.runtime import triton_helpers from torch._inductor.runtime.triton_helpers import libdevice, math as tl_math import torc...
crobbins327/semanticGAN_WSI
LogCoshLoss
false
1,749
[ "BSD-2-Clause", "MIT" ]
0
4046ddc822f463e03952402247f79d540bf7be95
https://github.com/crobbins327/semanticGAN_WSI/tree/4046ddc822f463e03952402247f79d540bf7be95
ResNetV2
# 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....
Willy0919/progressive-coordinate-transforms
ResNetV2
false
14,819
[ "Apache-2.0", "MIT" ]
142
b637fa2541a815d270e162a4c9cd3348b098d48a
https://github.com/Willy0919/progressive-coordinate-transforms/tree/b637fa2541a815d270e162a4c9cd3348b098d48a
JaccardLoss
import torch import torch.nn as nn class JaccardLoss(nn.Module): def __init__(self, apply_softmax: 'bool'=False, eps: 'float'=1e-06): super().__init__() self.apply_softmax = apply_softmax self.eps = eps def forward(self, x, y, eps=1e-06): if self.apply_softmax: x ...
import torch import triton import triton.language as tl from torch._inductor.runtime.triton_heuristics import grid from torch._C import _cuda_getCurrentRawStream as get_raw_stream from torch._inductor.runtime import triton_helpers import torch.nn as nn assert_size_stride = torch._C._dynamo.guards.assert_size_stride emp...
HalestormAI/efficientnet-unet
JaccardLoss
false
2,334
[ "MIT" ]
0
b6d5ec86d667ce7ac1f689bc16269dca83a079f0
https://github.com/HalestormAI/efficientnet-unet/tree/b6d5ec86d667ce7ac1f689bc16269dca83a079f0
ConditionTime
# AOT ID: ['0_inference'] from ctypes import c_void_p, c_long, c_int import torch import math import random import os import tempfile from math import inf, nan from torch._inductor.hooks import run_intermediate_hooks from torch._inductor.utils import maybe_profile from torch._inductor.codegen.memory_planning import _al...
import torch import triton import triton.language as tl from torch._inductor.runtime.triton_heuristics import grid from torch._C import _cuda_getCurrentRawStream as get_raw_stream from torch import nn as nn assert_size_stride = torch._C._dynamo.guards.assert_size_stride empty_strided_cuda = torch._C._dynamo.guards._emp...
ValterFallenius/metnet
ConditionTime
false
9,652
[ "MIT" ]
0
7cde48a7b5fc0b69a8ce9083f934949362620fd5
https://github.com/ValterFallenius/metnet/tree/7cde48a7b5fc0b69a8ce9083f934949362620fd5
ConvRelu
# AOT ID: ['0_forward'] from ctypes import c_void_p, c_long, c_int import torch import math import random import os import tempfile from math import inf, nan from torch._inductor.hooks import run_intermediate_hooks from torch._inductor.utils import maybe_profile from torch._inductor.codegen.memory_planning import _alig...
import torch from torch._inductor.select_algorithm import extern_kernels import triton import triton.language as tl from torch._inductor.runtime.triton_heuristics import grid from torch._C import _cuda_getCurrentRawStream as get_raw_stream from torch._inductor.runtime import triton_helpers import torch.nn as nn from to...
asmekal/catalyst
ConvRelu
false
12,122
[ "MIT" ]
0
e11365c0a9812649ceaef14e53061cd5117d8684
https://github.com/asmekal/catalyst/tree/e11365c0a9812649ceaef14e53061cd5117d8684
TVLoss
# AOT ID: ['0_inference'] from ctypes import c_void_p, c_long, c_int import torch import math import random import os import tempfile from math import inf, nan from torch._inductor.hooks import run_intermediate_hooks from torch._inductor.utils import maybe_profile from torch._inductor.codegen.memory_planning import _al...
import torch import triton import triton.language as tl from torch._inductor.runtime.triton_heuristics import grid from torch._C import _cuda_getCurrentRawStream as get_raw_stream from torch._inductor.runtime.triton_helpers import math as tl_math import torch.nn as nn assert_size_stride = torch._C._dynamo.guards.assert...
myeldib/Simple-SR
TVLoss
false
12,808
[ "MIT" ]
0
583456b1f231574d9e0b45c29266cf41603d161d
https://github.com/myeldib/Simple-SR/tree/583456b1f231574d9e0b45c29266cf41603d161d
CBAM_Module
import torch from typing import * import torch.nn as nn class CBAM_Module(nn.Module): def __init__(self, channels, reduction): super(CBAM_Module, self).__init__() self.avg_pool = nn.AdaptiveAvgPool2d(1) self.max_pool = nn.AdaptiveMaxPool2d(1) self.fc1 = nn.Conv2d(channels, channel...
import torch from torch._inductor.select_algorithm import extern_kernels import triton import triton.language as tl from torch._inductor.runtime.triton_heuristics import grid from torch._C import _cuda_getCurrentRawStream as get_raw_stream from torch._inductor.runtime import triton_helpers from typing import * import t...
artyompal/kaggle_quick_draw
CBAM_Module
false
3,136
[ "Apache-2.0" ]
0
227e228295479cd5e1af8dcde773f5efdacd62b8
https://github.com/artyompal/kaggle_quick_draw/tree/227e228295479cd5e1af8dcde773f5efdacd62b8
Embedding
import torch import numpy as np import torch as t import torch.nn as nn import torch.utils.data class Embedding(nn.Module): """ Redefining torch.nn.Embedding (see docs for that function) """ def __init__(self, num_embeddings, embedding_dim, padding_idx=None, _weight=None): super().__i...
import torch import triton import triton.language as tl from torch._inductor.runtime.triton_heuristics import grid from torch._C import _cuda_getCurrentRawStream as get_raw_stream import numpy as np import torch as t import torch.nn as nn import torch.utils.data assert_size_stride = torch._C._dynamo.guards.assert_size_...
arjunsesh/lrr-neurips
Embedding
false
6,232
[ "MIT" ]
1
d78106daec1e729b02a0452f74a37bf004ed243c
https://github.com/arjunsesh/lrr-neurips/tree/d78106daec1e729b02a0452f74a37bf004ed243c
length_evolution
# AOT ID: ['0_inference'] from ctypes import c_void_p, c_long, c_int import torch import math import random import os import tempfile from math import inf, nan from torch._inductor.hooks import run_intermediate_hooks from torch._inductor.utils import maybe_profile from torch._inductor.codegen.memory_planning import _al...
import torch import triton import triton.language as tl from torch._inductor.runtime.triton_heuristics import grid from torch._C import _cuda_getCurrentRawStream as get_raw_stream from torch._inductor.runtime.triton_helpers import math as tl_math import torch.nn as nn assert_size_stride = torch._C._dynamo.guards.assert...
LiWentomng/boxlevelset
length_evolution
false
8,461
[ "Apache-2.0" ]
25
8cc40bf6ae4a343c482c676c72259cc12c29d31c
https://github.com/LiWentomng/boxlevelset/tree/8cc40bf6ae4a343c482c676c72259cc12c29d31c
ConvTran
# 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....
RicCu/NeuralStyle
ConvTran
false
5,767
[ "MIT" ]
1
97dc6aec6b2072a9a187276e047aea885566e1be
https://github.com/RicCu/NeuralStyle/tree/97dc6aec6b2072a9a187276e047aea885566e1be
FasterBlock
# 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_...
becauseofAI/DemoHub
FasterBlock
false
3,202
[ "Apache-2.0" ]
0
2b7fdd1f1c6f229ba326e8c1b78c4e7f5982f3da
https://github.com/becauseofAI/DemoHub/tree/2b7fdd1f1c6f229ba326e8c1b78c4e7f5982f3da
ResARModule
import torch import torch.nn as nn import torch.nn.functional as F from torch.nn.utils.spectral_norm import spectral_norm def build_norm_layer(norm_type, param=None, num_feats=None): if norm_type == 'bnorm': return nn.BatchNorm1d(num_feats) elif norm_type == 'snorm': spectral_norm(param) ...
import torch from torch._inductor.select_algorithm import extern_kernels import triton import triton.language as tl from torch._inductor.runtime.triton_heuristics import grid from torch._C import _cuda_getCurrentRawStream as get_raw_stream import torch.nn as nn from torch.nn.utils.spectral_norm import spectral_norm ass...
BaiYuhaoSpiceeYJ/SEGAN_denoise
ResARModule
false
2,025
[ "MIT" ]
0
5bf65ae72b9f0a996ae338c53c68c4967e08cd59
https://github.com/BaiYuhaoSpiceeYJ/SEGAN_denoise/tree/5bf65ae72b9f0a996ae338c53c68c4967e08cd59
GaussianFocalLoss
import functools import torch import torch.nn.functional as F import torch.nn as nn 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...
Guoning-Chen/mmdetection
GaussianFocalLoss
false
503
[ "Apache-2.0" ]
0
f1d1c5a19dbe6aa2e74fc9ca2e9578db4532fc64
https://github.com/Guoning-Chen/mmdetection/tree/f1d1c5a19dbe6aa2e74fc9ca2e9578db4532fc64
KL_loss_softmax
# 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...
BruceW91/CVSE
KL_loss_softmax
false
13,414
[ "MIT" ]
152
20fa1ff50d1dcb4a7b3799071fa78038e52db804
https://github.com/BruceW91/CVSE/tree/20fa1ff50d1dcb4a7b3799071fa78038e52db804
NTXent
import torch import numpy as np import torch.nn as nn import torch.nn.functional as F class NTXent(nn.Module): """ Contrastive loss with distributed data parallel support code: https://github.com/AndrewAtanov/simclr-pytorch/blob/master/models/losses.py """ LARGE_NUMBER = 1000000000.0 def __in...
import torch from torch._inductor.select_algorithm import extern_kernels import triton import triton.language as tl from torch._inductor.runtime.triton_heuristics import grid from torch._C import _cuda_getCurrentRawStream as get_raw_stream from torch._inductor.runtime import triton_helpers from torch._inductor.runtime....
salesforce/CoSeRec
NTXent
false
10,765
[ "BSD-3-Clause" ]
0
c0bf5e5c3a5fd645efd3d6cdb9ff6a98d1c477ef
https://github.com/salesforce/CoSeRec/tree/c0bf5e5c3a5fd645efd3d6cdb9ff6a98d1c477ef
Upsample
# 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...
AkioHayakawa/SDEdit
Upsample
false
1,938
[ "MIT" ]
0
54d793bc013ea99ae81c539bc559254fa8746e19
https://github.com/AkioHayakawa/SDEdit/tree/54d793bc013ea99ae81c539bc559254fa8746e19
DepthwiseSeparableConv2d
import torch import torch.nn as nn import torch.optim.lr_scheduler import torch.utils.data from torchvision.transforms import * class DepthwiseSeparableConv2d(nn.Module): def __init__(self, input, output, padding=0, bias=False): super(DepthwiseSeparableConv2d, self).__init__() self.depthwise = nn...
import torch from torch._inductor.select_algorithm import extern_kernels import triton import triton.language as tl from torch._inductor.runtime.triton_heuristics import grid from torch._C import _cuda_getCurrentRawStream as get_raw_stream import torch.nn as nn import torch.optim.lr_scheduler import torch.utils.data fr...
csharpshooter/DeepLearning
DepthwiseSeparableConv2d
false
1,775
[ "MIT" ]
0
c1d20660c32076468970f7376931e1fcd0d2644e
https://github.com/csharpshooter/DeepLearning/tree/c1d20660c32076468970f7376931e1fcd0d2644e
OuterProductLayer
import torch import torch.nn as nn class OuterProductLayer(nn.Module): """OutterProduct Layer used in PNN. This implemention is adapted from code that the author of the paper published on https://github.com/Atomu2014/product-nets. """ def __init__(self, num_feature_field, embedding_size, 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...
BELIEVEfxy/LightSANs
OuterProductLayer
false
7,773
[ "MIT" ]
17
94ce7e59d144dbc787153b8c486cad334790ec6e
https://github.com/BELIEVEfxy/LightSANs/tree/94ce7e59d144dbc787153b8c486cad334790ec6e
RefineModelReLU
import torch import torch.nn as nn class RefineModelReLU(torch.nn.Module): def __init__(self, in_channels): super(RefineModelReLU, self).__init__() self.layer1 = nn.Linear(in_channels, 128) self.relu1 = nn.ReLU() self.layer2 = nn.Linear(128, 64) self.relu2 = 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 import torch.nn as nn assert_...
BoyuanChen/neural-state-variables
RefineModelReLU
false
7,854
[ "MIT" ]
17
10483d93ac8c006f3786c434fb57d70d9ab465ec
https://github.com/BoyuanChen/neural-state-variables/tree/10483d93ac8c006f3786c434fb57d70d9ab465ec
AttNLocalNew
# 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 @triton.jit def triton_poi_fused_index_put_lift_fres...
napoler/tkit-attnlocal-pytorch
AttNLocalNew
false
4,044
[ "Apache-2.0" ]
0
ec1c32cb49635824f978b3ec19b4c80505ea735b
https://github.com/napoler/tkit-attnlocal-pytorch/tree/ec1c32cb49635824f978b3ec19b4c80505ea735b
InstanceNormalization
# AOT ID: ['0_forward'] from ctypes import c_void_p, c_long, c_int import torch import math import random import os import tempfile from math import inf, nan from torch._inductor.hooks import run_intermediate_hooks from torch._inductor.utils import maybe_profile from torch._inductor.codegen.memory_planning import _alig...
import torch import triton import triton.language as tl from torch._inductor.runtime.triton_heuristics import grid from torch._C import _cuda_getCurrentRawStream as get_raw_stream from torch._inductor.runtime.triton_helpers import libdevice import torch.nn as nn assert_size_stride = torch._C._dynamo.guards.assert_size_...
ImageProcessingCentraleLille2021/fast-neural-style
InstanceNormalization
false
13,830
[ "MIT" ]
350
e77456c35c2a49f90227119d158828a0964c7e13
https://github.com/ImageProcessingCentraleLille2021/fast-neural-style/tree/e77456c35c2a49f90227119d158828a0964c7e13
FinalLayer
import torch import torch.nn as nn import torch.nn.functional as F class LayerNorm(nn.Module): def __init__(self, features, eps=1e-06): super(LayerNorm, self).__init__() self.gamma = nn.Parameter(torch.ones(features)) self.beta = nn.Parameter(torch.zeros(features)) self.eps = eps ...
import torch from torch._inductor.select_algorithm import extern_kernels import triton import triton.language as tl from 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 ...
ishine/RPN_KWS
FinalLayer
false
15,640
[ "MIT" ]
53
b54d4010a701a6ec0a9ddf3ab6177a4be6dd6af5
https://github.com/ishine/RPN_KWS/tree/b54d4010a701a6ec0a9ddf3ab6177a4be6dd6af5
CrossAttN_v8
import torch import torch.nn as nn import torch.nn.functional as Func class CrossAttN_v8(nn.Module): def __init__(self, in_planes, clip_dim): super(CrossAttN_v8, self).__init__() self.f = nn.Conv2d(in_planes, in_planes, 1, 1, 0) self.g = nn.Conv2d(in_planes, in_planes, 1, 1, 0) se...
import torch from torch._inductor.select_algorithm import extern_kernels import triton import triton.language as tl from torch._inductor.runtime.triton_heuristics import grid from torch._C import _cuda_getCurrentRawStream as get_raw_stream from torch._inductor.runtime import triton_helpers from torch._inductor.runtime....
Holmes-Alan/TxST
CrossAttN_v8
false
9,237
[ "MIT" ]
0
c5b59a12bbb9e62244c3b608581d5cb9606525e0
https://github.com/Holmes-Alan/TxST/tree/c5b59a12bbb9e62244c3b608581d5cb9606525e0
GRUCell
import torch import numpy as np import torch.nn.functional as F from torch import nn 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 ...
YilliaJing/PM2.5-GNN
GRUCell
false
14,692
[ "MIT" ]
91
7aacc6b6b9562ad2a9dad6197e6c4d73607ebdf2
https://github.com/YilliaJing/PM2.5-GNN/tree/7aacc6b6b9562ad2a9dad6197e6c4d73607ebdf2
DiceLoss
import torch import torch.nn as nn import torch.utils.data def flatten_samples(input_): """ Flattens a tensor or a variable such that the channel axis is first and the sample axis is second. The shapes are transformed as follows: (N, C, H, W) --> (C, N * H * W) (N, C, D, H, W) --> (C, N * ...
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...
JoOkuma/torch-em
DiceLoss
false
664
[ "MIT" ]
0
68b723683f9013723a0e4fc8cfef1d6a2a9c9dff
https://github.com/JoOkuma/torch-em/tree/68b723683f9013723a0e4fc8cfef1d6a2a9c9dff
FocalFrequencyLoss
# 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.utils.data assert_size_stride = torch._C._dynamo.guards.assert_size_stride empty_strided_cuda = torch._C....
EndlessSora/focal-frequency-loss
FocalFrequencyLoss
false
13,645
[ "MIT" ]
364
dcaa01ecbfbbd9d8f83f7e5993474e1aa087227c
https://github.com/EndlessSora/focal-frequency-loss/tree/dcaa01ecbfbbd9d8f83f7e5993474e1aa087227c
EqualConvTranspose2d
import math import torch import torch.nn.functional as F from torch import nn class EqualConvTranspose2d(nn.Module): def __init__(self, in_channel, out_channel, kernel_size, stride=1, padding=0, bias=True): super().__init__() self.weight = nn.Parameter(torch.randn(in_channel, out_channel,...
import torch from torch._inductor.select_algorithm import extern_kernels import triton import triton.language as tl from torch._inductor.runtime.triton_heuristics import grid from torch._C import _cuda_getCurrentRawStream as get_raw_stream import math from torch import nn assert_size_stride = torch._C._dynamo.guards.as...
xh-liu-tech/CIPS-3D
EqualConvTranspose2d
false
11,108
[ "MIT" ]
0
8910dfcf19bb86aab2287d652ae4e3666806b511
https://github.com/xh-liu-tech/CIPS-3D/tree/8910dfcf19bb86aab2287d652ae4e3666806b511
FilterResponseNormNd
# AOT ID: ['0_forward'] from ctypes import c_void_p, c_long, c_int import torch import math import random import os import tempfile from math import inf, nan from torch._inductor.hooks import run_intermediate_hooks from torch._inductor.utils import maybe_profile from torch._inductor.codegen.memory_planning import _alig...
import torch import triton import triton.language as tl from torch._inductor.runtime.triton_heuristics import grid from torch._C import _cuda_getCurrentRawStream as get_raw_stream from torch._inductor.runtime import triton_helpers from torch._inductor.runtime.triton_helpers import libdevice, math as tl_math import torc...
aouedions11/SSFL-Benchmarking-Semi-supervised-Federated-Learning
FilterResponseNormNd
false
6,234
[ "MIT" ]
1
78aec81919bf95ed4677d0e0a4ebbbe3be455742
https://github.com/aouedions11/SSFL-Benchmarking-Semi-supervised-Federated-Learning/tree/78aec81919bf95ed4677d0e0a4ebbbe3be455742
SpatialGatingUnit
# 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 ...
nima1999nikkhah/gMLP
SpatialGatingUnit
false
12,833
[ "MIT" ]
0
6e04a173bdb137680695fe55753d8b2284f03fa4
https://github.com/nima1999nikkhah/gMLP/tree/6e04a173bdb137680695fe55753d8b2284f03fa4
SE
# 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...
mengzhu0308/EfficientNetV2-PyTorch
SE
false
12,777
[ "Apache-2.0" ]
0
b9946a4372849d9231a044dcbf697ae17008b467
https://github.com/mengzhu0308/EfficientNetV2-PyTorch/tree/b9946a4372849d9231a044dcbf697ae17008b467
DenseNet2D_up_block_concat
# 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...
ArmandB/RITnet
DenseNet2D_up_block_concat
false
91
[ "MIT" ]
0
afe9524fdd795982c7e52761da68af2dfda589ea
https://github.com/ArmandB/RITnet/tree/afe9524fdd795982c7e52761da68af2dfda589ea
EncoderImagePrecomp
import torch import numpy as np from collections import OrderedDict import torch.nn as nn import torch.nn.init def l2norm(x, dim=-1): return x / x.norm(2, dim=dim, keepdim=True).clamp(min=1e-06) class EncoderImagePrecomp(nn.Module): """ image encoder """ def __init__(self, img_dim, embed_size, no_imgno...
import torch from torch._inductor.select_algorithm import extern_kernels import triton import triton.language as tl from 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....
davidatbu/MLVGSNL
EncoderImagePrecomp
false
15,131
[ "MIT" ]
97
88d42424a0a7badb43e22cd3950948c9522faaa1
https://github.com/davidatbu/MLVGSNL/tree/88d42424a0a7badb43e22cd3950948c9522faaa1
_BoundaryRefineModule
import torch from torch import nn class _BoundaryRefineModule(nn.Module): def __init__(self, dim): super(_BoundaryRefineModule, self).__init__() self.relu = nn.ReLU(inplace=True) self.conv1 = nn.Conv2d(dim, dim, kernel_size=3, padding=1) self.conv2 = nn.Conv2d(dim, dim, kernel_siz...
import torch from torch._inductor.select_algorithm import extern_kernels import triton import triton.language as tl from 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...
adynathos/pytorch-semantic-segmentation
_BoundaryRefineModule
false
9,930
[ "MIT" ]
0
44d1784984cfd0926821c3fdbc20d371bb074296
https://github.com/adynathos/pytorch-semantic-segmentation/tree/44d1784984cfd0926821c3fdbc20d371bb074296
Loss
import torch import torch.nn as nn class Loss(nn.Module): def __init__(self): super(Loss, self).__init__() self.BCELoss = nn.BCELoss(reduce=True, size_average=True) def forward(self, predict_y, input_y): loss = self.BCELoss(predict_y, input_y) return loss def get_inputs(): ...
import torch import triton import triton.language as tl from torch._inductor.runtime.triton_heuristics import grid from torch._C import _cuda_getCurrentRawStream as get_raw_stream from torch._inductor.runtime import triton_helpers from torch._inductor.runtime.triton_helpers import libdevice, math as tl_math import torc...
RandolphVI/HyperNet
Loss
false
5,762
[ "Apache-2.0" ]
1
e9f376f5eb087e57360ca41cca2533c3ca967e47
https://github.com/RandolphVI/HyperNet/tree/e9f376f5eb087e57360ca41cca2533c3ca967e47
TargetContextGate
import torch import torch.nn as nn import torch.cuda import torch.distributed class ContextGate(nn.Module): """ Context gate is a decoder module that takes as input the previous word embedding, the current decoder state and the attention state, and produces a gate. The gate can be used to select t...
import torch from torch._inductor.select_algorithm import extern_kernels import triton import triton.language as tl from torch._inductor.runtime.triton_heuristics import grid from torch._C import _cuda_getCurrentRawStream as get_raw_stream from torch._inductor.runtime.triton_helpers import libdevice import torch.nn as ...
ESCM-summarization/ESCM-summary-evaluation
TargetContextGate
false
9,119
[ "MIT" ]
0
3780b51f0ed44cbbea3f163a871d875f1e5e9393
https://github.com/ESCM-summarization/ESCM-summary-evaluation/tree/3780b51f0ed44cbbea3f163a871d875f1e5e9393
TransformerEncoderLayer
from torch.nn import Module import torch import torch.nn as nn import torch.nn.functional as F from torch.nn import Linear from torch.nn import Dropout from torch.nn import LayerNorm from torch.nn import Identity def drop_path(x, drop_prob: 'float'=0.0, training: 'bool'=False): """ Obtained from: github.com:r...
import torch from torch._inductor.select_algorithm import extern_kernels import triton import triton.language as tl from 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....
iliasprc/Compact-Transformers
TransformerEncoderLayer
false
3,685
[ "Apache-2.0" ]
0
31975a0b4469854dfb0e0cbcedd8f0698cf84a7e
https://github.com/iliasprc/Compact-Transformers/tree/31975a0b4469854dfb0e0cbcedd8f0698cf84a7e
TVLoss
import torch class TVLoss(torch.nn.Module): def __init__(self): super(TVLoss, self).__init__() def forward(self, x): x.size()[0] h_x = x.size()[2] w_x = x.size()[3] self._tensor_size(x[:, :, 1:, :]) self._tensor_size(x[:, :, :, 1:]) h_tv = torch.pow(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 assert_size_stride = torch._C._dynamo.guards.assert_size_stride empty_strided_cuda = torch._C._dynamo.guards._empty_strided_cuda @triton.j...
Holmes-Alan/Photo2Sketch
TVLoss
false
530
[ "MIT" ]
0
43a0ca6bb8a8e645b35a2ab23d11ed5efe117e09
https://github.com/Holmes-Alan/Photo2Sketch/tree/43a0ca6bb8a8e645b35a2ab23d11ed5efe117e09
MinimalRNNCell
import torch from torch import nn from functools import partial def get_initializer(name, activation): if activation in ['id', 'identity', 'linear', 'modrelu']: nonlinearity = 'linear' elif activation in ['relu', 'tanh', 'sigmoid']: nonlinearity = activation else: assert False, f'g...
import torch from torch._inductor.select_algorithm import extern_kernels import triton import triton.language 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...
tarepan/HiPPO
MinimalRNNCell
false
16,539
[ "Apache-2.0" ]
57
bc23e2dba13da6c307cb5a4ae248c2d2c56d465f
https://github.com/tarepan/HiPPO/tree/bc23e2dba13da6c307cb5a4ae248c2d2c56d465f
SoftCrossEntropyLoss2d
import torch import torch.utils.data.distributed import torch import torch.nn as nn from numpy import int64 as int64 from torchvision.transforms import functional as F import torch.nn.functional as F import torch.utils class SoftCrossEntropyLoss2d(nn.Module): def __init__(self): super(SoftCrossEntropyLos...
import torch from torch._inductor.select_algorithm import extern_kernels import triton import triton.language as tl from 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....
HRTNet/HRTNet
SoftCrossEntropyLoss2d
false
898
[ "MIT" ]
0
6a51c9c34568988ea6125a1638794c63d8fadbea
https://github.com/HRTNet/HRTNet/tree/6a51c9c34568988ea6125a1638794c63d8fadbea
ConvSig
# AOT ID: ['0_forward'] from ctypes import c_void_p, c_long, c_int import torch import math import random import os import tempfile from math import inf, nan from torch._inductor.hooks import run_intermediate_hooks from torch._inductor.utils import maybe_profile from torch._inductor.codegen.memory_planning import _alig...
import torch from torch._inductor.select_algorithm import extern_kernels import triton import triton.language as tl from torch._inductor.runtime.triton_heuristics import grid from torch._C import _cuda_getCurrentRawStream as get_raw_stream import math import torch.nn.functional as F from torch.nn import Conv2d from tor...
fish258/MonoRec
ConvSig
false
15,366
[ "MIT" ]
388
c0612d2710802004cdd83205e63d0582de543c41
https://github.com/fish258/MonoRec/tree/c0612d2710802004cdd83205e63d0582de543c41
weightedFeatureFusion
# 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...
Nigel233/Different-Backbones-for-YOLO-v3
weightedFeatureFusion
false
9,360
[ "MIT" ]
0
030e7860e966b079afc9b53a320a41f3eb7950be
https://github.com/Nigel233/Different-Backbones-for-YOLO-v3/tree/030e7860e966b079afc9b53a320a41f3eb7950be
LogCoshLoss
import torch def apply_reduction(losses, reduction='none'): """Apply reduction to collection of losses.""" if reduction == 'mean': losses = losses.mean() elif reduction == 'sum': losses = losses.sum() return losses class LogCoshLoss(torch.nn.Module): """Log-cosh loss function mod...
import torch import triton import triton.language as tl from torch._inductor.runtime.triton_heuristics import grid from torch._C import _cuda_getCurrentRawStream as get_raw_stream from torch._inductor.runtime.triton_helpers import libdevice, math as tl_math assert_size_stride = torch._C._dynamo.guards.assert_size_strid...
leoauri/auraloss
LogCoshLoss
false
15,904
[ "Apache-2.0" ]
272
0e3362674ae1b53aa61c6a631fb4e6970c5683c1
https://github.com/leoauri/auraloss/tree/0e3362674ae1b53aa61c6a631fb4e6970c5683c1
AngularLoss
# 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...
donikv/rgn_pytorch
AngularLoss
false
1,863
[ "MIT" ]
0
95f8cd36fec5655f9bfd8634fff89b06e81dc2ed
https://github.com/donikv/rgn_pytorch/tree/95f8cd36fec5655f9bfd8634fff89b06e81dc2ed
CPAMDec
from torch.nn import Module import torch from torchvision.datasets import * from torch.nn import Parameter from torch.nn import Conv2d from torch.nn import Linear from torch.nn import Softmax from torchvision.transforms import * class CPAMDec(Module): """ CPAM decoding module """ def __init__(self, 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....
tousifulhaque/DANet
CPAMDec
false
4,460
[ "MIT" ]
0
1a0c91f0e551a071b5e335b4157313780a8a1b1a
https://github.com/tousifulhaque/DANet/tree/1a0c91f0e551a071b5e335b4157313780a8a1b1a
CharbonnierLoss
# AOT ID: ['0_inference'] from ctypes import c_void_p, c_long, c_int import torch import math import random import os import tempfile from math import inf, nan from torch._inductor.hooks import run_intermediate_hooks from torch._inductor.utils import maybe_profile from torch._inductor.codegen.memory_planning import _al...
import torch import triton import triton.language as tl from torch._inductor.runtime.triton_heuristics import grid from torch._C import _cuda_getCurrentRawStream as get_raw_stream from torch._inductor.runtime import triton_helpers from torch._inductor.runtime.triton_helpers import libdevice import torch.utils.data impo...
EvgeneyZ/TMNet
CharbonnierLoss
false
13,649
[ "Apache-2.0" ]
90
8a42754747c2fa575e9108c13b5018a884f46099
https://github.com/EvgeneyZ/TMNet/tree/8a42754747c2fa575e9108c13b5018a884f46099
DiscreteNet
import torch import torch.nn as nn import torch.nn.functional as F def set_init(layers): for layer in layers: nn.init.normal_(layer.weight, mean=0.0, std=0.1) nn.init.constant_(layer.bias, 0.0) class DiscreteNet(nn.Module): def __init__(self, s_dim, a_dim): super(DiscreteNet, self)....
import torch from torch._inductor.select_algorithm import extern_kernels import triton import triton.language as tl from torch._inductor.runtime.triton_heuristics import grid from torch._C import _cuda_getCurrentRawStream as get_raw_stream from torch._inductor.runtime import triton_helpers import torch.nn as nn import ...
lws803/pytorch-A3C
DiscreteNet
false
10,458
[ "MIT" ]
0
944e7f42a8fa54b7d6efbe169d8a3467b20a0f7f
https://github.com/lws803/pytorch-A3C/tree/944e7f42a8fa54b7d6efbe169d8a3467b20a0f7f
RAddInt
# AOT ID: ['0_inference'] from ctypes import c_void_p, c_long, c_int import torch import math import random import os import tempfile from math import inf, nan from torch._inductor.hooks import run_intermediate_hooks from torch._inductor.utils import maybe_profile from torch._inductor.codegen.memory_planning import _al...
import torch import triton import triton.language as tl from torch._inductor.runtime.triton_heuristics import grid from torch._C import _cuda_getCurrentRawStream as get_raw_stream assert_size_stride = torch._C._dynamo.guards.assert_size_stride empty_strided_cuda = torch._C._dynamo.guards._empty_strided_cuda @triton.j...
NVIDIA-AI-IOT-private/torch2trt
RAddInt
false
10,543
[ "MIT" ]
0
953d60039e0c81e90eea467c3df2e6e3f7040242
https://github.com/NVIDIA-AI-IOT-private/torch2trt/tree/953d60039e0c81e90eea467c3df2e6e3f7040242
FinalPool
# AOT ID: ['0_inference'] from ctypes import c_void_p, c_long, c_int import torch import math import random import os import tempfile from math import inf, nan from torch._inductor.hooks import run_intermediate_hooks from torch._inductor.utils import maybe_profile from torch._inductor.codegen.memory_planning import _al...
import torch import triton import triton.language as tl from torch._inductor.runtime.triton_heuristics import grid from torch._C import _cuda_getCurrentRawStream as get_raw_stream from torch._inductor.runtime import triton_helpers import torch.utils.data assert_size_stride = torch._C._dynamo.guards.assert_size_stride e...
CoraJung/flexible-input-slu
FinalPool
false
17,146
[ "Apache-2.0" ]
7
6a1a6bf105f1a0c07e8d483aa6da1df7a554392d
https://github.com/CoraJung/flexible-input-slu/tree/6a1a6bf105f1a0c07e8d483aa6da1df7a554392d
BertPredictionTransform
import math import torch import torch.nn as nn import torch.cuda import torch.distributed def get_activation_fn(activation): """Return an activation function Module according to its name.""" if activation == 'gelu': fn = GELU() elif activation == 'relu': fn = nn.ReLU() elif activation ...
import torch from torch._inductor.select_algorithm import extern_kernels import triton import triton.language 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 ...
SivilTaram/dialogue-utterance-rewriter-pytorch
BertPredictionTransform
false
2,918
[ "MIT" ]
0
92c2254958b7a1ee9199836f7f2236575270983f
https://github.com/SivilTaram/dialogue-utterance-rewriter-pytorch/tree/92c2254958b7a1ee9199836f7f2236575270983f
DistillLoss
# 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...
qinjian623/pytorch_toys
DistillLoss
false
16,304
[ "MIT" ]
56
7f4761bddc65282ea31a2d0f9eb146772276dd7c
https://github.com/qinjian623/pytorch_toys/tree/7f4761bddc65282ea31a2d0f9eb146772276dd7c
ResampleNorm
# 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.functional as F import torch.nn as nn import torch.functional a...
GoldbergData/pytorch-forecasting
ResampleNorm
false
2,333
[ "MIT" ]
0
e2ef3794da5d996c9740d932a4f55269bb4003f2
https://github.com/GoldbergData/pytorch-forecasting/tree/e2ef3794da5d996c9740d932a4f55269bb4003f2
HandTypeLoss
# 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...
DuinoDu/InterHand2.6M.pl
HandTypeLoss
false
5,093
[ "MIT" ]
1
2d216960cf95b066a197a9b49795840b1ecfd0c1
https://github.com/DuinoDu/InterHand2.6M.pl/tree/2d216960cf95b066a197a9b49795840b1ecfd0c1
My_loss_offset
# 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 ...
H-Liu1997/Pytorch_Pose_Estimation_Framework
My_loss_offset
false
5,249
[ "MIT" ]
1
06616b3459ff639f8486e6ea4f93922597788b2a
https://github.com/H-Liu1997/Pytorch_Pose_Estimation_Framework/tree/06616b3459ff639f8486e6ea4f93922597788b2a
F_fully_convolutional
import torch import torch.nn as nn import torch.nn.functional as F class F_fully_convolutional(nn.Module): def __init__(self, in_channels, out_channels, internal_size=256, kernel_size=3, leaky_slope=0.02): super().__init__() pad = kernel_size // 2 self.leaky_slope = leaky_slope ...
import torch from torch._inductor.select_algorithm import extern_kernels import 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...
Xenovortex/INN_Embedding_Classification
F_fully_convolutional
false
1,266
[ "MIT" ]
0
df31ec3dcf70780cae5140a69ffafdd64f218e5f
https://github.com/Xenovortex/INN_Embedding_Classification/tree/df31ec3dcf70780cae5140a69ffafdd64f218e5f
BottleneckLSTMCell
# 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 logging import torch.n...
alejodosr/adaptive-inattention
BottleneckLSTMCell
false
6,172
[ "MIT" ]
1
ad1c883081e5248704be5ce5c4baa24b2eda1c59
https://github.com/alejodosr/adaptive-inattention/tree/ad1c883081e5248704be5ce5c4baa24b2eda1c59
CA
# 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....
sithu31296/image_classification
CA
false
16,482
[ "MIT" ]
57
6b8cbce96100225621cee3166a73e852ba216cc3
https://github.com/sithu31296/image_classification/tree/6b8cbce96100225621cee3166a73e852ba216cc3
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....
pandeydeep9/Attentive-Neural-Process
Attention
false
12,872
[ "Apache-2.0" ]
0
7bbdc46d51ab0c891067e508d00a029c07d04802
https://github.com/pandeydeep9/Attentive-Neural-Process/tree/7bbdc46d51ab0c891067e508d00a029c07d04802
SilogLoss
import torch import torch.nn as nn class SilogLoss(nn.Module): def __init__(self, ratio=10, ratio2=0.85): super().__init__() self.ratio = ratio self.ratio2 = ratio2 def forward(self, pred, gt): log_diff = torch.log(pred * self.ratio) - torch.log(gt * self.ratio) silog...
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...
aycatakmaz/packnet-sfm
SilogLoss
false
12,130
[ "MIT" ]
0
d89cae81290133f136f6a1d1e288affc67eed1f7
https://github.com/aycatakmaz/packnet-sfm/tree/d89cae81290133f136f6a1d1e288affc67eed1f7
BertAttention
# 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....
mcao516/SSKD-TinyBERT
BertAttention
false
12,783
[ "Apache-2.0" ]
0
d862002e03df5cb54a80657e41a77f1b6f7732d9
https://github.com/mcao516/SSKD-TinyBERT/tree/d862002e03df5cb54a80657e41a77f1b6f7732d9
L2Normalization
# 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_...
Jiangtong-Li/ZHSIR
L2Normalization
false
17,502
[ "Apache-2.0" ]
8
fd2c0a7e79f22cbf565ccd5e13342f1b317ac9b7
https://github.com/Jiangtong-Li/ZHSIR/tree/fd2c0a7e79f22cbf565ccd5e13342f1b317ac9b7
CoxPHLossSorted
# 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 Tens...
rohanshad/pycox
CoxPHLossSorted
false
16,334
[ "BSD-2-Clause" ]
449
5483489d21f3441e53f78f9f8898ce607f41c632
https://github.com/rohanshad/pycox/tree/5483489d21f3441e53f78f9f8898ce607f41c632
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 import triton_helpers from torch._inductor.runtime.triton_helpers import libdevice import torch.nn as nn assert...
CVHj/torchcv
L2Norm
false
13,447
[ "MIT" ]
433
6291f3e1e4bbf6467fd6b1e79001d34a59481bb6
https://github.com/CVHj/torchcv/tree/6291f3e1e4bbf6467fd6b1e79001d34a59481bb6
Net
import torch import torch.nn as tnn class Net(tnn.Module): def __init__(self): super(Net, self).__init__() self.conv1 = tnn.Conv2d(3, 6, 5) self.pool = tnn.MaxPool2d(2, 2) self.conv2 = tnn.Conv2d(6, 16, 5) self.fc1 = tnn.Linear(16 * 5 * 5, 120) self.fc2 = tnn.Linea...
import torch from torch._inductor.select_algorithm import extern_kernels import triton import triton.language as tl from 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 tnn assert...
Jittor/Jittor
Net
false
17,504
[ "Apache-2.0" ]
4
bc945bae94bded917214b0afe12be6bf5b919dbe
https://github.com/Jittor/Jittor/tree/bc945bae94bded917214b0afe12be6bf5b919dbe
TVLoss
# AOT ID: ['0_inference'] from ctypes import c_void_p, c_long, c_int import torch import math import random import os import tempfile from math import inf, nan from torch._inductor.hooks import run_intermediate_hooks from torch._inductor.utils import maybe_profile from torch._inductor.codegen.memory_planning import _al...
import torch import triton import triton.language as tl from torch._inductor.runtime.triton_heuristics import grid from torch._C import _cuda_getCurrentRawStream as get_raw_stream from torch._inductor.runtime import triton_helpers import torch.nn as nn assert_size_stride = torch._C._dynamo.guards.assert_size_stride emp...
jokingbear/DM
TVLoss
false
6,984
[ "MIT" ]
1
9c4dada1756f3d866455a397511d4f3bacfadc60
https://github.com/jokingbear/DM/tree/9c4dada1756f3d866455a397511d4f3bacfadc60
Norm
import torch import torch.nn as nn class Norm(nn.Module): def __init__(self, d_model, eps=1e-06): super().__init__() self.size = d_model self.alpha = nn.Parameter(torch.ones(self.size)) self.bias = nn.Parameter(torch.zeros(self.size)) self.eps = eps 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.triton_helpers import libdevice import torch.nn as nn assert_size_stride = torch._C._dynamo.guards.assert_size_...
msank00/miniTransformer
Norm
false
12,802
[ "MIT" ]
0
a264f30982d9e2dbf8c796d495f7a237c0dd53ef
https://github.com/msank00/miniTransformer/tree/a264f30982d9e2dbf8c796d495f7a237c0dd53ef
Critic
import torch import torch.nn as nn import torch.nn.functional as F class Critic(nn.Module): def __init__(self, state_dim, action_dim): super(Critic, self).__init__() self.l1 = nn.Linear(state_dim + action_dim, 1024) self.l2 = nn.Linear(1024, 512) self.l3 = nn.Linear(512, 256) ...
import torch from torch._inductor.select_algorithm import extern_kernels import triton import triton.language as tl from 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 ...
ctoto93/TD3
Critic
false
9,962
[ "MIT" ]
0
88482b9f1fb4441d74426ece60d5da13414aeb77
https://github.com/ctoto93/TD3/tree/88482b9f1fb4441d74426ece60d5da13414aeb77
ISAB
import math import torch import torch.nn.functional as F import torch.nn as nn class MAB(nn.Module): def __init__(self, dim_X, dim_Y, dim, num_heads=4, ln=False, p=None): super().__init__() self.num_heads = num_heads self.fc_q = nn.Linear(dim_X, dim) self.fc_k = nn.Linear(dim_Y, d...
import torch from torch._inductor.select_algorithm import extern_kernels import triton import triton.language as tl from torch._inductor.runtime.triton_heuristics import grid from torch._C import _cuda_getCurrentRawStream as get_raw_stream from torch._inductor.runtime import triton_helpers from torch._inductor.runtime....
OpenXAIProject/dac
ISAB
false
8,704
[ "MIT" ]
17
652776e21b56dcb68839363bb077d5c5ea28d81e
https://github.com/OpenXAIProject/dac/tree/652776e21b56dcb68839363bb077d5c5ea28d81e
ChannelwiseAttention
import torch import torch.nn as nn import torch.nn.functional as F class ChannelwiseAttention(nn.Module): def __init__(self, in_channels): super(ChannelwiseAttention, self).__init__() self.in_channels = in_channels self.linear_1 = nn.Linear(self.in_channels, self.in_channels // 4) ...
import torch from torch._inductor.select_algorithm import extern_kernels import triton import triton.language as tl from torch._inductor.runtime.triton_heuristics import grid from torch._C import _cuda_getCurrentRawStream as get_raw_stream from torch._inductor.runtime import triton_helpers import torch.nn as nn assert_...
farkoo/novel-seam-carving-method
ChannelwiseAttention
false
3,495
[ "MIT" ]
0
aa3e9a4e3d5e13872eed412444e5be519542f7e5
https://github.com/farkoo/novel-seam-carving-method/tree/aa3e9a4e3d5e13872eed412444e5be519542f7e5
MultiLevelPooling
# 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...
Asichurter/Few-Shot-Project
MultiLevelPooling
false
61
[ "MIT" ]
0
865cd6aa7b996c518dfa48dcc9ffad90445f9efe
https://github.com/Asichurter/Few-Shot-Project/tree/865cd6aa7b996c518dfa48dcc9ffad90445f9efe
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 import ...
jianzhnie/TsFormer
CNN
false
3,731
[ "Apache-2.0" ]
0
47e362f02445ba00d5ab8db206667767e72faca7
https://github.com/jianzhnie/TsFormer/tree/47e362f02445ba00d5ab8db206667767e72faca7
ContrastiveEmbeddingLoss
import torch import torch.nn as nn from torch.nn.modules.loss import * from torch.nn.modules import * from torch.optim import * from torch.optim.lr_scheduler import * import torch.distributed class ContrastiveEmbeddingLoss(nn.Module): """ Contrastive embedding loss paper: http://yann.lecun.com/exdb/publi...
import torch import triton import triton.language as tl from torch._inductor.runtime.triton_heuristics import grid from torch._C import _cuda_getCurrentRawStream as get_raw_stream from torch._inductor.runtime import triton_helpers from torch._inductor.runtime.triton_helpers import libdevice import torch.nn as nn from t...
asmekal/catalyst
ContrastiveEmbeddingLoss
false
12,123
[ "MIT" ]
0
e11365c0a9812649ceaef14e53061cd5117d8684
https://github.com/asmekal/catalyst/tree/e11365c0a9812649ceaef14e53061cd5117d8684
BertPredictionHead
from _paritybench_helpers import _mock_config import math import torch import torch.utils.data import torch.nn as nn import torch import torch.nn.parallel def gelu(x): """Implementation of the gelu activation function. For information: OpenAI GPT"s gelu is slightly different (and gives slightly different ...
import torch from torch._inductor.select_algorithm import extern_kernels import triton import triton.language as tl from 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....
adymaharana/VLCStoryGan
BertPredictionHead
false
18,257
[ "MIT" ]
10
74112404689e8144c2ed2d375e1e5a1cde09debb
https://github.com/adymaharana/VLCStoryGan/tree/74112404689e8144c2ed2d375e1e5a1cde09debb
ResidualBlock_noBN
# 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 ...
juyongjiang/Simple-SR
ResidualBlock_noBN
false
7,009
[ "MIT" ]
1
76820511abc04fbe6e4a79d23c67aee97406d563
https://github.com/juyongjiang/Simple-SR/tree/76820511abc04fbe6e4a79d23c67aee97406d563
SimpleNotModule
import torch import torch.jit import torch.onnx import torch.nn class SimpleNotModule(torch.nn.Module): def __init__(self): super(SimpleNotModule, self).__init__() def forward(self, a): b = torch.logical_not(a) return torch.logical_not(b) def get_inputs(): return [torch.rand([4...
import torch import triton import triton.language as tl from torch._inductor.runtime.triton_heuristics import grid from torch._C import _cuda_getCurrentRawStream as get_raw_stream import torch.jit import torch.onnx import torch.nn assert_size_stride = torch._C._dynamo.guards.assert_size_stride empty_strided_cuda = torc...
YaronBenAtar/glow
SimpleNotModule
false
14,657
[ "Apache-2.0" ]
2,838
a13706a4239fa7eaf059c670dc573e3eb0768f86
https://github.com/YaronBenAtar/glow/tree/a13706a4239fa7eaf059c670dc573e3eb0768f86
MinibatchStdDev
# 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 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
ReshapeF
# 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 =...
bomtorazek/contrastive-unpaired-translation
ReshapeF
false
12,210
[ "BSD-3-Clause" ]
0
07c048038375e1b9a4e464154b8dbc49f5e16ede
https://github.com/bomtorazek/contrastive-unpaired-translation/tree/07c048038375e1b9a4e464154b8dbc49f5e16ede
RNN
import torch import torch.nn as nn class RNN(nn.Module): def __init__(self, input_size, hidden_size, output_size): super(RNN, self).__init__() self.hidden_size = hidden_size self.i2h = nn.Linear(input_size + hidden_size, hidden_size) self.i2o = nn.Linear(input_size + hidden_size, ...
import torch from torch._inductor.select_algorithm import extern_kernels import triton import triton.language as tl from torch._inductor.runtime.triton_heuristics import grid from torch._C import _cuda_getCurrentRawStream as get_raw_stream from torch._inductor.runtime import triton_helpers from torch._inductor.runtime....
LatifB/char-level-classification
RNN
false
9,217
[ "MIT" ]
0
3d0e21e85571efafe0e26c6f27c5fa258a9503da
https://github.com/LatifB/char-level-classification/tree/3d0e21e85571efafe0e26c6f27c5fa258a9503da
ConvGLU
# AOT ID: ['0_forward'] from ctypes import c_void_p, c_long, c_int import torch import math import random import os import tempfile from math import inf, nan from torch._inductor.hooks import run_intermediate_hooks from torch._inductor.utils import maybe_profile from torch._inductor.codegen.memory_planning import _alig...
import torch from torch._inductor.select_algorithm import extern_kernels import triton import triton.language as tl from torch._inductor.runtime.triton_heuristics import grid from torch._C import _cuda_getCurrentRawStream as get_raw_stream from torch import nn import torch.utils.data import torch.cuda import torch.opti...
Malkovsky/NeMo
ConvGLU
false
2,608
[ "Apache-2.0" ]
0
8cf9aad8ecba36f1bd7b096cf274c2bc8ac695c3
https://github.com/Malkovsky/NeMo/tree/8cf9aad8ecba36f1bd7b096cf274c2bc8ac695c3
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...
DLWK/EANet
BCEDiceLoss
false
7,953
[ "MIT" ]
14
3680e099dd815117d4a54f928fb8247aa2f0b71a
https://github.com/DLWK/EANet/tree/3680e099dd815117d4a54f928fb8247aa2f0b71a
Network
# AOT ID: ['0_forward'] from ctypes import c_void_p, c_long, c_int import torch import math import random import os import tempfile from math import inf, nan from torch._inductor.hooks import run_intermediate_hooks from torch._inductor.utils import maybe_profile from torch._inductor.codegen.memory_planning import _alig...
import torch from torch._inductor.select_algorithm import extern_kernels import triton import triton.language as tl from torch._inductor.runtime.triton_heuristics import grid from torch._C import _cuda_getCurrentRawStream as get_raw_stream from torch._inductor.runtime import triton_helpers assert_size_stride = torch._C...
georgeyiasemis/Deep-Reinforcement-Learning-on-a-Grid-World-
Network
false
6,739
[ "MIT" ]
1
f32ceac5f4e29cba212d6fd1b8a25c08ac733666
https://github.com/georgeyiasemis/Deep-Reinforcement-Learning-on-a-Grid-World-/tree/f32ceac5f4e29cba212d6fd1b8a25c08ac733666