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
CoordConv
import torch import torch.nn as nn class AddCoords(nn.Module): def __init__(self, with_r=False): super().__init__() self.with_r = with_r def forward(self, input_tensor): """ Args: input_tensor: shape(batch, channel, x_dim, y_dim) """ batch_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 import torch.nn as nn assert_size_stride = torch._C._dynamo.guards.assert_size_s...
SeunghwanByun/Real-Time-Road-Detection-Network
CoordConv
false
1,054
[ "MIT" ]
0
bc46615adef0e2b1a9a03dd4951559ca5849e6e1
https://github.com/SeunghwanByun/Real-Time-Road-Detection-Network/tree/bc46615adef0e2b1a9a03dd4951559ca5849e6e1
DivLoss
import torch import torch.nn as nn import torch.utils.data class DivLoss(nn.Module): """Diversity loss, which is defined as negative of standard deviation. """ def __init__(self): super(DivLoss, self).__init__() def forward(self, lam): mu = lam.mean(0) std = ((lam - mu) ** 2)...
import torch import triton import triton.language as tl from torch._inductor.runtime.triton_heuristics import grid from torch._C import _cuda_getCurrentRawStream as get_raw_stream from torch._inductor.runtime import triton_helpers from torch._inductor.runtime.triton_helpers import libdevice import torch.nn as nn import...
XianyuanLiu/Transfer-Learning-Library
DivLoss
false
10,140
[ "MIT" ]
0
25f83f32437032df88ca6101ecd1f63ec7a0aa2c
https://github.com/XianyuanLiu/Transfer-Learning-Library/tree/25f83f32437032df88ca6101ecd1f63ec7a0aa2c
GroverAttention
# AOT ID: ['0_inference'] from ctypes import c_void_p, c_long, c_int import torch import math import random import os import tempfile from math import inf, nan from torch._inductor.hooks import run_intermediate_hooks from torch._inductor.utils import maybe_profile from torch._inductor.codegen.memory_planning import _al...
import torch from torch._inductor.select_algorithm import extern_kernels import triton import triton.language as tl from torch._inductor.runtime.triton_heuristics import grid from torch._C import _cuda_getCurrentRawStream as get_raw_stream from torch._inductor.runtime import triton_helpers from torch._inductor.runtime....
Changgun-Choi/huggingmolecules
GroverAttention
false
243
[ "Apache-2.0" ]
0
6d7c5e7d0acfd3d4725eb0deaeb0413dad9cfde8
https://github.com/Changgun-Choi/huggingmolecules/tree/6d7c5e7d0acfd3d4725eb0deaeb0413dad9cfde8
MultiHeadAttention
import math import torch import torch.nn as nn import torch.nn.functional as F def attention(q, k, v, d_k, mask=None, dropout=None): scores = torch.matmul(q, k.transpose(-2, -1)) / math.sqrt(d_k) if mask is not None: mask = mask.unsqueeze(1) scores = scores.masked_fill(mask == 0, -1000000000.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._inductor.runtime import triton_helpers from torch._inductor.runtime....
and-smith/Vac-Scholar-Curb-GAN
MultiHeadAttention
false
6,213
[ "MIT" ]
1
142bd70fdf0f1cbc4a1c20c5e58fa5b6a9dbe742
https://github.com/and-smith/Vac-Scholar-Curb-GAN/tree/142bd70fdf0f1cbc4a1c20c5e58fa5b6a9dbe742
ResBlock
import torch import torch.nn as nn import torch.nn.functional as F def get_conv(in_dim, out_dim, kernel_size, stride, padding, zero_bias=True, zero_weights=False, groups=1): c = nn.Conv2d(in_dim, out_dim, kernel_size, stride, padding, groups=groups) if zero_bias: c.bias.data *= 0.0 if zero_wei...
import torch from torch._inductor.select_algorithm import extern_kernels import triton import triton.language 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 ...
kpandey008/DiffuseVAE
ResBlock
false
15,863
[ "MIT" ]
90
b505894668ac1e4ef9a66ec220f5b40f5c83629e
https://github.com/kpandey008/DiffuseVAE/tree/b505894668ac1e4ef9a66ec220f5b40f5c83629e
Mod
import torch class Mod(torch.nn.Module): def __init__(self): super(Mod, 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 from torch._inductor.runtime.triton_helpers import libdevice assert_size_stride = torch._C._dynamo.guards.assert_size_stride empty_strided_c...
Ilyabasharov/torch2trt
Mod
false
2,565
[ "MIT" ]
0
76bf298b3da408509665e23e2494922b131afb10
https://github.com/Ilyabasharov/torch2trt/tree/76bf298b3da408509665e23e2494922b131afb10
NlpCrossEntropy
import torch import torch.nn as nn class NlpCrossEntropy(nn.Module): def __init__(self): super().__init__() def forward(self, props, tgt): tgt_props = props.gather(2, tgt.unsqueeze(2)).squeeze() mask = (tgt > 0).float() return -(tgt_props * mask).sum() / mask.sum() def get_...
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...
NeilWangziyu/torch_light
NlpCrossEntropy
false
5,641
[ "MIT" ]
1
daf8fd62f57885cf182f1b3edc3152156d229ef3
https://github.com/NeilWangziyu/torch_light/tree/daf8fd62f57885cf182f1b3edc3152156d229ef3
BinaryReg
import torch from typing import Optional import torch.utils.data import torch.nn as nn import torch.nn.parallel class BinaryReg(nn.Module): """Regularization for encouraging the outputs to be binary. Args: pred (torch.Tensor): foreground logits. mask (Optional[torch.Tensor], optional): weight...
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.utils.dat...
HarshSulakhe/pytorch_connectomics
BinaryReg
false
9,852
[ "MIT" ]
0
73402e654afde69a43a5836cc90a32ef75c75dc2
https://github.com/HarshSulakhe/pytorch_connectomics/tree/73402e654afde69a43a5836cc90a32ef75c75dc2
ShuffleCatChunk
# 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...
akaneko1019/yolact_edge
ShuffleCatChunk
false
14,767
[ "MIT" ]
1,036
a9a00281b33b3ac90253a4939773308a8f95e21d
https://github.com/akaneko1019/yolact_edge/tree/a9a00281b33b3ac90253a4939773308a8f95e21d
Feedforward
import torch class Feedforward(torch.nn.Module): def __init__(self, input_size, output_size, hidden_size): super(Feedforward, self).__init__() self.input_size = input_size self.output_size = output_size self.hidden_size = hidden_size self.fc1 = torch.nn.Linear(self.input_s...
import torch from torch._inductor.select_algorithm import extern_kernels import triton import triton.language as tl from torch._inductor.runtime.triton_heuristics import grid from torch._C import _cuda_getCurrentRawStream as get_raw_stream assert_size_stride = torch._C._dynamo.guards.assert_size_stride empty_strided_cu...
fywu85/eecs206a_project
Feedforward
false
6,708
[ "MIT" ]
1
73ea518779da4d187df8bbe4cbe46bca6d1a0714
https://github.com/fywu85/eecs206a_project/tree/73ea518779da4d187df8bbe4cbe46bca6d1a0714
equalized_linear
# 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.init import normal import torch.utils.data a...
mingo-x/pggan-pytorch
equalized_linear
false
7,234
[ "MIT" ]
1
a1dde73cd4df52476fe7c948d81fa9caea8070a5
https://github.com/mingo-x/pggan-pytorch/tree/a1dde73cd4df52476fe7c948d81fa9caea8070a5
MyGlobalAvgPool2d
import torch import torch.nn as nn import torch.utils.data import torch.nn.parallel import torch.optim class MyGlobalAvgPool2d(nn.Module): def __init__(self, keep_dim=True): super(MyGlobalAvgPool2d, self).__init__() self.keep_dim = keep_dim def forward(self, x): return x.mean(3, keep...
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 import torch.nn.parallel import torch.optim assert_size_stride = torch._C._dynamo.guards.asser...
xmyqsh/once-for-all
MyGlobalAvgPool2d
false
4,585
[ "MIT" ]
0
0bca1778b106d33460fc8d0f7d7e6ca4e1e937d9
https://github.com/xmyqsh/once-for-all/tree/0bca1778b106d33460fc8d0f7d7e6ca4e1e937d9
NAE
import torch import torch.nn as nn class NAE(nn.Module): def __init__(self): super().__init__() def forward(self, pred, gt): diff = torch.abs(pred - gt) loss = torch.mean(torch.abs(diff / gt)) return loss def get_inputs(): return [torch.rand([4, 4, 4, 4]), 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 from torch._inductor.runtime import triton_helpers from torch._inductor.runtime.triton_helpers import math as tl_math import torch.nn as nn ...
j1a0m0e4sNTU/MachineLearning2019
NAE
false
3,677
[ "MIT" ]
0
44a7a3387837e53134bcf5eb8fcf95daf4dff48d
https://github.com/j1a0m0e4sNTU/MachineLearning2019/tree/44a7a3387837e53134bcf5eb8fcf95daf4dff48d
period_L1
# 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...
flytocc/RAPiD
period_L1
false
15,368
[ "MIT" ]
142
92e6a44b8a0107def055e93c971d78fd548562f8
https://github.com/flytocc/RAPiD/tree/92e6a44b8a0107def055e93c971d78fd548562f8
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 import torch.nn as nn assert...
Terminator8758/Precise-ICS-master
DistillLoss
false
18,009
[ "MIT" ]
4
9f4591fee6ab64d9dd91f551355d29562bf663cb
https://github.com/Terminator8758/Precise-ICS-master/tree/9f4591fee6ab64d9dd91f551355d29562bf663cb
L2PenaltyConstraintLoss
# AOT ID: ['0_inference'] from ctypes import c_void_p, c_long, c_int import torch import math import random import os import tempfile from math import inf, nan from torch._inductor.hooks import run_intermediate_hooks from torch._inductor.utils import maybe_profile from torch._inductor.codegen.memory_planning import _al...
import torch import triton import triton.language as tl from torch._inductor.runtime.triton_heuristics import grid from torch._C import _cuda_getCurrentRawStream as get_raw_stream from torch._inductor.runtime import triton_helpers from torch._inductor.runtime.triton_helpers import libdevice from torch import nn assert_...
ykt345/fairtorch
L2PenaltyConstraintLoss
false
11,013
[ "MIT" ]
0
fe7e0cfaec3de0fc2b9c92943bb02639acd46bb4
https://github.com/ykt345/fairtorch/tree/fe7e0cfaec3de0fc2b9c92943bb02639acd46bb4
NetworkExtension
import torch import torch.utils import torch import torch.nn as nn class NetworkExtension(nn.Module): def __init__(self, orig_num_classes, num_classes, auxiliary): super(NetworkExtension, self).__init__() self._auxiliary = auxiliary self.classifier = nn.Linear(orig_num_classes, num_classe...
import torch from torch._inductor.select_algorithm import extern_kernels import 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 import torch import torch.nn as nn assert_size_stride = torch...
amelieEmily/RobustDARTS
NetworkExtension
false
12,207
[ "Apache-2.0" ]
0
b26e127c6e9c330258786f5eb77b17d367f546ff
https://github.com/amelieEmily/RobustDARTS/tree/b26e127c6e9c330258786f5eb77b17d367f546ff
DummyModelWithSharedSubmodule
import torch import torch.nn as nn import torch.nn.parallel import torch.optim import torch.utils.data from torch.optim.lr_scheduler import * import torch.optim.lr_scheduler import torch.onnx import torch.testing class DummyDenseWithRelu(nn.Module): def __init__(self, input_size, output_size, relu=None): ...
import torch from torch._inductor.select_algorithm import extern_kernels import triton import triton.language as tl from 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 ...
Emily0219/distiller
DummyModelWithSharedSubmodule
false
5,127
[ "Apache-2.0" ]
1
445ed35b671fb54586acc280b53d951f18bf97ae
https://github.com/Emily0219/distiller/tree/445ed35b671fb54586acc280b53d951f18bf97ae
SoftCrossEntropyLoss2d
import torch import torch.nn as nn import torch.nn.functional as F import torch.utils class SoftCrossEntropyLoss2d(nn.Module): def __init__(self): super(SoftCrossEntropyLoss2d, self).__init__() def forward(self, inputs, targets): loss = 0 inputs = -F.log_softmax(inputs, dim=1) ...
import torch from torch._inductor.select_algorithm import extern_kernels import triton import triton.language as tl from torch._inductor.runtime.triton_heuristics import grid from torch._C import _cuda_getCurrentRawStream as get_raw_stream from torch._inductor.runtime import triton_helpers from torch._inductor.runtime....
songzijiang/FasterSeg
SoftCrossEntropyLoss2d
false
16,510
[ "MIT" ]
334
1a14ef6dd665afd229a16ab43b532b5a406512f8
https://github.com/songzijiang/FasterSeg/tree/1a14ef6dd665afd229a16ab43b532b5a406512f8
Attn
# 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....
gau820827/AI-writer_Data2Doc
Attn
false
15,410
[ "Apache-2.0" ]
77
6be0ee6238158a47aa0fdfa8a34df2a47714835a
https://github.com/gau820827/AI-writer_Data2Doc/tree/6be0ee6238158a47aa0fdfa8a34df2a47714835a
LayerNorm
# AOT ID: ['0_forward'] from ctypes import c_void_p, c_long, c_int import torch import math import random import os import tempfile from math import inf, nan from torch._inductor.hooks import run_intermediate_hooks from torch._inductor.utils import maybe_profile from torch._inductor.codegen.memory_planning import _alig...
import torch import triton import triton.language as tl from torch._inductor.runtime.triton_heuristics import grid from torch._C import _cuda_getCurrentRawStream as get_raw_stream from torch._inductor.runtime.triton_helpers import libdevice from torch import nn assert_size_stride = torch._C._dynamo.guards.assert_size_s...
hyunwoongko/transformer
LayerNorm
false
15,558
[ "Apache-2.0" ]
233
8f7aaa19d37b088c156db0512868127ba9bf1a0f
https://github.com/hyunwoongko/transformer/tree/8f7aaa19d37b088c156db0512868127ba9bf1a0f
MyKernelTorch
# 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_...
sugatoray/alibi-detect
MyKernelTorch
false
16,505
[ "Apache-2.0" ]
1,227
66d7873c248c0be1a1d836e6fe1ef59351b802d9
https://github.com/sugatoray/alibi-detect/tree/66d7873c248c0be1a1d836e6fe1ef59351b802d9
PrimaryCaps
# 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...
esdrascosta/Matrix-Capsules
PrimaryCaps
false
6,661
[ "MIT" ]
1
ddf35dfa1acfb51a11a3ec27e15fe863a2ff6fa4
https://github.com/esdrascosta/Matrix-Capsules/tree/ddf35dfa1acfb51a11a3ec27e15fe863a2ff6fa4
MetaBilinear
import torch import torch.nn as nn import torch.nn.functional as F from collections import OrderedDict class MetaModule(nn.Module): """ Base class for PyTorch meta-learning modules. These modules accept an additional argument `params` in their `forward` method. Notes ----- Objects inherited f...
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 reinterpret_tensor = torch._C._dynamo.guards._reinterp...
RisingStockPrices/multi-shape-siren
MetaBilinear
false
2,772
[ "MIT" ]
0
f78d6deb94660fd11ef0caf55f88095b74d3e223
https://github.com/RisingStockPrices/multi-shape-siren/tree/f78d6deb94660fd11ef0caf55f88095b74d3e223
RWKV_ChannelMix
# AOT ID: ['0_forward'] from ctypes import c_void_p, c_long, c_int import torch import math import random import os import tempfile from math import inf, nan from torch._inductor.hooks import run_intermediate_hooks from torch._inductor.utils import maybe_profile from torch._inductor.codegen.memory_planning import _alig...
import torch from torch._inductor.select_algorithm import extern_kernels import triton import triton.language as tl from torch._inductor.runtime.triton_heuristics import grid from torch._C import _cuda_getCurrentRawStream as get_raw_stream from torch._inductor.runtime.triton_helpers import libdevice, math as tl_math im...
YUASDS/AI-Writer
RWKV_ChannelMix
false
6,017
[ "BSD-3-Clause" ]
1
6ec1e9548802ed5b5a2f1fd297595a52cb605266
https://github.com/YUASDS/AI-Writer/tree/6ec1e9548802ed5b5a2f1fd297595a52cb605266
D
# AOT ID: ['0_inference'] from ctypes import c_void_p, c_long, c_int import torch import math import random import os import tempfile from math import inf, nan from torch._inductor.hooks import run_intermediate_hooks from torch._inductor.utils import maybe_profile from torch._inductor.codegen.memory_planning import _al...
import torch import triton import triton.language as tl from torch._inductor.runtime.triton_heuristics import grid from torch._C import _cuda_getCurrentRawStream as get_raw_stream from torch._inductor.runtime import triton_helpers from torch._inductor.runtime.triton_helpers import libdevice import torch.nn as nn assert...
leaderj1001/SimSiam
D
false
15,874
[ "MIT" ]
53
ed36348d3d5a8621674c78c3ed77c1188bd18e16
https://github.com/leaderj1001/SimSiam/tree/ed36348d3d5a8621674c78c3ed77c1188bd18e16
DiceLoss
import torch from torch import nn import torch.backends.cudnn class DiceLoss(nn.Module): def __init__(self, smooth=0, eps=1e-07): super(DiceLoss, self).__init__() self.smooth = smooth self.eps = eps def forward(self, output, target): return 1 - (2 * torch.sum(output * target)...
import torch import triton import triton.language as tl from torch._inductor.runtime.triton_heuristics import grid from torch._C import _cuda_getCurrentRawStream as get_raw_stream from torch._inductor.runtime import triton_helpers from torch import nn import torch.backends.cudnn assert_size_stride = torch._C._dynamo.gu...
cxz/tgs-salt-identification-challenge
DiceLoss
false
6,503
[ "MIT" ]
1
859f3d7f2d3184532c42c34444500eec3b03b1c8
https://github.com/cxz/tgs-salt-identification-challenge/tree/859f3d7f2d3184532c42c34444500eec3b03b1c8
LASympNet
from torch.nn import Module import torch import torch.nn as nn class Module(torch.nn.Module): """Standard module format. """ def __init__(self): super(Module, self).__init__() self.activation = None self.initializer = None self.__device = None self.__dtype = None ...
import torch from torch._inductor.select_algorithm import extern_kernels import triton import triton.language as tl from torch._inductor.runtime.triton_heuristics import grid from torch._C import _cuda_getCurrentRawStream as get_raw_stream from torch.nn import Module import torch.nn as nn assert_size_stride = torch._C....
shushu-qin/deeponet
LASympNet
false
16,461
[ "Apache-2.0" ]
140
5bbe066279bba055ad80e04c364140363c87634a
https://github.com/shushu-qin/deeponet/tree/5bbe066279bba055ad80e04c364140363c87634a
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...
Exdenta/torchsat
DiceLoss
false
13,655
[ "MIT" ]
316
70ea3db758757104fb3ba618ddf7997f0f3a75b4
https://github.com/Exdenta/torchsat/tree/70ea3db758757104fb3ba618ddf7997f0f3a75b4
Normalize
import torch import torch.nn as nn class Normalize(nn.Module): def __init__(self, features, epsilon=1e-06): super(Normalize, self).__init__() self.gain = nn.Parameter(torch.ones(features)) self.bias = nn.Parameter(torch.zeros(features)) self.epsilon = epsilon 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_...
yuri20198/neurips19-graph-protein-design
Normalize
false
4,644
[ "MIT" ]
0
068e8cdfcbba629f996e99d3765cc2f3233f71a3
https://github.com/yuri20198/neurips19-graph-protein-design/tree/068e8cdfcbba629f996e99d3765cc2f3233f71a3
Conv2dSWD
import torch import torch.utils.data import torch.nn as nn import torch class Conv2dSWD(nn.Module): def __init__(self, in_channels, out_channels, kernel_radius=2, bias=True): super(Conv2dSWD, self).__init__() kernel_size_h = 2 * kernel_radius - 1 self.padding = kernel_radius - 1 s...
import torch from torch._inductor.select_algorithm import extern_kernels import triton import triton.language as tl from torch._inductor.runtime.triton_heuristics import grid from torch._C import _cuda_getCurrentRawStream as get_raw_stream import torch.utils.data import torch.nn as nn import torch assert_size_stride = ...
FVL2020/MSWSR
Conv2dSWD
false
8,112
[ "MIT" ]
27
0844e78ee68fb0465efd5c4a2215ce815980526b
https://github.com/FVL2020/MSWSR/tree/0844e78ee68fb0465efd5c4a2215ce815980526b
ChannelScale
# 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...
rlmwang/torch-tools
ChannelScale
false
10,796
[ "MIT" ]
0
822132534d73414f26045bad38a0a345661b057f
https://github.com/rlmwang/torch-tools/tree/822132534d73414f26045bad38a0a345661b057f
Res
import torch from torch import nn import torch.distributions class Res(nn.Module): def __init__(self, H): super().__init__() self.u1 = nn.Linear(H, H) self.u2 = nn.Linear(H, H) self.v1 = nn.Linear(H, H) self.v2 = nn.Linear(H, H) self.w = nn.Linear(H, H) def fo...
import torch from torch._inductor.select_algorithm import extern_kernels import triton import triton.language as tl from 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...
da03/torch_struct
Res
false
3,371
[ "MIT" ]
0
08713b61b0cfe8438e52e82e07c88cf094feb73a
https://github.com/da03/torch_struct/tree/08713b61b0cfe8438e52e82e07c88cf094feb73a
PACRRConvMax2dModule
# AOT ID: ['0_forward'] from ctypes import c_void_p, c_long, c_int import torch import math import random import os import tempfile from math import inf, nan from torch._inductor.hooks import run_intermediate_hooks from torch._inductor.utils import maybe_profile from torch._inductor.codegen.memory_planning import _alig...
import torch from torch._inductor.select_algorithm import extern_kernels import triton import triton.language as tl from torch._inductor.runtime.triton_heuristics import grid from torch._C import _cuda_getCurrentRawStream as get_raw_stream from torch._inductor.runtime import triton_helpers assert_size_stride = torch._C...
alpers/FlexNeuART
PACRRConvMax2dModule
false
12,083
[ "Apache-2.0" ]
0
2ae263f46b6eb2f1435b9073dad629a2fef23ab9
https://github.com/alpers/FlexNeuART/tree/2ae263f46b6eb2f1435b9073dad629a2fef23ab9
ContrastivePairwiseEmbeddingLoss
import torch import torch.nn as nn import torch.nn.functional as F 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 ContrastivePairwiseEmbeddingLoss(nn.Module): """ ContrastivePairwiseEmbeddingLos...
import torch from torch._inductor.select_algorithm import extern_kernels import triton import triton.language as tl from 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....
bbradt/catalyst
ContrastivePairwiseEmbeddingLoss
false
3,180
[ "Apache-2.0" ]
0
38a503c8af040906e377b7485d7fe15a7bc1de19
https://github.com/bbradt/catalyst/tree/38a503c8af040906e377b7485d7fe15a7bc1de19
BILM
import torch import torch.nn as nn class BILM(nn.Module): def __init__(self): super(BILM, self).__init__() self.maxpool1 = nn.MaxPool2d(kernel_size=3, stride=1, padding=1) self.maxpool2 = nn.MaxPool2d(kernel_size=3, stride=1, padding=1) def forward(self, feat): pos_sig = torc...
import torch import triton import triton.language as tl from torch._inductor.runtime.triton_heuristics import grid from torch._C import _cuda_getCurrentRawStream as get_raw_stream from torch._inductor.runtime import triton_helpers import torch.nn as nn assert_size_stride = torch._C._dynamo.guards.assert_size_stride emp...
SeunghwanByun/Real-Time-Road-Detection-Network
BILM
false
1,046
[ "MIT" ]
0
bc46615adef0e2b1a9a03dd4951559ca5849e6e1
https://github.com/SeunghwanByun/Real-Time-Road-Detection-Network/tree/bc46615adef0e2b1a9a03dd4951559ca5849e6e1
MSBlock
import torch import torch.nn as nn class MSBlock(nn.Module): def __init__(self, c_in, rate=4): super(MSBlock, self).__init__() self.rate = rate self.conv = nn.Conv2d(c_in, 32, 3, stride=1, padding=1) self.relu = nn.ReLU(inplace=True) dilation = self.rate * 1 if self.rate >...
import torch from torch._inductor.select_algorithm import extern_kernels import triton import triton.language as tl from 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
MSBlock
false
3,494
[ "MIT" ]
0
aa3e9a4e3d5e13872eed412444e5be519542f7e5
https://github.com/farkoo/novel-seam-carving-method/tree/aa3e9a4e3d5e13872eed412444e5be519542f7e5
GLU
# AOT ID: ['0_forward'] from ctypes import c_void_p, c_long, c_int import torch import math import random import os import tempfile from math import inf, nan from torch._inductor.hooks import run_intermediate_hooks from torch._inductor.utils import maybe_profile from torch._inductor.codegen.memory_planning import _alig...
import torch from torch._inductor.select_algorithm import extern_kernels import triton import triton.language as tl from torch._inductor.runtime.triton_heuristics import grid from torch._C import _cuda_getCurrentRawStream as get_raw_stream import torch.nn as nn import torch.nn.functional assert_size_stride = torch._C._...
MichalOp/StarTrain
GLU
false
17,720
[ "MIT" ]
7
e8dddf879f103e18239ad37b373c9b51fbbe093b
https://github.com/MichalOp/StarTrain/tree/e8dddf879f103e18239ad37b373c9b51fbbe093b
CustomGruCell
# 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 numpy as np ...
kouohhashi/PySyft
CustomGruCell
false
10,355
[ "Apache-2.0" ]
0
7415961b459f1d25f762467b346b7b94c1d6943f
https://github.com/kouohhashi/PySyft/tree/7415961b459f1d25f762467b346b7b94c1d6943f
KL_Loss
# AOT ID: ['0_inference'] from ctypes import c_void_p, c_long, c_int import torch import math import random import os import tempfile from math import inf, nan from torch._inductor.hooks import run_intermediate_hooks from torch._inductor.utils import maybe_profile from torch._inductor.codegen.memory_planning import _al...
import torch import triton import triton.language as tl from torch._inductor.runtime.triton_heuristics import grid from torch._C import _cuda_getCurrentRawStream as get_raw_stream from torch._inductor.runtime import triton_helpers from torch._inductor.runtime.triton_helpers import libdevice, math as tl_math from torch ...
BlakeDai/FedML-test
KL_Loss
false
9,192
[ "Apache-2.0" ]
0
3cb9a7234f3f0294f3137e4be572153ba7b62f8f
https://github.com/BlakeDai/FedML-test/tree/3cb9a7234f3f0294f3137e4be572153ba7b62f8f
FromRGB
# 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 as nn import torch.utils.cpp_extension assert_size_s...
STomoya/animeface
FromRGB
false
14,384
[ "MIT" ]
61
37b3cd26097d7874559d4c152e41e5712b7a1a42
https://github.com/STomoya/animeface/tree/37b3cd26097d7874559d4c152e41e5712b7a1a42
CustomKLLoss
# 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.nn.modules....
WdBlink/AugMix-3DOCUNet-Brats2019
CustomKLLoss
false
5,954
[ "MIT" ]
1
125c6c8682b51a550eeac9173d13d0a211576abc
https://github.com/WdBlink/AugMix-3DOCUNet-Brats2019/tree/125c6c8682b51a550eeac9173d13d0a211576abc
SelfAttn
import torch import torch.nn as nn import torch.nn.functional as F import torch.utils.data import torch.nn.init import torch as th class SelfAttn(nn.Module): def __init__(self, hidden_size): super(SelfAttn, self).__init__() self.query = nn.Linear(hidden_size, 1) def forward(self, keys, value...
import torch from torch._inductor.select_algorithm import extern_kernels import triton import triton.language as tl from 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....
ljw23/ConvLab-2
SelfAttn
false
15,937
[ "Apache-2.0" ]
339
13d48ea0e441701bd66100689b6c25b561f15525
https://github.com/ljw23/ConvLab-2/tree/13d48ea0e441701bd66100689b6c25b561f15525
NN
import torch from torch import nn import torch.nn.functional as F class NN(nn.Module): def __init__(self, input_size, num_classes): super(NN, self).__init__() self.fc1 = nn.Linear(input_size, 50) self.fc2 = nn.Linear(50, num_classes) def forward(self, x): x = F.relu(self.fc1(...
import torch from torch._inductor.select_algorithm import extern_kernels import triton import triton.language as tl from 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...
HaowenWeiJohn/CV_Project
NN
false
526
[ "MIT" ]
0
8e2414796f60a8c3fe452f3721e4a6ef7edfdb11
https://github.com/HaowenWeiJohn/CV_Project/tree/8e2414796f60a8c3fe452f3721e4a6ef7edfdb11
SamePad2dStrong
# 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...
IssamLaradji/wisenet
SamePad2dStrong
false
17,436
[ "Apache-2.0" ]
7
881457f5168815f5e9d03f110244842d539747a0
https://github.com/IssamLaradji/wisenet/tree/881457f5168815f5e9d03f110244842d539747a0
AnimalStudentNet
import torch import torch.nn as nn import torch.nn.functional as F class AnimalStudentNet(nn.Module): def __init__(self, num_classes=16): super(AnimalStudentNet, self).__init__() self.pool = nn.MaxPool2d(2, 2) self.dropout = nn.Dropout2d(p=0.1) self.conv1 = nn.Conv2d(3, 6, kernel_...
import torch from torch._inductor.select_algorithm import extern_kernels import triton import triton.language as tl from 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_...
elouie/CodeSamples
AnimalStudentNet
false
10,074
[ "Apache-2.0" ]
0
3fe9fcf23cbfc82d84a679ea16d69ae41e700f06
https://github.com/elouie/CodeSamples/tree/3fe9fcf23cbfc82d84a679ea16d69ae41e700f06
Net
import torch import torch.nn as nn class Net(nn.Module): def __init__(self): super().__init__() self.conv1 = nn.Conv2d(1, 1, (5, 5), groups=1) self.relu1 = nn.ReLU(inplace=True) self.fc1 = nn.Linear(36, 5) self.relu2 = nn.ReLU(inplace=True) def forward(self, 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 import torch.nn as nn assert_...
KarthikGanesan88/stonne
Net
false
9,270
[ "MIT" ]
0
f228ade67120b9dafac8ea99d201e269b2ad7099
https://github.com/KarthikGanesan88/stonne/tree/f228ade67120b9dafac8ea99d201e269b2ad7099
GraphConvolution
import torch import torch.nn as nn import torch.nn.functional as F class GraphConvolution(nn.Module): """ Simple GCN layer, similar to https://arxiv.org/abs/1609.02907 """ def __init__(self, in_features, out_features, dropout=0.3): super(GraphConvolution, self).__init__() self.in_feat...
import torch from torch._inductor.select_algorithm import extern_kernels import triton import triton.language as tl from 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_...
ayyyq/T-LSTM
GraphConvolution
false
6,292
[ "MIT" ]
1
36dbc88ac710d3925851cd87c2368ecfc7061b70
https://github.com/ayyyq/T-LSTM/tree/36dbc88ac710d3925851cd87c2368ecfc7061b70
CDAE
# AOT ID: ['0_forward'] from ctypes import c_void_p, c_long, c_int import torch import math import random import os import tempfile from math import inf, nan from torch._inductor.hooks import run_intermediate_hooks from torch._inductor.utils import maybe_profile from torch._inductor.codegen.memory_planning import _alig...
import torch from torch._inductor.select_algorithm import extern_kernels import triton import triton.language as tl from torch._inductor.runtime.triton_heuristics import grid from torch._C import _cuda_getCurrentRawStream as get_raw_stream from torch._inductor.runtime import triton_helpers from torch import nn from tor...
mmcenta/eye-disease-recognition
CDAE
false
4,025
[ "MIT" ]
0
52e1dedbce27514b605b9f8ad976d6042b7e2f14
https://github.com/mmcenta/eye-disease-recognition/tree/52e1dedbce27514b605b9f8ad976d6042b7e2f14
ConvReLUNorm
import torch import torch.cuda import torch.distributed import torch.utils.data import torch.optim class ConvReLUNorm(torch.nn.Module): def __init__(self, in_channels, out_channels, kernel_size=1, dropout=0.0): super(ConvReLUNorm, self).__init__() self.conv = torch.nn.Conv1d(in_channels, out_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....
hamjam/NeMo
ConvReLUNorm
false
15,490
[ "Apache-2.0" ]
4,145
b3484d32e1317666151f931bfa39867d88ed8658
https://github.com/hamjam/NeMo/tree/b3484d32e1317666151f931bfa39867d88ed8658
GlobalAveragePooling
import torch import torch.nn as nn class GlobalAveragePooling(nn.Module): def __init__(self): super().__init__() def forward(self, x): return x.mean([2, 3]) 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 assert_size_stride = torch._C._dynamo.guards.assert_size_stride empty_strided_cuda = torch._C._dynamo.guards._empty_st...
HexagonPrime/pixel-nerf
GlobalAveragePooling
false
2,409
[ "BSD-2-Clause" ]
0
298aa7a3451c01e6f19f73f0c756672d3de54bf9
https://github.com/HexagonPrime/pixel-nerf/tree/298aa7a3451c01e6f19f73f0c756672d3de54bf9
DilatedResidualLayer
# 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_...
manthan-kodar/Action-seg-experiments
DilatedResidualLayer
false
12,759
[ "MIT" ]
0
3515ee64082ab567838782f5600e186bf86473a0
https://github.com/manthan-kodar/Action-seg-experiments/tree/3515ee64082ab567838782f5600e186bf86473a0
TrainablePositionalEncoding
# 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_...
minjoong507/TVRetrieval
TrainablePositionalEncoding
false
10,755
[ "MIT" ]
0
919e1766ab8aa1ef267bd3b80d4f87b06cde09a9
https://github.com/minjoong507/TVRetrieval/tree/919e1766ab8aa1ef267bd3b80d4f87b06cde09a9
DuelingQNetwork
# 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 co...
nullbyte91/udacity-drl-navigation
DuelingQNetwork
false
10,610
[ "MIT" ]
0
d981ab906fd3dfc9939d639b2083d004cde0b961
https://github.com/nullbyte91/udacity-drl-navigation/tree/d981ab906fd3dfc9939d639b2083d004cde0b961
PoolingF
# 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...
a11isonliu/contrastive-unpaired-translation
PoolingF
false
9,846
[ "BSD-3-Clause" ]
0
67651ed9877cae121d9398f46094ce8dbc678802
https://github.com/a11isonliu/contrastive-unpaired-translation/tree/67651ed9877cae121d9398f46094ce8dbc678802
LogSumExpPool
import torch from torch import nn class LogSumExpPool(nn.Module): def __init__(self, gamma): super(LogSumExpPool, self).__init__() self.gamma = gamma def forward(self, feat_map): """ Numerically stable implementation of the operation Arguments: feat_map(Te...
import torch import triton import triton.language as tl from torch._inductor.runtime.triton_heuristics import grid from torch._C import _cuda_getCurrentRawStream as get_raw_stream from torch._inductor.runtime import triton_helpers from torch._inductor.runtime.triton_helpers import math as tl_math from torch import nn a...
Tarandro/Chexpert
LogSumExpPool
false
11,927
[ "Apache-2.0" ]
0
6bc51f899a479f8dbad8a64c92f35ed4632377b3
https://github.com/Tarandro/Chexpert/tree/6bc51f899a479f8dbad8a64c92f35ed4632377b3
RobertaClassificationHead
# 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 ty...
LaudateCorpus1/text-1
RobertaClassificationHead
false
9,267
[ "BSD-3-Clause" ]
0
8808e7eee5a2df79b9566a4a348889dc2722fcfb
https://github.com/LaudateCorpus1/text-1/tree/8808e7eee5a2df79b9566a4a348889dc2722fcfb
Custom_dropout
import torch import torch.nn as nn import torch.nn.parallel class Custom_dropout(nn.Module): """ An implementation for few , Given a task perform a rowise sum of 2-d matrix , you get a zero out the contribution of few of rows in the matrix Given, X a 2-d matrix consisting of row vectors (1-d) x1 , x2 ,..xn....
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...
Chahalprincy/deepchem
Custom_dropout
false
224
[ "MIT" ]
0
9d1a6a879cc74b065694b3ddb763d52151d57b7a
https://github.com/Chahalprincy/deepchem/tree/9d1a6a879cc74b065694b3ddb763d52151d57b7a
SphereLoss
# 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....
modricwang/SphereReID
SphereLoss
false
10,581
[ "MIT" ]
0
d0c39d2ce52cbc35e4d3adc1e90c0e54585aa492
https://github.com/modricwang/SphereReID/tree/d0c39d2ce52cbc35e4d3adc1e90c0e54585aa492
IndepAnisotropicGaussianUVLoss
# AOT ID: ['0_inference'] from ctypes import c_void_p, c_long, c_int import torch import math import random import os import tempfile from math import inf, nan from torch._inductor.hooks import run_intermediate_hooks from torch._inductor.utils import maybe_profile from torch._inductor.codegen.memory_planning import _al...
import torch import triton import triton.language as tl from torch._inductor.runtime.triton_heuristics import grid from torch._C import _cuda_getCurrentRawStream as get_raw_stream from torch._inductor.runtime import triton_helpers from torch._inductor.runtime.triton_helpers import libdevice, math as tl_math import math...
GOPIKA-0204/Clothing-Detection-and-Recolouring
IndepAnisotropicGaussianUVLoss
false
9,074
[ "MIT" ]
0
b5d436a981b854228314729b41874f31948a33ba
https://github.com/GOPIKA-0204/Clothing-Detection-and-Recolouring/tree/b5d436a981b854228314729b41874f31948a33ba
RefModel3d2
import torch import torch.nn.functional as F class RefModel3d2(torch.nn.Module): """The 3D reference model.""" def __init__(self): super().__init__() self.l1 = torch.nn.Conv3d(2, 2, 3, padding=1, stride=2, padding_mode='replicate', bias=False) self.l2 = torch.nn.GroupNorm(...
import torch from torch._inductor.select_algorithm import extern_kernels import triton import triton.language as tl from 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....
shuohan/pytorch-layers
RefModel3d2
false
4,367
[ "MIT" ]
0
020846fd02d501cf477552179c19ba4b5e9a0695
https://github.com/shuohan/pytorch-layers/tree/020846fd02d501cf477552179c19ba4b5e9a0695
GeLU
# AOT ID: ['0_inference'] from ctypes import c_void_p, c_long, c_int import torch import math import random import os import tempfile from math import inf, nan from torch._inductor.hooks import run_intermediate_hooks from torch._inductor.utils import maybe_profile from torch._inductor.codegen.memory_planning import _al...
import torch import triton import triton.language as tl from torch._inductor.runtime.triton_heuristics import grid from torch._C import _cuda_getCurrentRawStream as get_raw_stream from torch._inductor.runtime.triton_helpers import libdevice import math from torch import nn assert_size_stride = torch._C._dynamo.guards.a...
HS-YN/PanoAVQA
GeLU
false
17,356
[ "MIT" ]
3
657b83421ce64ea18b3e79fb580afc7034403ccc
https://github.com/HS-YN/PanoAVQA/tree/657b83421ce64ea18b3e79fb580afc7034403ccc
TemporalEmbedding
import math import torch import torch.nn as nn class FixedEmbedding(nn.Module): def __init__(self, c_in, d_model): super(FixedEmbedding, self).__init__() w = torch.zeros(c_in, d_model).float() w.require_grad = False position = torch.arange(0, c_in).float().unsqueeze(1) div...
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 math import torch.nn as nn assert_size_stride = torch._C._dynamo.guards.assert_size_stride empty_strided_cuda = torch._C._dynamo.guar...
Xianchao-Wu/informer
TemporalEmbedding
false
5,991
[ "Apache-2.0" ]
1
bb9cb3c6ff9e7e76c8dbbf3bcc7924df1f18982d
https://github.com/Xianchao-Wu/informer/tree/bb9cb3c6ff9e7e76c8dbbf3bcc7924df1f18982d
BCELoss
# 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 ...
klovbe/UnsupervisedDeepLearning-Pytorch
BCELoss
false
7,046
[ "MIT" ]
1
35e8e49cd4024179db173f3dab2e6d1a5d037d35
https://github.com/klovbe/UnsupervisedDeepLearning-Pytorch/tree/35e8e49cd4024179db173f3dab2e6d1a5d037d35
RelPositionMultiHeadedAttention
import math import torch from typing import Optional from typing import Tuple from torch import nn class MultiHeadedAttention(nn.Module): """Multi-Head Attention layer. Args: n_head (int): The number of heads. n_feat (int): The number of features. dropout_rate (float): Dropout rate. ...
import torch from torch._inductor.select_algorithm import extern_kernels import triton import triton.language as tl from 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....
Honghe/wenet
RelPositionMultiHeadedAttention
false
5,332
[ "Apache-2.0" ]
1
4421790bec3778df591816d69f0449930a9be321
https://github.com/Honghe/wenet/tree/4421790bec3778df591816d69f0449930a9be321
ILN
# 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 import torch.utils.cpp_extension assert_size_stride = tor...
STomoya/animeface
ILN
false
15,296
[ "MIT" ]
61
37b3cd26097d7874559d4c152e41e5712b7a1a42
https://github.com/STomoya/animeface/tree/37b3cd26097d7874559d4c152e41e5712b7a1a42
MultinomialCELoss
import torch import torch.nn as nn class MultinomialCELoss(nn.Module): def __init__(self): super(MultinomialCELoss, self).__init__() def forward(self, x, y): x = x + 1e-08 x = torch.log(x) zlogz = y * x loss = -zlogz.sum() loss /= x.shape[0] * x.shape[2] * x.s...
import torch import triton import triton.language as tl from torch._inductor.runtime.triton_heuristics import grid from torch._C import _cuda_getCurrentRawStream as get_raw_stream from torch._inductor.runtime import triton_helpers from torch._inductor.runtime.triton_helpers import math as tl_math import torch.nn as nn ...
MMujtabaRoohani/FlowerColorizer-PyTorch
MultinomialCELoss
false
11,668
[ "MIT" ]
0
4c9c4c954a38babe1f10f816f8406eb4ab998842
https://github.com/MMujtabaRoohani/FlowerColorizer-PyTorch/tree/4c9c4c954a38babe1f10f816f8406eb4ab998842
EcaModule
import math import torch import torch.utils.data import torch.nn as nn import torch.nn.parallel from torch import optim as optim class EcaModule(nn.Module): """Constructs an ECA module. Args: channels: Number of channels of the input feature map for use in adaptive kernel sizes for actual...
import torch from torch._inductor.select_algorithm import extern_kernels import triton import triton.language as tl from torch._inductor.runtime.triton_heuristics import grid from torch._C import _cuda_getCurrentRawStream as get_raw_stream import math import torch.utils.data import torch.nn as nn import torch.nn.parall...
dumpmemory/NonDeepNetworks
EcaModule
false
15,250
[ "BSD-3-Clause" ]
307
5513bf588f4e64c99583440507232675c2e21e34
https://github.com/dumpmemory/NonDeepNetworks/tree/5513bf588f4e64c99583440507232675c2e21e34
GatedLinearUnit
import torch import torch.nn as nn class GatedLinearUnit(nn.Module): def __init__(self, dim: 'int'=-1, nonlinear: 'bool'=True): super().__init__() self.dim = dim self.nonlinear = nonlinear def forward(self, x: 'torch.Tensor') ->torch.Tensor: val, gate = torch.chunk(x, 2, dim=...
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_...
ZhuangweiKang/pytorch-ts
GatedLinearUnit
false
2,994
[ "Apache-2.0", "MIT" ]
0
076d456358fd1bac96becba4f1ba38ec5a5fcf4d
https://github.com/ZhuangweiKang/pytorch-ts/tree/076d456358fd1bac96becba4f1ba38ec5a5fcf4d
Block
from _paritybench_helpers import _mock_config import torch import torch.nn as nn from torch.nn import functional as F class RWKV_TimeMix(nn.Module): def __init__(self, config, layer_id): super().__init__() assert config.n_attn % config.n_head == 0 self.layer_id = layer_id self.ctx...
import torch from torch._inductor.select_algorithm import extern_kernels import triton import triton.language as tl from 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....
JunnYu/Paddle-AI-Writer
Block
false
8,822
[ "BSD-3-Clause" ]
25
8d211f9e60aeed323b6330065668f54350514c70
https://github.com/JunnYu/Paddle-AI-Writer/tree/8d211f9e60aeed323b6330065668f54350514c70
Cosine
# 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 from torch.optim.lr...
anlewy/mt-dnn
Cosine
false
14,862
[ "MIT" ]
2,075
eeb6f01ce0630e61a52b8c9c6f7537cd34978e45
https://github.com/anlewy/mt-dnn/tree/eeb6f01ce0630e61a52b8c9c6f7537cd34978e45
location_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 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
Decoder
import torch import torch.nn as nn from collections import OrderedDict class Decoder(nn.Module): def __init__(self, style_dim, class_dim): super(Decoder, self).__init__() self.linear_model = nn.Sequential(OrderedDict([('linear_1', nn. Linear(in_features=style_dim + class_dim, out_feat...
import torch from torch._inductor.select_algorithm import extern_kernels import triton import triton.language 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 ...
vicissitude1999/multi-level-vae
Decoder
false
16,684
[ "MIT" ]
68
83bc98fbe5046c61941298d4fd49b08fd868ee89
https://github.com/vicissitude1999/multi-level-vae/tree/83bc98fbe5046c61941298d4fd49b08fd868ee89
GaussianSample
# AOT ID: ['0_forward'] from ctypes import c_void_p, c_long, c_int import torch import math import random import os import tempfile from math import inf, nan from torch._inductor.hooks import run_intermediate_hooks from torch._inductor.utils import maybe_profile from torch._inductor.codegen.memory_planning import _alig...
import torch from torch import device from torch._inductor.select_algorithm import extern_kernels import triton import triton.language as tl from torch._inductor.runtime.triton_heuristics import grid from torch._C import _cuda_getCurrentRawStream as get_raw_stream from torch._inductor.runtime.triton_helpers import math...
ChengF-Lab/scIVA
GaussianSample
false
8,884
[ "MIT" ]
0
f70a927531dd16236dff30decbe77f0552ad4f2d
https://github.com/ChengF-Lab/scIVA/tree/f70a927531dd16236dff30decbe77f0552ad4f2d
Contract
# 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...
Alex-Beh/hand_tracking
Contract
false
11,163
[ "Apache-2.0" ]
0
40ac39e10ed5815d9400d6a87149015ad6ab9686
https://github.com/Alex-Beh/hand_tracking/tree/40ac39e10ed5815d9400d6a87149015ad6ab9686
Actor
# AOT ID: ['0_forward'] from ctypes import c_void_p, c_long, c_int import torch import math import random import os import tempfile from math import inf, nan from torch._inductor.hooks import run_intermediate_hooks from torch._inductor.utils import maybe_profile from torch._inductor.codegen.memory_planning import _alig...
import torch from torch._inductor.select_algorithm import extern_kernels import triton import triton.language as tl from torch._inductor.runtime.triton_heuristics import grid from torch._C import _cuda_getCurrentRawStream as get_raw_stream from torch._inductor.runtime import triton_helpers from torch._inductor.runtime....
brooky56/DeepRL-UR-motion-planning
Actor
false
1,583
[ "MIT" ]
0
0cc523da6d8a55896773f1f57feed1f0c77fea78
https://github.com/brooky56/DeepRL-UR-motion-planning/tree/0cc523da6d8a55896773f1f57feed1f0c77fea78
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 import torch.nn as nn assert_...
cheapmouse94/Machine_Learning-Gates-python
Network
false
1,670
[ "MIT" ]
0
1e159ccf8f9a5db9104fa3926b85750787676e15
https://github.com/cheapmouse94/Machine_Learning-Gates-python/tree/1e159ccf8f9a5db9104fa3926b85750787676e15
NonLocal
import torch import torch.nn as nn import torch.nn.functional as func import torch.jit import torch.nn class NonLocal(nn.Module): def __init__(self, in_size, attention_size=32, size=None, scale=None): super(NonLocal, self).__init__() self.size = size self.scale = scale self.attent...
import torch from torch._inductor.select_algorithm import extern_kernels import triton import triton.language as tl from 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....
ankmathur96/torchsupport
NonLocal
false
3,178
[ "MIT" ]
0
77bf4a90b8770a408665e2604428808c3ed2f979
https://github.com/ankmathur96/torchsupport/tree/77bf4a90b8770a408665e2604428808c3ed2f979
PositionwiseFeedForward
import torch import torch.nn as nn import torch.nn.functional as F class PositionwiseFeedForward(nn.Module): """ Implements FFN equation (1-D convolution). """ def __init__(self, n_hid, dropout=0.1): super(PositionwiseFeedForward, self).__init__() self.w_1 = nn.Linear(n_hid, n_hid...
import torch from torch._inductor.select_algorithm import extern_kernels import triton import triton.language as tl from 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_...
acbull/HiCE
PositionwiseFeedForward
false
14,742
[ "MIT" ]
58
0a7e3035bc6e1e2ea5d08b0f1fb68656f75df62f
https://github.com/acbull/HiCE/tree/0a7e3035bc6e1e2ea5d08b0f1fb68656f75df62f
ATOCAttentionUnit
import torch from typing import Union import torch.nn as nn from typing import Dict import torch.utils.data class ATOCAttentionUnit(nn.Module): """ Overview: the attention unit of the atoc network. We now implement it as two-layer MLP, same as the original paper Interface: __init__, forwa...
import torch from torch._inductor.select_algorithm import extern_kernels import triton import triton.language as tl from 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 ...
Weiyuhong-1998/DI-engine
ATOCAttentionUnit
false
14,580
[ "Apache-2.0" ]
464
88658ea358298c6e61e95a454284b8853a3e9484
https://github.com/Weiyuhong-1998/DI-engine/tree/88658ea358298c6e61e95a454284b8853a3e9484
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.triton_helpers import libdevice, math as tl_math im...
QiuhongAnnaWei/IBRNet
conv
false
14,258
[ "Apache-2.0" ]
254
6c8b68e6d95eae04535ff0906387ec7899f5d5ce
https://github.com/QiuhongAnnaWei/IBRNet/tree/6c8b68e6d95eae04535ff0906387ec7899f5d5ce
LinearEstimator
import torch import torch.nn as nn class LinearEstimator(nn.Module): def __init__(self, in_c, out_c, factor=1.0): super().__init__() self.factor = factor self.net = nn.Linear(in_c, out_c, bias=False) def forward(self, x): return self.net(x) * self.factor def get_inputs(): ...
import torch from torch._inductor.select_algorithm import extern_kernels import 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...
MLIA/LEADS
LinearEstimator
false
17,650
[ "MIT" ]
6
4010f6b6e6a56ee049b4b4a9aec1c24b34730616
https://github.com/MLIA/LEADS/tree/4010f6b6e6a56ee049b4b4a9aec1c24b34730616
Block_MLP
import torch import torch.nn as nn def drop_path(x, drop_prob: 'float'=0.0, training: 'bool'=False): """Drop paths (Stochastic Depth) per sample (when applied in main path of residual blocks). This is the same as the DropConnect impl I created for EfficientNet, etc networks, however, the original name is...
import torch from torch._inductor.select_algorithm import extern_kernels import triton import triton.language 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 ...
yifanc96/yifanc-DL
Block_MLP
false
11,095
[ "MIT" ]
0
25d56cec776fb151c8f6bcbd997bca94f07f3597
https://github.com/yifanc96/yifanc-DL/tree/25d56cec776fb151c8f6bcbd997bca94f07f3597
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....
CharlesPikachu/mcibi
MultiheadAttention
false
7,903
[ "MIT" ]
41
6ce453504741c2eed1d290306055258a377a4094
https://github.com/CharlesPikachu/mcibi/tree/6ce453504741c2eed1d290306055258a377a4094
L2Norm
from torch.nn import Module import torch import torch.nn.functional as F class L2Norm(Module): def forward(self, input): return F.normalize(input) 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 libdevice from torch.nn import Module ...
HAOCHENYE/Silent-Face-Anti-Spoofing-master-yehc
L2Norm
false
500
[ "Apache-2.0" ]
0
014c781d4109733f87a50b10d10508ba5e431581
https://github.com/HAOCHENYE/Silent-Face-Anti-Spoofing-master-yehc/tree/014c781d4109733f87a50b10d10508ba5e431581
GraphNet
import torch import torch.nn as nn class GraphNet(nn.Module): def __init__(self, input_size, n_classes, num_neurons=32): super(GraphNet, self).__init__() self.fc1 = nn.Linear(input_size, num_neurons) self.fc2 = nn.Linear(num_neurons, num_neurons) self.fc3 = nn.Linear(num_neurons, ...
import torch from torch._inductor.select_algorithm import extern_kernels import triton import triton.language as tl from 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....
adam2392/dldo
GraphNet
false
12,070
[ "MIT" ]
0
fc57f8700eb048558ab205c2c77a064f1a7cc7f6
https://github.com/adam2392/dldo/tree/fc57f8700eb048558ab205c2c77a064f1a7cc7f6
GramMSELoss
import torch import torch.nn as nn import torch.utils.data class GramMatrix(nn.Module): def forward(self, input): b, c, h, w = input.size() F = input.view(b, c, h * w) G = torch.bmm(F, F.transpose(1, 2)) G.div_(h * w) return G class GramMSELoss(nn.Module): def forwa...
import torch from torch._inductor.select_algorithm import extern_kernels import triton import triton.language as tl from 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 ...
Reytuag/non-stationary_texture_syn
GramMSELoss
false
14,303
[ "MIT" ]
351
005d3e4ead3dfa2164b14c5b3bf41cdc15fd3b0b
https://github.com/Reytuag/non-stationary_texture_syn/tree/005d3e4ead3dfa2164b14c5b3bf41cdc15fd3b0b
PyTorchFeedForward
import torch import torch.nn import torch.autograd import torch.nn as nn import torch.nn.functional as F import torch.optim import torch.cuda class PyTorchFeedForward(nn.Module): def __init__(self, depth, width, input_size, output_size): super(PyTorchFeedForward, self).__init__() self.linears = [...
import torch from torch._inductor.select_algorithm import extern_kernels import triton import triton.language as tl from 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....
ccoulombe/thinc
PyTorchFeedForward
false
12,197
[ "MIT" ]
0
8d891b61ddef3ca00266ca0ec7c47e2d063a3a83
https://github.com/ccoulombe/thinc/tree/8d891b61ddef3ca00266ca0ec7c47e2d063a3a83
activation_quantize_fn
# 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.nn as nn assert_size_stride = torch._C._dy...
MohammedHAlali/pytorch_DoReFaNet
activation_quantize_fn
false
847
[ "MIT" ]
0
d208089b9172f02c09cc6633158ed5b5d6cd7f1e
https://github.com/MohammedHAlali/pytorch_DoReFaNet/tree/d208089b9172f02c09cc6633158ed5b5d6cd7f1e
InverseDepthSmoothnessLoss
import torch import torch.nn as nn def _gradient_x(img: 'torch.Tensor') ->torch.Tensor: assert len(img.shape) == 4, img.shape return img[:, :, :, :-1] - img[:, :, :, 1:] def _gradient_y(img: 'torch.Tensor') ->torch.Tensor: assert len(img.shape) == 4, img.shape return img[:, :, :-1, :] - img[:, :, 1:...
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...
IEM-Computer-Vision/kornia
InverseDepthSmoothnessLoss
false
9,297
[ "ECL-2.0", "Apache-2.0" ]
0
f98bd9a2158a6e59cda076d55d476acf13f4e0af
https://github.com/IEM-Computer-Vision/kornia/tree/f98bd9a2158a6e59cda076d55d476acf13f4e0af
SoftmaxFocalClassificationLoss
import torch import torch.nn as nn import torch.nn.functional as F class SoftmaxFocalClassificationLoss(nn.Module): """Criterion that computes Focal loss. According to [1], the Focal loss is computed as follows: .. math:: \\text{FL}(p_t) = -\\alpha_t (1 - p_t)^{\\gamma} \\, \\text{log}(p_t) wh...
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 ...
collector-m/BtcDet
SoftmaxFocalClassificationLoss
false
15,062
[ "Apache-2.0" ]
108
80bee34f2f40931600f812a6edbcb27e51cb7ec3
https://github.com/collector-m/BtcDet/tree/80bee34f2f40931600f812a6edbcb27e51cb7ec3
F_conv
# AOT ID: ['0_forward'] from ctypes import c_void_p, c_long, c_int import torch import math import random import os import tempfile from math import inf, nan from torch._inductor.hooks import run_intermediate_hooks from torch._inductor.utils import maybe_profile from torch._inductor.codegen.memory_planning import _alig...
import torch from torch._inductor.select_algorithm import extern_kernels import triton import triton.language as tl from torch._inductor.runtime.triton_heuristics import grid from torch._C import _cuda_getCurrentRawStream as get_raw_stream import warnings import torch.nn as nn assert_size_stride = torch._C._dynamo.guar...
Xenovortex/INN_Embedding_Classification
F_conv
false
1,245
[ "MIT" ]
0
df31ec3dcf70780cae5140a69ffafdd64f218e5f
https://github.com/Xenovortex/INN_Embedding_Classification/tree/df31ec3dcf70780cae5140a69ffafdd64f218e5f
StateCritic
import torch import torch.nn as nn import torch.nn.functional as F class Encoder(nn.Module): """Encodes the static & dynamic states using 1d Convolution.""" def __init__(self, input_size, hidden_size): super(Encoder, self).__init__() self.conv = nn.Conv1d(input_size, hidden_size, kernel_size=...
import torch from torch._inductor.select_algorithm import extern_kernels import triton import triton.language as tl from torch._inductor.runtime.triton_heuristics import grid from torch._C import _cuda_getCurrentRawStream as get_raw_stream from torch._inductor.runtime import triton_helpers import torch.nn as nn assert_...
dimichai/City-Metro-Network-Expansion-with-RL
StateCritic
false
3,444
[ "MIT" ]
0
54cfec74d89b4e4fc912d480a3025e4c75e3b196
https://github.com/dimichai/City-Metro-Network-Expansion-with-RL/tree/54cfec74d89b4e4fc912d480a3025e4c75e3b196
AddCoords
# 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...
MingSungChao/IPN-hand
AddCoords
false
14,011
[ "MIT" ]
54
0b061e4438f159e3e312af4959cb424917b5c367
https://github.com/MingSungChao/IPN-hand/tree/0b061e4438f159e3e312af4959cb424917b5c367
RMSE
# 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...
d4l3k/crowds
RMSE
false
12,238
[ "MIT" ]
0
a57eee80d66498474c86cec22dd77be9d627ad97
https://github.com/d4l3k/crowds/tree/a57eee80d66498474c86cec22dd77be9d627ad97
DoubleAttention
import torch from torch import nn from torch.nn import init from torch.nn import functional as F class DoubleAttention(nn.Module): def __init__(self, in_channels, c_m, c_n, reconstruct=True): super().__init__() self.in_channels = in_channels self.reconstruct = reconstruct self.c_m...
import torch from torch._inductor.select_algorithm import extern_kernels import triton import triton.language as tl from 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....
LeftAttention/Attention-Codebase
DoubleAttention
false
17,590
[ "Apache-2.0" ]
6
348ec66233a7c0f95a3cb5f0f11641e2a7a9b9c3
https://github.com/LeftAttention/Attention-Codebase/tree/348ec66233a7c0f95a3cb5f0f11641e2a7a9b9c3
TwoMLPHead
import torch from torchvision.transforms import functional as F from torch import nn import torch.nn.functional as F import torch.utils.data class TwoMLPHead(nn.Module): """ Standard heads for FPN-based models Arguments: in_channels (int): number of input channels representation_size (int...
import torch from torch._inductor.select_algorithm import extern_kernels import triton import triton.language as tl from 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...
BoChenYS/ROPE
TwoMLPHead
false
17,301
[ "BSD-3-Clause" ]
6
3e50f134259b555cf547e4a3ef8b14cf5cda4e00
https://github.com/BoChenYS/ROPE/tree/3e50f134259b555cf547e4a3ef8b14cf5cda4e00
TextProcessor
# 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_...
olipinski/MultimodalGame
TextProcessor
false
10,634
[ "BSD-3-Clause" ]
0
cfacc66baebfadb6ed6a8b44b3dd71a298285d68
https://github.com/olipinski/MultimodalGame/tree/cfacc66baebfadb6ed6a8b44b3dd71a298285d68
Downsample
# 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.utils.data import torch import torch.nn as nn assert_size_stride = ...
Tiamat-Tech/Image-Super-Resolution-via-Iterative-Refinement
Downsample
false
14,485
[ "Apache-2.0" ]
1,764
ef9b943b573328d7a5ddb1a0c2abd168b91610dc
https://github.com/Tiamat-Tech/Image-Super-Resolution-via-Iterative-Refinement/tree/ef9b943b573328d7a5ddb1a0c2abd168b91610dc
KARAttention
from _paritybench_helpers import _mock_config import math import torch from torch import nn class KARMultiHeadAttention(nn.Module): def __init__(self, config, hidden_size): super(KARMultiHeadAttention, self).__init__() if 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....
ohadrozen/inferbert
KARAttention
false
4,137
[ "Apache-2.0" ]
0
2e450aba894937e5769dcf028e4a8a597991fe43
https://github.com/ohadrozen/inferbert/tree/2e450aba894937e5769dcf028e4a8a597991fe43