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
length_evolution
import torch import torch.nn as nn class length_evolution(nn.Module): """ calcaulate the length of evolution curve by the gradient """ def __init__(self, func='l1'): super(length_evolution, self).__init__() self.func = func def forward(self, mask_score, class_weight): gra...
import torch import triton import triton.language as tl from torch._inductor.runtime.triton_heuristics import grid from torch._C import _cuda_getCurrentRawStream as get_raw_stream from torch._inductor.runtime.triton_helpers import math as tl_math import torch.nn as nn assert_size_stride = torch._C._dynamo.guards.assert...
LiWentomng/boxlevelset
length_evolution
false
8,461
[ "Apache-2.0" ]
25
8cc40bf6ae4a343c482c676c72259cc12c29d31c
https://github.com/LiWentomng/boxlevelset/tree/8cc40bf6ae4a343c482c676c72259cc12c29d31c
AttentionCrossEntropy
# 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 ...
LindgeW/sentiment-analysis-based-on-attention
AttentionCrossEntropy
false
8,444
[ "Apache-2.0" ]
13
82ea37c8ef84eec56082d60001b1179b4c12f416
https://github.com/LindgeW/sentiment-analysis-based-on-attention/tree/82ea37c8ef84eec56082d60001b1179b4c12f416
GeM
import torch import torch.nn as nn from torch.nn import functional as F from torch.nn.parameter import Parameter def gem(x, p=3, eps=1e-06): return F.avg_pool2d(x.clamp(min=eps).pow(p), (x.size(-2), x.size(-1))).pow( 1.0 / p) class GeM(nn.Module): def __init__(self, p=3, eps=1e-06, p_trainable=True...
import torch import triton import triton.language as tl from torch._inductor.runtime.triton_heuristics import grid from torch._C import _cuda_getCurrentRawStream as get_raw_stream from torch._inductor.runtime import triton_helpers from torch._inductor.runtime.triton_helpers import libdevice import torch.nn as nn from t...
SamYuen101234/Masked_Face_Recognition
GeM
false
14,375
[ "MIT" ]
60
2dc572573ebd9ac208314690b529ed69addf0913
https://github.com/SamYuen101234/Masked_Face_Recognition/tree/2dc572573ebd9ac208314690b529ed69addf0913
Pooling
import torch import torch.nn as nn class Pooling(nn.Module): """ Implementation of pooling for PoolFormer --pool_size: pooling size """ def __init__(self, pool_size=3): super().__init__() self.pool = nn.AvgPool2d(pool_size, stride=1, padding=pool_size // 2, count_incl...
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...
TranNhiem/MA_SSRL_Pytorch
Pooling
false
1,141
[ "MIT" ]
0
87d946461850240fdd54de761603f13ef3710c2b
https://github.com/TranNhiem/MA_SSRL_Pytorch/tree/87d946461850240fdd54de761603f13ef3710c2b
ResBlock
# AOT ID: ['0_forward'] from ctypes import c_void_p, c_long, c_int import torch import math import random import os import tempfile from math import inf, nan from torch._inductor.hooks import run_intermediate_hooks from torch._inductor.utils import maybe_profile from torch._inductor.codegen.memory_planning import _alig...
import torch from torch._inductor.select_algorithm import extern_kernels import triton import triton.language as tl from torch._inductor.runtime.triton_heuristics import grid from torch._C import _cuda_getCurrentRawStream as get_raw_stream from torch._inductor.runtime import triton_helpers assert_size_stride = torch._C...
StarsStation/DeepLearning
ResBlock
false
5,853
[ "MIT" ]
1
a4c833af93652069f19a8c6f0b1e42cde64bbb79
https://github.com/StarsStation/DeepLearning/tree/a4c833af93652069f19a8c6f0b1e42cde64bbb79
TemperatureHolder
# 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 import nn assert_size_stride = torch._C._dynamo.guards.assert_...
lin826/pfrl
TemperatureHolder
false
12,708
[ "MIT" ]
0
62d7f13b854f1879211a386fd870a7db982cc8ec
https://github.com/lin826/pfrl/tree/62d7f13b854f1879211a386fd870a7db982cc8ec
SemiNorm
# 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
SemiNorm
false
3,170
[ "MIT" ]
0
77bf4a90b8770a408665e2604428808c3ed2f979
https://github.com/ankmathur96/torchsupport/tree/77bf4a90b8770a408665e2604428808c3ed2f979
Binarizer
from torch.autograd import Function import torch import torch.nn as nn import torch.nn.functional as F class SignFunction(Function): def __init__(self): super(SignFunction, self).__init__() @staticmethod def forward(ctx, input, is_training=True): if is_training: prob = input....
import torch from torch._inductor.select_algorithm import extern_kernels import triton import triton.language 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.autograd...
Biaze7/lossy-image-compression
Binarizer
false
7,779
[ "MIT" ]
16
88ca2022a306fea52d6671593b314f0de3bf6010
https://github.com/Biaze7/lossy-image-compression/tree/88ca2022a306fea52d6671593b314f0de3bf6010
Swish
# 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.utils.data import torch.nn as nn from math import sqrt as sqrt from itertools import product as product assert_size_stride = to...
Het-Shah/Monk_Object_Detection
Swish
false
8,227
[ "Apache-2.0" ]
15
1d7a07193ea3455221caa41d07c33c81d50c6b3f
https://github.com/Het-Shah/Monk_Object_Detection/tree/1d7a07193ea3455221caa41d07c33c81d50c6b3f
EncoderBlock
# 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....
longxianlei/UtilsTools
EncoderBlock
false
10,507
[ "MIT" ]
0
f45c648eb679ed59bb512b61a1af52938e326ac3
https://github.com/longxianlei/UtilsTools/tree/f45c648eb679ed59bb512b61a1af52938e326ac3
GT
# 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...
ahangchen/torch2trt
GT
false
6,095
[ "MIT" ]
1
53c663f0e0570ef7ffd6771354ae3478f63bd328
https://github.com/ahangchen/torch2trt/tree/53c663f0e0570ef7ffd6771354ae3478f63bd328
h_sigmoid
import torch import torch.utils.data import torch.nn as nn class h_sigmoid(nn.Module): def __init__(self, inplace=True, h_max=1): super(h_sigmoid, self).__init__() self.relu = nn.ReLU6(inplace=inplace) self.h_max = h_max def forward(self, x): return self.relu(x + 3) * self.h_...
import torch import triton import triton.language as tl from torch._inductor.runtime.triton_heuristics import grid from torch._C import _cuda_getCurrentRawStream as get_raw_stream from torch._inductor.runtime import triton_helpers import torch.utils.data import torch.nn as nn assert_size_stride = torch._C._dynamo.guard...
anonymous2022ijcai/RGSL
h_sigmoid
false
1,449
[ "MIT" ]
0
11c38ee50d50127c0f7c2a137bdb21ca5f7f3644
https://github.com/anonymous2022ijcai/RGSL/tree/11c38ee50d50127c0f7c2a137bdb21ca5f7f3644
QueryModule
import torch import torch.nn as nn import torch.nn.functional as F class QueryModule(nn.Module): """ A neural module that takes as input a feature map and an attention and produces a feature map as output. Extended Summary ---------------- A :class:`QueryModule` takes a feature map and an attenti...
import torch from torch._inductor.select_algorithm import extern_kernels import triton import triton.language as tl from 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_...
ArjitJ/tbd-nets
QueryModule
false
8,880
[ "MIT" ]
0
8e93ecad54489706ec3249c9ca5d345d6866e1ba
https://github.com/ArjitJ/tbd-nets/tree/8e93ecad54489706ec3249c9ca5d345d6866e1ba
LinearPool
import torch from torch import nn class LinearPool(nn.Module): def __init__(self): super(LinearPool, self).__init__() def forward(self, feat_map): """ Arguments: feat_map(Tensor): tensor with shape (N, C, H, W) return(Tensor): tensor with shape (N, C, 1, 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 import nn assert_size_stride = torch._C._dynamo.guards.assert_size_stride empty_strided_cuda = torch._C._dynamo.guards._empty_str...
iampartho/EEE426
LinearPool
false
3,636
[ "Apache-2.0" ]
0
a706660c0efcd4adea44d54c57a34bcaa4439ec1
https://github.com/iampartho/EEE426/tree/a706660c0efcd4adea44d54c57a34bcaa4439ec1
MLP
import torch import torch.nn as nn import torch.nn.functional as F class MLP(nn.Module): """ 全连接网络""" def __init__(self, state_dim): super(MLP, self).__init__() self.fc1 = nn.Linear(state_dim, 36) self.fc2 = nn.Linear(36, 36) self.fc3 = nn.Linear(36, 1) def forward(self, ...
import torch from torch._inductor.select_algorithm import extern_kernels import triton import triton.language as tl from torch._inductor.runtime.triton_heuristics import grid from torch._C import _cuda_getCurrentRawStream as get_raw_stream from torch._inductor.runtime import triton_helpers import torch.nn as nn assert_...
KOWKO1/reinforcement-learning-tutorials
MLP
false
5,432
[ "MIT" ]
1
5f29d6eba8b580041f3e82d88dc3e1cd8e4cae10
https://github.com/KOWKO1/reinforcement-learning-tutorials/tree/5f29d6eba8b580041f3e82d88dc3e1cd8e4cae10
MTFullyConnected
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 import time import numpy as n...
EXYNOS-999/DrugEx
MTFullyConnected
false
5,177
[ "MIT" ]
1
f75a90fbc0b9863d594fbff6afecb0f866c076d6
https://github.com/EXYNOS-999/DrugEx/tree/f75a90fbc0b9863d594fbff6afecb0f866c076d6
GAT
# 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....
NightmareNyx/pygcn
GAT
false
4,274
[ "MIT" ]
0
3972f167ce7fcc41cb21284d75816dfd9a15f7ef
https://github.com/NightmareNyx/pygcn/tree/3972f167ce7fcc41cb21284d75816dfd9a15f7ef
SingleConv3DBlock
# AOT ID: ['0_forward'] from ctypes import c_void_p, c_long, c_int import torch import math import random import os import tempfile from math import inf, nan from torch._inductor.hooks import run_intermediate_hooks from torch._inductor.utils import maybe_profile from torch._inductor.codegen.memory_planning import _alig...
import torch from torch._inductor.select_algorithm import extern_kernels import triton import triton.language as tl from torch._inductor.runtime.triton_heuristics import grid from torch._C import _cuda_getCurrentRawStream as get_raw_stream from torch import nn import torch._utils assert_size_stride = torch._C._dynamo.g...
ilcessadecalcular/segmentation
SingleConv3DBlock
false
10,579
[ "MIT" ]
0
24ba499a399efdba212ec5e2235b72ed8270cc24
https://github.com/ilcessadecalcular/segmentation/tree/24ba499a399efdba212ec5e2235b72ed8270cc24
CoxPHLossSorted
import torch from torch import Tensor def cox_ph_loss_sorted(log_h: 'Tensor', events: 'Tensor', eps: 'float'=1e-07 ) ->Tensor: """Requires the input to be sorted by descending duration time. See DatasetDurationSorted. We calculate the negative log of $( rac{h_i}{\\sum_{j \\in R_i} h_j})^d$, where...
import torch import triton import triton.language as tl from torch._inductor.runtime.triton_heuristics import grid from torch._C import _cuda_getCurrentRawStream as get_raw_stream from torch._inductor.runtime import triton_helpers from torch._inductor.runtime.triton_helpers import math as tl_math from torch import Tens...
bseewald/pycox
CoxPHLossSorted
false
9,869
[ "BSD-2-Clause" ]
0
366348d51ecd902a01ab830b2f0a4cf1694d9ae2
https://github.com/bseewald/pycox/tree/366348d51ecd902a01ab830b2f0a4cf1694d9ae2
MultiHeadAttention
import torch import torch.utils.data from torch import nn import torch.nn.functional as F class MultiHeadAttention(nn.Module): """ input: query --- [N, T_q, query_dim] key --- [N, T_k, key_dim] output: out --- [N, T_q, num_units] """ def __init__(self, query_dim, key_dim, ...
import torch from torch._inductor.select_algorithm import extern_kernels import triton import triton.language as tl from 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....
azahed98/mellotron
MultiHeadAttention
false
1,534
[ "BSD-3-Clause" ]
0
02998743de820e379e0c7ff44506088d6e65c693
https://github.com/azahed98/mellotron/tree/02998743de820e379e0c7ff44506088d6e65c693
AUGRUCell
import torch import torch.nn as nn import torch.nn.functional as F from sklearn.metrics import * class AUGRUCell(nn.Module): """ Effect of GRU with attentional update gate (AUGRU) Reference: - Deep Interest Evolution Network for Click-Through Rate Prediction[J]. arXiv preprint arXiv:1809.03672, ...
import torch from torch._inductor.select_algorithm import extern_kernels import triton import triton.language 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 ...
liyunrui/DeepCTR-Torch
AUGRUCell
false
12,735
[ "Apache-2.0" ]
0
392fd6d39d9ca0ac854022136cdb4d5c68e3a592
https://github.com/liyunrui/DeepCTR-Torch/tree/392fd6d39d9ca0ac854022136cdb4d5c68e3a592
decoder2
# 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 import torch.nn as nn assert_size_stride = torch._C._dynamo.guards.assert_size_s...
iMoonLab/HHDTI
decoder2
false
6,840
[ "MIT" ]
1
b2dd0e78818888e676afc91af1425dada5b3258a
https://github.com/iMoonLab/HHDTI/tree/b2dd0e78818888e676afc91af1425dada5b3258a
Reorg
import torch import torch.nn as nn import torch.utils.data class Reorg(nn.Module): def forward(self, x): return torch.cat([x[..., ::2, ::2], x[..., 1::2, ::2], x[..., ::2, 1::2], x[..., 1::2, 1::2]], 1) def get_inputs(): return [torch.rand([4, 4, 4, 4])] def get_init_inputs(): re...
import torch import triton import triton.language as tl from torch._inductor.runtime.triton_heuristics import grid from torch._C import _cuda_getCurrentRawStream as get_raw_stream import torch.nn as nn import torch.utils.data assert_size_stride = torch._C._dynamo.guards.assert_size_stride empty_strided_cuda = torch._C....
ks1320/Traffic-Surveillance-System
Reorg
false
12,693
[ "MIT" ]
0
fa1eb2a3a3d494c798fa2eeb0528ef48b1978332
https://github.com/ks1320/Traffic-Surveillance-System/tree/fa1eb2a3a3d494c798fa2eeb0528ef48b1978332
AdaptiveFeatureNorm
# AOT ID: ['0_inference'] from ctypes import c_void_p, c_long, c_int import torch import math import random import os import tempfile from math import inf, nan from torch._inductor.hooks import run_intermediate_hooks from torch._inductor.utils import maybe_profile from torch._inductor.codegen.memory_planning import _al...
import torch import triton import triton.language as tl from torch._inductor.runtime.triton_heuristics import grid from torch._C import _cuda_getCurrentRawStream as get_raw_stream from torch._inductor.runtime.triton_helpers import libdevice assert_size_stride = torch._C._dynamo.guards.assert_size_stride empty_strided_c...
KevinMusgrave/pytorch-adapt
AdaptiveFeatureNorm
false
13,944
[ "MIT" ]
131
ff1491e1bfcc586afb8ee619712c8816ddf10358
https://github.com/KevinMusgrave/pytorch-adapt/tree/ff1491e1bfcc586afb8ee619712c8816ddf10358
BERTLayerNorm
# 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_...
Chriskuei/FedMatch
BERTLayerNorm
false
18,370
[ "Apache-2.0" ]
4
305e8c4bbb398712b00c883a986dfec17b500f76
https://github.com/Chriskuei/FedMatch/tree/305e8c4bbb398712b00c883a986dfec17b500f76
ChamferLoss
# 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 import torch.nn as nn import ...
BossunWang/soft-intro-vae-pytorch
ChamferLoss
false
13,806
[ "Apache-2.0" ]
144
10841fe2ae1aea12dbf43347dea63ee25d951864
https://github.com/BossunWang/soft-intro-vae-pytorch/tree/10841fe2ae1aea12dbf43347dea63ee25d951864
Conv
# AOT ID: ['0_forward'] from ctypes import c_void_p, c_long, c_int import torch import math import random import os import tempfile from math import inf, nan from torch._inductor.hooks import run_intermediate_hooks from torch._inductor.utils import maybe_profile from torch._inductor.codegen.memory_planning import _alig...
import torch from torch._inductor.select_algorithm import extern_kernels import triton import triton.language as tl from torch._inductor.runtime.triton_heuristics import grid from torch._C import _cuda_getCurrentRawStream as get_raw_stream import torch.nn as nn assert_size_stride = torch._C._dynamo.guards.assert_size_s...
amonod/udvd
Conv
false
1,434
[ "MIT" ]
0
a1ccb777d205255ac68c40efb93dd3996f562c45
https://github.com/amonod/udvd/tree/a1ccb777d205255ac68c40efb93dd3996f562c45
combLoss
# 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...
MingzheWu418/plastering
combLoss
false
9,321
[ "MIT" ]
0
322531e934c3acf2ecc8f520b37a6d255b9959c2
https://github.com/MingzheWu418/plastering/tree/322531e934c3acf2ecc8f520b37a6d255b9959c2
AlexOutputBlock
import torch import torch.nn as nn import torch.utils.data class AlexDense(nn.Module): """ AlexNet specific dense block. Parameters: ---------- in_channels : int Number of input channels. out_channels : int Number of output channels. """ def __init__(self, in_channels...
import torch from torch._inductor.select_algorithm import extern_kernels import triton import triton.language as tl from torch._inductor.runtime.triton_heuristics import grid from torch._C import _cuda_getCurrentRawStream as get_raw_stream from torch._inductor.runtime import triton_helpers import torch.nn as nn import ...
earhian/imgclsmob
AlexOutputBlock
false
6,650
[ "MIT" ]
1
c87c0942420876941868c016211073dec4392e4d
https://github.com/earhian/imgclsmob/tree/c87c0942420876941868c016211073dec4392e4d
StyledResBlock
# 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 from to...
mkleshchenok/dlcourse_2021_p1_final_project
StyledResBlock
false
12,811
[ "MIT" ]
0
1dd4f2e3dccc4604aa98982bf9377273ab4783c1
https://github.com/mkleshchenok/dlcourse_2021_p1_final_project/tree/1dd4f2e3dccc4604aa98982bf9377273ab4783c1
ArcCosDotLoss
import torch class ArcCosDotLoss(torch.nn.Module): def __init__(self): super().__init__() def forward(self, x, y, w, mask): eps = 1e-12 denom = torch.multiply(torch.linalg.norm(x, dim=1), torch.linalg. norm(y, dim=1)) + eps dot = x[:, 0, :, :] * y[:, 0, :, :] + x[...
import torch import triton import triton.language as tl from torch._inductor.runtime.triton_heuristics import grid from torch._C import _cuda_getCurrentRawStream as get_raw_stream from torch._inductor.runtime import triton_helpers from torch._inductor.runtime.triton_helpers import libdevice assert_size_stride = torch._...
acycliq/cellpose
ArcCosDotLoss
false
12,046
[ "BSD-3-Clause" ]
0
6d7a3f692206bf791e3ea7bd9524ee6df628ed8a
https://github.com/acycliq/cellpose/tree/6d7a3f692206bf791e3ea7bd9524ee6df628ed8a
Biaffine
# AOT ID: ['0_forward'] from ctypes import c_void_p, c_long, c_int import torch import math import random import os import tempfile from math import inf, nan from torch._inductor.hooks import run_intermediate_hooks from torch._inductor.utils import maybe_profile from torch._inductor.codegen.memory_planning import _alig...
import torch from torch._inductor.select_algorithm import extern_kernels import triton import triton.language as tl from torch._inductor.runtime.triton_heuristics import grid from torch._C import _cuda_getCurrentRawStream as get_raw_stream import math import torch.nn as nn assert_size_stride = torch._C._dynamo.guards.a...
andhikayusup/biaffineparser
Biaffine
false
14,838
[ "Apache-2.0" ]
46
30180b805bdb6c0f1e0386ceb090ba83d6ab2621
https://github.com/andhikayusup/biaffineparser/tree/30180b805bdb6c0f1e0386ceb090ba83d6ab2621
L2Norm
import torch import torch.nn as nn import torch.utils.data import torch.nn.init as init class L2Norm(nn.Module): def __init__(self, n_channels, scale): super(L2Norm, self).__init__() self.n_channels = n_channels self.gamma = scale or None self.eps = 1e-10 self.weight = nn....
import torch import triton import triton.language as tl from torch._inductor.runtime.triton_heuristics import grid from torch._C import _cuda_getCurrentRawStream as get_raw_stream from torch._inductor.runtime.triton_helpers import libdevice import torch.nn as nn import torch.utils.data import torch.nn.init as init asse...
VisionLearningGroup/CDS
L2Norm
false
18,046
[ "MIT" ]
7
5b3644c286f19f76acdc03c6f6021a6f6e4ec4fc
https://github.com/VisionLearningGroup/CDS/tree/5b3644c286f19f76acdc03c6f6021a6f6e4ec4fc
ContractingBlock
# 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...
akanametov/unet-pytorch
ContractingBlock
false
3,054
[ "MIT" ]
0
6cf0f70674958356ea4ac36fe61b0415921f72ae
https://github.com/akanametov/unet-pytorch/tree/6cf0f70674958356ea4ac36fe61b0415921f72ae
ARFB
import torch import torch.nn as nn def defaultConv(inChannels, outChannels, kernelSize, bias=True): return nn.Conv2d(inChannels, outChannels, kernelSize, padding= kernelSize // 2, bias=bias) class ResidualUnit(nn.Module): def __init__(self, inChannel, outChannel, reScale, kernelSize=1, bias=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 import torch.nn as nn assert_size_stride = torch._C._dynamo.guards.assert_size_s...
YingqiLiulll/scrips_for_SR
ARFB
false
1,273
[ "MIT" ]
0
04fa6fdaf157e913d3e2521cd80315a10a2ccedc
https://github.com/YingqiLiulll/scrips_for_SR/tree/04fa6fdaf157e913d3e2521cd80315a10a2ccedc
TripletLoss
import torch import torch.nn as nn import torch.nn.functional as F class TripletLoss(nn.Module): def __init__(self, device, margin): super(TripletLoss, self).__init__() self.margin = margin self.device = device self.loss = nn.TripletMarginLoss(margin) def forward(self, anchor...
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...
Devanshu-singh-VR/FaceRecognition
TripletLoss
false
2,156
[ "MIT" ]
0
f596d1964f4f43174ffe5bac6d6437a7d22c3593
https://github.com/Devanshu-singh-VR/FaceRecognition/tree/f596d1964f4f43174ffe5bac6d6437a7d22c3593
LinearNet
import torch import torch.nn as nn import torch.nn.functional as F class LinearNet(nn.Module): def __init__(self, board_width, board_height): super(LinearNet, self).__init__() self.board_width = board_width self.board_height = board_height self.model = nn.Linear(in_features=4 * 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 import torch.nn as nn assert_size_stride = torch._C._dynamo.guards.assert_size_s...
ZiwenZhuang/AlphaZero_Gomoku
LinearNet
false
12,032
[ "MIT" ]
0
72db1c3eda1f6133da24c924da6032ea3569076e
https://github.com/ZiwenZhuang/AlphaZero_Gomoku/tree/72db1c3eda1f6133da24c924da6032ea3569076e
PositionwiseFeedForward
# 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 ...
DongjunLee/claf
PositionwiseFeedForward
false
13,588
[ "MIT" ]
225
ef548dda27c9aac8ce4db09774c8a1459d25bde1
https://github.com/DongjunLee/claf/tree/ef548dda27c9aac8ce4db09774c8a1459d25bde1
eSEModule
import torch import torch.nn as nn import torch.nn.functional as F class Hsigmoid(nn.Module): def __init__(self, inplace=True): super(Hsigmoid, self).__init__() self.inplace = inplace def forward(self, x): return F.relu6(x + 3.0, inplace=self.inplace) / 6.0 class eSEModule(nn.Modul...
import torch from torch._inductor.select_algorithm import extern_kernels import triton import triton.language as tl from 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 ...
BXuan694/basemodel-pytorch
eSEModule
false
4,890
[ "MIT" ]
1
a36c96904580be902e323db17eebbe2ea1f54176
https://github.com/BXuan694/basemodel-pytorch/tree/a36c96904580be902e323db17eebbe2ea1f54176
VecNormEncoder
# 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...
liruilong940607/A-NeRF
VecNormEncoder
false
15,922
[ "MIT" ]
110
19cb6c4fd389266214ac0d7215a44011cb1bebf5
https://github.com/liruilong940607/A-NeRF/tree/19cb6c4fd389266214ac0d7215a44011cb1bebf5
Conv2dLayer
# 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 ...
LenKerr/Semantic-Colorization-GAN
Conv2dLayer
false
5,513
[ "MIT" ]
1
2ce52406ca6fc92e69692b451b1c9ae66ba3b76f
https://github.com/LenKerr/Semantic-Colorization-GAN/tree/2ce52406ca6fc92e69692b451b1c9ae66ba3b76f
ScaledDotProductAttention
# 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....
bahducoup/factorized_training
ScaledDotProductAttention
false
12,166
[ "MIT" ]
0
0af38f16338a9bcfcc11091b1a6b75befd67f234
https://github.com/bahducoup/factorized_training/tree/0af38f16338a9bcfcc11091b1a6b75befd67f234
LxmertCrossAttentionLayer
# 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....
rsgit95/med_kg_txt_multimodal
LxmertCrossAttentionLayer
false
4,219
[ "Apache-2.0" ]
0
80355b0cf58e0571531ad6f9728c533110ca996d
https://github.com/rsgit95/med_kg_txt_multimodal/tree/80355b0cf58e0571531ad6f9728c533110ca996d
Upsample
import torch import torch.nn as nn class Upsample(nn.Module): def __init__(self, in_channels, with_conv): super().__init__() self.with_conv = with_conv if self.with_conv: self.conv = torch.nn.Conv2d(in_channels, in_channels, kernel_size=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 import torch.nn as nn assert_size_stride = torch._C._dynamo.guards.assert_size_s...
Rm1n90/SDEdit
Upsample
false
9,443
[ "MIT" ]
0
16bfa4f5d37cd32680359db3405af4ea40a9cd1b
https://github.com/Rm1n90/SDEdit/tree/16bfa4f5d37cd32680359db3405af4ea40a9cd1b
ScoringFunction
import torch import torch.nn as nn class Conv2dAct(nn.Module): def __init__(self, in_channels, out_channels, ksize=1, activation='relu'): super(Conv2dAct, self).__init__() self.conv = nn.Conv2d(in_channels, out_channels, ksize) if activation == 'sigmoid': self.act = nn.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 import torch.nn as nn assert_size_stride = torch._C._dynamo.guards.assert_size_s...
sunwhawhang/headpose-fsanet-pytorch
ScoringFunction
false
4,473
[ "MIT" ]
0
d37d39dbff649b2f607367f35d9eadba2fea18f7
https://github.com/sunwhawhang/headpose-fsanet-pytorch/tree/d37d39dbff649b2f607367f35d9eadba2fea18f7
Block
# 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....
ofooo/AI-Writer
Block
false
12,869
[ "BSD-3-Clause" ]
0
1ba84894c15c9e5605d3c6cd7521d5c6dab6eb6d
https://github.com/ofooo/AI-Writer/tree/1ba84894c15c9e5605d3c6cd7521d5c6dab6eb6d
BaseFactorizationMachine
# 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...
MIracleyin/RecBole-notebook
BaseFactorizationMachine
false
9,574
[ "MIT" ]
0
ef32b3e57a297ff4889dec1f63c7984f8f901a23
https://github.com/MIracleyin/RecBole-notebook/tree/ef32b3e57a297ff4889dec1f63c7984f8f901a23
ResBlk
import math import torch import torch.nn as nn import torch.nn.functional as F def normalize(x, eps=1e-06): """Apply min-max normalization.""" x = x.contiguous() N, C, H, W = x.size() x_ = x.view(N * C, -1) max_val = torch.max(x_, dim=1, keepdim=True)[0] min_val = torch.min(x_, dim=1, keepdim=...
import torch from torch._inductor.select_algorithm import extern_kernels import triton import triton.language as tl from torch._inductor.runtime.triton_heuristics import grid from torch._C import _cuda_getCurrentRawStream as get_raw_stream import torch.nn as nn import torch.nn.functional as F assert_size_stride = torch...
ORANZINO/bouquet_server
ResBlk
false
17,759
[ "MIT" ]
7
2ce1bb59df15297878c555dd97e0f27b5202ed02
https://github.com/ORANZINO/bouquet_server/tree/2ce1bb59df15297878c555dd97e0f27b5202ed02
FullSort
import torch import torch.nn as nn class FullSort(nn.Module): def forward(self, x): return torch.sort(x, 1)[0] def get_inputs(): return [torch.rand([4, 4, 4, 4])] def get_init_inputs(): return [[], {}]
import torch import triton import triton.language as tl from torch._inductor.runtime.triton_heuristics import grid from torch._C import _cuda_getCurrentRawStream as get_raw_stream from torch._inductor.runtime import triton_helpers import torch.nn as nn assert_size_stride = torch._C._dynamo.guards.assert_size_stride emp...
zxydi1992/residual-flows
FullSort
false
13,195
[ "MIT" ]
0
4ec289681dc91cff5312b22f7ebed93838b440fb
https://github.com/zxydi1992/residual-flows/tree/4ec289681dc91cff5312b22f7ebed93838b440fb
Padding1
# 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 assert_size_stride = torch._C._dynamo.guards.assert_size_str...
ijinjay/torch2mindspore
Padding1
false
3,656
[ "MIT" ]
0
e4c06bd5e8a3b25b72bf158393a66c5cd1b572d2
https://github.com/ijinjay/torch2mindspore/tree/e4c06bd5e8a3b25b72bf158393a66c5cd1b572d2
HSwish
# AOT ID: ['0_inference'] from ctypes import c_void_p, c_long, c_int import torch import math import random import os import tempfile from math import inf, nan from torch._inductor.hooks import run_intermediate_hooks from torch._inductor.utils import maybe_profile from torch._inductor.codegen.memory_planning import _al...
import torch import triton import triton.language as tl from torch._inductor.runtime.triton_heuristics import grid from torch._C import _cuda_getCurrentRawStream as get_raw_stream from torch._inductor.runtime import triton_helpers import torch.utils.data from torch import nn assert_size_stride = torch._C._dynamo.guards...
prabhum456/determined
HSwish
false
10,632
[ "Apache-2.0" ]
0
7e8017df0f62d80d21f5483578e2d5abd0e30935
https://github.com/prabhum456/determined/tree/7e8017df0f62d80d21f5483578e2d5abd0e30935
CNN_2
import torch import torch.nn as nn import torch.nn.functional as F class CNN_2(nn.Module): def __init__(self, input_size, n_feature, output_size): super(CNN_2, self).__init__() self.n_feature = n_feature self.conv1 = nn.Conv2d(in_channels=3, out_channels=32, kernel_size=5) self.co...
import torch from torch._inductor.select_algorithm import extern_kernels import triton import triton.language as tl from 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....
IbrahimEl-Shal/CatDogClassifier
CNN_2
false
9,184
[ "MIT" ]
0
aa6e73b679a181593f8297726da94b70d3b51407
https://github.com/IbrahimEl-Shal/CatDogClassifier/tree/aa6e73b679a181593f8297726da94b70d3b51407
EncoderLayer
import torch import torch.nn as nn import torch.nn.functional as F class Lambda(nn.Module): """An easy way to create a pytorch layer for a simple `func`.""" def __init__(self, func): """create a layer that simply calls `func` with `x`""" super().__init__() self.func = func def fo...
import torch from torch._inductor.select_algorithm import extern_kernels import triton import triton.language as tl from torch._inductor.runtime.triton_heuristics import grid from torch._C import _cuda_getCurrentRawStream as get_raw_stream from torch._inductor.runtime import triton_helpers from torch._inductor.runtime....
eminem171333491/PaddleOCR2Pytorch
EncoderLayer
false
3,470
[ "Apache-2.0" ]
0
ec466bb3a689eccb9290e9f80812a45301d3b030
https://github.com/eminem171333491/PaddleOCR2Pytorch/tree/ec466bb3a689eccb9290e9f80812a45301d3b030
MaskedMSE
# 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...
dhruvramani/MaskedMSE
MaskedMSE
false
12,262
[ "MIT" ]
0
76ff94add5659217a3f4f21e60a4f069defede29
https://github.com/dhruvramani/MaskedMSE/tree/76ff94add5659217a3f4f21e60a4f069defede29
MultiHeadAttention
import torch import numpy as np import torch.nn as nn class MultiHeadAttention(nn.Module): """Multi-Head Attention Layer""" def __init__(self, hidden_size, num_attention_heads, attention_dropout_prob ): super(MultiHeadAttention, self).__init__() self.h = num_attention_heads se...
import torch from torch._inductor.select_algorithm import extern_kernels import triton import triton.language as tl from torch._inductor.runtime.triton_heuristics import grid from torch._C import _cuda_getCurrentRawStream as get_raw_stream from torch._inductor.runtime import triton_helpers from torch._inductor.runtime....
Ginga1892/bert-x
MultiHeadAttention
false
2,320
[ "MIT" ]
0
903970ef0a6967aa20a82bcf56b874602e37a04d
https://github.com/Ginga1892/bert-x/tree/903970ef0a6967aa20a82bcf56b874602e37a04d
AE_big_2D_v1
import torch import torch.nn as nn import torch.utils.data class AE_big_2D_v1(nn.Module): def __init__(self, n_features=4): super(AE_big_2D_v1, self).__init__() self.en1 = nn.Linear(n_features, 8) self.en2 = nn.Linear(8, 6) self.en3 = nn.Linear(6, 4) self.en4 = nn.Linear(4...
import torch from torch._inductor.select_algorithm import extern_kernels import triton import triton.language as tl from torch._inductor.runtime.triton_heuristics import grid from torch._C import _cuda_getCurrentRawStream as get_raw_stream from torch._inductor.runtime.triton_helpers import libdevice import torch.nn as ...
gitter-badger/HEPAutoencoders
AE_big_2D_v1
false
12,454
[ "Apache-2.0" ]
0
43010cd66fa4335a04b30b87926148e1c8d92de9
https://github.com/gitter-badger/HEPAutoencoders/tree/43010cd66fa4335a04b30b87926148e1c8d92de9
SmallVDSR_F8
# 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_...
MingSun-Tse/pytorch-vdsr
SmallVDSR_F8
false
5,611
[ "MIT" ]
1
597bacb4ec7385c8cc6cdf91e26e64ef2e6808b7
https://github.com/MingSun-Tse/pytorch-vdsr/tree/597bacb4ec7385c8cc6cdf91e26e64ef2e6808b7
Model
import torch import torch.nn as nn import torch.nn.functional as F class Model(nn.Module): def __init__(self, num_inputs, num_outputs): super(Model, self).__init__() h_size_1 = 100 h_size_2 = 100 self.p_fc1 = nn.Linear(num_inputs, h_size_1) self.p_fc2 = nn.Linear(h_size_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.triton_helpers import libdevice, math as tl_math im...
yanjiajia-september/Pytorch-DPPO
Model
false
16,759
[ "MIT" ]
179
5e1a75b6dfc6a170270253a35d10109718240e97
https://github.com/yanjiajia-september/Pytorch-DPPO/tree/5e1a75b6dfc6a170270253a35d10109718240e97
RZTXEncoderLayer
# 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....
mpariente/rezero
RZTXEncoderLayer
false
16,127
[ "MIT" ]
376
6bcf1df00bc9a3560b093a2bbe12dade92f86eba
https://github.com/mpariente/rezero/tree/6bcf1df00bc9a3560b093a2bbe12dade92f86eba
Upsample4x
import torch from torch import nn class Upsample4x(nn.Module): def __init__(self, n_channels): super(Upsample4x, self).__init__() self.conv = nn.Conv2d(n_channels, n_channels, 3, 1, 1) def forward(self, x): x = torch.nn.functional.interpolate(x, scale_factor=4, mode= 'bil...
import torch from torch._inductor.select_algorithm import extern_kernels import triton import triton.language as tl from 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...
xqterry/lightweight-human-pose-estimation.pytorch
Upsample4x
false
4,595
[ "Apache-2.0" ]
0
e5ec9452c9bd9683451d3b2f97c6fe9e075b2d48
https://github.com/xqterry/lightweight-human-pose-estimation.pytorch/tree/e5ec9452c9bd9683451d3b2f97c6fe9e075b2d48
BertSelfAttention
from _paritybench_helpers import _mock_config import math import torch import torch.nn as nn import torch.utils.checkpoint class BertSelfAttention(nn.Module): def __init__(self, config): super().__init__() if (config.hidden_size % config.num_attention_heads != 0 and not hasattr(config...
import torch from torch._inductor.select_algorithm import extern_kernels import triton import triton.language as tl from 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....
Hzfinfdu/Black-Box-Tuning
BertSelfAttention
false
4,738
[ "MIT" ]
0
64eb5505875dc1b242c6f0a2a2f07e4000c24cb4
https://github.com/Hzfinfdu/Black-Box-Tuning/tree/64eb5505875dc1b242c6f0a2a2f07e4000c24cb4
LipNormConv2d
# 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
LipNormConv2d
false
4,288
[ "MIT" ]
0
e912a1667e4fffb339dbc574c85020ec6cf78b02
https://github.com/rh-ia/color-information/tree/e912a1667e4fffb339dbc574c85020ec6cf78b02
SmoothL1Loss
# 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 ...
atoaiari/mmpose
SmoothL1Loss
false
6,279
[ "Apache-2.0" ]
1
256a9117767008e8c33b4038a346aca12233e300
https://github.com/atoaiari/mmpose/tree/256a9117767008e8c33b4038a346aca12233e300
injective_pad
import torch import torch.nn as nn import torch.nn.parallel import torch.optim import torch.utils.data import torch.utils.data.distributed class injective_pad(nn.Module): def __init__(self, pad_size): super(injective_pad, self).__init__() self.pad_size = pad_size self.pad = nn.ZeroPad2d((...
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 import torch.optim import torch.utils.data import torch.utils.data.distributed assert_size_st...
jhjacobsen/pytorch-i-revnet
injective_pad
false
15,680
[ "MIT" ]
392
307413043e33540cbe9c3746ef420261f8138315
https://github.com/jhjacobsen/pytorch-i-revnet/tree/307413043e33540cbe9c3746ef420261f8138315
ToLongTensor
import torch from torch import Tensor from typing import List import torch.nn as nn class ToLongTensor(nn.Module): """Convert a list of integers to long tensor """ def __init__(self): super(ToLongTensor, self).__init__() def forward(self, tokens: 'List[List[int]]') ->Tensor: return t...
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...
ZongHR/text
ToLongTensor
false
3,000
[ "BSD-3-Clause" ]
0
856607154be7c784505869f10ae578346868b121
https://github.com/ZongHR/text/tree/856607154be7c784505869f10ae578346868b121
depthwise_conv
import torch import torch.nn as nn import torch.utils.data class depthwise_conv(nn.Module): def __init__(self, kernel_size=3, stride=1, padding=1): super(depthwise_conv, self).__init__() self.depthwise = nn.Conv2d(1, 1, kernel_size=kernel_size, stride= stride, padding=padding) 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 import torch.nn as nn import torch.utils.data assert_size_stride = torch._C._dyn...
whiteking64/lang-seg
depthwise_conv
false
16,715
[ "MIT" ]
202
9d063b126f1b64e38ddb20cc75fc74435bfdcbd3
https://github.com/whiteking64/lang-seg/tree/9d063b126f1b64e38ddb20cc75fc74435bfdcbd3
SymmetricPad2d
import torch import torch.nn as nn class SymmetricPad2d(nn.Module): """symmetric 0-pad to splited tensors and concat""" def __init__(self, pad=1): super(SymmetricPad2d, self).__init__() self.padding1 = nn.ZeroPad2d((pad, 0, pad, 0)) self.padding2 = nn.ZeroPad2d((pad, 0, 0, pad)) ...
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...
Lee-Gihun/Micronet_GSJ
SymmetricPad2d
false
8,449
[ "MIT" ]
12
72289bb66507b6c3b4d14f2e5916dec718a1b198
https://github.com/Lee-Gihun/Micronet_GSJ/tree/72289bb66507b6c3b4d14f2e5916dec718a1b198
FocalLoss
import torch import torch.nn.functional as F import torch.nn as nn class FocalLoss(nn.Module): """ from https://github.com/CellProfiling/HPA-competition-solutions/blob/master/bestfitting/src/layers/loss.py """ def __init__(self, gamma=2): super().__init__() self.gamma = gamma ...
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...
Fkaneko/kaggle-hpa-single-cell-image-classification
FocalLoss
false
5,164
[ "MIT" ]
1
52000cbf5c7eec6ace29274d9e85b5b24fac281b
https://github.com/Fkaneko/kaggle-hpa-single-cell-image-classification/tree/52000cbf5c7eec6ace29274d9e85b5b24fac281b
GramMatrix
# 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 import torch.nn as nn assert_size_stride = torch._C._dynamo.guards.assert_size_s...
NeilWangziyu/torch_light
GramMatrix
false
5,658
[ "MIT" ]
1
daf8fd62f57885cf182f1b3edc3152156d229ef3
https://github.com/NeilWangziyu/torch_light/tree/daf8fd62f57885cf182f1b3edc3152156d229ef3
SpatialCrossMapLRN
import torch import torch.nn as nn import torch.nn.parallel import torch.optim import torch.utils.data class SpatialCrossMapLRN(nn.Module): def __init__(self, local_size=1, alpha=1.0, beta=0.75, k=1, ACROSS_CHANNELS=True): super(SpatialCrossMapLRN, self).__init__() self.ACROSS_CHANNELS = ...
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....
Tagussan/pretrained-models.pytorch
SpatialCrossMapLRN
false
1,121
[ "BSD-3-Clause" ]
0
854e6c153c2534dd7cf76a5ec102307ea5171167
https://github.com/Tagussan/pretrained-models.pytorch/tree/854e6c153c2534dd7cf76a5ec102307ea5171167
BinaryPrimitivesPredefined
# 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 math from torch import nn assert_size_stride = torch._C._dynamo.guards.a...
C-SUNSHINE/TOQ-Nets-PyTorch-Release
BinaryPrimitivesPredefined
false
17,148
[ "MIT" ]
6
05e06bf633fb3c6b610dda9a5126ecd7af1db02f
https://github.com/C-SUNSHINE/TOQ-Nets-PyTorch-Release/tree/05e06bf633fb3c6b610dda9a5126ecd7af1db02f
GeometryFeature
# 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.nn.parallel import torch.optim import torch.utils.data assert_size_stride = torch._C._dynamo.guards.asser...
phatli/PENet_ICRA2021
GeometryFeature
false
4,124
[ "MIT" ]
0
18594b8f11d4d99022d9c80a86a6e2d4e854404a
https://github.com/phatli/PENet_ICRA2021/tree/18594b8f11d4d99022d9c80a86a6e2d4e854404a
GeLU
import torch import torch.nn as nn class GeLU(nn.Module): def forward(self, x): return 0.5 * x * (1.0 + torch.tanh(x * 0.7978845608 * (1.0 + 0.044715 * x * 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_...
Chriskuei/FedMatch
GeLU
false
17,094
[ "Apache-2.0" ]
4
305e8c4bbb398712b00c883a986dfec17b500f76
https://github.com/Chriskuei/FedMatch/tree/305e8c4bbb398712b00c883a986dfec17b500f76
_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=64, out_channels=64, kernel_size =3, stride=1, padding=1, bias=False) self.in1 = nn.InstanceNorm2d(64, affine=Tru...
import torch from torch._inductor.select_algorithm import extern_kernels import triton import triton.language as tl from 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....
Shandilya21/Improved-Optimization-Tecniques-for-Super-Resoultion-in-Images
_Residual_Block
false
17,902
[ "MIT" ]
10
d903d99706f557d74e00d4395e7d316172a9f7ee
https://github.com/Shandilya21/Improved-Optimization-Tecniques-for-Super-Resoultion-in-Images/tree/d903d99706f557d74e00d4395e7d316172a9f7ee
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 from torch import nn assert_s...
Arthur1511/CAD-COVID
LinearBlock
false
67
[ "MIT" ]
0
daab5d70b9f811da41f702e92179a15ca4809fa5
https://github.com/Arthur1511/CAD-COVID/tree/daab5d70b9f811da41f702e92179a15ca4809fa5
DiffLoss
import torch class DiffLoss(torch.nn.Module): def __init__(self): super(DiffLoss, self).__init__() def forward(self, D1, D2): D1 = D1.view(D1.size(0), -1) D1_norm = torch.norm(D1, p=2, dim=1, keepdim=True).detach() D1_norm = D1.div(D1_norm.expand_as(D1) + 1e-06) D2 = ...
import torch from torch._inductor.select_algorithm import extern_kernels import triton import triton.language as tl from torch._inductor.runtime.triton_heuristics import grid from torch._C import _cuda_getCurrentRawStream as get_raw_stream from torch._inductor.runtime.triton_helpers import libdevice assert_size_stride ...
CZSLwithCVAE/CZSL_CVAE
DiffLoss
false
17,060
[ "MIT" ]
5
b77d40f7efde96d2512ac15ebe592ef56b13f2e3
https://github.com/CZSLwithCVAE/CZSL_CVAE/tree/b77d40f7efde96d2512ac15ebe592ef56b13f2e3
Scale
import torch import torch.nn as nn class Scale(nn.Module): def __init__(self, scale=1.0): super(Scale, self).__init__() self.scale = nn.Parameter(torch.tensor(scale, dtype=torch.float)) def forward(self, x): return x * self.scale def get_inputs(): return [torch.rand([4, 4, 4, 4...
import torch import triton import triton.language as tl from torch._inductor.runtime.triton_heuristics import grid from torch._C import _cuda_getCurrentRawStream as get_raw_stream import torch.nn as nn assert_size_stride = torch._C._dynamo.guards.assert_size_stride empty_strided_cuda = torch._C._dynamo.guards._empty_st...
Leotju/ttfnet
Scale
false
765
[ "Apache-2.0" ]
0
94eea28ea22215310140caee492d5de2b01b3d04
https://github.com/Leotju/ttfnet/tree/94eea28ea22215310140caee492d5de2b01b3d04
Embedder
# 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._utils import torch.nn import torc...
badrinarayan/ReAgent
Embedder
false
3,263
[ "BSD-3-Clause" ]
0
d49b02dce53d9a5d5ee077cea7efded507677641
https://github.com/badrinarayan/ReAgent/tree/d49b02dce53d9a5d5ee077cea7efded507677641
L_1st
# 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 import torch.nn as nn assert_size_stride = torch._C._dynamo.guards.assert_size_s...
ZagHe568/graph_embedding
L_1st
false
18,166
[ "MIT" ]
4
2a6f8214ce4b30b51eb9f1904b64fe782876f010
https://github.com/ZagHe568/graph_embedding/tree/2a6f8214ce4b30b51eb9f1904b64fe782876f010
DiagLinear
import math import torch from torch import Tensor from torch import nn class DiagLinear(nn.Module): """Applies a diagonal linear transformation to the incoming data: :math:`y = xD^T + b`""" __constants__ = ['features'] def __init__(self, features, bias=True): super(DiagLinear, self).__init__() ...
import torch import triton import triton.language as tl from torch._inductor.runtime.triton_heuristics import grid from torch._C import _cuda_getCurrentRawStream as get_raw_stream import math from torch import Tensor from torch import nn assert_size_stride = torch._C._dynamo.guards.assert_size_stride empty_strided_cuda...
nihaarshah/behavenet
DiagLinear
false
12,829
[ "MIT" ]
0
35bf5360e136075ca5ec30b3f98a2112a53e992c
https://github.com/nihaarshah/behavenet/tree/35bf5360e136075ca5ec30b3f98a2112a53e992c
ConvertPointsFromHomogeneous
import torch import torch.nn as nn def convert_points_from_homogeneous(points): """Function that converts points from homogeneous to Euclidean space. See :class:`~torchgeometry.ConvertPointsFromHomogeneous` for details. Examples:: >>> input = torch.rand(2, 4, 3) # BxNx3 >>> output = tg...
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...
hassony2/frankmocap
ConvertPointsFromHomogeneous
false
6,787
[ "BSD-3-Clause" ]
1
50aae41d9b41d2f344ae1709bbf1b25974209fa9
https://github.com/hassony2/frankmocap/tree/50aae41d9b41d2f344ae1709bbf1b25974209fa9
CoxPHLossSorted
import torch from torch import Tensor def cox_ph_loss_sorted(log_h: 'Tensor', events: 'Tensor', eps: 'float'=1e-07 ) ->Tensor: """Requires the input to be sorted by descending duration time. See DatasetDurationSorted. We calculate the negative log of $( rac{h_i}{\\sum_{j \\in R_i} h_j})^d$, where...
import torch import triton import triton.language as tl from torch._inductor.runtime.triton_heuristics import grid from torch._C import _cuda_getCurrentRawStream as get_raw_stream from torch._inductor.runtime import triton_helpers from torch._inductor.runtime.triton_helpers import math as tl_math from torch import Tens...
gabrielasuchopar/pycox
CoxPHLossSorted
false
3,511
[ "BSD-2-Clause" ]
0
e4ea5f0ee26c6d3e3a468f164de2b7c426376e99
https://github.com/gabrielasuchopar/pycox/tree/e4ea5f0ee26c6d3e3a468f164de2b7c426376e99
CenteredLayer
import torch from torch import nn class CenteredLayer(nn.Module): def __init__(self, **kwargs): super(CenteredLayer, self).__init__(**kwargs) def forward(self, x): return x - x.mean() def get_inputs(): return [torch.rand([4, 4, 4, 4])] def get_init_inputs(): return [[], {}]
import torch import triton import triton.language as tl from torch._inductor.runtime.triton_heuristics import grid from torch._C import _cuda_getCurrentRawStream as get_raw_stream from torch._inductor.runtime import triton_helpers from torch import nn assert_size_stride = torch._C._dynamo.guards.assert_size_stride empt...
Halo1236/Dive-into-DL-PyTorch
CenteredLayer
false
513
[ "Apache-2.0" ]
0
586b4e9ca77b2121ce5f5bec8b0a893b33f1b574
https://github.com/Halo1236/Dive-into-DL-PyTorch/tree/586b4e9ca77b2121ce5f5bec8b0a893b33f1b574
Attention
# AOT ID: ['0_forward'] from ctypes import c_void_p, c_long, c_int import torch import math import random import os import tempfile from math import inf, nan from torch._inductor.hooks import run_intermediate_hooks from torch._inductor.utils import maybe_profile from torch._inductor.codegen.memory_planning import _alig...
import torch from torch._inductor.select_algorithm import extern_kernels import triton import triton.language as tl from torch._inductor.runtime.triton_heuristics import grid from torch._C import _cuda_getCurrentRawStream as get_raw_stream from torch._inductor.runtime import triton_helpers from torch._inductor.runtime....
alpgokcek/turkish-qg-model
Attention
false
3,103
[ "MIT" ]
0
e90050d869958325aeaf639a2b1ff5eb2856e318
https://github.com/alpgokcek/turkish-qg-model/tree/e90050d869958325aeaf639a2b1ff5eb2856e318
SoftGeneratorPoolMLP
# AOT ID: ['0_forward'] from ctypes import c_void_p, c_long, c_int import torch import math import random import os import tempfile from math import inf, nan from torch._inductor.hooks import run_intermediate_hooks from torch._inductor.utils import maybe_profile from torch._inductor.codegen.memory_planning import _alig...
import torch from torch._inductor.select_algorithm import extern_kernels import triton import triton.language as tl from torch._inductor.runtime.triton_heuristics import grid from torch._C import _cuda_getCurrentRawStream as get_raw_stream from torch._inductor.runtime import triton_helpers import torch.nn as nn from to...
LinChen-65/pygcn
SoftGeneratorPoolMLP
false
2,528
[ "MIT" ]
0
0a77f56fd6d5cb3edc7affc2ba3455733d7da6eb
https://github.com/LinChen-65/pygcn/tree/0a77f56fd6d5cb3edc7affc2ba3455733d7da6eb
TimeBlock
import torch import torch.nn as nn import torch.nn.functional as F class TimeBlock(nn.Module): def __init__(self, in_channels, out_channels, kernel_size=3): """ :param in_channels: Number of input features at each node in each time step. :param out_channels: Desired number of outp...
import torch from torch._inductor.select_algorithm import extern_kernels import triton import triton.language as tl from 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_...
Kelang-Tian/ST-MGAT
TimeBlock
false
17,534
[ "MIT" ]
8
f527cb5748d022d9c3b4eddd3481cf641bb0dae3
https://github.com/Kelang-Tian/ST-MGAT/tree/f527cb5748d022d9c3b4eddd3481cf641bb0dae3
ConvModule
import torch import torch.utils.data import torch.nn as nn def _get_activation(activation): valid = ['relu', 'leaky_relu', 'lrelu', 'tanh', 'sigmoid'] assert activation in valid, 'activation should be one of {}'.format(valid) if activation == 'relu': return nn.ReLU(inplace=True) if activation ...
import torch from torch._inductor.select_algorithm import extern_kernels import triton import triton.language as tl from torch._inductor.runtime.triton_heuristics import grid from torch._C import _cuda_getCurrentRawStream as get_raw_stream import torch.utils.data import torch.nn as nn assert_size_stride = torch._C._dyn...
IlyaBizyaev/ttools
ConvModule
false
8,351
[ "MIT" ]
11
b1435b19f397ce1baff9daed3cb287e52a029fdb
https://github.com/IlyaBizyaev/ttools/tree/b1435b19f397ce1baff9daed3cb287e52a029fdb
FiLMLayerEqualFC
# 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 math i...
xh-liu-tech/CIPS-3D
FiLMLayerEqualFC
false
11,107
[ "MIT" ]
0
8910dfcf19bb86aab2287d652ae4e3666806b511
https://github.com/xh-liu-tech/CIPS-3D/tree/8910dfcf19bb86aab2287d652ae4e3666806b511
LowRankEncoderLayer
import torch import torch.nn as nn import torch.utils.checkpoint import torch.nn.functional as F from torch.cuda.amp import autocast class ScaledDotProductAttention(nn.Module): """ Scaled Dot-Product Attention """ def __init__(self, temperature, attn_dropout=0.1): super().__init__() self.temp...
import torch from torch._inductor.select_algorithm import extern_kernels import triton import triton.language as tl from 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....
bahducoup/factorized_training
LowRankEncoderLayer
false
12,173
[ "MIT" ]
0
0af38f16338a9bcfcc11091b1a6b75befd67f234
https://github.com/bahducoup/factorized_training/tree/0af38f16338a9bcfcc11091b1a6b75befd67f234
MaskDiscriminator
# 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...
JACKYLUO1991/DCBNet
MaskDiscriminator
false
17,469
[ "MIT" ]
6
b797584b66ad99fe984f58268befb12ec60ccfae
https://github.com/JACKYLUO1991/DCBNet/tree/b797584b66ad99fe984f58268befb12ec60ccfae
LinearRegression
# AOT ID: ['0_forward'] from ctypes import c_void_p, c_long, c_int import torch import math import random import os import tempfile from math import inf, nan from torch._inductor.hooks import run_intermediate_hooks from torch._inductor.utils import maybe_profile from torch._inductor.codegen.memory_planning import _alig...
import torch from torch._inductor.select_algorithm import extern_kernels import triton import triton.language as tl from torch._inductor.runtime.triton_heuristics import grid from torch._C import _cuda_getCurrentRawStream as get_raw_stream from torch import nn assert_size_stride = torch._C._dynamo.guards.assert_size_st...
GaspardLeMarque/Competition-Models
LinearRegression
false
483
[ "MIT" ]
0
3bd0b75de369420ac3a3011659f1de5942a867e1
https://github.com/GaspardLeMarque/Competition-Models/tree/3bd0b75de369420ac3a3011659f1de5942a867e1
SimpleCumSumModule
# 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.jit import torch.onnx import torch.nn assert_size_stride = torch._C._dynamo.guards.assert_size_stride empty_strided_cuda = torc...
YaronBenAtar/glow
SimpleCumSumModule
false
14,663
[ "Apache-2.0" ]
2,838
a13706a4239fa7eaf059c670dc573e3eb0768f86
https://github.com/YaronBenAtar/glow/tree/a13706a4239fa7eaf059c670dc573e3eb0768f86
KLNormal
import torch import torch.nn as nn import torch.utils.data import torch.utils.data.distributed class KLNormal(nn.Module): def __init__(self): super(KLNormal, self).__init__() def forward(self, qm, qv, pm, pv): element_wise = 0.5 * (torch.log(pv) - torch.log(qv) + qv / pv + (qm - ...
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.utils.data import torch.utils.data.dis...
kayburns/craftassist
KLNormal
false
3,806
[ "MIT" ]
0
07909493d320afc2c9ff428d0891bc3acd4dc68f
https://github.com/kayburns/craftassist/tree/07909493d320afc2c9ff428d0891bc3acd4dc68f
NegativeSampling
# 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...
kimoyerr/my-dataloader
NegativeSampling
false
12,672
[ "MIT" ]
0
a235e2f02d936df3f835b423dd015afa52e54066
https://github.com/kimoyerr/my-dataloader/tree/a235e2f02d936df3f835b423dd015afa52e54066
Log_Cosh_Loss
import torch class Log_Cosh_Loss(torch.nn.Module): def forward(self, logits, labels): return torch.mean(torch.log(torch.cosh(labels - logits))) def get_inputs(): return [torch.rand([4, 4, 4, 4]), torch.rand([4, 4, 4, 4])] def get_init_inputs(): return [[], {}]
import torch import triton import triton.language as tl from torch._inductor.runtime.triton_heuristics import grid from torch._C import _cuda_getCurrentRawStream as get_raw_stream from torch._inductor.runtime import triton_helpers from torch._inductor.runtime.triton_helpers import libdevice, math as tl_math assert_size...
CODEJIN/RHRNet
Log_Cosh_Loss
false
4,927
[ "MIT" ]
1
71bd9d40a9951a7beabe9c3e802e74af22dd405d
https://github.com/CODEJIN/RHRNet/tree/71bd9d40a9951a7beabe9c3e802e74af22dd405d
JSCriterion
import torch import torch.nn.functional as F from torch.nn.modules.loss import _Loss from torch.optim.lr_scheduler import * class Criterion(_Loss): def __init__(self, alpha=1.0, name='criterion'): super().__init__() """Alpha is used to weight each loss term """ self.alpha = alpha ...
import torch import triton import triton.language as tl from torch._inductor.runtime.triton_heuristics import grid from torch._C import _cuda_getCurrentRawStream as get_raw_stream from torch._inductor.runtime import triton_helpers from torch._inductor.runtime.triton_helpers import libdevice, math as tl_math from torch....
chunhuililili/mt_dnn
JSCriterion
false
10,202
[ "MIT" ]
0
4c6efaf21724c7b8103a05e46b5b44d7b246225e
https://github.com/chunhuililili/mt_dnn/tree/4c6efaf21724c7b8103a05e46b5b44d7b246225e
MySigmoidFocalLoss
import torch import torch.utils.data from torch import nn class MySigmoidFocalLoss(nn.Module): def __init__(self, gamma, alpha): super().__init__() self.gamma = gamma self.alpha = alpha def forward(self, confids, targets): bias = 1e-07 num_classes = confids.shape[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 torch.utils.dat...
yuruiqi/FCOS
MySigmoidFocalLoss
false
13,156
[ "BSD-2-Clause" ]
0
f03f984a03f4e23a0c1c8b470e401d4319e56c3f
https://github.com/yuruiqi/FCOS/tree/f03f984a03f4e23a0c1c8b470e401d4319e56c3f
MLP
import torch import torch.nn as nn class MLP(nn.Module): def __init__(self, embedding_size): super(MLP, self).__init__() self.dense_h_to_4h = nn.Linear(embedding_size, embedding_size * 4) self.dense_4h_to_h = nn.Linear(embedding_size * 4, embedding_size) self.act = nn.functional.g...
import torch from torch._inductor.select_algorithm import extern_kernels import triton import triton.language as tl from torch._inductor.runtime.triton_heuristics import grid from torch._C import _cuda_getCurrentRawStream as get_raw_stream from torch._inductor.runtime.triton_helpers import libdevice import torch.nn as ...
AeroXi/CPM-Generate-Pytorch
MLP
false
8,840
[ "Apache-2.0" ]
0
a1530ad2848a690c6e1557f996fe58538fe86884
https://github.com/AeroXi/CPM-Generate-Pytorch/tree/a1530ad2848a690c6e1557f996fe58538fe86884
CosAttention
import torch import torch.nn as nn class CosAttention(nn.Module): def __init__(self): super(CosAttention, self).__init__() def forward(self, title_output, attr_output): """ title_output (batchsize, seqlen, hidden_dim) attr_output (batchsize, hidden_dim) """ 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...
deepframwork/TorchBlocks
CosAttention
false
6,532
[ "MIT" ]
1
35f6e1bb83d2b9b05ba914a21fd365cb26ac4a32
https://github.com/deepframwork/TorchBlocks/tree/35f6e1bb83d2b9b05ba914a21fd365cb26ac4a32
AbsLayer
# AOT ID: ['0_inference'] from ctypes import c_void_p, c_long, c_int import torch import math import random import os import tempfile from math import inf, nan from torch._inductor.hooks import run_intermediate_hooks from torch._inductor.utils import maybe_profile from torch._inductor.codegen.memory_planning import _al...
import torch import triton import triton.language as tl from torch._inductor.runtime.triton_heuristics import grid from torch._C import _cuda_getCurrentRawStream as get_raw_stream from torch._inductor.runtime.triton_helpers import math as tl_math from torch.nn import Module from torch.nn.modules import Module import to...
TomVeniat/avalanche
AbsLayer
false
14,502
[ "MIT" ]
810
6e89f9945cf40c14471406a4cf4830a8d95c5705
https://github.com/TomVeniat/avalanche/tree/6e89f9945cf40c14471406a4cf4830a8d95c5705