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
BinaryNLLEntropy
import torch import torch.nn.functional as F import torch.utils.checkpoint from torch.nn.modules.loss import _Loss import torch.jit class BinaryNLLEntropy(_Loss): def __init__(self, size_average=True): super(BinaryNLLEntropy, self).__init__() self.size_average = size_average def forward(self...
import torch import triton import triton.language as tl from torch._inductor.runtime.triton_heuristics import grid from torch._C import _cuda_getCurrentRawStream as get_raw_stream from torch._inductor.runtime import triton_helpers from torch._inductor.runtime.triton_helpers import libdevice, math as tl_math import torc...
RoderickGu/Pretraining_GPT
BinaryNLLEntropy
false
17,851
[ "Apache-2.0" ]
4
0a3ecd38116dc271e273f57490b9b45b660bf401
https://github.com/RoderickGu/Pretraining_GPT/tree/0a3ecd38116dc271e273f57490b9b45b660bf401
MLP
# 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.nn import Module from torch.nn import Linear from torch.nn import Sig...
jfmalloy1/UltraMarathon_Prediction
MLP
false
3,724
[ "MIT" ]
0
8eef7bd2860ce255994d32a0150c09b3b655cee7
https://github.com/jfmalloy1/UltraMarathon_Prediction/tree/8eef7bd2860ce255994d32a0150c09b3b655cee7
LinearVariance
# 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 math import ...
AlliedToasters/elko_den
LinearVariance
false
7,678
[ "Apache-2.0" ]
38
4e69f7f5c0dc7ffad54c7e190a2b75aba2eab7d2
https://github.com/AlliedToasters/elko_den/tree/4e69f7f5c0dc7ffad54c7e190a2b75aba2eab7d2
PointWiseFeedForward
import torch class PointWiseFeedForward(torch.nn.Module): def __init__(self, hidden_units, dropout_rate): super(PointWiseFeedForward, self).__init__() self.conv1 = torch.nn.Conv1d(hidden_units, hidden_units, kernel_size=1) self.dropout1 = torch.nn.Dropout(p=dropout_rate) self.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 assert_size_stride = torch._C...
Vivdaddy/recsys-filterbubbles
PointWiseFeedForward
false
5,940
[ "MIT" ]
1
d21639bce515ffef5ba2db530dc2505eee1f83c0
https://github.com/Vivdaddy/recsys-filterbubbles/tree/d21639bce515ffef5ba2db530dc2505eee1f83c0
Residual
import torch import torch.nn as nn class Residual(nn.Sequential): """ Residual block that runs like a Sequential, but then adds the original input to the output tensor. See :class:`torch.nn.Sequential` for more information. Warning: The dimension between the input and output of the mo...
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...
FenryrMKIII/objectDetection-lightnet
Residual
false
2,242
[ "MIT" ]
0
3a1fa7b77227210060714a9e22d7d241888b36b4
https://github.com/FenryrMKIII/objectDetection-lightnet/tree/3a1fa7b77227210060714a9e22d7d241888b36b4
conv_head_pooling
import torch import torch.nn as nn class conv_head_pooling(nn.Module): def __init__(self, in_feature, out_feature, stride, conv_type, padding_mode='zeros', dilation=1): super(conv_head_pooling, self).__init__() if conv_type == 'depthwise': _groups = in_feature else: ...
import torch from torch._inductor.select_algorithm import extern_kernels import 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...
yasarniyazoglu/d2go
conv_head_pooling
false
11,032
[ "Apache-2.0" ]
0
308c2700c51c70a7a928d99a477b64e856d1ed5e
https://github.com/yasarniyazoglu/d2go/tree/308c2700c51c70a7a928d99a477b64e856d1ed5e
my_Layernorm
import torch import torch.nn as nn class my_Layernorm(nn.Module): """ Special designed layernorm for the seasonal part """ def __init__(self, channels): super(my_Layernorm, self).__init__() self.layernorm = nn.LayerNorm(channels) def forward(self, x): x_hat = self.layerno...
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_...
thuml/Autoformer
my_Layernorm
false
16,590
[ "MIT" ]
263
6bf300d0bf3e7f3cb4d795dd8ed14ede2000a9ab
https://github.com/thuml/Autoformer/tree/6bf300d0bf3e7f3cb4d795dd8ed14ede2000a9ab
SEModule
# 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_...
ChrisLiu007/Pytorch-Code-Template
SEModule
false
5,008
[ "MIT" ]
1
25eae3ffe43f60a4f7e06651e3a3cd5d0b69b9ae
https://github.com/ChrisLiu007/Pytorch-Code-Template/tree/25eae3ffe43f60a4f7e06651e3a3cd5d0b69b9ae
TestNet
import torch from torch import nn class TestNet(nn.Module): def __init__(self): super().__init__() self.conv = nn.Conv1d(1, 1, 1) def forward(self, x): x_len = x.shape[-1] return self.conv(x.view(-1, 1, x_len)).view(x.shape) def get_inputs(): return [torch.rand([4, 4, 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 import nn assert_size_stride = torch._C._dynamo.guards.assert_size_st...
TuZehai/pytorch_stoi
TestNet
false
14,515
[ "MIT" ]
45
ae58e3ef4d608fc367e522150f48c58f122716fd
https://github.com/TuZehai/pytorch_stoi/tree/ae58e3ef4d608fc367e522150f48c58f122716fd
Discriminator
# 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...
tasfia/BMCoGAN
Discriminator
false
13,107
[ "MIT" ]
0
0d400c2c71dbfb69af422afc487f65afb98de8af
https://github.com/tasfia/BMCoGAN/tree/0d400c2c71dbfb69af422afc487f65afb98de8af
PointwiseConvolutionLayer
# 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 as...
slgao/FU-DeepLearningCourse
PointwiseConvolutionLayer
false
4,360
[ "MIT" ]
0
2300e8bdaa2afb4c73535d5de80874f6103af6f2
https://github.com/slgao/FU-DeepLearningCourse/tree/2300e8bdaa2afb4c73535d5de80874f6103af6f2
GCNModelAE
# 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....
chundiliu/random_rewrite
GCNModelAE
false
1,715
[ "MIT" ]
0
fd106642da82b0ad42b8b0fa405147b321d67cbb
https://github.com/chundiliu/random_rewrite/tree/fd106642da82b0ad42b8b0fa405147b321d67cbb
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....
kama1kant/rl-autonomous-driving
Actor
false
10,356
[ "MIT" ]
0
8f8687ff81892874a32c6a556c6be2e686012731
https://github.com/kama1kant/rl-autonomous-driving/tree/8f8687ff81892874a32c6a556c6be2e686012731
_Residual_Block
import torch import torch.nn as nn class _Residual_Block(nn.Module): def __init__(self): super(_Residual_Block, self).__init__() self.conv1 = nn.Conv2d(in_channels=256, out_channels=256, kernel_size=3, stride=1, padding=1, bias=False) self.relu = nn.ReLU(inplace=True) ...
import torch from torch._inductor.select_algorithm import extern_kernels import triton import triton.language as tl from torch._inductor.runtime.triton_heuristics import grid from torch._C import _cuda_getCurrentRawStream as get_raw_stream from torch._inductor.runtime import triton_helpers import torch.nn as nn assert_...
twtygqyy/pytorch-EDSR
_Residual_Block
false
16,661
[ "MIT" ]
59
001031b6563fcc45d4e7edb7e14c41fb9982ce64
https://github.com/twtygqyy/pytorch-EDSR/tree/001031b6563fcc45d4e7edb7e14c41fb9982ce64
BahdanauAttention
import math import torch from torch import nn import torch.nn.functional as F class BahdanauAttention(nn.Module): def __init__(self, hidden_size): super(BahdanauAttention, self).__init__() self.hidden_size = hidden_size self.attn = nn.Linear(self.hidden_size * 2, hidden_size) self...
import torch from torch._inductor.select_algorithm import extern_kernels import triton import triton.language as tl from torch._inductor.runtime.triton_heuristics import grid from torch._C import _cuda_getCurrentRawStream as get_raw_stream from torch._inductor.runtime import triton_helpers from torch._inductor.runtime....
Chiang97912/seq2seq
BahdanauAttention
false
268
[ "MIT" ]
0
4b544016ecc16fa8e48358021cf486e58494aa0f
https://github.com/Chiang97912/seq2seq/tree/4b544016ecc16fa8e48358021cf486e58494aa0f
AddNet
import torch import torch.nn.functional class AddNet(torch.nn.Module): def __init__(self): super(AddNet, self).__init__() self.conv1 = torch.nn.Conv2d(3, 4, kernel_size=1, stride=1) self.conv2 = torch.nn.Conv2d(3, 4, kernel_size=1, stride=1) def forward(self, x, y): x = 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.functional assert_size_stride = torch._C._dynamo.guards.assert_s...
elad-c/model_optimization
AddNet
false
10,646
[ "Apache-2.0" ]
0
b0ecf41c3f9434008d57d7fe724ff8585e19d4cc
https://github.com/elad-c/model_optimization/tree/b0ecf41c3f9434008d57d7fe724ff8585e19d4cc
MultiHeadAttention
import math import torch from torch import nn import torch.utils.data import torch.optim class MultiHeadAttention(nn.Module): """ Multi-head scaled dot-product attention layer. Args: hidden_size: size of the embeddings in the model, also known as d_model num_attention_heads: number of hea...
import torch from torch._inductor.select_algorithm import extern_kernels import triton import triton.language as tl from 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....
Zenodia/NeMo
MultiHeadAttention
false
1,329
[ "Apache-2.0" ]
0
3c288d8a7caf667c95444c39434e3ebc5f53d911
https://github.com/Zenodia/NeMo/tree/3c288d8a7caf667c95444c39434e3ebc5f53d911
Normalize
# AOT ID: ['0_inference'] from ctypes import c_void_p, c_long, c_int import torch import math import random import os import tempfile from math import inf, nan from torch._inductor.hooks import run_intermediate_hooks from torch._inductor.utils import maybe_profile from torch._inductor.codegen.memory_planning import _al...
import torch import triton import triton.language as tl from torch._inductor.runtime.triton_heuristics import grid from torch._C import _cuda_getCurrentRawStream as get_raw_stream from torch._inductor.runtime.triton_helpers import libdevice import torch.nn as nn import torch.nn.parallel import torch.optim import torch....
Bhaskers-Blu-Org2/metric-transfer.pytorch
Normalize
false
13,394
[ "MIT" ]
51
b0ae8ed6e6f62357100d799defbb61a78c831a87
https://github.com/Bhaskers-Blu-Org2/metric-transfer.pytorch/tree/b0ae8ed6e6f62357100d799defbb61a78c831a87
TreeLSTM
# 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 ...
mhoangvslev/torchfold
TreeLSTM
false
16,040
[ "Apache-2.0" ]
160
9285c7889f2e1966fb94c4b8a3e91bcd60e40ab2
https://github.com/mhoangvslev/torchfold/tree/9285c7889f2e1966fb94c4b8a3e91bcd60e40ab2
AlphaClassifier
import torch import numpy as np from torch import nn from torch.utils.data import DataLoader import torch.nn.functional as F from torchvision import transforms from sklearn.preprocessing import StandardScaler from sklearn import metrics from torch.utils.data import Dataset def compute_auc(labels, scores, pos_label=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 import triton_helpers from torch._inductor.runtime.triton_helpers import math as tl_math import numpy as np fro...
vitskvara/shape-guided-anomaly-detection
AlphaClassifier
false
4,751
[ "MIT" ]
0
6685b2e0b97968a6d0f478d2920486da107b277f
https://github.com/vitskvara/shape-guided-anomaly-detection/tree/6685b2e0b97968a6d0f478d2920486da107b277f
OptimizedMLP
# 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.optim ...
plaveczlambert/nonlinearbubbledynamics
OptimizedMLP
false
10,695
[ "MIT" ]
0
190c5170f7ff6068badeee818c01226c55aaec97
https://github.com/plaveczlambert/nonlinearbubbledynamics/tree/190c5170f7ff6068badeee818c01226c55aaec97
AlphaChooser
import torch from torch import nn class AlphaChooser(torch.nn.Module): """ It manages the alpha values in alpha-entmax function. """ def __init__(self, head_count): super(AlphaChooser, self).__init__() self.pre_alpha = nn.Parameter(torch.randn(head_count)) def forward(self): ...
import torch import triton import triton.language as tl from torch._inductor.runtime.triton_heuristics import grid from torch._C import _cuda_getCurrentRawStream as get_raw_stream from torch._inductor.runtime import triton_helpers from torch import nn assert_size_stride = torch._C._dynamo.guards.assert_size_stride empt...
prajjwal1/fluence2
AlphaChooser
false
16,276
[ "Apache-2.0" ]
64
f7353f4947ac4712ecd1df34e97df27d83060f13
https://github.com/prajjwal1/fluence2/tree/f7353f4947ac4712ecd1df34e97df27d83060f13
ResidualDenseBlock_5C
# AOT ID: ['0_forward'] from ctypes import c_void_p, c_long, c_int import torch import math import random import os import tempfile from math import inf, nan from torch._inductor.hooks import run_intermediate_hooks from torch._inductor.utils import maybe_profile from torch._inductor.codegen.memory_planning import _alig...
import torch from torch._inductor.select_algorithm import extern_kernels import triton import triton.language as tl from torch._inductor.runtime.triton_heuristics import grid from torch._C import _cuda_getCurrentRawStream as get_raw_stream import torch.nn as nn from torch.nn import Parameter assert_size_stride = torch....
LenKerr/Semantic-Colorization-GAN
ResidualDenseBlock_5C
false
5,528
[ "MIT" ]
1
2ce52406ca6fc92e69692b451b1c9ae66ba3b76f
https://github.com/LenKerr/Semantic-Colorization-GAN/tree/2ce52406ca6fc92e69692b451b1c9ae66ba3b76f
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_...
E-Dreamer-LQ/Astronomical_Target_Detection
InstanceNormalization
false
17,234
[ "MIT" ]
6
0c2d6c2e516ff1efa28d44582442123c3a03f079
https://github.com/E-Dreamer-LQ/Astronomical_Target_Detection/tree/0c2d6c2e516ff1efa28d44582442123c3a03f079
Bias
import torch import torch.nn as nn class Bias(nn.Module): def __init__(self): super(Bias, self).__init__() self.bias = nn.Parameter(torch.zeros(1)) def forward(self, feat_img, feat_sound): B, C, H, W = feat_sound.size() feat_img = feat_img.view(B, 1, C) z = torch.bmm(...
import torch from torch._inductor.select_algorithm import extern_kernels import 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...
TaoStarlit/Sound-of-Pixels
Bias
false
11,921
[ "MIT" ]
0
06cd37a75836e22208f2e59bcc263b89938e065e
https://github.com/TaoStarlit/Sound-of-Pixels/tree/06cd37a75836e22208f2e59bcc263b89938e065e
DenseSAGEConv
import math import torch from torch import Tensor from torch.nn import Linear import torch.nn.functional as F from torch.nn import Parameter import torch.utils.data def uniform(size, tensor): bound = 1.0 / math.sqrt(size) if tensor is not None: tensor.data.uniform_(-bound, bound) def kaiming_uniform...
import torch from torch._inductor.select_algorithm import extern_kernels import triton import triton.language as tl from 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 math from torch import...
CFF-Dream/pytorch_geometric
DenseSAGEConv
false
2,033
[ "MIT" ]
0
7c19ad74957409ee9e07314ce81524b3113b9c84
https://github.com/CFF-Dream/pytorch_geometric/tree/7c19ad74957409ee9e07314ce81524b3113b9c84
Temporal_Attention_layer
# AOT ID: ['0_forward'] from ctypes import c_void_p, c_long, c_int import torch import math import random import os import tempfile from math import inf, nan from torch._inductor.hooks import run_intermediate_hooks from torch._inductor.utils import maybe_profile from torch._inductor.codegen.memory_planning import _alig...
import torch from torch._inductor.select_algorithm import extern_kernels import triton import triton.language as tl from torch._inductor.runtime.triton_heuristics import grid from torch._C import _cuda_getCurrentRawStream as get_raw_stream from torch._inductor.runtime import triton_helpers from torch._inductor.runtime....
msalvato/pytorch_geometric_temporal
Temporal_Attention_layer
false
10,591
[ "MIT" ]
0
149bd46d3b2bddfc3570e31a91a3f53e8873d50e
https://github.com/msalvato/pytorch_geometric_temporal/tree/149bd46d3b2bddfc3570e31a91a3f53e8873d50e
ResolutionScalingLayer
# 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.fft assert_size_stride = torch._C._dynamo.guards.assert_size_stride empty_strided_cuda = torch._C._dynamo...
NejcHirci/material-addon
ResolutionScalingLayer
false
17,768
[ "MIT" ]
4
c08e2081413c3319b712c2f7193ac8013f601382
https://github.com/NejcHirci/material-addon/tree/c08e2081413c3319b712c2f7193ac8013f601382
ODEfunc
# 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....
BoyanJIANG/4D-Compositional-Representation
ODEfunc
false
7,836
[ "Apache-2.0" ]
12
64d5f4bbd6b8e6bc3bfd8f76736f6d468c71a73c
https://github.com/BoyanJIANG/4D-Compositional-Representation/tree/64d5f4bbd6b8e6bc3bfd8f76736f6d468c71a73c
RegModel
# 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_...
amperie/user-models
RegModel
false
3,092
[ "Apache-2.0" ]
0
5236c50d0f20a7bac81acc5d1936a3502de2f5f3
https://github.com/amperie/user-models/tree/5236c50d0f20a7bac81acc5d1936a3502de2f5f3
TripletSemihardLoss
import torch import torchvision.transforms.functional as F import torch.nn.functional as F import torch.utils.model_zoo def pdist(A, squared=False, eps=0.0001): prod = torch.mm(A, A.t()) norm = prod.diag().unsqueeze(1).expand_as(prod) res = (norm + norm.t() - 2 * prod).clamp(min=0) if squared: ...
import torch from torch._inductor.select_algorithm import extern_kernels import triton import triton.language as tl from 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....
CompVis/metric-learning-divide-and-conquer-improved
TripletSemihardLoss
false
8,193
[ "MIT" ]
11
33fe768a54376a090e2d7139898177b06e8903d2
https://github.com/CompVis/metric-learning-divide-and-conquer-improved/tree/33fe768a54376a090e2d7139898177b06e8903d2
MultiHeadedAttention
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....
pengchengguo/wenet
MultiHeadedAttention
false
16,236
[ "Apache-2.0" ]
1,166
940dc164e5cfa9b8c0131688f0f9457af9563892
https://github.com/pengchengguo/wenet/tree/940dc164e5cfa9b8c0131688f0f9457af9563892
MemoryDictionary
# 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 as F from typing import * asser...
Geson-anko/ThinkingSimulation
MemoryDictionary
false
11,454
[ "MIT" ]
0
bd4b33c42042a2d8d14e1a9553f19fb4b4bfe8f8
https://github.com/Geson-anko/ThinkingSimulation/tree/bd4b33c42042a2d8d14e1a9553f19fb4b4bfe8f8
Net
# AOT ID: ['0_forward'] from ctypes import c_void_p, c_long, c_int import torch import math import random import os import tempfile from math import inf, nan from torch._inductor.hooks import run_intermediate_hooks from torch._inductor.utils import maybe_profile from torch._inductor.codegen.memory_planning import _alig...
import torch from torch._inductor.select_algorithm import extern_kernels import triton import triton.language as tl from torch._inductor.runtime.triton_heuristics import grid from torch._C import _cuda_getCurrentRawStream as get_raw_stream from torch._inductor.runtime import triton_helpers import torch.nn as nn assert_...
Saran-nns/delve
Net
false
1,032
[ "MIT" ]
0
3489d8aa13181b392d3c47a19f9d9a47d87f8790
https://github.com/Saran-nns/delve/tree/3489d8aa13181b392d3c47a19f9d9a47d87f8790
Selection
# 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, math as tl_math import torch.nn as nn assert_size_stride = torch._C._dynamo.gu...
HendrikPN/reinforced_scinet
Selection
false
17,375
[ "Apache-2.0" ]
4
b57c9d1d997cc56647db4faa0690364e7039a5ee
https://github.com/HendrikPN/reinforced_scinet/tree/b57c9d1d997cc56647db4faa0690364e7039a5ee
DPLSTMCell
# 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 math import ...
romovpa/opacus
DPLSTMCell
false
10,860
[ "Apache-2.0" ]
0
9cda8072e52049a06afba7ab524276bb6613a727
https://github.com/romovpa/opacus/tree/9cda8072e52049a06afba7ab524276bb6613a727
RegLoss
import torch import torch.nn as nn import torch.utils.data def _gather_feat(feat, ind, mask=None): dim = feat.size(2) ind = ind.unsqueeze(2).expand(ind.size(0), ind.size(1), dim) feat = feat.gather(1, ind) if mask is not None: mask = mask.unsqueeze(2).expand_as(feat) feat = feat[mask] ...
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 ...
Ssong24/CenterNet_Custom
RegLoss
false
9,544
[ "MIT" ]
0
526ec70f8dfabf9fb9179c9be28ce50fb2a7961c
https://github.com/Ssong24/CenterNet_Custom/tree/526ec70f8dfabf9fb9179c9be28ce50fb2a7961c
CnptAttention
import torch from torch import nn class CnptAttention(nn.Module): def __init__(self, in_dim, out_dim): super(CnptAttention, self).__init__() self.softmax = nn.Softmax(dim=-1) def forward(self, query, key): """ query: sent_emb (1, D) key: [(k, D), (k,D)] value:...
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...
adonis704/ucas_2021_hc_15
CnptAttention
false
18,225
[ "MIT" ]
6
7308c3b32962ef5430d85ccfcb199ebe40bf4a7f
https://github.com/adonis704/ucas_2021_hc_15/tree/7308c3b32962ef5430d85ccfcb199ebe40bf4a7f
Critic
# AOT ID: ['0_forward'] from ctypes import c_void_p, c_long, c_int import torch import math import random import os import tempfile from math import inf, nan from torch._inductor.hooks import run_intermediate_hooks from torch._inductor.utils import maybe_profile from torch._inductor.codegen.memory_planning import _alig...
import torch from torch._inductor.select_algorithm import extern_kernels import triton import triton.language as tl from torch._inductor.runtime.triton_heuristics import grid from torch._C import _cuda_getCurrentRawStream as get_raw_stream from torch._inductor.runtime import triton_helpers import numpy as np import tor...
rbak/deep-rl-udacity-project-3
Critic
false
12,927
[ "MIT" ]
0
4bf2aec6b0ef27636ebd11dfd4b442554208cffb
https://github.com/rbak/deep-rl-udacity-project-3/tree/4bf2aec6b0ef27636ebd11dfd4b442554208cffb
HFM
import torch import torch.nn as nn import torch.utils.model_zoo class HFM(nn.Module): def __init__(self, k=2): super().__init__() self.k = k self.net = nn.Sequential(nn.AvgPool2d(kernel_size=self.k, stride= self.k), nn.Upsample(scale_factor=self.k, mode='nearest')) def fo...
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.model_zoo assert_size_stride = torch._C._dynamo.guards.assert_size_stride empty_strided_cuda = torc...
NawaNae/ESRT-Huawei
HFM
false
2,680
[ "MIT" ]
0
edea1c0bafec940dc7ea8e5110c355a83188665c
https://github.com/NawaNae/ESRT-Huawei/tree/edea1c0bafec940dc7ea8e5110c355a83188665c
SpatialLogMeanExp
# 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 numpy as np imp...
CPJKU/kagglebirds2020
SpatialLogMeanExp
false
17,030
[ "MIT" ]
4
f86b459389b1d0b0af96ebc9252ffc8496c272e8
https://github.com/CPJKU/kagglebirds2020/tree/f86b459389b1d0b0af96ebc9252ffc8496c272e8
PyConv3
# 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.parallel import torch.optim import torch.u...
lkf59553/pyconv
PyConv3
false
15,944
[ "MIT" ]
295
d8b39cf43014b8fd277dcefc9eb7f8880511e977
https://github.com/lkf59553/pyconv/tree/d8b39cf43014b8fd277dcefc9eb7f8880511e977
DenseModel
# AOT ID: ['0_forward'] from ctypes import c_void_p, c_long, c_int import torch import math import random import os import tempfile from math import inf, nan from torch._inductor.hooks import run_intermediate_hooks from torch._inductor.utils import maybe_profile from torch._inductor.codegen.memory_planning import _alig...
import torch from torch._inductor.select_algorithm import extern_kernels import triton import triton.language as tl from torch._inductor.runtime.triton_heuristics import grid from torch._C import _cuda_getCurrentRawStream as get_raw_stream from torch._inductor.runtime.triton_helpers import libdevice from torch import n...
HSE-LAMBDA/pytorch_ard
DenseModel
false
9,044
[ "MIT" ]
0
b6b40d4c495d3374180698549d8fef0b768ffd3a
https://github.com/HSE-LAMBDA/pytorch_ard/tree/b6b40d4c495d3374180698549d8fef0b768ffd3a
Swish
import torch import torch.nn as nn class Swish(nn.Module): def __init__(self): super(Swish, self).__init__() self.beta = nn.Parameter(torch.tensor(1.0)) def forward(self, x): return x * torch.sigmoid(self.beta * x) def get_inputs(): return [torch.rand([4, 4, 4, 4])] def get_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 torch.nn as nn assert_size_stride = torch._C._dynamo.guards.assert_size_stride empty_strided_cuda = torch._C._dynamo.guards._empty_st...
ahmedfgad/high-fidelity-generative-compression
Swish
false
6,117
[ "Apache-2.0" ]
1
f3c6aa3472e3c629cbc35eefb0957119c913054a
https://github.com/ahmedfgad/high-fidelity-generative-compression/tree/f3c6aa3472e3c629cbc35eefb0957119c913054a
ConvGRUCellNd
# 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 ...
ankmathur96/torchsupport
ConvGRUCellNd
false
3,189
[ "MIT" ]
0
77bf4a90b8770a408665e2604428808c3ed2f979
https://github.com/ankmathur96/torchsupport/tree/77bf4a90b8770a408665e2604428808c3ed2f979
KnowledgeDistillationLoss
import torch import torch.nn as nn class KnowledgeDistillationLoss(nn.Module): def __init__(self, reduction='mean', alpha=1.0): super().__init__() self.reduction = reduction self.alpha = alpha def forward(self, inputs, targets, mask=None): inputs = inputs.narrow(1, 0, targets...
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 ...
VitoPalmisano/MiB_BiSeNet_SEAM_test
KnowledgeDistillationLoss
false
2,946
[ "MIT" ]
0
7b74beb69f135c0bb843ee24c90c3097ce448eec
https://github.com/VitoPalmisano/MiB_BiSeNet_SEAM_test/tree/7b74beb69f135c0bb843ee24c90c3097ce448eec
MultiHeadedAttention
import math import torch import torch.nn as nn import torch.nn.functional as F class MultiHeadedAttention(nn.Module): def __init__(self, num_head, d_model, dropout=0.1): super(MultiHeadedAttention, self).__init__() assert d_model % num_head == 0 self.d_k = d_model // num_head self...
import torch from torch._inductor.select_algorithm import extern_kernels import triton import triton.language as tl from torch._inductor.runtime.triton_heuristics import grid from torch._C import _cuda_getCurrentRawStream as get_raw_stream from torch._inductor.runtime import triton_helpers from torch._inductor.runtime....
bekirufuk/pointer_summarizer
MultiHeadedAttention
false
12,174
[ "Apache-2.0" ]
0
8fc9726f9337b26339848d896a09e7e8f9456bcc
https://github.com/bekirufuk/pointer_summarizer/tree/8fc9726f9337b26339848d896a09e7e8f9456bcc
AttentionPool2d
# 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....
AranKomat/Diff-DALLE
AttentionPool2d
false
13,349
[ "MIT" ]
53
9418e98e97b599c5c65f16ee168fedf76a29095f
https://github.com/AranKomat/Diff-DALLE/tree/9418e98e97b599c5c65f16ee168fedf76a29095f
Mean
# 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 reinterpret...
Tahlor/glom-pytorch
Mean
false
1,125
[ "MIT" ]
0
45b2fc52af5288cd53611e497a70d53ffa303410
https://github.com/Tahlor/glom-pytorch/tree/45b2fc52af5288cd53611e497a70d53ffa303410
HardAttn
import torch from torch.nn import functional as F import torch.nn as nn class HardAttn(nn.Module): """Hard Attention (Sec. 3.1.II)""" def __init__(self, in_channels): super(HardAttn, self).__init__() self.fc = nn.Linear(in_channels, 4 * 2) self.init_params() def init_params(self)...
import torch from torch._inductor.select_algorithm import extern_kernels import triton import triton.language as tl from torch._inductor.runtime.triton_heuristics import grid from torch._C import _cuda_getCurrentRawStream as get_raw_stream from torch._inductor.runtime.triton_helpers import libdevice import torch.nn as ...
RndmVariableQ/deep-person-reid
HardAttn
false
11,869
[ "MIT" ]
0
9ab8343b2fc2ac130aeca5bc2bd1ae808e9ce1b9
https://github.com/RndmVariableQ/deep-person-reid/tree/9ab8343b2fc2ac130aeca5bc2bd1ae808e9ce1b9
Critic
import torch import numpy as np import torch.nn.functional as F import torch.nn as nn def hidden_init(layer): fan_in = layer.weight.data.size()[0] lim = 1.0 / np.sqrt(fan_in) return -lim, lim class Critic(nn.Module): def __init__(self, state_size, action_size, seed, fcs1_units=512, fc2_unit...
import torch from torch._inductor.select_algorithm import extern_kernels import triton import triton.language as tl from torch._inductor.runtime.triton_heuristics import grid from torch._C import _cuda_getCurrentRawStream as get_raw_stream from torch._inductor.runtime import triton_helpers import numpy as np import tor...
asiliskender/deep-reinforcement-learning
Critic
false
12,132
[ "MIT" ]
0
dbf96d67477aa9242128b78b081474193e1e4538
https://github.com/asiliskender/deep-reinforcement-learning/tree/dbf96d67477aa9242128b78b081474193e1e4538
BinaryLoss
import torch import torch.nn as nn import torch.nn.functional as F def adjust_smooth_l1_loss(y_pred, theta=0.1): less_grad_factor = 1.0 / (2 * theta) less_loss_bias = less_grad_factor * theta ** 2 less_than_theta = (y_pred < theta).float() loss = less_than_theta * y_pred ** 2 * less_grad_factor + (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 import torch.nn.functional as F assert_size_stride ...
DerekRay/2020-instanceSeg
BinaryLoss
false
7,952
[ "MIT" ]
25
a08ad95e64726db53cc32a5f90aaa13ae3cdb6a3
https://github.com/DerekRay/2020-instanceSeg/tree/a08ad95e64726db53cc32a5f90aaa13ae3cdb6a3
LinearEnsemble
# 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 as T import torch.nn as nn assert_size_stride = torch._C._dynamo.gu...
RamiSketcher/AMMI-RL
LinearEnsemble
false
975
[ "MIT" ]
0
6d51587ff4d5dc14cba87fca561bd7b340b44586
https://github.com/RamiSketcher/AMMI-RL/tree/6d51587ff4d5dc14cba87fca561bd7b340b44586
SpectralEigenConv
import torch import torch.nn as nn class SpectralEigenConv(nn.Module): def __init__(self, in_features, out_features, bias=False, K=10, alpha= 0.1, **kwargs): super().__init__() assert K > 0 self.K = K self.alpha = alpha self.in_features = in_features self.o...
import torch from torch._inductor.select_algorithm import extern_kernels import triton import triton.language as tl from torch._inductor.runtime.triton_heuristics import grid from torch._C import _cuda_getCurrentRawStream as get_raw_stream import torch.nn as nn assert_size_stride = torch._C._dynamo.guards.assert_size_s...
EdisonLeeeee/GraphGallery
SpectralEigenConv
false
13,650
[ "MIT" ]
300
4eec9c5136bda14809bd22584b26cc346cdb633b
https://github.com/EdisonLeeeee/GraphGallery/tree/4eec9c5136bda14809bd22584b26cc346cdb633b
LipNormLinear
# AOT ID: ['0_forward'] from ctypes import c_void_p, c_long, c_int import torch import math import random import os import tempfile from math import inf, nan from torch._inductor.hooks import run_intermediate_hooks from torch._inductor.utils import maybe_profile from torch._inductor.codegen.memory_planning import _alig...
import torch from torch._inductor.select_algorithm import extern_kernels import triton import triton.language as tl from torch._inductor.runtime.triton_heuristics import grid from torch._C import _cuda_getCurrentRawStream as get_raw_stream from torch._inductor.runtime.triton_helpers import math as tl_math from torch im...
rh-ia/color-information
LipNormLinear
false
4,291
[ "MIT" ]
0
e912a1667e4fffb339dbc574c85020ec6cf78b02
https://github.com/rh-ia/color-information/tree/e912a1667e4fffb339dbc574c85020ec6cf78b02
ClassHead
import torch import torch.nn as nn from itertools import product as product class ClassHead(nn.Module): def __init__(self, inchannels=512, num_anchors=3): super(ClassHead, self).__init__() self.num_anchors = num_anchors self.conv1x1 = nn.Conv2d(inchannels, self.num_anchors * 2, ...
import torch from torch._inductor.select_algorithm import extern_kernels import triton import triton.language as tl from torch._inductor.runtime.triton_heuristics import grid from torch._C import _cuda_getCurrentRawStream as get_raw_stream import torch.nn as nn from itertools import product as product assert_size_strid...
Akshobhya2018eeb1137/Attendance_System_Using_Face_Recognition
ClassHead
false
18,444
[ "MIT" ]
2
a52ca53e15332ab706f6ed23045b38ea6d38dfd9
https://github.com/Akshobhya2018eeb1137/Attendance_System_Using_Face_Recognition/tree/a52ca53e15332ab706f6ed23045b38ea6d38dfd9
Generator
import torch from torch import nn import torch.nn.functional as f class Generator(nn.Module): def __init__(self, nz): super(Generator, self).__init__() self.fc1 = nn.Linear(nz, 10) self.fc2 = nn.Linear(10, 1) def forward(self, x): x = f.relu(self.fc1(x)) x = self.fc2(...
import torch from torch._inductor.select_algorithm import extern_kernels import triton import triton.language as tl from 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...
Anas-Alamri/vegans
Generator
false
4,837
[ "MIT" ]
1
2e8513c9cbebf18d0125cebdc7d924dd6345883a
https://github.com/Anas-Alamri/vegans/tree/2e8513c9cbebf18d0125cebdc7d924dd6345883a
TimeEncoding
import torch import torch.nn as nn class TimeEncoding(nn.Module): def __init__(self, d_model, dropout=0.1, max_len=5000): super(TimeEncoding, self).__init__() self.dropout = nn.Dropout(p=dropout) def forward(self, x, mask, lengths): time = mask * 1 / (lengths[..., None] - 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 import torch.nn as nn assert_size_stride = torch._C._dynamo.guards.assert_size_stride empty_strided_cuda = torch._C._dynamo.guards._empty_st...
Immocat/ACTOR
TimeEncoding
false
13,829
[ "MIT" ]
164
c7237e82e333bf2c57f7d8e12f27d0831233befc
https://github.com/Immocat/ACTOR/tree/c7237e82e333bf2c57f7d8e12f27d0831233befc
BetaIntersection
# 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....
amayuelas/NNKGReasoning
BetaIntersection
false
6,189
[ "MIT" ]
1
0e3623b344fd4e3088ece897f898ddbb1f80888d
https://github.com/amayuelas/NNKGReasoning/tree/0e3623b344fd4e3088ece897f898ddbb1f80888d
Expand
# 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.onnx assert_size_stride = torch._C._dynamo.guards.assert_size_stride empty_strided_cuda = torch._C._dynam...
DDGRCF/YOLOX_OBB
Expand
false
7,943
[ "Apache-2.0" ]
39
27b80953306492b8bc83b86b1353d8cee01ef9b6
https://github.com/DDGRCF/YOLOX_OBB/tree/27b80953306492b8bc83b86b1353d8cee01ef9b6
ComplexConv
# 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...
wizofe/urus-mri-recon
ComplexConv
false
4,539
[ "MIT" ]
0
eab8e48dca31d2b936ce69ccc251ec5a4a10facc
https://github.com/wizofe/urus-mri-recon/tree/eab8e48dca31d2b936ce69ccc251ec5a4a10facc
SourceContextGate
# 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 ...
NaomiatLibrary/OpenNMT-kpg-release
SourceContextGate
false
875
[ "MIT" ]
0
1da3468d7dad22529a77f3526abf9b373bd3dc4c
https://github.com/NaomiatLibrary/OpenNMT-kpg-release/tree/1da3468d7dad22529a77f3526abf9b373bd3dc4c
TripletLoss
import torch from torch import Tensor from torch import nn from torch.nn import functional as F def euclidean_dist(x: 'Tensor', y: 'Tensor') ->Tensor: xx, yy = torch.meshgrid((x ** 2).sum(1), (y ** 2).sum(1)) return xx + yy - 2 * (x @ y.t()) class TripletLoss(nn.Module): """ Modified from Tong Xiao'...
import torch from torch._inductor.select_algorithm import extern_kernels import triton import triton.language as tl from 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 Tensor from...
sithu31296/re_identification
TripletLoss
false
4,342
[ "MIT" ]
0
28c2cf32c6c8c9d79330e1419a7156fe10d8ac95
https://github.com/sithu31296/re_identification/tree/28c2cf32c6c8c9d79330e1419a7156fe10d8ac95
Conv2dWithFastWeight
# 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 typing import Tuple from typing import Union import torch.nn as nn assert_s...
BIGWangYuDong/mmfewshot
Conv2dWithFastWeight
false
13,361
[ "Apache-2.0" ]
376
dac097afc92df176bc2de76b7c90968584865197
https://github.com/BIGWangYuDong/mmfewshot/tree/dac097afc92df176bc2de76b7c90968584865197
Transformer
# 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....
bruchano/ImageStyler
Transformer
false
9,945
[ "MIT" ]
0
7bde13bc954566088c477065adb5c4e4214c28bb
https://github.com/bruchano/ImageStyler/tree/7bde13bc954566088c477065adb5c4e4214c28bb
SALayer
import torch import torch.nn as nn import torch.utils.model_zoo class SALayer(nn.Module): def __init__(self, kernel_size=7): super(SALayer, self).__init__() padding = 3 if kernel_size == 7 else 1 self.conv1 = nn.Conv2d(2, 1, kernel_size, padding=padding, bias=False) self.sigmoid =...
import torch from torch._inductor.select_algorithm import extern_kernels import triton import triton.language as tl from torch._inductor.runtime.triton_heuristics import grid from torch._C import _cuda_getCurrentRawStream as get_raw_stream from torch._inductor.runtime import triton_helpers import torch.nn as nn import ...
JiahangGu/RFN
SALayer
false
17,477
[ "MIT" ]
4
8f7b33e22bb0a9f4057476720e05cc694a46ec00
https://github.com/JiahangGu/RFN/tree/8f7b33e22bb0a9f4057476720e05cc694a46ec00
LipNormConv2d
import torch import torch.nn as nn import torch.nn.functional as F def _max_except_dim(input, dim): maxed = input for axis in range(input.ndimension() - 1, dim, -1): maxed, _ = maxed.max(axis, keepdim=True) for axis in range(dim - 1, -1, -1): maxed, _ = maxed.max(axis, keepdim=True) re...
import torch from torch._inductor.select_algorithm import extern_kernels import triton import triton.language as tl from torch._inductor.runtime.triton_heuristics import grid from torch._C import _cuda_getCurrentRawStream as get_raw_stream from torch._inductor.runtime.triton_helpers import math as tl_math import torch....
zxydi1992/residual-flows
LipNormConv2d
false
13,198
[ "MIT" ]
0
4ec289681dc91cff5312b22f7ebed93838b440fb
https://github.com/zxydi1992/residual-flows/tree/4ec289681dc91cff5312b22f7ebed93838b440fb
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 import torch.nn as nn assert_size_stride = torch._C._dynamo.guards.assert_size_...
uber-common/safemutations
LayerNorm
false
16,639
[ "MIT" ]
91
40e5fd03a244f89bf157d4bedf79201e706aedc1
https://github.com/uber-common/safemutations/tree/40e5fd03a244f89bf157d4bedf79201e706aedc1
RMSE
import torch import torch.nn.functional as F import torch.nn as nn class RMSE(nn.Module): def __init__(self): super(RMSE, self).__init__() def forward(self, fake, real): if not fake.shape == real.shape: _, _, H, W = real.shape fake = F.upsample(fake, size=(H, W), mode...
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...
Khoronus/MonoDepth-FPN-PyTorch
RMSE
false
723
[ "MIT" ]
0
6e41e297723d1490c537e04afff905c61d6f0ff8
https://github.com/Khoronus/MonoDepth-FPN-PyTorch/tree/6e41e297723d1490c537e04afff905c61d6f0ff8
BasicBlock
# AOT ID: ['0_forward'] from ctypes import c_void_p, c_long, c_int import torch import math import random import os import tempfile from math import inf, nan from torch._inductor.hooks import run_intermediate_hooks from torch._inductor.utils import maybe_profile from torch._inductor.codegen.memory_planning import _alig...
import torch from torch._inductor.select_algorithm import extern_kernels import triton import triton.language as tl from torch._inductor.runtime.triton_heuristics import grid from torch._C import _cuda_getCurrentRawStream as get_raw_stream from torch._inductor.runtime import triton_helpers import math import torch.nn a...
ardihikaru/learn-to-cluster
BasicBlock
false
6,230
[ "MIT" ]
1
d7a5ea0946f7b402f8878bfd608bf3e0dc9a26ca
https://github.com/ardihikaru/learn-to-cluster/tree/d7a5ea0946f7b402f8878bfd608bf3e0dc9a26ca
FeatExemplarAvgBlock
import torch import torch.nn as nn class FeatExemplarAvgBlock(nn.Module): def __init__(self, nFeat): super(FeatExemplarAvgBlock, self).__init__() def forward(self, features_train, labels_train): labels_train_transposed = labels_train.transpose(1, 2) weight_novel = torch.bmm(labels_tr...
import torch from torch._inductor.select_algorithm import extern_kernels import 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...
CSer-Tang-hao/FS-KTN
FeatExemplarAvgBlock
false
7,869
[ "MIT" ]
19
8e5b1637e0f86f9d29dad7ff740a9c7a4a292a74
https://github.com/CSer-Tang-hao/FS-KTN/tree/8e5b1637e0f86f9d29dad7ff740a9c7a4a292a74
TemporalDecay
import math import torch import torch.nn as nn import torch.nn.functional as F from torch.nn.parameter import Parameter class TemporalDecay(nn.Module): def __init__(self, input_size, rnn_hid_size): super(TemporalDecay, self).__init__() self.rnn_hid_size = rnn_hid_size self.build(input_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._inductor.runtime....
Sobhan1996/BRITS-master
TemporalDecay
false
9,511
[ "MIT" ]
0
66726ec104dad43c6d8367b0c9ef8f19daf65f0e
https://github.com/Sobhan1996/BRITS-master/tree/66726ec104dad43c6d8367b0c9ef8f19daf65f0e
LandmarkHead
import torch from torch import nn import torch.cuda class LandmarkHead(nn.Module): """ LandmarkHead RetinaFace head for landmark branch. inchannels (`int`): number of input channels. num_anchors (`int`): number of anchors. """ def __init__(self, inchannel...
import torch from torch._inductor.select_algorithm import extern_kernels import triton import 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.cuda assert_size_stride = torch._C._dynamo.gua...
LoveEachDay/towhee
LandmarkHead
false
11,717
[ "Apache-2.0" ]
0
513c9c2626676cadaaf0a16ac3c828d96bec91a1
https://github.com/LoveEachDay/towhee/tree/513c9c2626676cadaaf0a16ac3c828d96bec91a1
policy_net
# AOT ID: ['0_forward'] from ctypes import c_void_p, c_long, c_int import torch import math import random import os import tempfile from math import inf, nan from torch._inductor.hooks import run_intermediate_hooks from torch._inductor.utils import maybe_profile from torch._inductor.codegen.memory_planning import _alig...
import torch from torch._inductor.select_algorithm import extern_kernels import triton import triton.language as tl from torch._inductor.runtime.triton_heuristics import grid from torch._C import _cuda_getCurrentRawStream as get_raw_stream from torch._inductor.runtime import triton_helpers from torch._inductor.runtime....
bigtreeljc/force_learning
policy_net
false
3,209
[ "MIT" ]
0
183a7c96c411e282966604e3cb375ba49e91a88c
https://github.com/bigtreeljc/force_learning/tree/183a7c96c411e282966604e3cb375ba49e91a88c
PixelwiseLossMSE
# 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...
akanametov/pathgan
PixelwiseLossMSE
false
18,295
[ "MIT" ]
8
d93464a9c2490532afdf7bbc0f60decdf2d0767d
https://github.com/akanametov/pathgan/tree/d93464a9c2490532afdf7bbc0f60decdf2d0767d
Atan
import torch import torch.nn as nn class Atan(nn.Module): def forward(self, x): return torch.atan(x) 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.triton_helpers import libdevice import torch.nn as nn assert_size_stride = torch._C._dynamo.guards.assert_size_...
awlange/pysurvival
Atan
false
14,916
[ "Apache-2.0" ]
242
841b9bc6ce700ba8898d2a1488aa9cd25ee7a8e6
https://github.com/awlange/pysurvival/tree/841b9bc6ce700ba8898d2a1488aa9cd25ee7a8e6
SimpleReshapeModel
import torch import torch.jit import torch.onnx import torch.nn class SimpleReshapeModel(torch.nn.Module): def __init__(self, shape): super(SimpleReshapeModel, self).__init__() self.shape = shape def forward(self, tensor): combined = tensor + tensor return combined.reshape(se...
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
SimpleReshapeModel
false
14,684
[ "Apache-2.0" ]
2,838
a13706a4239fa7eaf059c670dc573e3eb0768f86
https://github.com/YaronBenAtar/glow/tree/a13706a4239fa7eaf059c670dc573e3eb0768f86
AconC
# AOT ID: ['0_forward'] from ctypes import c_void_p, c_long, c_int import torch import math import random import os import tempfile from math import inf, nan from torch._inductor.hooks import run_intermediate_hooks from torch._inductor.utils import maybe_profile from torch._inductor.codegen.memory_planning import _alig...
import torch import triton import triton.language as tl from torch._inductor.runtime.triton_heuristics import grid from torch._C import _cuda_getCurrentRawStream as get_raw_stream import torch.nn as nn assert_size_stride = torch._C._dynamo.guards.assert_size_stride empty_strided_cuda = torch._C._dynamo.guards._empty_st...
IanVzs/labelImg
AconC
false
11,505
[ "MIT" ]
0
3d3dfbf9cf385f38c60376826fdce1f178f563a6
https://github.com/IanVzs/labelImg/tree/3d3dfbf9cf385f38c60376826fdce1f178f563a6
BinaryMul
import abc import inspect import torch import warnings import torch.nn as nn import torch.nn.parallel import torch.optim import torch.utils.data from typing import Any from typing import * def get_module_name(cls_or_func): module_name = cls_or_func.__module__ if module_name == '__main__': for frm in 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 abc import inspect import warnings import torch.nn as nn import torch.nn.parallel import torch.optim import torch.utils.data from typ...
Johnsonms/NNI_master
BinaryMul
false
11,564
[ "MIT" ]
0
e5e5c7aed89cf3189cffe1056464833c15eb54ff
https://github.com/Johnsonms/NNI_master/tree/e5e5c7aed89cf3189cffe1056464833c15eb54ff
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....
QiuhongAnnaWei/IBRNet
MultiHeadAttention
false
14,276
[ "Apache-2.0" ]
254
6c8b68e6d95eae04535ff0906387ec7899f5d5ce
https://github.com/QiuhongAnnaWei/IBRNet/tree/6c8b68e6d95eae04535ff0906387ec7899f5d5ce
NN
import torch from torch import nn import torch.nn.functional as F class NN(nn.Module): def __init__(self): super().__init__() self.fc1 = nn.Linear(4, 16) self.fc2 = nn.Linear(16, 3) def forward(self, x): x = F.relu(self.fc1(x)) x = self.fc2(x) return x def 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 import triton_helpers from torch import nn assert_s...
Jie-Yuan/Deeps
NN
false
17,478
[ "MIT" ]
4
b4acbb8e16b8ff5d181e70c3b549df0d818d0d76
https://github.com/Jie-Yuan/Deeps/tree/b4acbb8e16b8ff5d181e70c3b549df0d818d0d76
Critic
import torch import torch.nn as nn import torch.nn.functional as F class Critic(nn.Module): """Initialize parameters and build model. Args: state_dim (int): Dimension of each state action_dim (int): Dimension of each action Return: value output of network "...
import torch from torch._inductor.select_algorithm import extern_kernels import triton import triton.language as tl from 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 ...
sofya-pugach/spot_mini_mini
Critic
false
16,485
[ "MIT" ]
323
42770145e91ed2625ccc7e4f4d7016ce14a61464
https://github.com/sofya-pugach/spot_mini_mini/tree/42770145e91ed2625ccc7e4f4d7016ce14a61464
GradientLoss
import torch from torch import nn class GradientLoss(nn.Module): """ L1 loss on the gradient of the picture """ def __init__(self): super(GradientLoss, self).__init__() def forward(self, a): gradient_a_x = torch.abs(a[:, :, :, :-1] - a[:, :, :, 1:]) gradient_a_y = torch.a...
import torch import triton import triton.language as tl from torch._inductor.runtime.triton_heuristics import grid from torch._C import _cuda_getCurrentRawStream as get_raw_stream from torch._inductor.runtime.triton_helpers import math as tl_math from torch import nn assert_size_stride = torch._C._dynamo.guards.assert_...
GuYuanjie/Deep-Retinex-fusion
GradientLoss
false
17,340
[ "MIT" ]
5
ffa2a1689fd512c8820fd87cbf665c09bcb142b4
https://github.com/GuYuanjie/Deep-Retinex-fusion/tree/ffa2a1689fd512c8820fd87cbf665c09bcb142b4
MaxNormConstraintLinear
import torch import torch.nn as nn class MaxNormConstraintLinear(nn.Linear): def __init__(self, *args, max_norm_value=1, norm_axis=0, **kwargs): self.max_norm_value = max_norm_value self.norm_axis = norm_axis super().__init__(*args, **kwargs) def forward(self, input): self.we...
import torch from torch._inductor.select_algorithm import extern_kernels import triton import triton.language as tl from 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....
Mrswolf/brainda
MaxNormConstraintLinear
false
8,567
[ "MIT" ]
24
cbd2fa6334d9e6243324dbaf086be4eb4047e801
https://github.com/Mrswolf/brainda/tree/cbd2fa6334d9e6243324dbaf086be4eb4047e801
four_layer_conv
import torch class four_layer_conv(torch.nn.Module): def __init__(self): super(four_layer_conv, self).__init__() self.relu = torch.nn.ReLU(inplace=True) self.fcn1 = torch.nn.Conv2d(256, 256, 3, stride=1, padding=1) self.fcn2 = torch.nn.Conv2d(256, 256, 3, stride=1, padding=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 assert_size_stride = torch._C...
peckjon/detectorch
four_layer_conv
false
16,270
[ "Apache-2.0" ]
627
69d31250d79a72b12b7419638ef59163f833bbba
https://github.com/peckjon/detectorch/tree/69d31250d79a72b12b7419638ef59163f833bbba
ClassHead
import torch import torch.nn as nn from itertools import product as product class ClassHead(nn.Module): def __init__(self, inchannels=512, num_anchors=2): super(ClassHead, self).__init__() self.num_anchors = num_anchors self.conv1x1 = nn.Conv2d(inchannels, self.num_anchors * 2, ...
import torch from torch._inductor.select_algorithm import extern_kernels import triton import triton.language as tl from torch._inductor.runtime.triton_heuristics import grid from torch._C import _cuda_getCurrentRawStream as get_raw_stream import torch.nn as nn from itertools import product as product assert_size_strid...
huigs/retinaface-pytorch
ClassHead
false
10,246
[ "MIT" ]
0
0d7551d5863d172c2122bdd8d2d58be36e1b10fd
https://github.com/huigs/retinaface-pytorch/tree/0d7551d5863d172c2122bdd8d2d58be36e1b10fd
Policy
import torch from copy import deepcopy import torch.nn as nn from typing import * import torch.utils import torch.optim class Policy(nn.Module): def __init__(self, max_nodes, search_space): super(Policy, self).__init__() self.max_nodes = max_nodes self.search_space = deepcopy(search_space...
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 copy import deepc...
Mirofil/AutoDL-Projects
Policy
false
2,654
[ "MIT" ]
0
e7ee9fe27e5c5561a4b9fd1c1ee185677ef30893
https://github.com/Mirofil/AutoDL-Projects/tree/e7ee9fe27e5c5561a4b9fd1c1ee185677ef30893
KLLoss
import torch import torch.nn as nn import torch.nn.functional as F class KLLoss(nn.Module): """ KL-Divergence symmetric loss between two distributions Used in here for knowledge distillation """ def __init__(self): super(KLLoss, self).__init__() self.similarity_f = nn.CosineSimila...
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...
NeurAI-Lab/DoGo
KLLoss
false
17,764
[ "MIT" ]
3
e3038204f15a40a2d5caca20bb171c87a40d95ba
https://github.com/NeurAI-Lab/DoGo/tree/e3038204f15a40a2d5caca20bb171c87a40d95ba
InitConv
import torch import torch.nn as nn import torch.nn.functional as F import torch.optim class InitConv(nn.Module): def __init__(self, in_channels=4, out_channels=16, dropout=0.2): super(InitConv, self).__init__() self.conv = nn.Conv3d(in_channels, out_channels, kernel_size=3, padding=1)...
import torch from torch._inductor.select_algorithm import extern_kernels import triton import triton.language as tl from torch._inductor.runtime.triton_heuristics import grid from torch._C import _cuda_getCurrentRawStream as get_raw_stream import torch.nn as nn import torch.optim assert_size_stride = torch._C._dynamo.g...
felixquinton1/TransBTS
InitConv
false
10,173
[ "Apache-2.0" ]
0
6992c902413ba15f40ebfe9f6d5d0e3594051033
https://github.com/felixquinton1/TransBTS/tree/6992c902413ba15f40ebfe9f6d5d0e3594051033
SimpleConvTranspose2dModule
import torch import torch.nn.functional as F import torch.jit import torch.onnx import torch.nn class SimpleConvTranspose2dModule(torch.nn.Module): def __init__(self, stride=1, padding=0, output_padding=0, dilation=1, groups=1): super(SimpleConvTranspose2dModule, self).__init__() self.str...
import torch from torch._inductor.select_algorithm import extern_kernels import triton import triton.language as tl from 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.jit import torch...
andreas-hommel/glow
SimpleConvTranspose2dModule
false
3,325
[ "Apache-2.0" ]
0
2bbbf8188a2a941e85677c83f2146bbd076a262e
https://github.com/andreas-hommel/glow/tree/2bbbf8188a2a941e85677c83f2146bbd076a262e
AnchorBoxTransform
import torch from torch import Tensor from typing import Optional import torch.nn as nn class AnchorBoxTransform(nn.Module): def __init__(self, mean: 'Optional[Tensor]'=None, std: 'Optional[Tensor]'=None, log_length: 'bool'=False): super(AnchorBoxTransform, self).__init__() self.mean = me...
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 Tensor from typing import Optional import torch.nn as nn assert_size_stride = torch._C._dynamo.guards.assert_size_stride e...
TidalPaladin/combustion
AnchorBoxTransform
false
17,985
[ "Apache-2.0" ]
3
69b9a2b9baf90b81ed9098b4f0391f5c15efaee7
https://github.com/TidalPaladin/combustion/tree/69b9a2b9baf90b81ed9098b4f0391f5c15efaee7
NatureHead
import torch import torch.nn as nn import torch.nn.functional as F class NatureHead(torch.nn.Module): """ DQN Nature 2015 paper input: [None, 84, 84, 4]; output: [None, 3136] -> [None, 512]; """ def __init__(self, n): super(NatureHead, self).__init__() self.conv1 = nn.Conv2d(n, 32...
import torch from torch._inductor.select_algorithm import extern_kernels import triton import triton.language as tl from torch._inductor.runtime.triton_heuristics import grid from torch._C import _cuda_getCurrentRawStream as get_raw_stream from torch._inductor.runtime import triton_helpers import torch.nn as nn assert_...
andy920262/pytorch-a2c-ppo-acktr
NatureHead
false
12,095
[ "MIT" ]
0
2e7e85219dfe737cb4036de3cf0c8b00706d640e
https://github.com/andy920262/pytorch-a2c-ppo-acktr/tree/2e7e85219dfe737cb4036de3cf0c8b00706d640e
Quantization
# 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...
yzxing87/Invertible-ISP
Quantization
false
16,793
[ "MIT" ]
246
344dd333dd2a075f6a9e4ffc445dc387ca3014c4
https://github.com/yzxing87/Invertible-ISP/tree/344dd333dd2a075f6a9e4ffc445dc387ca3014c4
MaxPool
# AOT ID: ['0_inference'] from ctypes import c_void_p, c_long, c_int import torch import math import random import os import tempfile from math import inf, nan from torch._inductor.hooks import run_intermediate_hooks from torch._inductor.utils import maybe_profile from torch._inductor.codegen.memory_planning import _al...
import torch import triton import triton.language as tl from torch._inductor.runtime.triton_heuristics import grid from torch._C import _cuda_getCurrentRawStream as get_raw_stream from torch._inductor.runtime import triton_helpers from torch import nn import torch.utils.data import torch.utils import torch.cuda assert_...
chomin/BayesNAS
MaxPool
false
3,293
[ "Apache-2.0" ]
0
7b1d991d1e10213fa999eab513d1e12fe4bb571b
https://github.com/chomin/BayesNAS/tree/7b1d991d1e10213fa999eab513d1e12fe4bb571b
LayerThreshold
# 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 random import torch.nn as nn assert_size_stride = torch._C._dynamo.guards.assert_size_stride empty_strided_cuda = torch._C._dynamo.gu...
dawnclaude/onnx2keras
LayerThreshold
false
15,149
[ "MIT" ]
115
3d2a47c0a228b91fd434232274e216e491da36e3
https://github.com/dawnclaude/onnx2keras/tree/3d2a47c0a228b91fd434232274e216e491da36e3
StatsPool
# AOT ID: ['0_inference'] from ctypes import c_void_p, c_long, c_int import torch import math import random import os import tempfile from math import inf, nan from torch._inductor.hooks import run_intermediate_hooks from torch._inductor.utils import maybe_profile from torch._inductor.codegen.memory_planning import _al...
import torch import triton import triton.language as tl from torch._inductor.runtime.triton_heuristics import grid from torch._C import _cuda_getCurrentRawStream as get_raw_stream from torch._inductor.runtime.triton_helpers import libdevice import torch.nn as nn import torch.optim assert_size_stride = torch._C._dynamo....
suissemaxx/pyannote-audio-develop_colab
StatsPool
false
4,386
[ "MIT" ]
0
e9499372a1771c21e1604424a6dd041337111093
https://github.com/suissemaxx/pyannote-audio-develop_colab/tree/e9499372a1771c21e1604424a6dd041337111093
HingeGANLossDiscriminator
import torch import torch.nn as nn class HingeGANLossDiscriminator(nn.Module): """ This class implements the Hinge discriminator GAN loss proposed in: https://arxiv.org/pdf/1705.02894.pdf """ def __init__(self) ->None: """ Constructor method. """ super(HingeGANLoss...
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...
ChristophReich1996/Mode_Collapse
HingeGANLossDiscriminator
false
7,901
[ "MIT" ]
14
937ee8bf96510fbf4070fc7e14b78276ab036b8c
https://github.com/ChristophReich1996/Mode_Collapse/tree/937ee8bf96510fbf4070fc7e14b78276ab036b8c
TemporalAttention
import torch from torch import nn class TemporalAttention(nn.Module): """ Temporal attention module from https://dl.acm.org/doi/abs/10.1145/3448083 """ def __init__(self, hidden_dim): super(TemporalAttention, self).__init__() self.fc = nn.Linear(hidden_dim, 1) self.sm = torch....
import torch from torch._inductor.select_algorithm import extern_kernels import triton import triton.language as tl from 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....
STRCSussex-UbiCompSiegen/dl_har_model
TemporalAttention
false
2,866
[ "MIT" ]
0
caac0f87fc7dd08a5d6ad3e4455ee25b35f5e7b4
https://github.com/STRCSussex-UbiCompSiegen/dl_har_model/tree/caac0f87fc7dd08a5d6ad3e4455ee25b35f5e7b4
SelfAttentionFuseLayer
import torch from torch import nn class SelfAttentionFuseLayer(nn.Module): def __init__(self, dim): super(SelfAttentionFuseLayer, self).__init__() self.W_7 = nn.Linear(dim, dim) self.w_8 = nn.Linear(dim, 1) self.activation = nn.Tanh() def forward(self, hidden_states): ...
import torch from torch._inductor.select_algorithm import extern_kernels import triton import triton.language as tl from 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....
nju-websoft/Jeeves
SelfAttentionFuseLayer
false
12,834
[ "Apache-2.0" ]
0
6c817ed9e9c36a27c1c10a0a3c863ca0e5fdb5c1
https://github.com/nju-websoft/Jeeves/tree/6c817ed9e9c36a27c1c10a0a3c863ca0e5fdb5c1
IoULoss
import torch import torch.nn as nn import torch.nn.functional as F import torch.nn.parallel import torch.optim import torch.utils.data.distributed class IoULoss(nn.Module): """ Creates a criterion that computes the Intersection over Union (IoU) between a segmentation mask and its ground truth. Rahman...
import torch import triton import triton.language as tl from torch._inductor.runtime.triton_heuristics import grid from torch._C import _cuda_getCurrentRawStream as get_raw_stream from torch._inductor.runtime import triton_helpers import torch.nn as nn import torch.nn.parallel import torch.optim import torch.utils.data...
TransformersWsz/onestage_grounding
IoULoss
false
2,916
[ "MIT" ]
0
c939a7d5d7c7f9e1bfa8df2e6269397b8f840b5a
https://github.com/TransformersWsz/onestage_grounding/tree/c939a7d5d7c7f9e1bfa8df2e6269397b8f840b5a