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
SAB
# 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....
OpenXAIProject/dac
SAB
false
8,642
[ "MIT" ]
17
652776e21b56dcb68839363bb077d5c5ea28d81e
https://github.com/OpenXAIProject/dac/tree/652776e21b56dcb68839363bb077d5c5ea28d81e
InputConv
import torch import torch.nn as nn import torch.nn.functional as F def _get_padding(kernel_size, stride, dilation): padding = (stride - 1 + dilation * (kernel_size - 1)) // 2 return padding class InputConv(nn.Module): def __init__(self, inp, outp, k=3, stride=1, dilation=1): super(InputConv, se...
import torch from torch._inductor.select_algorithm import extern_kernels import triton import triton.language as tl from torch._inductor.runtime.triton_heuristics import grid from torch._C import _cuda_getCurrentRawStream as get_raw_stream from torch._inductor.runtime import triton_helpers import torch.nn as nn assert_...
AksultanMukhanbet/proctoring_intellectual_part
InputConv
false
8,838
[ "MIT" ]
0
f85db9d31025cb57a732f64ab22358651bc93c69
https://github.com/AksultanMukhanbet/proctoring_intellectual_part/tree/f85db9d31025cb57a732f64ab22358651bc93c69
MatrixConv2dResblock
# AOT ID: ['0_forward'] from ctypes import c_void_p, c_long, c_int import torch import math import random import os import tempfile from math import inf, nan from torch._inductor.hooks import run_intermediate_hooks from torch._inductor.utils import maybe_profile from torch._inductor.codegen.memory_planning import _alig...
import torch from torch._inductor.select_algorithm import extern_kernels import triton import triton.language as tl from torch._inductor.runtime.triton_heuristics import grid from torch._C import _cuda_getCurrentRawStream as get_raw_stream from torch._inductor.runtime import triton_helpers import torch.nn as nn import ...
RyusukeYamano/nngen
MatrixConv2dResblock
false
14,352
[ "Apache-2.0" ]
207
9ed1f7fb83908794aa94d70287d89545d45fe875
https://github.com/RyusukeYamano/nngen/tree/9ed1f7fb83908794aa94d70287d89545d45fe875
CenterLoss
import torch import torch.nn.functional as F import torch.nn as nn class CenterLoss(nn.Module): """Implements the Center loss from https://ydwen.github.io/papers/WenECCV16.pdf""" def __init__(self, num_classes, embed_size, cos_dist=True): super().__init__() self.cos_dist = cos_dist 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 from torch._inductor.runtime import triton_helpers from torch._inductor.runtime.triton_helpers import libdevice import torch.nn as nn assert...
grib0ed0v/face_recognition.pytorch
CenterLoss
false
15,466
[ "Apache-2.0" ]
158
05cb9b30e8220445fcb27988926d88f330091c12
https://github.com/grib0ed0v/face_recognition.pytorch/tree/05cb9b30e8220445fcb27988926d88f330091c12
Attention
# 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....
abhinavrangarajan/genienlp
Attention
false
1,354
[ "BSD-3-Clause" ]
0
ba121274b3365739ce9e5a8facc9a2904149b9c7
https://github.com/abhinavrangarajan/genienlp/tree/ba121274b3365739ce9e5a8facc9a2904149b9c7
MaxPool2dLayer
import torch import torch.nn as nn import torch.nn.functional as F class MaxPool2dLayer(nn.Module): def forward(self, tensor, kernel_size=(3, 3), stride=(1, 1), padding=0, ceil_mode=False): return F.max_pool2d(tensor, kernel_size, stride=stride, padding= padding, ceil_mode=ceil_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 import torch.nn as nn assert_size_stride = torch._C._dynamo.guards.assert_size_stride emp...
a-kore/lucent
MaxPool2dLayer
false
1,344
[ "Apache-2.0" ]
0
6b2b4dfea45c36c99e16f9923104a532df80e0a8
https://github.com/a-kore/lucent/tree/6b2b4dfea45c36c99e16f9923104a532df80e0a8
Scale
import torch from torch import nn class Scale(nn.Module): def __init__(self, scale): super().__init__() self.scale = scale def forward(self, x): return x * self.scale def get_inputs(): return [torch.rand([4, 4, 4, 4])] def get_init_inputs(): return [[], {'scale': 1.0}]
import torch import triton import triton.language as tl from torch._inductor.runtime.triton_heuristics import grid from torch._C import _cuda_getCurrentRawStream as get_raw_stream from torch import nn assert_size_stride = torch._C._dynamo.guards.assert_size_stride empty_strided_cuda = torch._C._dynamo.guards._empty_str...
FranardoHuang/ROAR
Scale
false
5,168
[ "Apache-2.0" ]
1
859e22389907dd0e61c83980ae5ff6dae51341d3
https://github.com/FranardoHuang/ROAR/tree/859e22389907dd0e61c83980ae5ff6dae51341d3
torch_uint8_to_float_normed
# AOT ID: ['0_inference'] from ctypes import c_void_p, c_long, c_int import torch import math import random import os import tempfile from math import inf, nan from torch._inductor.hooks import run_intermediate_hooks from torch._inductor.utils import maybe_profile from torch._inductor.codegen.memory_planning import _al...
import torch import triton import triton.language as tl from torch._inductor.runtime.triton_heuristics import grid from torch._C import _cuda_getCurrentRawStream as get_raw_stream assert_size_stride = torch._C._dynamo.guards.assert_size_stride empty_strided_cuda = torch._C._dynamo.guards._empty_strided_cuda @triton.j...
ozendelait/pytorch-semseg
torch_uint8_to_float_normed
false
7,435
[ "MIT" ]
1
200491febd653bd26befcd5b3d52c614aa832b7e
https://github.com/ozendelait/pytorch-semseg/tree/200491febd653bd26befcd5b3d52c614aa832b7e
BMNLoss
import torch import torch.nn.functional as F import torch.nn as nn def binary_logistic_regression_loss(reg_score, label, threshold=0.5, ratio_range=(1.05, 21), eps=1e-05): """Binary Logistic Regression Loss.""" label = label.view(-1) reg_score = reg_score.contiguous().view(-1) pmask = (label > thr...
import torch from torch import device import triton import triton.language as tl from 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_ma...
Viditagarwal7479/Video-Swin-Transformer
BMNLoss
false
18,064
[ "Apache-2.0" ]
9
37910ef3141c7b2eef76544f9ec8bdf26ec94c7d
https://github.com/Viditagarwal7479/Video-Swin-Transformer/tree/37910ef3141c7b2eef76544f9ec8bdf26ec94c7d
CNN_Model
# 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....
CaFeCoKe/Leaf_Disease_Classification
CNN_Model
false
11,317
[ "MIT" ]
0
113a69cc896f91c878eb391b3650fb4bfe1975c3
https://github.com/CaFeCoKe/Leaf_Disease_Classification/tree/113a69cc896f91c878eb391b3650fb4bfe1975c3
GatedConv
# 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.utils.data assert_size_stride = torch._C._dyn...
musyoku/ffjord
GatedConv
false
7,302
[ "MIT" ]
1
9e431e122e59fa9a71f3f301dec8fdd3db51e0ce
https://github.com/musyoku/ffjord/tree/9e431e122e59fa9a71f3f301dec8fdd3db51e0ce
SRCNN
import logging import torch import torch.nn as nn def get_root_logger(log_file=None, log_level=logging.INFO): """Get the root logger. The logger will be initialized if it has not been initialized. By default a StreamHandler will be added. If `log_file` is specified, a FileHandler will also be added. ...
import torch from torch._inductor.select_algorithm import extern_kernels import triton import triton.language as tl from 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....
hejm37/mmediting
SRCNN
false
12,494
[ "Apache-2.0" ]
0
d4086aaf8a36ae830f1714aad585900d24ad1156
https://github.com/hejm37/mmediting/tree/d4086aaf8a36ae830f1714aad585900d24ad1156
ComplexCnnQAHead
# AOT ID: ['0_forward'] from ctypes import c_void_p, c_long, c_int import torch import math import random import os import tempfile from math import inf, nan from torch._inductor.hooks import run_intermediate_hooks from torch._inductor.utils import maybe_profile from torch._inductor.codegen.memory_planning import _alig...
import torch from torch._inductor.select_algorithm import extern_kernels import triton import triton.language as tl from torch._inductor.runtime.triton_heuristics import grid from torch._C import _cuda_getCurrentRawStream as get_raw_stream from torch._inductor.runtime import triton_helpers from torch import nn assert_s...
park-sungmoo/odqa_baseline_code
ComplexCnnQAHead
false
16,228
[ "Apache-2.0" ]
67
45954be766e5f987bef18e5b8a2e47f1508742cd
https://github.com/park-sungmoo/odqa_baseline_code/tree/45954be766e5f987bef18e5b8a2e47f1508742cd
GaussianLoss
import torch class GaussianLoss(torch.nn.Module): """ Gaussian log-likelihood loss. It assumes targets `y` with n rows and d columns, but estimates `yhat` with n rows and 2d columns. The columns 0:d of `yhat` contain estimated means, the columns d:2*d of `yhat` contain estimated variances. This 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 from torch._inductor.runtime.triton_helpers import math as tl_math assert_size_stride = torch._C._dynamo.guards.assert_size_stride empty_str...
scottgigante-immunai/CPA
GaussianLoss
false
16,365
[ "MIT" ]
132
9338ede503d36c6163a521bee904aa93d896ef92
https://github.com/scottgigante-immunai/CPA/tree/9338ede503d36c6163a521bee904aa93d896ef92
STFullyConnected
import time import torch import numpy as np from torch import nn from torch import optim from torch.nn import functional as F class Base(nn.Module): """ This class is the base structure for all of classification/regression DNN models. Mainly, it provides the general methods for training, evaluating model and ...
import torch from torch._inductor.select_algorithm import extern_kernels import triton import triton.language as tl from 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....
naisuu/DrugEx
STFullyConnected
false
4,074
[ "MIT" ]
0
8708c98a137473f11990d70e43a46018806b6f39
https://github.com/naisuu/DrugEx/tree/8708c98a137473f11990d70e43a46018806b6f39
VarifocalLoss
# 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...
CityU-AIM-Group/HTD
VarifocalLoss
false
17,114
[ "MIT" ]
5
0be9fd844118c275abc6053b3cbd5ffb589e62ee
https://github.com/CityU-AIM-Group/HTD/tree/0be9fd844118c275abc6053b3cbd5ffb589e62ee
Transition
import torch import torch.nn as nn class Transition(nn.Module): def __init__(self, in_features, out_features, act_layer=nn.GELU): super(Transition, self).__init__() self.act = act_layer() self.linear = nn.Linear(in_features, out_features) def forward(self, x): x = self.linear...
import torch from torch._inductor.select_algorithm import extern_kernels import triton import triton.language as tl from torch._inductor.runtime.triton_heuristics import grid from torch._C import _cuda_getCurrentRawStream as get_raw_stream from torch._inductor.runtime.triton_helpers import libdevice import torch.nn as ...
Roxbili/T2T-ViT
Transition
false
9,445
[ "BSD-3-Clause-Clear" ]
0
c5442bc560ea15b421130f13e31c4b68f52c1e5a
https://github.com/Roxbili/T2T-ViT/tree/c5442bc560ea15b421130f13e31c4b68f52c1e5a
Sigmoid
import torch import torch.nn as nn import torch.nn.parallel class Sigmoid(nn.Module): def __init__(self, inplace: 'bool'=False): super(Sigmoid, self).__init__() self.inplace = inplace def forward(self, x): return x.sigmoid_() if self.inplace else x.sigmoid() def get_inputs(): r...
import torch import triton import triton.language as tl from torch._inductor.runtime.triton_heuristics import grid from torch._C import _cuda_getCurrentRawStream as get_raw_stream import torch.nn as nn import torch.nn.parallel assert_size_stride = torch._C._dynamo.guards.assert_size_stride empty_strided_cuda = torch._C...
Fanzhongjie/ARFE
Sigmoid
false
462
[ "Apache-2.0" ]
0
4b96b8c5bc0895d3d30acec2a490f81a860fe860
https://github.com/Fanzhongjie/ARFE/tree/4b96b8c5bc0895d3d30acec2a490f81a860fe860
ClipGlobalAvgPool2d
import torch import torch.nn as nn class FastGlobalAvgPool2d(nn.Module): def __init__(self, flatten=False): super(FastGlobalAvgPool2d, self).__init__() self.flatten = flatten def forward(self, x): if self.flatten: in_size = x.size() return x.view((in_size[0], ...
import torch import triton import triton.language as tl from torch._inductor.runtime.triton_heuristics import grid from torch._C import _cuda_getCurrentRawStream as get_raw_stream from torch._inductor.runtime import triton_helpers import torch.nn as nn assert_size_stride = torch._C._dynamo.guards.assert_size_stride emp...
tenghehan/reid_without_id
ClipGlobalAvgPool2d
false
10,872
[ "MIT" ]
0
d1d0ff273b1ef19fc6da8cbbf210527779b37455
https://github.com/tenghehan/reid_without_id/tree/d1d0ff273b1ef19fc6da8cbbf210527779b37455
MDNHead
# 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.nn...
zuoxingdong/lagom
MDNHead
false
16,846
[ "MIT" ]
383
3b6710804dbc79c6dffb369ac87c68f4055ab6cd
https://github.com/zuoxingdong/lagom/tree/3b6710804dbc79c6dffb369ac87c68f4055ab6cd
SmoothBCEwLogits
# 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...
broadinstitute/lincs-profiling-comparison
SmoothBCEwLogits
false
6,363
[ "BSD-3-Clause" ]
1
075c3bc60eeb3934fc42c30bae6aeed8cda1cd6d
https://github.com/broadinstitute/lincs-profiling-comparison/tree/075c3bc60eeb3934fc42c30bae6aeed8cda1cd6d
AttentionLayer
# 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....
lost-person/AREL
AttentionLayer
false
7,143
[ "MIT" ]
1
cee8bc542a2226f41fcbf65ed805fd585512689d
https://github.com/lost-person/AREL/tree/cee8bc542a2226f41fcbf65ed805fd585512689d
CircPad
import torch import torch.nn.functional as F class CircPad(torch.nn.Module): def __init__(self, pad_size): super(CircPad, self).__init__() if type(pad_size) == tuple: self.padding = pad_size else: self.padding = tuple(pad_size for i in range(6)) def forward(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 assert_size_stride = torch._C._dynamo.guards.assert_size_stride empty_strided_cuda = torch._C._dynamo.guards._empty_strided_cuda @triton.j...
conlain-k/RLN_elasticity
CircPad
false
3,359
[ "MIT" ]
0
d8574c83d62f675960a7f8b86ddb553e9a7b1ca7
https://github.com/conlain-k/RLN_elasticity/tree/d8574c83d62f675960a7f8b86ddb553e9a7b1ca7
ScaledDotProductWithBoxAttention
import torch import numpy as np import torch.nn as nn from torch.autograd import * class ScaledDotProductWithBoxAttention(nn.Module): """ Scaled dot-product attention with box """ def __init__(self, d_model, d_k, d_v, h, dropout=0.1, comment=None): """ :param d_model: Output dimension...
import torch from torch._inductor.select_algorithm import extern_kernels import triton import triton.language as tl from 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....
Maxi-0902/DRAN
ScaledDotProductWithBoxAttention
false
849
[ "MIT" ]
0
c3dbfcbc018446544150dc4e151442d6a9fcd4d9
https://github.com/Maxi-0902/DRAN/tree/c3dbfcbc018446544150dc4e151442d6a9fcd4d9
Critic
import torch import torch.nn.functional as F import torch.nn as nn class Critic(nn.Module): """ Neural Network for the Critic Model """ def __init__(self, state_size, action_size, seed=0, first_layer_units= 400, second_layer_units=300): """Initialize parameters and build model. Params ...
import torch from torch._inductor.select_algorithm import extern_kernels import triton import triton.language as tl from torch._inductor.runtime.triton_heuristics import grid from torch._C import _cuda_getCurrentRawStream as get_raw_stream from torch._inductor.runtime import triton_helpers import torch.nn.functional as...
FranckNdame/drlkit
Critic
false
8,118
[ "MIT" ]
33
698f3c182036cc5eed68f2a05b53a3e3670146bf
https://github.com/FranckNdame/drlkit/tree/698f3c182036cc5eed68f2a05b53a3e3670146bf
SimpleTextClassifier
import torch import torch.nn as nn import torch.nn.functional as F class SimpleTextClassifier(nn.Module): """Text Classifier with 1 hidden layer """ def __init__(self, num_labels, vocab_size): super(SimpleTextClassifier, self).__init__() self.linear1 = nn.Linear(vocab_size, 128) ...
import torch from torch._inductor.select_algorithm import extern_kernels import triton import triton.language as tl from 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....
mtfelix/pytorch_active_learning
SimpleTextClassifier
false
4,040
[ "MIT" ]
0
495f20c9cf5100cf2a100f4a4c6103e05fb62ca2
https://github.com/mtfelix/pytorch_active_learning/tree/495f20c9cf5100cf2a100f4a4c6103e05fb62ca2
SelfAttention
import torch import torch.nn as nn class SelfAttention(nn.Module): def __init__(self, embed_dims, heads): super(SelfAttention, self).__init__() self.heads = heads self.embed_dims = embed_dims self.depth = embed_dims // heads self.query = nn.Linear(self.depth, self.depth) ...
import torch from torch._inductor.select_algorithm import extern_kernels import triton import triton.language as tl from 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....
Brandon-mg/LipReader-Transformer
SelfAttention
false
2,043
[ "MIT" ]
0
0fe52957943368d7c5b8d1b0df39e3fb14f7c035
https://github.com/Brandon-mg/LipReader-Transformer/tree/0fe52957943368d7c5b8d1b0df39e3fb14f7c035
SOSLoss
import torch from torch import nn class SOSLoss(nn.Module): def __init__(self): super().__init__() def forward(self, anchors, positives, negatives): dist_an = torch.sum(torch.pow(anchors - negatives, 2), dim=1) dist_pn = torch.sum(torch.pow(positives - negatives, 2), dim=1) n...
import torch import triton import triton.language as tl from torch._inductor.runtime.triton_heuristics import grid from torch._C import _cuda_getCurrentRawStream as get_raw_stream from torch._inductor.runtime.triton_helpers import libdevice from torch import nn assert_size_stride = torch._C._dynamo.guards.assert_size_s...
lulor/project_vg
SOSLoss
false
7,142
[ "MIT" ]
1
27b0c3b3038c5a666dde516a0a265ae8ddf2059f
https://github.com/lulor/project_vg/tree/27b0c3b3038c5a666dde516a0a265ae8ddf2059f
DoubleSymLayer
import copy import math import torch import torch.nn as nn def normalInit(dims): """ Essentially, PyTorch's init.xavier_normal_ but clamped :param K: tensor to be initialized/overwritten :return: initialized tensor on the device in the nn.Parameter wrapper """ K = torch.zeros(dims) fan_in...
import torch from torch._inductor.select_algorithm import extern_kernels import triton import triton.language as tl from torch._inductor.runtime.triton_heuristics import grid from torch._C import _cuda_getCurrentRawStream as get_raw_stream from torch._inductor.runtime import triton_helpers import copy import math impor...
EmoryMLIP/DynamicBlocks
DoubleSymLayer
false
17,248
[ "MIT" ]
9
52acc9fbc1a2640c6ac8922fa18105279ccaea97
https://github.com/EmoryMLIP/DynamicBlocks/tree/52acc9fbc1a2640c6ac8922fa18105279ccaea97
FocalLoss
import torch import torch.nn as nn import torch.nn.functional as F class FocalLoss(nn.Module): def __init__(self, weight=None, size_average=True): super(FocalLoss, self).__init__() def forward(self, inputs: 'torch.Tensor', targets: 'torch.Tensor', alpha: 'float'=0.5, gamma: 'float'=0.5, smoo...
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...
Latterlig96/DCUnet
FocalLoss
false
8,455
[ "MIT" ]
11
87d1c137a60177d6daf1dfff0483678d5580fda0
https://github.com/Latterlig96/DCUnet/tree/87d1c137a60177d6daf1dfff0483678d5580fda0
ConvToVector
import torch import torch.nn as nn import torch.nn.functional as F class ConvToVector(nn.Module): def __init__(self, in_channels, padding=1): super(ConvToVector, self).__init__() self.in_channels = in_channels self.conv1 = nn.Conv2d(in_channels, 3, kernel_size=3, padding=padding) ...
import torch from torch._inductor.select_algorithm import extern_kernels import triton import triton.language as tl from 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_...
MarcCote/spatial-reasoning
ConvToVector
false
812
[ "MIT" ]
0
06c57cfafbd1c24b68d6ab634d19806964d867f3
https://github.com/MarcCote/spatial-reasoning/tree/06c57cfafbd1c24b68d6ab634d19806964d867f3
BPRLoss
# 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 ...
dreaming-qin/RecBole
BPRLoss
false
12,308
[ "MIT" ]
0
d6de39521484ded60c387ca604abaf86310acdbe
https://github.com/dreaming-qin/RecBole/tree/d6de39521484ded60c387ca604abaf86310acdbe
Copy
import torch import torch.nn as nn import torch.utils.data import torch.nn.init class Copy(nn.Module): def __init__(self, hidden_size, copy_weight=1.0): super().__init__() self.Wcopy = nn.Linear(hidden_size, hidden_size) self.copy_weight = copy_weight def forward(self, enc_out_hs, de...
import torch from torch._inductor.select_algorithm import extern_kernels import triton import triton.language 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 ...
ChrisGeishauser/ConvLab-2
Copy
false
2,209
[ "Apache-2.0" ]
0
8f55d033c6e2453fdc092c4f504be3973a55e7ea
https://github.com/ChrisGeishauser/ConvLab-2/tree/8f55d033c6e2453fdc092c4f504be3973a55e7ea
L2
# AOT ID: ['0_inference'] from ctypes import c_void_p, c_long, c_int import torch import math import random import os import tempfile from math import inf, nan from torch._inductor.hooks import run_intermediate_hooks from torch._inductor.utils import maybe_profile from torch._inductor.codegen.memory_planning import _al...
import torch import triton import triton.language as tl from torch._inductor.runtime.triton_heuristics import grid from torch._C import _cuda_getCurrentRawStream as get_raw_stream from torch._inductor.runtime.triton_helpers import libdevice import torch.nn as nn assert_size_stride = torch._C._dynamo.guards.assert_size_...
B06901052/deep-stabilization
L2
false
97
[ "Apache-2.0" ]
0
b6030b463cf1f1128660e900669f43e742aa2651
https://github.com/B06901052/deep-stabilization/tree/b6030b463cf1f1128660e900669f43e742aa2651
LayerNorm
import torch import torch.utils.data import torch.nn as nn class LayerNorm(nn.Module): def __init__(self, features, eps=1e-06, gamma=1.0, beta=0.0, learnable= False): super(LayerNorm, self).__init__() if learnable: self.gamma = nn.Parameter(torch.ones(features)) 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 from torch._inductor.runtime.triton_helpers import libdevice import torch.utils.data import torch.nn as nn assert_size_stride = torch._C._dy...
cynthiamao98/DepthAwareCNN
LayerNorm
false
12,239
[ "MIT" ]
0
824cffaa4159e3dc7cc251a4a659e35c437bb92c
https://github.com/cynthiamao98/DepthAwareCNN/tree/824cffaa4159e3dc7cc251a4a659e35c437bb92c
ObjectClassifier
# 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....
TuBui/deep_image_comparator
ObjectClassifier
false
1,158
[ "MIT" ]
0
2dea7738d794b91a960ee9f41461a4e3ffcd5e44
https://github.com/TuBui/deep_image_comparator/tree/2dea7738d794b91a960ee9f41461a4e3ffcd5e44
LastLevelMaxPool
import torch import torch.utils.data from torchvision.transforms import functional as F from torch import nn import torch.nn.functional as F class LastLevelMaxPool(nn.Module): def forward(self, x): return [F.max_pool2d(x, 1, 2, 0)] def get_inputs(): return [torch.rand([4, 4, 4, 4])] def get_init_...
import torch import triton import triton.language as tl from torch._inductor.runtime.triton_heuristics import grid from torch._C import _cuda_getCurrentRawStream as get_raw_stream import torch.utils.data from torch import nn assert_size_stride = torch._C._dynamo.guards.assert_size_stride empty_strided_cuda = torch._C._...
Friedrich1006/maskrcnn-benchmark
LastLevelMaxPool
false
815
[ "MIT" ]
0
bfd36ce2b90218e0805dc30e72be9257a9bc129b
https://github.com/Friedrich1006/maskrcnn-benchmark/tree/bfd36ce2b90218e0805dc30e72be9257a9bc129b
leakyrelu
import torch import torch.nn as nn class leakyrelu(nn.Module): def __init__(self, layer=10, channels=32): super(leakyrelu, self).__init__() layers = [] for i in range(layer): layers.append(nn.LeakyReLU(inplace=True)) self.layers = nn.Sequential(*layers) def forwar...
import torch import triton import triton.language as tl from torch._inductor.runtime.triton_heuristics import grid from torch._C import _cuda_getCurrentRawStream as get_raw_stream import torch.nn as nn assert_size_stride = torch._C._dynamo.guards.assert_size_stride @triton.jit def triton_poi_fused_leaky_relu_0(in_ptr...
yifanpu001/PytorchToCaffe
leakyrelu
false
4,716
[ "MIT" ]
0
37c1ebfc3547e93b1c174721036d03c831c60e48
https://github.com/yifanpu001/PytorchToCaffe/tree/37c1ebfc3547e93b1c174721036d03c831c60e48
MaxPool2d
import torch import numpy as np import torch.nn as nn from numbers import Number def normcdf(value, mu=0.0, stddev=1.0): sinv = 1.0 / stddev if isinstance(stddev, Number) else stddev.reciprocal() return 0.5 * (1.0 + torch.erf((value - mu) * sinv / np.sqrt(2.0))) def _normal_log_pdf(value, mu, stddev): v...
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 numpy as np import torch.nn as nn from numbers import N...
SaumilShah66/dqn_uav
MaxPool2d
false
9,579
[ "MIT" ]
0
2bf780369e964b870624aebcff16c0714cad03c1
https://github.com/SaumilShah66/dqn_uav/tree/2bf780369e964b870624aebcff16c0714cad03c1
MLP
import math import torch import torch.nn as nn import torch.nn.functional as F class Linear(nn.Module): def __init__(self, in_features, out_features, dropout, bias=False): super(Linear, self).__init__() self.dropout = dropout self.in_features = in_features self.out_features = out_...
import torch from torch._inductor.select_algorithm import extern_kernels import triton import triton.language as tl from 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....
DongHande/PT_propagation_then_training
MLP
false
8,023
[ "MIT" ]
21
3f346ff161d2a0b807e3c0269ad26a7266305cc3
https://github.com/DongHande/PT_propagation_then_training/tree/3f346ff161d2a0b807e3c0269ad26a7266305cc3
SelfAttention
# AOT ID: ['0_forward'] from ctypes import c_void_p, c_long, c_int import torch import math import random import os import tempfile from math import inf, nan from torch._inductor.hooks import run_intermediate_hooks from torch._inductor.utils import maybe_profile from torch._inductor.codegen.memory_planning import _alig...
import torch from torch._inductor.select_algorithm import extern_kernels import triton import triton.language as tl from torch._inductor.runtime.triton_heuristics import grid from torch._C import _cuda_getCurrentRawStream as get_raw_stream from torch._inductor.runtime import triton_helpers from torch._inductor.runtime....
Sud0x67/mrmix
SelfAttention
false
18,003
[ "Apache-2.0" ]
4
4f4784e421c768509bd007e21b4455b56edc7cd2
https://github.com/Sud0x67/mrmix/tree/4f4784e421c768509bd007e21b4455b56edc7cd2
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_...
xuehaouwa/VGGFace2-pytorch
SEModule
false
4,594
[ "MIT" ]
0
c38e11f893e5bcc273a9b847530cd619019b636c
https://github.com/xuehaouwa/VGGFace2-pytorch/tree/c38e11f893e5bcc273a9b847530cd619019b636c
SvmLoss
import torch class SvmLoss(torch.nn.Module): def __init__(self): super(SvmLoss, self).__init__() def forward(self, decisions, targets): targets = targets.float() * 2 - 1 projection_dist = 1 - targets * decisions margin = torch.max(torch.zeros_like(projection_dist), projection...
import torch import triton import triton.language as tl from torch._inductor.runtime.triton_heuristics import grid from torch._C import _cuda_getCurrentRawStream as get_raw_stream from torch._inductor.runtime import triton_helpers assert_size_stride = torch._C._dynamo.guards.assert_size_stride empty_strided_cuda = torc...
brainsqueeze/Kaggle-competitions
SvmLoss
false
3,238
[ "MIT" ]
0
e734ca71303619fd2c9a6f10aaf98b2c0a800758
https://github.com/brainsqueeze/Kaggle-competitions/tree/e734ca71303619fd2c9a6f10aaf98b2c0a800758
SumModule
import torch import torch.nn as nn class SumModule(nn.Module): def __init__(self, *axis, keepdim=False): super().__init__() self.axis = axis self.keepdim = keepdim def forward(self, v): sum = v.sum(self.axis) if self.keepdim: dims = list(v.shape) ...
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...
finalgruntgit/diautils
SumModule
false
10,271
[ "MIT" ]
0
b9d7666ed5023700db01a4295430c52721acfc25
https://github.com/finalgruntgit/diautils/tree/b9d7666ed5023700db01a4295430c52721acfc25
FocalLoss
import torch import torch.nn as nn import torch.nn.functional as F import torch.nn.parallel import torch.optim import torch.utils.data def focal_loss(input_values, gamma): """Computes the focal loss""" p = torch.exp(-input_values) loss = (1 - p) ** gamma * input_values return loss.mean() class Focal...
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 ...
EricZsy/BalancedKnowledgeDistillation
FocalLoss
false
8,049
[ "MIT" ]
22
88a2de840a3fc6eb2ee881c729f293b8e78714aa
https://github.com/EricZsy/BalancedKnowledgeDistillation/tree/88a2de840a3fc6eb2ee881c729f293b8e78714aa
GATgate_lp2
import torch from torch import nn class GATgate_lp2(nn.Module): def __init__(self, n_dim): super(GATgate_lp2, self).__init__() self.w_l = nn.Linear(n_dim, n_dim) self.w_p = nn.Linear(n_dim, n_dim) self.LR = nn.LeakyReLU() def forward(self, vec_l, vec_p, adj_inter): h_...
import torch from torch._inductor.select_algorithm import extern_kernels import triton import 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...
arwhirang/affinity_prediction_BGNN
GATgate_lp2
false
9,754
[ "MIT" ]
0
b8a2a5de16a61a46dadd53856d758e7f63f9ca91
https://github.com/arwhirang/affinity_prediction_BGNN/tree/b8a2a5de16a61a46dadd53856d758e7f63f9ca91
NearestInterp
# AOT ID: ['0_inference'] from ctypes import c_void_p, c_long, c_int import torch import math import random import os import tempfile from math import inf, nan from torch._inductor.hooks import run_intermediate_hooks from torch._inductor.utils import maybe_profile from torch._inductor.codegen.memory_planning import _al...
import torch import triton import triton.language as tl from torch._inductor.runtime.triton_heuristics import grid from torch._C import _cuda_getCurrentRawStream as get_raw_stream assert_size_stride = torch._C._dynamo.guards.assert_size_stride empty_strided_cuda = torch._C._dynamo.guards._empty_strided_cuda @triton.j...
jonathanzjl/cam-vision
NearestInterp
false
3,765
[ "BSD-2-Clause" ]
0
d1bd865b147ea1137979b624c64a6baa4a4b0714
https://github.com/jonathanzjl/cam-vision/tree/d1bd865b147ea1137979b624c64a6baa4a4b0714
MeanStd
# 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...
AnetaKaczynska/video-GAN
MeanStd
false
26
[ "BSD-3-Clause" ]
0
e30e54c18265c658a65b1b26b57b4f499b58bfc6
https://github.com/AnetaKaczynska/video-GAN/tree/e30e54c18265c658a65b1b26b57b4f499b58bfc6
LayerNormChannel
# 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...
Jack-Hu-2001/UniverseNet
LayerNormChannel
false
13,867
[ "Apache-2.0" ]
314
03e7b8442286f951c65fe730ec86b9441005ac1b
https://github.com/Jack-Hu-2001/UniverseNet/tree/03e7b8442286f951c65fe730ec86b9441005ac1b
Block
import torch from torch import nn import torch.onnx class Block(nn.Module): def __init__(self, in_channels, num_filters, kernel_size, pool_size): super(Block, self).__init__() self.conv = nn.Conv2d(in_channels, num_filters, kernel_size=kernel_size ) self.pool = nn.MaxPool2d(ke...
import torch from torch._inductor.select_algorithm import extern_kernels import triton import triton.language as tl from 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...
Alwaysproblem/examples-1
Block
false
82
[ "MIT" ]
0
9754fa63ed1931489a21ac1f5b299f945e369a5c
https://github.com/Alwaysproblem/examples-1/tree/9754fa63ed1931489a21ac1f5b299f945e369a5c
GE2ELoss
import torch import torch.nn as nn import torch.nn.functional as F def calc_loss(sim_matrix): same_idx = list(range(sim_matrix.size(0))) pos = sim_matrix[same_idx, :, same_idx] neg = (torch.exp(sim_matrix).sum(dim=2) + 1e-06).log_() per_embedding_loss = -1 * (pos - neg) loss = per_embedding_loss.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 libdevice, math as tl_math import torc...
JeffT13/SCOTUS_Speaker_Verification
GE2ELoss
false
9,153
[ "BSD-3-Clause" ]
0
276f52c23fe40d1f55ae77889b202350f3220d1d
https://github.com/JeffT13/SCOTUS_Speaker_Verification/tree/276f52c23fe40d1f55ae77889b202350f3220d1d
ResidualSequential
import torch import torch.optim import torch.nn as nn import torch.nn.init class ResidualSequential(nn.Sequential): def __init__(self, *args): super(ResidualSequential, self).__init__(*args) def forward(self, x): out = super(ResidualSequential, self).forward(x) x_ = None if o...
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.optim import torch.nn as nn import torch.nn.init assert_size_stride = torch._C._dynamo.guards.assert_size_stride empty_strided_...
Volodimirich/DL-in-denoising-MCT-rock-images
ResidualSequential
false
5,934
[ "MIT" ]
1
0201d42a45221e4e0faaf50c59bf48c435bcdc82
https://github.com/Volodimirich/DL-in-denoising-MCT-rock-images/tree/0201d42a45221e4e0faaf50c59bf48c435bcdc82
AbsModule
import torch class AbsModule(torch.nn.Module): def __init__(self): super(AbsModule, self).__init__() def forward(self, x): return torch.abs(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 math as tl_math assert_size_stride = torch._C._dynamo.guards.assert_size_stride empty_str...
MichaelZhero/nncase
AbsModule
false
11,929
[ "Apache-2.0" ]
0
0fae6ce90d7adff386e1a286cd2b42422f4b850a
https://github.com/MichaelZhero/nncase/tree/0fae6ce90d7adff386e1a286cd2b42422f4b850a
NN
import torch from torch import nn import torch.nn.functional as F import torch.utils.data 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): ...
import torch from torch._inductor.select_algorithm import extern_kernels import triton import triton.language as tl from 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...
jiazhi412/Machine-Learning-Collection
NN
false
3,737
[ "MIT" ]
0
1c30faf1e27a79eeca966c017e956df8f7f6ef17
https://github.com/jiazhi412/Machine-Learning-Collection/tree/1c30faf1e27a79eeca966c017e956df8f7f6ef17
XConv2d
# 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.nn as nn assert_size_stride = torch._C._dyn...
HyperGAN/imgclsmob
XConv2d
false
17,688
[ "MIT" ]
9
88b9776a5a927dc9a54e85e31978c4a9ec5ecbf3
https://github.com/HyperGAN/imgclsmob/tree/88b9776a5a927dc9a54e85e31978c4a9ec5ecbf3
UNETAdd
import torch from torch import nn class UNETAdd(nn.Module): """UNET Without concatenation during decoding""" def __init__(self): super(UNETAdd, self).__init__() self.conv1_1 = nn.Conv2d(in_channels=3, out_channels=16, kernel_size=3, stride=1, padding=1) self.conv1_2 = nn.C...
import torch from torch._inductor.select_algorithm import extern_kernels import triton import triton.language as tl from torch._inductor.runtime.triton_heuristics import grid from torch._C import _cuda_getCurrentRawStream as get_raw_stream from torch._inductor.runtime import triton_helpers from torch._inductor.runtime....
quenting44/semantic_segmentation
UNETAdd
false
10,846
[ "MIT" ]
0
bd197ddda3c6891d69ff7e552a0c224c7ec1269a
https://github.com/quenting44/semantic_segmentation/tree/bd197ddda3c6891d69ff7e552a0c224c7ec1269a
AdaptiveSin
# AOT ID: ['0_forward'] from ctypes import c_void_p, c_long, c_int import torch import math import random import os import tempfile from math import inf, nan from torch._inductor.hooks import run_intermediate_hooks from torch._inductor.utils import maybe_profile from torch._inductor.codegen.memory_planning import _alig...
import torch import triton import triton.language as tl from torch._inductor.runtime.triton_heuristics import grid from torch._C import _cuda_getCurrentRawStream as get_raw_stream from torch._inductor.runtime.triton_helpers import math as tl_math from torch.nn.parameter import Parameter assert_size_stride = torch._C._d...
ndem0/PINA
AdaptiveSin
false
10,720
[ "MIT" ]
0
1812ddb8d96a9c8aeb80ce35002dbd115e7d7931
https://github.com/ndem0/PINA/tree/1812ddb8d96a9c8aeb80ce35002dbd115e7d7931
PoswiseFeedForwardNet
# 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 ...
kyuhyoung/transformer-evolution
PoswiseFeedForwardNet
false
15,859
[ "Apache-2.0" ]
105
fae06f677df0be55c67cd58efea158e5517ac045
https://github.com/kyuhyoung/transformer-evolution/tree/fae06f677df0be55c67cd58efea158e5517ac045
PrecomputedNorm
import torch import torch.nn as nn class PrecomputedNorm(nn.Module): """Normalization using Pre-computed Mean/Std. Args: stats: Precomputed (mean, std). axis: Axis setting used to calculate mean/variance. """ def __init__(self, stats, axis=[1, 2]): super().__init__() 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 import torch.nn as nn assert_size_stride = torch._C._dynamo.guards.assert_size_stride empty_strided_cuda = torch._C._dynamo.guards._empty_st...
gcambara/s3prl
PrecomputedNorm
false
15,405
[ "MIT" ]
856
33284ebde3a903ed8604d6dae85669d0174ae1d3
https://github.com/gcambara/s3prl/tree/33284ebde3a903ed8604d6dae85669d0174ae1d3
Flatten
# AOT ID: ['0_inference'] from ctypes import c_void_p, c_long, c_int import torch import math import random import os import tempfile from math import inf, nan from torch._inductor.hooks import run_intermediate_hooks from torch._inductor.utils import maybe_profile from torch._inductor.codegen.memory_planning import _al...
import torch import triton import triton.language as tl from torch._inductor.runtime.triton_heuristics import grid from torch._C import _cuda_getCurrentRawStream as get_raw_stream import torch.nn as nn assert_size_stride = torch._C._dynamo.guards.assert_size_stride empty_strided_cuda = torch._C._dynamo.guards._empty_st...
Escaton615/mtcnn-pytorch
Flatten
false
2,199
[ "MIT" ]
0
4a645c1bf8dca0b5410cc0454ee0a538ada2d241
https://github.com/Escaton615/mtcnn-pytorch/tree/4a645c1bf8dca0b5410cc0454ee0a538ada2d241
LinearLayer
import torch import torch.nn as nn from torch.nn import Parameter def l2normalize(v, eps=1e-12): return v / (v.norm() + eps) class LayerNorm(nn.Module): def __init__(self, num_features, eps=1e-08, affine=True): super(LayerNorm, self).__init__() self.num_features = num_features 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....
LenKerr/Semantic-Colorization-GAN
LinearLayer
false
5,516
[ "MIT" ]
1
2ce52406ca6fc92e69692b451b1c9ae66ba3b76f
https://github.com/LenKerr/Semantic-Colorization-GAN/tree/2ce52406ca6fc92e69692b451b1c9ae66ba3b76f
TransformerDecoderLayer
# 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....
Guaguago/Persona-Dialogue-Generation
TransformerDecoderLayer
false
13,773
[ "MIT" ]
258
0d4526ec8eddff62751a70666e14d72103906f44
https://github.com/Guaguago/Persona-Dialogue-Generation/tree/0d4526ec8eddff62751a70666e14d72103906f44
ContrastiveLoss
import torch import torch.nn as nn import torch.nn.functional as F import torch.utils.data class ContrastiveLoss(nn.Module): """ Contrastive loss Takes embeddings of two samples and a target label == 1 if samples are from the same class and label == 0 otherwise """ def __init__(self, margin): ...
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...
DanIulian/minigrid_rl
ContrastiveLoss
false
340
[ "MIT" ]
0
d7b59fd1d1e62fc99d5134c89f59c6ad16246cfa
https://github.com/DanIulian/minigrid_rl/tree/d7b59fd1d1e62fc99d5134c89f59c6ad16246cfa
GCN
from torch.nn import Module import math import torch from torch.nn.parameter import Parameter from torch.nn.modules.module import Module import torch.nn.functional as F from torch.nn import Parameter class GraphConvolution(Module): """ Simple GCN layer, similar to https://arxiv.org/abs/1609.02907 """ ...
import torch from torch._inductor.select_algorithm import extern_kernels import triton import triton.language as tl from torch._inductor.runtime.triton_heuristics import grid from torch._C import _cuda_getCurrentRawStream as get_raw_stream from torch._inductor.runtime import triton_helpers from torch.nn import Module i...
LEAP-WS/CGPN
GCN
false
17,555
[ "MIT" ]
9
28564d9ec7cc7342ff53f3f5a1d36ca5985c11a9
https://github.com/LEAP-WS/CGPN/tree/28564d9ec7cc7342ff53f3f5a1d36ca5985c11a9
AttentionConv
# AOT ID: ['0_forward'] from ctypes import c_void_p, c_long, c_int import torch import math import random import os import tempfile from math import inf, nan from torch._inductor.hooks import run_intermediate_hooks from torch._inductor.utils import maybe_profile from torch._inductor.codegen.memory_planning import _alig...
import torch from torch._inductor.select_algorithm import extern_kernels import triton import triton.language as tl from torch._inductor.runtime.triton_heuristics import grid from torch._C import _cuda_getCurrentRawStream as get_raw_stream from torch._inductor.runtime.triton_helpers import math as tl_math import torch....
khy0809/Stand-Alone-Self-Attention
AttentionConv
false
10,392
[ "MIT" ]
0
019718c8983faac24d69bd9b37eaf33cd28e1c4a
https://github.com/khy0809/Stand-Alone-Self-Attention/tree/019718c8983faac24d69bd9b37eaf33cd28e1c4a
h_sigmoid
# AOT ID: ['0_inference'] from ctypes import c_void_p, c_long, c_int import torch import math import random import os import tempfile from math import inf, nan from torch._inductor.hooks import run_intermediate_hooks from torch._inductor.utils import maybe_profile from torch._inductor.codegen.memory_planning import _al...
import torch import triton import triton.language as tl from torch._inductor.runtime.triton_heuristics import grid from torch._C import _cuda_getCurrentRawStream as get_raw_stream from torch._inductor.runtime import triton_helpers import torch.nn as nn assert_size_stride = torch._C._dynamo.guards.assert_size_stride emp...
GewelsJI/VPS
h_sigmoid
false
8,175
[ "Apache-2.0" ]
22
8cb7f584be3c5fc0941126860f2198cb1d88fc4e
https://github.com/GewelsJI/VPS/tree/8cb7f584be3c5fc0941126860f2198cb1d88fc4e
Net
import torch import torch.nn as nn class Net(nn.Module): def __init__(self): super(Net, self).__init__() self.conv = nn.Conv2d(1, 1, 3) def forward(self, x): return self.conv(x) def get_inputs(): return [torch.rand([4, 1, 64, 64])] def get_init_inputs(): return [[], {}]
import torch from torch._inductor.select_algorithm import extern_kernels import 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...
EricGustin/SmartRedis
Net
false
11,402
[ "BSD-2-Clause" ]
0
42c42fb4312c0822a58e3c869f60b7e51d4bdd05
https://github.com/EricGustin/SmartRedis/tree/42c42fb4312c0822a58e3c869f60b7e51d4bdd05
FusedLeakyReLU
# AOT ID: ['0_forward'] from ctypes import c_void_p, c_long, c_int import torch import math import random import os import tempfile from math import inf, nan from torch._inductor.hooks import run_intermediate_hooks from torch._inductor.utils import maybe_profile from torch._inductor.codegen.memory_planning import _alig...
import torch import triton import triton.language as tl from torch._inductor.runtime.triton_heuristics import grid from torch._C import _cuda_getCurrentRawStream as get_raw_stream from torch import nn from torch.nn import functional as F assert_size_stride = torch._C._dynamo.guards.assert_size_stride empty_strided_cuda...
RaghavaDhanya/stylegan2-pytorch
FusedLeakyReLU
false
11,800
[ "MIT", "BSD-2-Clause", "Apache-2.0" ]
0
6a2b0c228c56830a7e669bc66dc92073d3c81ca8
https://github.com/RaghavaDhanya/stylegan2-pytorch/tree/6a2b0c228c56830a7e669bc66dc92073d3c81ca8
AE_2D_v5
# 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 ...
gitter-badger/HEPAutoencoders
AE_2D_v5
false
12,449
[ "Apache-2.0" ]
0
43010cd66fa4335a04b30b87926148e1c8d92de9
https://github.com/gitter-badger/HEPAutoencoders/tree/43010cd66fa4335a04b30b87926148e1c8d92de9
MetaLayerNorm
import re import torch import warnings 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 ---...
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 re import warnings import torch.nn as nn from collections import Ordered...
SDivakarBhat/pytorch-meta
MetaLayerNorm
false
11,822
[ "MIT" ]
0
74cbc8ae625d85c6b954aad159ccb26b523b2240
https://github.com/SDivakarBhat/pytorch-meta/tree/74cbc8ae625d85c6b954aad159ccb26b523b2240
Net
import torch import torch.nn as nn import torch.nn.functional as F class Net(nn.Module): def __init__(self, input_seq_length, output_num_classes): """Initialize model layers""" super(Net, self).__init__() self.input_seq_length = input_seq_length self.output_num_classes = output_nu...
import torch from torch._inductor.select_algorithm import extern_kernels import triton import triton.language as tl from 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_...
bradford415/multiclassification
Net
false
6,364
[ "MIT" ]
1
ee0234ec0a85b04f78cd86c3e5c52e5d658f19ac
https://github.com/bradford415/multiclassification/tree/ee0234ec0a85b04f78cd86c3e5c52e5d658f19ac
_ChannelAttentionModule
# 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....
maoweinuaa/FaceParsing
_ChannelAttentionModule
false
15,998
[ "MIT" ]
138
5e153b636e7e57b20d3079b2e0f15aa02dc4046d
https://github.com/maoweinuaa/FaceParsing/tree/5e153b636e7e57b20d3079b2e0f15aa02dc4046d
RSubInt
# AOT ID: ['0_inference'] from ctypes import c_void_p, c_long, c_int import torch import math import random import os import tempfile from math import inf, nan from torch._inductor.hooks import run_intermediate_hooks from torch._inductor.utils import maybe_profile from torch._inductor.codegen.memory_planning import _al...
import torch import triton import triton.language as tl from torch._inductor.runtime.triton_heuristics import grid from torch._C import _cuda_getCurrentRawStream as get_raw_stream assert_size_stride = torch._C._dynamo.guards.assert_size_stride empty_strided_cuda = torch._C._dynamo.guards._empty_strided_cuda @triton.j...
Ilyabasharov/torch2trt
RSubInt
false
2,544
[ "MIT" ]
0
76bf298b3da408509665e23e2494922b131afb10
https://github.com/Ilyabasharov/torch2trt/tree/76bf298b3da408509665e23e2494922b131afb10
VAE
# 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 import triton_helpers from...
CoAxLab/newremagine
VAE
false
8,940
[ "MIT" ]
0
5ae1c579121c93271ebf5dcef45bd66e8daea3a7
https://github.com/CoAxLab/newremagine/tree/5ae1c579121c93271ebf5dcef45bd66e8daea3a7
OrthogonalHouseholder
import math import torch import torch.nn as nn class OrthogonalHouseholder(nn.Module): def __init__(self, sz, bias=True): super(OrthogonalHouseholder, self).__init__() self.sz = sz self.bias = bias self.A = nn.Parameter(torch.empty((sz, sz))) self.b = nn.Parameter(torch.em...
import torch from torch._inductor.select_algorithm import extern_kernels import 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.a...
mahkons/orthogonal
OrthogonalHouseholder
false
3,959
[ "MIT" ]
0
19a69134ca9a01ef564eab624b8c1526291770aa
https://github.com/mahkons/orthogonal/tree/19a69134ca9a01ef564eab624b8c1526291770aa
Gate
# 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...
lonePatient/TorchBlocks
Gate
false
15,950
[ "MIT" ]
82
4a65d746cc8a396cb7df73ed4644d97ddf843e29
https://github.com/lonePatient/TorchBlocks/tree/4a65d746cc8a396cb7df73ed4644d97ddf843e29
ActorCritic
# AOT ID: ['0_forward'] from ctypes import c_void_p, c_long, c_int import torch import math import random import os import tempfile from math import inf, nan from torch._inductor.hooks import run_intermediate_hooks from torch._inductor.utils import maybe_profile from torch._inductor.codegen.memory_planning import _alig...
import torch from torch._inductor.select_algorithm import extern_kernels import triton import triton.language as tl from torch._inductor.runtime.triton_heuristics import grid from torch._C import _cuda_getCurrentRawStream as get_raw_stream from torch._inductor.runtime import triton_helpers from torch._inductor.runtime....
NeilWangziyu/torch_light
ActorCritic
false
5,640
[ "MIT" ]
1
daf8fd62f57885cf182f1b3edc3152156d229ef3
https://github.com/NeilWangziyu/torch_light/tree/daf8fd62f57885cf182f1b3edc3152156d229ef3
InformedSender
# 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....
XeniaOhmer/SystematicRepresentations
InformedSender
false
1,252
[ "MIT" ]
0
825208d1be659dc820e61f577cdb53afc47302f4
https://github.com/XeniaOhmer/SystematicRepresentations/tree/825208d1be659dc820e61f577cdb53afc47302f4
Matcher
import math import torch import torch.nn as nn class Matcher(nn.Module): """ Matching between a pair of nodes to conduct link prediction. Use multi-head attention as matching model. """ def __init__(self, n_hid): super(Matcher, self).__init__() self.left_linear = nn.Linear...
import torch from torch._inductor.select_algorithm import extern_kernels import triton import triton.language as tl from torch._inductor.runtime.triton_heuristics import grid from torch._C import _cuda_getCurrentRawStream as get_raw_stream import math import torch.nn as nn assert_size_stride = torch._C._dynamo.guards.a...
nchungvh/pyhgt
Matcher
false
7,319
[ "MIT" ]
1
3cb08ea856ca02aaf1664aa7486024a8742c7567
https://github.com/nchungvh/pyhgt/tree/3cb08ea856ca02aaf1664aa7486024a8742c7567
DeiTOutput
from _paritybench_helpers import _mock_config import torch from torch import nn import torch.utils.checkpoint class DeiTOutput(nn.Module): def __init__(self, config): super().__init__() self.dense = nn.Linear(config.intermediate_size, config.hidden_size) self.dropout = nn.Dropout(config.h...
import torch from torch._inductor.select_algorithm import extern_kernels import triton import triton.language as tl from torch._inductor.runtime.triton_heuristics import grid from torch._C import _cuda_getCurrentRawStream as get_raw_stream from torch import nn import torch.utils.checkpoint assert_size_stride = torch._C...
ncoop57/transformers
DeiTOutput
false
4,056
[ "Apache-2.0" ]
0
d7e156bd1ae2467e9ea1dbc44f31da0ed2296aee
https://github.com/ncoop57/transformers/tree/d7e156bd1ae2467e9ea1dbc44f31da0ed2296aee
TransitionUp
# 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...
Sreehari-S/Tiramisu_DigestPath
TransitionUp
false
1,083
[ "Apache-2.0" ]
0
a884ee911bc60ce997996e0ec2e6036600ffcffa
https://github.com/Sreehari-S/Tiramisu_DigestPath/tree/a884ee911bc60ce997996e0ec2e6036600ffcffa
PNet
import torch import torch.nn as nn from collections import OrderedDict class PNet(nn.Module): def __init__(self): super().__init__() self.features = nn.Sequential(OrderedDict([('conv1', nn.Conv2d(3, 10, 3, 1)), ('prelu1', nn.PReLU(10)), ('pool1', nn.MaxPool2d(2, 2, ceil_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....
galbiati/mtcnn
PNet
false
3,525
[ "MIT" ]
0
6caa8e47ee6c7a01f6f990193129964a2d7e4b52
https://github.com/galbiati/mtcnn/tree/6caa8e47ee6c7a01f6f990193129964a2d7e4b52
CustomLoss
import torch import torch.nn as nn class CustomLoss(nn.Module): def __init__(self, weight=None, size_average=True): super(CustomLoss, self).__init__() def forward(self, outputs, targets): gamma = 0.5 C4 = 10 gb_hat = outputs[:, :, :34] rb_hat = outputs[:, :, 34:68] ...
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...
Ryuk17/PercepNet
CustomLoss
false
14,356
[ "BSD-3-Clause" ]
170
94e91f1db242447593098afc1a844b822e154e09
https://github.com/Ryuk17/PercepNet/tree/94e91f1db242447593098afc1a844b822e154e09
mnistmodel_A
import torch from torch import nn import torch.nn.functional as F class mnistmodel_A(nn.Module): def __init__(self): super(mnistmodel_A, self).__init__() self.conv1 = nn.Conv2d(in_channels=1, out_channels=64, kernel_size= 5, stride=1, padding=2) self.conv2 = nn.Conv2d(in_chann...
import torch from torch._inductor.select_algorithm import extern_kernels import triton import triton.language as tl from torch._inductor.runtime.triton_heuristics import grid from torch._C import _cuda_getCurrentRawStream as get_raw_stream from torch._inductor.runtime import triton_helpers from torch import nn assert_s...
layel2/layyer-lib
mnistmodel_A
false
3,880
[ "MIT" ]
0
db48b5c38098ee93d2d34693d98e5ef4d319d919
https://github.com/layel2/layyer-lib/tree/db48b5c38098ee93d2d34693d98e5ef4d319d919
InvConvNear
# 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.cuda from torch import nn import torch.distributed import torch.uti...
Oreoluwa1234/NeMo
InvConvNear
false
9,725
[ "Apache-2.0" ]
0
b01e3ceed34efe31fd43866685dbdd19a6b30928
https://github.com/Oreoluwa1234/NeMo/tree/b01e3ceed34efe31fd43866685dbdd19a6b30928
ReverseMaskConv
import torch from torch import nn from torch.nn.parameter import Parameter def weights_init(): """ Gaussian init. """ def init_fun(m): classname = m.__class__.__name__ if (classname.find('Conv') == 0 or classname.find('Linear') == 0 ) and hasattr(m, 'weight'): ...
import torch from torch._inductor.select_algorithm import extern_kernels import triton import triton.language as tl from 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....
delldu/ImagePatch
ReverseMaskConv
false
6,554
[ "MIT" ]
1
aaeadba9fe9f40e9bf900468f100a06bafc8231f
https://github.com/delldu/ImagePatch/tree/aaeadba9fe9f40e9bf900468f100a06bafc8231f
IIDIsotropicGaussianUVLoss
# 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...
Magixxxxxx/detectron2
IIDIsotropicGaussianUVLoss
false
2,617
[ "Apache-2.0" ]
0
c1ee8cf73777c96cc8a89463d0dca6e0ffe148f4
https://github.com/Magixxxxxx/detectron2/tree/c1ee8cf73777c96cc8a89463d0dca6e0ffe148f4
StackTime
import torch import torch.nn as nn import torch.utils.data import torch.jit import torch.optim import torch.utils.collect_env import torch.nn.parallel import torch.utils.data.distributed class StackTime(nn.Module): def __init__(self, factor): super().__init__() self.factor = int(factor) def ...
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.jit import torch.optim import torch.utils.collect_env import torch.nn.parallel im...
cometta/training
StackTime
false
10,044
[ "Apache-2.0" ]
0
2f33c36d5aa2e1c2770fb3bab35afc8c665e01ce
https://github.com/cometta/training/tree/2f33c36d5aa2e1c2770fb3bab35afc8c665e01ce
RZTXEncoderLayer
from torch.nn import Module import torch import torch.nn as nn import torch.nn.functional as F from torch.nn.modules.module import Module from torch.nn.modules.activation import MultiheadAttention from torch.nn.modules.dropout import Dropout from torch.nn.modules.linear import Linear class RZTXEncoderLayer(Module): ...
import torch from torch._inductor.select_algorithm import extern_kernels import triton import triton.language as tl from torch._inductor.runtime.triton_heuristics import grid from torch._C import _cuda_getCurrentRawStream as get_raw_stream from torch._inductor.runtime import triton_helpers from torch._inductor.runtime....
mpariente/rezero
RZTXEncoderLayer
false
16,127
[ "MIT" ]
376
6bcf1df00bc9a3560b093a2bbe12dade92f86eba
https://github.com/mpariente/rezero/tree/6bcf1df00bc9a3560b093a2bbe12dade92f86eba
Actor
import torch import torch.nn as nn import torch.nn.functional as F class Actor(nn.Module): def __init__(self, state_size, action_size, action_parameter_size, hidden_layers=None, init_std=0.01, init_type='normal', activation= 'leaky_relu', squashing_function=False): super(Actor, self).__in...
import torch from torch._inductor.select_algorithm import extern_kernels import triton import triton.language as tl from torch._inductor.runtime.triton_heuristics import grid from torch._C import _cuda_getCurrentRawStream as get_raw_stream import torch.nn as nn assert_size_stride = torch._C._dynamo.guards.assert_size_s...
bcahlit/MP-DQN
Actor
false
1,526
[ "MIT" ]
0
d80d34680e20192134f39e5b7c43abbc6bff3ba1
https://github.com/bcahlit/MP-DQN/tree/d80d34680e20192134f39e5b7c43abbc6bff3ba1
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 import torch.utils.data assert_size_stride = torch._C._dyn...
roedoejet/vits
LayerNorm
false
10,790
[ "MIT" ]
0
982e3632c876562563bc74c37d485eaf53715ecc
https://github.com/roedoejet/vits/tree/982e3632c876562563bc74c37d485eaf53715ecc
LinearBlock
# AOT ID: ['0_forward'] from ctypes import c_void_p, c_long, c_int import torch import math import random import os import tempfile from math import inf, nan from torch._inductor.hooks import run_intermediate_hooks from torch._inductor.utils import maybe_profile from torch._inductor.codegen.memory_planning import _alig...
import torch from torch._inductor.select_algorithm import extern_kernels import triton import triton.language as tl from torch._inductor.runtime.triton_heuristics import grid from torch._C import _cuda_getCurrentRawStream as get_raw_stream from torch._inductor.runtime import triton_helpers import torch.nn as nn import ...
AllenPu/mbdg
LinearBlock
false
7,664
[ "MIT" ]
27
243f53a57dcf4bfb6e717c0c9f64a839cff8d548
https://github.com/AllenPu/mbdg/tree/243f53a57dcf4bfb6e717c0c9f64a839cff8d548
MedianPool2d
import torch import torch.nn as nn import torch.nn.functional as F from torch.nn.modules.utils import _pair from torch.nn.modules.utils import _quadruple class MedianPool2d(nn.Module): """Median pool (usable as median filter when stride=1) module. Args: kernel_size: size of pooling kernel, int or 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.triton_helpers import math as tl_math import torch.nn as nn from torch.nn.modules.utils import _pair from torch...
Arnakii/invertinggradients
MedianPool2d
false
8,871
[ "MIT" ]
0
c4f66fc9c73f0a18e9ddf01650c0e82fe3998013
https://github.com/Arnakii/invertinggradients/tree/c4f66fc9c73f0a18e9ddf01650c0e82fe3998013
RgbaToRgb
import torch import torch.nn as nn def rgba_to_rgb(image: 'torch.Tensor') ->torch.Tensor: """Convert image from RGBA to RGB. See :class:`~kornia.color.RgbaToRgb` for details. Args: image (torch.Tensor): RGBA Image to be converted to RGB. Returns: torch.Tensor: RGB version of the ima...
import torch import triton import triton.language as tl from torch._inductor.runtime.triton_heuristics import grid from torch._C import _cuda_getCurrentRawStream as get_raw_stream import torch.nn as nn assert_size_stride = torch._C._dynamo.guards.assert_size_stride empty_strided_cuda = torch._C._dynamo.guards._empty_st...
IEM-Computer-Vision/kornia
RgbaToRgb
false
9,268
[ "ECL-2.0", "Apache-2.0" ]
0
f98bd9a2158a6e59cda076d55d476acf13f4e0af
https://github.com/IEM-Computer-Vision/kornia/tree/f98bd9a2158a6e59cda076d55d476acf13f4e0af
PointwiseFeedForward
# 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_...
XuMayi/PyABSA
PointwiseFeedForward
false
1,258
[ "MIT" ]
0
3d71c0cdaea7ea1eff600d9091c3c63f61c111e5
https://github.com/XuMayi/PyABSA/tree/3d71c0cdaea7ea1eff600d9091c3c63f61c111e5
region_levelset
# 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...
LiWentomng/boxlevelset
region_levelset
false
8,505
[ "Apache-2.0" ]
25
8cc40bf6ae4a343c482c676c72259cc12c29d31c
https://github.com/LiWentomng/boxlevelset/tree/8cc40bf6ae4a343c482c676c72259cc12c29d31c
DenseNet_conv
import torch import torch.nn as nn def xavier_init(module, gain=1, bias=0, distribution='normal'): assert distribution in ['uniform', 'normal'] if distribution == 'uniform': nn.init.xavier_uniform_(module.weight, gain=gain) else: nn.init.xavier_normal_(module.weight, gain=gain) if hasa...
import torch from torch._inductor.select_algorithm import extern_kernels import triton import triton.language as tl from 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_...
Shiaoming/DensefromRGBS
DenseNet_conv
false
17,926
[ "MIT" ]
7
d69f5f60c5512da876b002a2007ec42d4a3fbb8e
https://github.com/Shiaoming/DensefromRGBS/tree/d69f5f60c5512da876b002a2007ec42d4a3fbb8e
LayerNorm
import torch from torch import nn class LayerNorm(nn.Module): """ Simple 1D LayerNorm. """ def __init__(self, features, center=True, scale=False, eps=1e-06): super().__init__() self.center = center self.scale = scale self.eps = eps if self.scale: 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 from torch._inductor.runtime.triton_helpers import libdevice from torch import nn assert_size_stride = torch._C._dynamo.guards.assert_size_s...
UT-Austin-RPL/maple
LayerNorm
false
18,042
[ "MIT" ]
9
aef9fe9869945df5bbd1b02fd40813aac135cf5a
https://github.com/UT-Austin-RPL/maple/tree/aef9fe9869945df5bbd1b02fd40813aac135cf5a
RMSELoss
# 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...
bio-ontology-research-group/OntoML
RMSELoss
false
1,546
[ "BSD-3-Clause" ]
0
4cdc17dc7ee26464db96c67838c3e77dba5318f9
https://github.com/bio-ontology-research-group/OntoML/tree/4cdc17dc7ee26464db96c67838c3e77dba5318f9
GatedConv2d
# 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 ...
delldu/DeepFillv2
GatedConv2d
false
6,551
[ "MIT" ]
1
a564b9589c1b42bcdddd3d7601f4059c4594a439
https://github.com/delldu/DeepFillv2/tree/a564b9589c1b42bcdddd3d7601f4059c4594a439