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
FakeRKHSConvNet
import math import torch import numpy as np from torch import nn as nn from torch import optim as optim class MaybeBatchNorm2d(nn.Module): def __init__(self, n_ftr, affine, use_bn): super(MaybeBatchNorm2d, self).__init__() self.bn = nn.BatchNorm2d(n_ftr, affine=affine) self.use_bn = use_b...
import torch from torch._inductor.select_algorithm import extern_kernels import triton import triton.language as tl from 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....
oke-aditya/pytorch-lightning-bolts
FakeRKHSConvNet
false
7,362
[ "Apache-2.0" ]
1
268df20bb442e7385b709b1488d37fd2767aba3c
https://github.com/oke-aditya/pytorch-lightning-bolts/tree/268df20bb442e7385b709b1488d37fd2767aba3c
FocalLoss
import torch from torch import nn import torch.nn.functional as F class FocalLoss(nn.Module): def __init__(self, gamma): super().__init__() self.gamma = gamma def forward(self, input, target): if not target.size() == input.size(): raise ValueError( 'Target...
import torch import triton import triton.language as tl from torch._inductor.runtime.triton_heuristics import grid from torch._C import _cuda_getCurrentRawStream as get_raw_stream from torch._inductor.runtime import triton_helpers from torch._inductor.runtime.triton_helpers import libdevice, math as tl_math from torch ...
dainis-boumber/nlp-loss-functions
FocalLoss
false
12,241
[ "Apache-2.0" ]
0
735d1e74bf9b9705a56cbb718b85448575efb5ee
https://github.com/dainis-boumber/nlp-loss-functions/tree/735d1e74bf9b9705a56cbb718b85448575efb5ee
SigmoidFocalClassificationLoss
# 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...
hlesmqh/WS3D
SigmoidFocalClassificationLoss
false
15,528
[ "MIT" ]
100
6816eeb135923a59de34ee5d94be2d0fd3ec83f9
https://github.com/hlesmqh/WS3D/tree/6816eeb135923a59de34ee5d94be2d0fd3ec83f9
Acosh
import torch import torch.onnx import torch.nn as nn class Acosh(nn.Module): def forward(self, x): return torch.acosh(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.onnx import torch.nn as nn assert_size_stride = torch._C._dynamo.g...
mil-tokyo/webdnn
Acosh
false
16,058
[ "MIT" ]
1,967
38a60fd3e1a4e72bc01108189a3aa51e0752aecd
https://github.com/mil-tokyo/webdnn/tree/38a60fd3e1a4e72bc01108189a3aa51e0752aecd
EqualConv2d
# 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 from torch import nn assert_size_stride = torch._C._dynamo.guards.as...
ArashVahabpour/encoder4editing-contrastive
EqualConv2d
false
13,282
[ "MIT" ]
1,051
1b91afe1693e01a41118e1ce2451b7d14bec51f4
https://github.com/ArashVahabpour/encoder4editing-contrastive/tree/1b91afe1693e01a41118e1ce2451b7d14bec51f4
Mean
import torch import torch.nn as nn class Mean(nn.Module): def __init__(self, dim, keep_dim=False): super(Mean, self).__init__() self.dim = dim self.keep_dim = keep_dim def forward(self, input): return input.mean(self.dim, self.keep_dim) def get_inputs(): return [torch.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 assert_size_stride = torch._C._dynamo.guards.assert_size_stride empty_strided_cuda = torch._C._dynamo.guards._empty_st...
WillyChen123/CDFNet
Mean
false
1,230
[ "MIT" ]
0
12d6b288aa2a8301683395a75bd44a7be44b7f2a
https://github.com/WillyChen123/CDFNet/tree/12d6b288aa2a8301683395a75bd44a7be44b7f2a
BSConvU
import torch class BSConvU(torch.nn.Module): def __init__(self, in_channels, out_channels, kernel_size=3, stride=1, padding=1, dilation=1, bias=True, padding_mode='zeros', with_norm= True, bn_kwargs=None): super().__init__() self.with_norm = with_norm if bn_kwargs is None:...
import torch from torch._inductor.select_algorithm import extern_kernels import triton import triton.language as tl from torch._inductor.runtime.triton_heuristics import grid from torch._C import _cuda_getCurrentRawStream as get_raw_stream from torch._inductor.runtime.triton_helpers import libdevice assert_size_stride ...
YingqiLiulll/scrips_for_SR
BSConvU
false
1,263
[ "MIT" ]
0
04fa6fdaf157e913d3e2521cd80315a10a2ccedc
https://github.com/YingqiLiulll/scrips_for_SR/tree/04fa6fdaf157e913d3e2521cd80315a10a2ccedc
TripletLoss
import torch from torchvision.transforms import functional as F import torch.utils.data from torch import nn import torch.nn.functional as F class TripletLoss(nn.Module): """ Triplet loss Takes embeddings [N*dim_embed] of an anchor sample, a positive sample and a negative sample """ def __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 from torch._inductor.runtime import triton_helpers import torch.utils.data from torch import nn assert_size_stride = torch._C._dynamo.guards...
Sigma10010/nuclei_cells_det
TripletLoss
false
17,927
[ "MIT" ]
4
c074175fec8938472bb4cddabd83d1d0ea78f230
https://github.com/Sigma10010/nuclei_cells_det/tree/c074175fec8938472bb4cddabd83d1d0ea78f230
ToRGB
# 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.autograd import Function import math from torch import nn as nn from ...
hyunobae/BasicSR
ToRGB
false
12,529
[ "Apache-2.0" ]
0
f2c2fc6cf28933658816c808f55c95fa20b16483
https://github.com/hyunobae/BasicSR/tree/f2c2fc6cf28933658816c808f55c95fa20b16483
Conv2dSame
# 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.utils.data.distributed from torch import nn...
Adlik/zen_nas
Conv2dSame
false
16,879
[ "Apache-2.0" ]
7
d820d5c7d5bbb6fd66a76d5f16513647d6ea7a57
https://github.com/Adlik/zen_nas/tree/d820d5c7d5bbb6fd66a76d5f16513647d6ea7a57
MultiHeadAttention
# AOT ID: ['0_forward'] from ctypes import c_void_p, c_long, c_int import torch import math import random import os import tempfile from math import inf, nan from torch._inductor.hooks import run_intermediate_hooks from torch._inductor.utils import maybe_profile from torch._inductor.codegen.memory_planning import _alig...
import torch from torch._inductor.select_algorithm import extern_kernels import triton import triton.language as tl from torch._inductor.runtime.triton_heuristics import grid from torch._C import _cuda_getCurrentRawStream as get_raw_stream from torch._inductor.runtime import triton_helpers from torch._inductor.runtime....
Sobsz/uberduck-ml-dev
MultiHeadAttention
false
1,092
[ "Apache-2.0" ]
0
f099238f6f2e3f600d72d89dea3c883c59d91387
https://github.com/Sobsz/uberduck-ml-dev/tree/f099238f6f2e3f600d72d89dea3c883c59d91387
PriorDiscriminator
# 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_...
Crazy-Jack/HCL
PriorDiscriminator
false
13,524
[ "MIT" ]
275
dd2aae0c525859c8498205a791058287f86ab111
https://github.com/Crazy-Jack/HCL/tree/dd2aae0c525859c8498205a791058287f86ab111
PairwiseBCELoss
import torch from abc import abstractmethod import torch.utils.data.dataloader import torch.nn.functional as F import torch.nn as nn import torch.nn import torch.optim.optimizer class SimilarityLoss(nn.Module): def __init__(self): super(SimilarityLoss, self).__init__() @abstractmethod 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 from torch._inductor.runtime import triton_helpers from torch._inductor.runtime.triton_helpers import libdevice, math as tl_math from abc im...
bogdankostic/flair
PairwiseBCELoss
false
6,339
[ "MIT" ]
1
8cf03eab19512e94c1bcb4a30409bb065d37fe25
https://github.com/bogdankostic/flair/tree/8cf03eab19512e94c1bcb4a30409bb065d37fe25
KeypointRCNNPredictor
# 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.utils.data from ...
Jack-XHP/LabPicV2-MaskRCNN
KeypointRCNNPredictor
false
9,163
[ "MIT" ]
0
b0586b2827000c7b7337d5110b2b1fd6185053a8
https://github.com/Jack-XHP/LabPicV2-MaskRCNN/tree/b0586b2827000c7b7337d5110b2b1fd6185053a8
ContrastiveDistanceLoss
# 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 from torch.nn.modules.loss import * from torch.nn.modules import * ...
asmekal/catalyst
ContrastiveDistanceLoss
false
12,117
[ "MIT" ]
0
e11365c0a9812649ceaef14e53061cd5117d8684
https://github.com/asmekal/catalyst/tree/e11365c0a9812649ceaef14e53061cd5117d8684
Actor
import torch import torch.nn as nn import torch as t class Actor(nn.Module): def __init__(self, state_dim, action_dim, action_range): super().__init__() self.fc1 = nn.Linear(state_dim, 16) self.fc2 = nn.Linear(16, 16) self.fc3 = nn.Linear(16, action_dim) self.action_range ...
import torch from torch._inductor.select_algorithm import extern_kernels import triton import triton.language as tl from 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....
LeonLester/Machin-title-in-progress-
Actor
false
11,647
[ "MIT" ]
0
777479d47b520dcdc6b09c247591b5fe1d6cbe8c
https://github.com/LeonLester/Machin-title-in-progress-/tree/777479d47b520dcdc6b09c247591b5fe1d6cbe8c
TanhHyperSolver
import torch import torch.nn as nn class TanhHyperSolver(nn.Module): def __init__(self, in_dim, out_dim, hidden_dim=32): super().__init__() self.fc1 = nn.Linear(in_dim, hidden_dim) self.fc2 = nn.Linear(hidden_dim, hidden_dim) self.fc3 = nn.Linear(hidden_dim, out_dim) self....
import torch from torch._inductor.select_algorithm import extern_kernels import triton import triton.language as tl from torch._inductor.runtime.triton_heuristics import grid from torch._C import _cuda_getCurrentRawStream as get_raw_stream from torch._inductor.runtime.triton_helpers import libdevice import torch.nn as ...
Juju-botu/diffeqml-research
TanhHyperSolver
false
13,919
[ "Apache-2.0" ]
49
aa796c87447e5299ec4f25a07fc4d032afb1f63e
https://github.com/Juju-botu/diffeqml-research/tree/aa796c87447e5299ec4f25a07fc4d032afb1f63e
ClassificationHead
# 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 assert_size_stride ...
mlfoundations/wise-ft
ClassificationHead
false
16,098
[ "MIT" ]
79
58b7a4b343b09dc06606aa929c2ef51accced8d1
https://github.com/mlfoundations/wise-ft/tree/58b7a4b343b09dc06606aa929c2ef51accced8d1
Net1
# 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 ...
Yixiao99/deep-learning-containers
Net1
false
14,702
[ "Apache-2.0" ]
383
01f078adf5abfb92e802b326511981bdd4a8c85c
https://github.com/Yixiao99/deep-learning-containers/tree/01f078adf5abfb92e802b326511981bdd4a8c85c
NextSentencePrediction
# 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....
LogIntelligence/LogADEmpirical
NextSentencePrediction
false
8,479
[ "MIT" ]
11
48458aee65c1c84466b04dd4092fae79a7f341fd
https://github.com/LogIntelligence/LogADEmpirical/tree/48458aee65c1c84466b04dd4092fae79a7f341fd
MLP
# AOT ID: ['0_forward'] from ctypes import c_void_p, c_long, c_int import torch import math import random import os import tempfile from math import inf, nan from torch._inductor.hooks import run_intermediate_hooks from torch._inductor.utils import maybe_profile from torch._inductor.codegen.memory_planning import _alig...
import torch from torch._inductor.select_algorithm import extern_kernels import triton import triton.language as tl from torch._inductor.runtime.triton_heuristics import grid from torch._C import _cuda_getCurrentRawStream as get_raw_stream from torch._inductor.runtime.triton_helpers import libdevice import math import ...
albertkx/GeDi
MLP
false
12,111
[ "BSD-3-Clause" ]
0
27532eb6ac5dd42d817d25a905401504e916f9fb
https://github.com/albertkx/GeDi/tree/27532eb6ac5dd42d817d25a905401504e916f9fb
CRF
import torch import torch.utils.data.dataloader import torch.nn class CRF(torch.nn.Module): """ Conditional Random Field Implementation according to sgrvinod (https://github.com/sgrvinod). Classifier which predicts single tag / class / label for given word based on not just the word, but also on previ...
import torch import triton import triton.language as tl from torch._inductor.runtime.triton_heuristics import grid from torch._C import _cuda_getCurrentRawStream as get_raw_stream import torch.utils.data.dataloader import torch.nn assert_size_stride = torch._C._dynamo.guards.assert_size_stride empty_strided_cuda = torc...
marleneDebatin/flair
CRF
false
7,162
[ "MIT" ]
1
4d17509f358158f66d43e85db1b6990523b0b095
https://github.com/marleneDebatin/flair/tree/4d17509f358158f66d43e85db1b6990523b0b095
Shifted_softplus
import torch import torch.nn as nn import torch.nn.parallel class Shifted_softplus(nn.Module): """ Performs a Shifter softplus loss, which modifies with a value of log(2) """ def __init__(self): super(Shifted_softplus, self).__init__() self.act = nn.Softplus() self.shift = nn.Para...
import torch import triton import triton.language as tl from torch._inductor.runtime.triton_heuristics import grid from torch._C import _cuda_getCurrentRawStream as get_raw_stream from torch._inductor.runtime.triton_helpers import libdevice, math as tl_math import torch.nn as nn import torch.nn.parallel assert_size_str...
QMrpy/deepchem
Shifted_softplus
false
2,736
[ "MIT" ]
0
f38a21c71e7bc4fd1fa59601be2b79ce7d744bd6
https://github.com/QMrpy/deepchem/tree/f38a21c71e7bc4fd1fa59601be2b79ce7d744bd6
NLKDifferenceCenter
import torch from torch import nn import torch.nn.functional as F class NLKDifferenceCenter(nn.Module): def __init__(self, dim, hidden_dim): super(NLKDifferenceCenter, self).__init__() self.dim = dim self.hidden_dim = hidden_dim self.layer1 = nn.Linear(self.dim, self.hidden_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....
HKUST-KnowComp/EFO-1-QA-benchmark
NLKDifferenceCenter
false
17,358
[ "MIT" ]
9
600fb02c76ab631f93ee362ceb789216ec085790
https://github.com/HKUST-KnowComp/EFO-1-QA-benchmark/tree/600fb02c76ab631f93ee362ceb789216ec085790
BertPreTrainingHeads
import math import torch import torch.nn as nn import torch.cuda import torch.distributed def get_activation_fn(activation): """Return an activation function Module according to its name.""" if activation == 'gelu': fn = GELU() elif activation == 'relu': fn = nn.ReLU() elif activation ...
import torch from torch._inductor.select_algorithm import extern_kernels import triton import triton.language as tl from torch._inductor.runtime.triton_heuristics import grid from torch._C import _cuda_getCurrentRawStream as get_raw_stream from torch._inductor.runtime import triton_helpers from torch._inductor.runtime....
SivilTaram/dialogue-utterance-rewriter-pytorch
BertPreTrainingHeads
false
2,930
[ "MIT" ]
0
92c2254958b7a1ee9199836f7f2236575270983f
https://github.com/SivilTaram/dialogue-utterance-rewriter-pytorch/tree/92c2254958b7a1ee9199836f7f2236575270983f
GatedConv2d
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.triton_helpers import libdevice, math as tl_math im...
piggy2303/DeepFillv2_Pytorch
GatedConv2d
false
7,473
[ "MIT" ]
1
dd35299f11704f878ed7a33e14ccd51a9d64baaf
https://github.com/piggy2303/DeepFillv2_Pytorch/tree/dd35299f11704f878ed7a33e14ccd51a9d64baaf
MixtureSynthesizers
# 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....
leaderj1001/Synthesizer-Rethinking-Self-Attention-Transformer-Models
MixtureSynthesizers
false
15,877
[ "MIT" ]
58
3ee5829438a8f9c063ae485e77c9ce7649d24139
https://github.com/leaderj1001/Synthesizer-Rethinking-Self-Attention-Transformer-Models/tree/3ee5829438a8f9c063ae485e77c9ce7649d24139
GlobalAttention
import torch import torch.nn as nn import torch.cuda def aeq(*args): """ Assert all arguments have the same value """ arguments = (arg for arg in args) first = next(arguments) assert all(arg == first for arg in arguments ), 'Not all arguments have the same value: ' + str(args) def 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....
kurianbenoy/QG-Net
GlobalAttention
false
3,875
[ "MIT" ]
0
074c697530aaaa259a3e16467a020846b1085af1
https://github.com/kurianbenoy/QG-Net/tree/074c697530aaaa259a3e16467a020846b1085af1
FakeReLUM
# 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...
Jay-Roberts/FW-Perturbations
FakeReLUM
false
9,113
[ "MIT" ]
0
0960f6116125307cc986f9f19b3c5ab4c15ed535
https://github.com/Jay-Roberts/FW-Perturbations/tree/0960f6116125307cc986f9f19b3c5ab4c15ed535
HighwayLayer
import torch import torch.nn.functional as F import torch.nn as nn import torch.jit import torch.jit.quantized import torch.onnx.operators class HighwayLayer(nn.Module): def __init__(self, input_dim, transform_activation=F.relu, gate_activation=F.softmax, gate_bias=-2): super().__init__() ...
import torch from torch._inductor.select_algorithm import extern_kernels import triton import triton.language as tl from 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....
Ayansam1152/translate
HighwayLayer
false
13,396
[ "BSD-3-Clause" ]
748
33d397fc25fb1072abd2975c77c602a2d031c6c4
https://github.com/Ayansam1152/translate/tree/33d397fc25fb1072abd2975c77c602a2d031c6c4
SpatialGate
import math import torch import torch.nn as nn import torch.utils.data from itertools import product as product from math import sqrt as sqrt class SpatialGate(nn.Module): def __init__(self, in_channels: 'int', num_groups: 'int'=1, kernel_size: 'int'=1, padding: 'int'=0, stride: 'int'=1, gate_activation:...
import torch from torch._inductor.select_algorithm import extern_kernels import triton import triton.language as tl from torch._inductor.runtime.triton_heuristics import grid from torch._C import _cuda_getCurrentRawStream as get_raw_stream from torch._inductor.runtime import triton_helpers from torch._inductor.runtime....
lingtengqiu/LearnableTreeFilterV2
SpatialGate
false
7,095
[ "Apache-2.0" ]
1
3814a5a84c0a5c33d6538749eaf5aed4827366de
https://github.com/lingtengqiu/LearnableTreeFilterV2/tree/3814a5a84c0a5c33d6538749eaf5aed4827366de
QNetwork
import torch import torch.nn.functional as F import torch.nn as nn class QNetwork(nn.Module): """Actor (Policy) Model.""" def __init__(self, state_size, action_size, seed, fc1_units=64, fc2_units=64): """Initialize parameters and build model. Params ====== state_si...
import torch from torch._inductor.select_algorithm import extern_kernels import triton import triton.language as tl from 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_...
AmineKheldouni/Graphs-in-Machine-Learning
QNetwork
false
4,858
[ "MIT" ]
1
003217495c624eaa33d44d679a0bc2164ca1f3d2
https://github.com/AmineKheldouni/Graphs-in-Machine-Learning/tree/003217495c624eaa33d44d679a0bc2164ca1f3d2
Snake
import torch import torch.nn as nn from torch import sin from torch import pow from torch.nn import Parameter from torch.distributions.exponential import Exponential class Snake(nn.Module): """ Implementation of the serpentine-like sine-based periodic activation function .. math:: 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.triton_helpers import math as tl_math import torch.nn as nn from torch.nn import Parameter from torch.distribut...
Juju-botu/diffeqml-research
Snake
false
13,965
[ "Apache-2.0" ]
49
aa796c87447e5299ec4f25a07fc4d032afb1f63e
https://github.com/Juju-botu/diffeqml-research/tree/aa796c87447e5299ec4f25a07fc4d032afb1f63e
ResizeTransform
# 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...
NingAnMe/voxelmorph
ResizeTransform
false
2,699
[ "Apache-2.0" ]
0
3a1a4c2f456af2dba5552efc1b08c68af38e54dc
https://github.com/NingAnMe/voxelmorph/tree/3a1a4c2f456af2dba5552efc1b08c68af38e54dc
SpatialPurity
# AOT ID: ['0_inference'] from ctypes import c_void_p, c_long, c_int import torch import math import random import os import tempfile from math import inf, nan from torch._inductor.hooks import run_intermediate_hooks from torch._inductor.utils import maybe_profile from torch._inductor.codegen.memory_planning import _al...
import torch from torch._inductor.select_algorithm import extern_kernels import triton import triton.language as tl from torch._inductor.runtime.triton_heuristics import grid from torch._C import _cuda_getCurrentRawStream as get_raw_stream from torch._inductor.runtime.triton_helpers import math as tl_math import torch....
BIT-DA/RIPU
SpatialPurity
false
16,970
[ "MIT" ]
9
125edf112c9ded1e7497aedb2a092331824df100
https://github.com/BIT-DA/RIPU/tree/125edf112c9ded1e7497aedb2a092331824df100
FeatureAssembler
# 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 typing import Optional import torch.nn as nn assert_size_stride = torch._C._dynamo.guards.assert_size_stride empty_strided_cuda = torch...
ZhuangweiKang/pytorch-ts
FeatureAssembler
false
2,991
[ "Apache-2.0", "MIT" ]
0
076d456358fd1bac96becba4f1ba38ec5a5fcf4d
https://github.com/ZhuangweiKang/pytorch-ts/tree/076d456358fd1bac96becba4f1ba38ec5a5fcf4d
SimpleTypeasModel
# 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
SimpleTypeasModel
false
14,685
[ "Apache-2.0" ]
2,838
a13706a4239fa7eaf059c670dc573e3eb0768f86
https://github.com/YaronBenAtar/glow/tree/a13706a4239fa7eaf059c670dc573e3eb0768f86
Convlayer
import torch class Convlayer(torch.nn.Module): def __init__(self, in_channels, out_channels, kernel_size=1, stride=1): super().__init__() padding = kernel_size // 2 self.refl = torch.nn.ReflectionPad2d(padding) self.conv = torch.nn.Conv2d(in_channels, out_channels, kernel_size, ...
import torch from torch._inductor.select_algorithm import extern_kernels import triton import triton.language as tl from torch._inductor.runtime.triton_heuristics import grid from torch._C import _cuda_getCurrentRawStream as get_raw_stream from torch._inductor.runtime.triton_helpers import math as tl_math assert_size_s...
bruchano/ImageStyler
Convlayer
false
9,925
[ "MIT" ]
0
7bde13bc954566088c477065adb5c4e4214c28bb
https://github.com/bruchano/ImageStyler/tree/7bde13bc954566088c477065adb5c4e4214c28bb
PatchEmbed
# 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._C import torch.serialization assert_size_str...
dkswxd/Swin-Transformer-Semantic-Segmentation
PatchEmbed
false
1,861
[ "Apache-2.0" ]
0
6af19736e5492a01d8952d4ee86a6d59b21c2ae1
https://github.com/dkswxd/Swin-Transformer-Semantic-Segmentation/tree/6af19736e5492a01d8952d4ee86a6d59b21c2ae1
Net
import torch import torch.nn as nn import torch.nn.functional as F class Net(nn.Module): def __init__(self): super(Net, self).__init__() self.fc = nn.Linear(28 * 28, 200) self.fc2 = nn.Linear(200, 10) def forward(self, x): x = x.view((-1, 28 * 28)) x = F.relu(self.fc(...
import torch from torch._inductor.select_algorithm import extern_kernels import triton import triton.language as tl from 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_...
anianruoss/RIAI
Net
false
3,108
[ "MIT" ]
0
2ac4ddcfb73c9678b1c4fe94fdaae82baceac4ea
https://github.com/anianruoss/RIAI/tree/2ac4ddcfb73c9678b1c4fe94fdaae82baceac4ea
StateInitZero
import torch from torch import nn from torchvision import models as models import torch.nn.parallel import torch.optim import torch.utils.data import torch.utils.data.distributed import torch.onnx class StateInitZero(nn.Module): def __init__(self, hidden_size, num_layers=1, batch_first=False): super(Stat...
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 torchvision import models as models import torch.nn.parallel import torch.optim import torch.utils.data import tor...
JinYAnGHe/openvino_training_extensions
StateInitZero
false
3,025
[ "Apache-2.0" ]
0
a0b4456a3c9fe6c1b7eabc9d5eb4e74d01453dee
https://github.com/JinYAnGHe/openvino_training_extensions/tree/a0b4456a3c9fe6c1b7eabc9d5eb4e74d01453dee
BinConv2d
import torch from itertools import product as product import torch.nn.functional as F from torch import nn import torch.optim import torch.utils.data class BinQuant(torch.autograd.Function): """BinaryConnect quantization. Refer: https://pytorch.org/tutorials/beginner/examples_autograd/two_layer_net_cu...
import torch from torch._inductor.select_algorithm import extern_kernels import triton import triton.language as tl from torch._inductor.runtime.triton_heuristics import grid from torch._C import _cuda_getCurrentRawStream as get_raw_stream from itertools import product as product from torch import nn import torch.optim...
ninfueng/a-PyTorch-Tutorial-to-Object-Detection
BinConv2d
false
10,638
[ "MIT" ]
0
fc7544720a7e939f5a56f4f7214e4965b7775f77
https://github.com/ninfueng/a-PyTorch-Tutorial-to-Object-Detection/tree/fc7544720a7e939f5a56f4f7214e4965b7775f77
ANNDigitDetect
# 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_...
Quest2GM/timestamp_detection_algorithm
ANNDigitDetect
false
5,732
[ "MIT" ]
1
8a5a7fba5a924a37402d7daece90fdf626a6a905
https://github.com/Quest2GM/timestamp_detection_algorithm/tree/8a5a7fba5a924a37402d7daece90fdf626a6a905
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._inductor.runtime....
aylagulcu/TripletMAML
LinearBlock
false
9,904
[ "MIT" ]
0
98cb4a23847ec24937963292cd6f162bcbf724ba
https://github.com/aylagulcu/TripletMAML/tree/98cb4a23847ec24937963292cd6f162bcbf724ba
Conv_Block_gn
# 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 ...
MRLoghmani/Separate_to_Adapt
Conv_Block_gn
false
5,580
[ "MIT" ]
1
09c734448aa22b3879186f59952d9fd596d4a1f8
https://github.com/MRLoghmani/Separate_to_Adapt/tree/09c734448aa22b3879186f59952d9fd596d4a1f8
tofp16
# 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 import torch.nn as nn assert_size_stride = torch._C._dynamo.guards.assert_size_stride empty_strided_cud...
Icep2020/CrowdGAN
tofp16
false
17,424
[ "MIT" ]
7
4adebaa09460f2f8296d368ffeba03f32c963d4d
https://github.com/Icep2020/CrowdGAN/tree/4adebaa09460f2f8296d368ffeba03f32c963d4d
BinaryDiceLoss
# 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...
MIPT-Oulu/3D-Histo-Grading
BinaryDiceLoss
false
5,570
[ "MIT" ]
1
b779a154d0e5b104fc152c8952124768fb7b1dc6
https://github.com/MIPT-Oulu/3D-Histo-Grading/tree/b779a154d0e5b104fc152c8952124768fb7b1dc6
Critic
# AOT ID: ['0_forward'] from ctypes import c_void_p, c_long, c_int import torch import math import random import os import tempfile from math import inf, nan from torch._inductor.hooks import run_intermediate_hooks from torch._inductor.utils import maybe_profile from torch._inductor.codegen.memory_planning import _alig...
import torch from torch._inductor.select_algorithm import extern_kernels import triton import triton.language as tl from torch._inductor.runtime.triton_heuristics import grid from torch._C import _cuda_getCurrentRawStream as get_raw_stream from torch._inductor.runtime import triton_helpers import torch.nn as nn assert_...
ZY-KK/panda
Critic
false
1,315
[ "MIT" ]
0
48fcbd65d563ef74aab2554be8de7662560c43da
https://github.com/ZY-KK/panda/tree/48fcbd65d563ef74aab2554be8de7662560c43da
TernaryLinear
import torch from torch import nn import torch.nn.functional as F from torch.nn import init class Ternary(nn.Module): """ Ternarize the input activations to -1, 0, 1. """ def __init__(self, left=-0.25, right=0.25): super().__init__() self.left = left self.right = right 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 import nn from torch.nn import init assert_size_stride = torch._C._dy...
C-SUNSHINE/TOQ-Nets-PyTorch-Release
TernaryLinear
false
17,145
[ "MIT" ]
6
05e06bf633fb3c6b610dda9a5126ecd7af1db02f
https://github.com/C-SUNSHINE/TOQ-Nets-PyTorch-Release/tree/05e06bf633fb3c6b610dda9a5126ecd7af1db02f
GeneralizedMeanPoolingFpn
import torch from abc import ABC from torch import nn class GeneralizedMeanPoolingFpn(nn.Module, ABC): """Applies a 2D power-average adaptive pooling over an input signal composed of several input planes. The function computed is: :math:`f(X) = pow(sum(pow(X, p)), 1/p)` - At p = infinity, one gets...
import torch import triton import triton.language as tl from torch._inductor.runtime.triton_heuristics import grid from torch._C import _cuda_getCurrentRawStream as get_raw_stream from torch._inductor.runtime import triton_helpers from torch._inductor.runtime.triton_helpers import libdevice from abc import ABC from tor...
catcodee/cluster-contrast-reid
GeneralizedMeanPoolingFpn
false
3,279
[ "MIT" ]
0
f6359990a4326375f23c3fd654df3fc6dcc9c579
https://github.com/catcodee/cluster-contrast-reid/tree/f6359990a4326375f23c3fd654df3fc6dcc9c579
Net
# AOT ID: ['0_forward'] from ctypes import c_void_p, c_long, c_int import torch import math import random import os import tempfile from math import inf, nan from torch._inductor.hooks import run_intermediate_hooks from torch._inductor.utils import maybe_profile from torch._inductor.codegen.memory_planning import _alig...
import torch from torch._inductor.select_algorithm import extern_kernels import triton import triton.language as tl from torch._inductor.runtime.triton_heuristics import grid from torch._C import _cuda_getCurrentRawStream as get_raw_stream from torch._inductor.runtime import triton_helpers import torch.nn as nn assert_...
The-very-most-awesome-team-of-cool-kids/02463_Active_Learning
Net
false
1,882
[ "MIT" ]
0
abc35a31996de1c2e3275cf946b6a44f62abb781
https://github.com/The-very-most-awesome-team-of-cool-kids/02463_Active_Learning/tree/abc35a31996de1c2e3275cf946b6a44f62abb781
Sub
import torch class Sub(torch.nn.Module): def __init__(self): super(Sub, self).__init__() def forward(self, x, y): return x - y def get_inputs(): return [torch.rand([4, 4, 4, 4]), torch.rand([4, 4, 4, 4])] def get_init_inputs(): return [[], {}]
import torch import triton import triton.language as tl from torch._inductor.runtime.triton_heuristics import grid from torch._C import _cuda_getCurrentRawStream as get_raw_stream assert_size_stride = torch._C._dynamo.guards.assert_size_stride empty_strided_cuda = torch._C._dynamo.guards._empty_strided_cuda @triton.j...
bunderhi/torch2trt
Sub
false
1,610
[ "MIT" ]
0
fa5e31e742a0f0c9a9ee38909a6fa56bb07ba96d
https://github.com/bunderhi/torch2trt/tree/fa5e31e742a0f0c9a9ee38909a6fa56bb07ba96d
GlobalAvgPool2d
# AOT ID: ['0_inference'] from ctypes import c_void_p, c_long, c_int import torch import math import random import os import tempfile from math import inf, nan from torch._inductor.hooks import run_intermediate_hooks from torch._inductor.utils import maybe_profile from torch._inductor.codegen.memory_planning import _al...
import torch import triton import triton.language as tl from torch._inductor.runtime.triton_heuristics import grid from torch._C import _cuda_getCurrentRawStream as get_raw_stream from torch import nn assert_size_stride = torch._C._dynamo.guards.assert_size_stride empty_strided_cuda = torch._C._dynamo.guards._empty_str...
JessyLee/Jessy_Dive_into_DL_Pytorch
GlobalAvgPool2d
false
11,542
[ "MIT" ]
0
40b7921637b13507057f41485d928f3b59cc6f6a
https://github.com/JessyLee/Jessy_Dive_into_DL_Pytorch/tree/40b7921637b13507057f41485d928f3b59cc6f6a
BPRLoss
import torch import torch.nn as nn class BPRLoss(nn.Module): """ BPRLoss, based on Bayesian Personalized Ranking Args: - gamma(float): Small value to avoid division by zero Shape: - Pos_score: (N) - Neg_score: (N), same shape as the Pos_score - Output: scalar. Exampl...
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 ...
BELIEVEfxy/LightSANs
BPRLoss
false
7,767
[ "MIT" ]
17
94ce7e59d144dbc787153b8c486cad334790ec6e
https://github.com/BELIEVEfxy/LightSANs/tree/94ce7e59d144dbc787153b8c486cad334790ec6e
SelfAttentionBatch
import torch from torch import nn import torch.nn.functional as F class SelfAttentionBatch(nn.Module): def __init__(self, dim, da, alpha=0.2, dropout=0.5): super(SelfAttentionBatch, self).__init__() self.dim = dim self.da = da self.alpha = alpha self.dropout = dropout ...
import torch from torch._inductor.select_algorithm import extern_kernels import triton import triton.language as tl from 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....
RUCAIBox/WSDM2022-C2CRS
SelfAttentionBatch
false
17,847
[ "MIT" ]
4
8ef2fa7c44bdba1799ab79f379ae7394bd468c02
https://github.com/RUCAIBox/WSDM2022-C2CRS/tree/8ef2fa7c44bdba1799ab79f379ae7394bd468c02
NormedLinear
import torch import torch.utils.data import torch import torch.nn as nn import torch.nn.functional as F from torch.nn import Parameter class NormedLinear(nn.Module): def __init__(self, in_features, out_features): super(NormedLinear, self).__init__() self.weight = Parameter(torch.Tensor(in_feature...
import torch from torch._inductor.select_algorithm import extern_kernels import triton import triton.language as tl from 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....
Data-Designer/Feature-Space-Augmentation-for-Long-Tailed-Data
NormedLinear
false
17,219
[ "MIT" ]
9
ac6bced6269d6ebaa3fc0935603d905a7f11a6fa
https://github.com/Data-Designer/Feature-Space-Augmentation-for-Long-Tailed-Data/tree/ac6bced6269d6ebaa3fc0935603d905a7f11a6fa
MultiHeadAttention
import math import torch from torch import nn class ScaledDotProduct(nn.Module): def __init__(self, attentionHeadSize, dropOutProb=0.1): super(ScaledDotProduct, self).__init__() self.attentionHeadSize = attentionHeadSize self.dropout = nn.Dropout(dropOutProb) def forward(self, Q, K, ...
import torch from torch._inductor.select_algorithm import extern_kernels import triton import triton.language as tl from 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....
simonepreite/QABERT
MultiHeadAttention
false
4,349
[ "MIT" ]
0
ed3e49f6619f3ff660068291231909693cb8f5d5
https://github.com/simonepreite/QABERT/tree/ed3e49f6619f3ff660068291231909693cb8f5d5
Critic
import torch import torch.nn as nn import torch.nn.functional as F class Critic(nn.Module): def __init__(self, state_dim, action_dim): super(Critic, self).__init__() self.l1 = nn.Linear(state_dim + action_dim, 7) self.l2 = nn.Linear(7, 6) self.l3 = nn.Linear(6, 1) self.l4 ...
import torch from torch._inductor.select_algorithm import extern_kernels import triton import triton.language as tl from 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 ...
chenbq1234/CityLearn
Critic
false
6,426
[ "MIT" ]
1
baa162435954ecd58e7f4769a46fa9046f4d2cf6
https://github.com/chenbq1234/CityLearn/tree/baa162435954ecd58e7f4769a46fa9046f4d2cf6
InteractingLayer
import torch import torch.nn as nn import torch.nn.functional as F from sklearn.metrics import * class InteractingLayer(nn.Module): """A Layer used in AutoInt that model the correlations between different feature fields by multi-head self-attention mechanism. Input shape - A 3D tensor with shape...
import torch from torch._inductor.select_algorithm import extern_kernels import triton import triton.language as tl from 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....
zzz123xyz/DeepCTR-Torch
InteractingLayer
false
4,750
[ "Apache-2.0" ]
0
d6b880cc6b3761dbef90920a28182ef6737dd665
https://github.com/zzz123xyz/DeepCTR-Torch/tree/d6b880cc6b3761dbef90920a28182ef6737dd665
ModulatedConv2d
import math import torch from torch import nn from torch.nn import functional as F def fused_leaky_relu(input, bias, negative_slope=0.2, scale=2 ** 0.5): rest_dim = [1] * (input.ndim - bias.ndim - 1) input = input if input.ndim == 3: return F.leaky_relu(input + bias.view(1, *rest_dim, bias.shape[0...
import torch from torch._inductor.select_algorithm import extern_kernels import triton import triton.language as tl from torch._inductor.runtime.triton_heuristics import grid from torch._C import _cuda_getCurrentRawStream as get_raw_stream from torch._inductor.runtime.triton_helpers import libdevice import math from to...
ozmig77/StyleCLIP-1
ModulatedConv2d
false
16,220
[ "MIT" ]
2,732
57b887bba971ef86c107f4805785ce44fca3efef
https://github.com/ozmig77/StyleCLIP-1/tree/57b887bba971ef86c107f4805785ce44fca3efef
PositionwiseFeedForward
import torch import torch.nn as nn import torch.nn.functional as F import torch.utils.data import torch.multiprocessing class PositionwiseFeedForward(nn.Module): """ A two-feed-forward-layer module """ def __init__(self, d_in, d_hid, dropout=0.1): super(PositionwiseFeedForward, self).__init__() ...
import torch from torch._inductor.select_algorithm import extern_kernels import triton import triton.language as tl from 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....
Caiyuan-Zheng/Consistency_Regularization_STR
PositionwiseFeedForward
false
2,089
[ "MIT" ]
0
7c7ce69390c429974cb2d1969b0d9d6707e6723f
https://github.com/Caiyuan-Zheng/Consistency_Regularization_STR/tree/7c7ce69390c429974cb2d1969b0d9d6707e6723f
CosNorm_Classifier
# 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...
HoganZhang/OpenLongTailRecognition-OLTR
CosNorm_Classifier
false
11,486
[ "BSD-3-Clause" ]
0
94b7e9fc93e7c96218e801007aa4d09a3f5fc69d
https://github.com/HoganZhang/OpenLongTailRecognition-OLTR/tree/94b7e9fc93e7c96218e801007aa4d09a3f5fc69d
Accuracy
# AOT ID: ['0_inference'] from ctypes import c_void_p, c_long, c_int import torch import math import random import os import tempfile from math import inf, nan from torch._inductor.hooks import run_intermediate_hooks from torch._inductor.utils import maybe_profile from torch._inductor.codegen.memory_planning import _al...
import torch import triton import triton.language as tl from torch._inductor.runtime.triton_heuristics import grid from torch._C import _cuda_getCurrentRawStream as get_raw_stream from torch._inductor.runtime import triton_helpers from torch import nn assert_size_stride = torch._C._dynamo.guards.assert_size_stride empt...
cms-flash/beauty-net
Accuracy
false
15,052
[ "MIT" ]
155
668210a95ccb4462d7beff10505e4e83532682f2
https://github.com/cms-flash/beauty-net/tree/668210a95ccb4462d7beff10505e4e83532682f2
ClipGlobalAvgPool2d
# AOT ID: ['0_inference'] from ctypes import c_void_p, c_long, c_int import torch import math import random import os import tempfile from math import inf, nan from torch._inductor.hooks import run_intermediate_hooks from torch._inductor.utils import maybe_profile from torch._inductor.codegen.memory_planning import _al...
import torch import triton import triton.language as tl from torch._inductor.runtime.triton_heuristics import grid from torch._C import _cuda_getCurrentRawStream as get_raw_stream from torch._inductor.runtime import triton_helpers from torch import nn assert_size_stride = torch._C._dynamo.guards.assert_size_stride empt...
hfyer/NAIC2020_ReID_R1
ClipGlobalAvgPool2d
false
6,805
[ "Apache-2.0" ]
1
240f0c9f65e482e6b0090f01d9f9e3373a337033
https://github.com/hfyer/NAIC2020_ReID_R1/tree/240f0c9f65e482e6b0090f01d9f9e3373a337033
NetVLAD
import math import torch import torch.nn as nn import torch.nn.functional as F class NetVLAD(nn.Module): def __init__(self, dims, num_clusters, outdims=None): super(NetVLAD, self).__init__() self.num_clusters = num_clusters self.dims = dims self.centroids = nn.Parameter(torch.rand...
import torch from torch._inductor.select_algorithm import extern_kernels import triton import triton.language as tl from 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....
glee1228/segment_temporal_context_aggregation
NetVLAD
false
6,760
[ "Apache-2.0" ]
1
e5778f848f1cfd89bd1f77beb5e1b38a66a2f13d
https://github.com/glee1228/segment_temporal_context_aggregation/tree/e5778f848f1cfd89bd1f77beb5e1b38a66a2f13d
HLoss
# 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....
lemon234071/oc_parlai
HLoss
false
3,883
[ "MIT" ]
0
33a0e57c48e58903cb1666e367a7bb9ef012de0c
https://github.com/lemon234071/oc_parlai/tree/33a0e57c48e58903cb1666e367a7bb9ef012de0c
MaxPoolPad
# 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 import torch.nn as nn import torch.backends.cudnn assert_size_str...
CalebEverett/fastai-dl2
MaxPoolPad
false
17,152
[ "Apache-2.0" ]
4
64d23592eddca6ca1f3647e73c319e97c8eb392b
https://github.com/CalebEverett/fastai-dl2/tree/64d23592eddca6ca1f3647e73c319e97c8eb392b
GHMC
import torch import torch.nn as nn import torch.nn.functional as F def _expand_onehot_labels(labels, label_weights, label_channels): bin_labels = labels.new_full((labels.size(0), label_channels), 0) inds = torch.nonzero((labels >= 0) & (labels < label_channels), as_tuple=False).squeeze() if inds.n...
import torch import triton import triton.language as tl from torch._inductor.runtime.triton_heuristics import grid from torch._C import _cuda_getCurrentRawStream as get_raw_stream from torch._inductor.runtime import triton_helpers from torch._inductor.runtime.triton_helpers import math as tl_math import torch.nn as nn ...
CK-er/mmdet
GHMC
false
2,072
[ "Apache-2.0" ]
0
9bea4068efbcf7bf739dbe41917a68d525c29868
https://github.com/CK-er/mmdet/tree/9bea4068efbcf7bf739dbe41917a68d525c29868
AttentionVasvani
import torch from torch import nn class AttentionVasvani(nn.Module): def __init__(self, encoder_dim=128, decoder_dim=128): super(AttentionVasvani, self).__init__() def forward(self, k, q): x = torch.sum(k * q, dim=1, keepdim=True) x /= torch.sqrt(torch.norm(k, p=1, dim=1, keepdim=Tru...
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 from torch import nn assert_size_stride = torch._C._dynamo.gua...
a1247418/MT18_LH_human-sleep-classification
AttentionVasvani
false
1,333
[ "MIT" ]
0
c4a40571390aaa14b1cc8a458100e21252fe05d2
https://github.com/a1247418/MT18_LH_human-sleep-classification/tree/c4a40571390aaa14b1cc8a458100e21252fe05d2
LDEPooling
import torch import torch.nn class LDEPooling(torch.nn.Module): """A novel learnable dictionary encoding layer. Reference: Weicheng Cai, etc., "A NOVEL LEARNABLE DICTIONARY ENCODING LAYER FOR END-TO-END LANGUAGE IDENTIFICATION", icassp, 2018 """ def __init__(self, input_dim, c_num=64,...
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 assert...
qlindazm/asv-subtools
LDEPooling
false
4,234
[ "Apache-2.0" ]
0
fe1d31db9f3268622016babe944201f6ff81ed56
https://github.com/qlindazm/asv-subtools/tree/fe1d31db9f3268622016babe944201f6ff81ed56
Net
import torch import torch.nn as nn class ConvBlock(nn.Module): def __init__(self, in_size, out_size, kernel=3, stride=1, padding=1, activ='relu', norm=None): super(ConvBlock, self).__init__() self.conv = nn.Conv2d(in_size, out_size, kernel, stride, padding) self.norm = norm ...
import torch from torch._inductor.select_algorithm import extern_kernels import 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...
jth1011/ECE539-Project
Net
false
12,653
[ "MIT" ]
0
bce6ffd75da92e862d8fda3852be247602b1567e
https://github.com/jth1011/ECE539-Project/tree/bce6ffd75da92e862d8fda3852be247602b1567e
DownsampleB
# 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 from torch import nn assert_size_stride = torch._C._dynamo.guards.assert_size_stride empty_strided_cuda = torch._C._dynamo.g...
gpleiss/aum
DownsampleB
false
15,452
[ "MIT" ]
45
3c710662d74cdad9b299f541170070c0cb292042
https://github.com/gpleiss/aum/tree/3c710662d74cdad9b299f541170070c0cb292042
InstanceNormLayer
# 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 from torch import nn assert_size_stride = torch._C._dynamo.guards.assert_size_s...
tylerwilliams/InterFaceGAN
InstanceNormLayer
false
4,463
[ "MIT" ]
0
120babcc0dc777aa902ef0dcdeaec7c528369dbc
https://github.com/tylerwilliams/InterFaceGAN/tree/120babcc0dc777aa902ef0dcdeaec7c528369dbc
UpsampleConvLayer
import torch class UpsampleConvLayer(torch.nn.Module): """UpsampleConvLayer Upsamples the input and then does a convolution. This method gives better results compared to ConvTranspose2d. ref: http://distill.pub/2016/deconv-checkerboard/ """ def __init__(self, in_channels, out_channels, kernel...
import torch from torch._inductor.select_algorithm import extern_kernels import triton import triton.language as tl from torch._inductor.runtime.triton_heuristics import grid from torch._C import _cuda_getCurrentRawStream as get_raw_stream from torch._inductor.runtime.triton_helpers import math as tl_math assert_size_s...
EdenBD/MultiModalStory-demo
UpsampleConvLayer
false
13,625
[ "Apache-2.0" ]
154
5e95e2aca766ca7c850e8db4973b8d51dfdba7f8
https://github.com/EdenBD/MultiModalStory-demo/tree/5e95e2aca766ca7c850e8db4973b8d51dfdba7f8
FirstBlock
import torch import numpy as np import torch.nn as nn class BatchNormLayer(nn.Module): """Implements batch normalization layer.""" def __init__(self, channels, gamma=False, beta=True, decay=0.9, epsilon =1e-05): """Initializes with basic settings. Args: channels: Number of 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 import numpy as np import torch.nn as nn assert_size_stride = torch._C._dynamo.g...
thunguyenphuoc/idinvert_pytorch
FirstBlock
false
13,129
[ "MIT" ]
0
bf8a81e75d193c22a05d9c4457907dc468389766
https://github.com/thunguyenphuoc/idinvert_pytorch/tree/bf8a81e75d193c22a05d9c4457907dc468389766
Contrast_Loss
# AOT ID: ['0_inference'] from ctypes import c_void_p, c_long, c_int import torch import math import random import os import tempfile from math import inf, nan from torch._inductor.hooks import run_intermediate_hooks from torch._inductor.utils import maybe_profile from torch._inductor.codegen.memory_planning import _al...
import torch import triton import triton.language as tl from torch._inductor.runtime.triton_heuristics import grid from torch._C import _cuda_getCurrentRawStream as get_raw_stream from torch._inductor.runtime import triton_helpers import torch.nn as nn assert_size_stride = torch._C._dynamo.guards.assert_size_stride emp...
LiuChaoXD/Remote-Sensing-Image-Retrieval-Models
Contrast_Loss
false
17,582
[ "MIT" ]
4
c135562263102080716e35260f111dcff7762264
https://github.com/LiuChaoXD/Remote-Sensing-Image-Retrieval-Models/tree/c135562263102080716e35260f111dcff7762264
ATOCAttentionUnit
# 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_...
PaParaZz1/DI-engine
ATOCAttentionUnit
false
11,855
[ "Apache-2.0" ]
0
b38144117c1ebc6eb860d8637ec8866dfbcdf2de
https://github.com/PaParaZz1/DI-engine/tree/b38144117c1ebc6eb860d8637ec8866dfbcdf2de
LandmarkHead
# AOT ID: ['0_forward'] from ctypes import c_void_p, c_long, c_int import torch import math import random import os import tempfile from math import inf, nan from torch._inductor.hooks import run_intermediate_hooks from torch._inductor.utils import maybe_profile from torch._inductor.codegen.memory_planning import _alig...
import torch from torch._inductor.select_algorithm import extern_kernels import triton import triton.language as tl from torch._inductor.runtime.triton_heuristics import grid from torch._C import _cuda_getCurrentRawStream as get_raw_stream import torch.nn as nn from itertools import product as product assert_size_strid...
Akshobhya2018eeb1137/Attendance_System_Using_Face_Recognition
LandmarkHead
false
18,446
[ "MIT" ]
2
a52ca53e15332ab706f6ed23045b38ea6d38dfd9
https://github.com/Akshobhya2018eeb1137/Attendance_System_Using_Face_Recognition/tree/a52ca53e15332ab706f6ed23045b38ea6d38dfd9
Accuracy
import torch import torch.nn as nn class Accuracy(nn.Module): def __init__(self, binary=False): super().__init__() self.binary = binary def forward(self, preds, trues): if self.binary: preds = preds >= 0.5 else: preds = preds.argmax(dim=1) resu...
import torch import triton import triton.language as tl from torch._inductor.runtime.triton_heuristics import grid from torch._C import _cuda_getCurrentRawStream as get_raw_stream from torch._inductor.runtime import triton_helpers import torch.nn as nn assert_size_stride = torch._C._dynamo.guards.assert_size_stride emp...
jokingbear/DM
Accuracy
false
6,979
[ "MIT" ]
1
9c4dada1756f3d866455a397511d4f3bacfadc60
https://github.com/jokingbear/DM/tree/9c4dada1756f3d866455a397511d4f3bacfadc60
ScaledDotProductAttention
import torch import torch.nn as nn class ScaledDotProductAttention(nn.Module): """ Scaled Dot-Product Attention """ def __init__(self, temperature, attn_dropout=0.1): super().__init__() self.temperature = temperature self.dropout = nn.Dropout(attn_dropout) self.softmax = nn.So...
import torch from torch._inductor.select_algorithm import extern_kernels import triton import triton.language as tl from 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....
LithiumH/cs224u-final-project
ScaledDotProductAttention
false
771
[ "Apache-2.0" ]
0
6049ccca3a2c33a77d9a6d5f44b2755301e18891
https://github.com/LithiumH/cs224u-final-project/tree/6049ccca3a2c33a77d9a6d5f44b2755301e18891
ChamferLoss
import torch import torch.nn as nn class ChamferLoss(nn.Module): """ Torch implementation of chamferLoss for n-dimensional geometries """ def __init__(self): self.init__ = super(ChamferLoss, self).__init__() self.use_cuda = torch.cuda.is_available() def batch_pairwise_dist(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_...
GitMarco27/GitMarco
ChamferLoss
false
9,249
[ "MIT" ]
0
2d9dd93a73a6d7b68d63222512a646cdd988909e
https://github.com/GitMarco27/GitMarco/tree/2d9dd93a73a6d7b68d63222512a646cdd988909e
TLU
import torch from torch import nn class TLU(nn.Module): def __init__(self, num_features): """max(y, tau) = max(y - tau, 0) + tau = ReLU(y - tau) + tau""" super(TLU, self).__init__() self.num_features = num_features self.tau = nn.parameter.Parameter(torch.Tensor(1, num_features, 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 import nn assert_size_stride = torch._C._dynamo.guards.assert_size_stride empt...
ildoonet/pytorch-filter-response-norm
TLU
false
12,522
[ "MIT" ]
0
e6885f2b2272fa6cde0a131d3b3a0e42b8c6d579
https://github.com/ildoonet/pytorch-filter-response-norm/tree/e6885f2b2272fa6cde0a131d3b3a0e42b8c6d579
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...
mcabbott/Avalon.jl
VAE
false
10,466
[ "MIT" ]
0
6885bcc8204952a2396e762ce51432d9969c4138
https://github.com/mcabbott/Avalon.jl/tree/6885bcc8204952a2396e762ce51432d9969c4138
SqrtModule
# 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...
mirecta/nncase
SqrtModule
false
4,174
[ "Apache-2.0" ]
0
d2efa59677a26f4259b3b6a5b6ec05ea16d4e40c
https://github.com/mirecta/nncase/tree/d2efa59677a26f4259b3b6a5b6ec05ea16d4e40c
PyConv4
# AOT ID: ['0_forward'] from ctypes import c_void_p, c_long, c_int import torch import math import random import os import tempfile from math import inf, nan from torch._inductor.hooks import run_intermediate_hooks from torch._inductor.utils import maybe_profile from torch._inductor.codegen.memory_planning import _alig...
import torch from torch._inductor.select_algorithm import extern_kernels import triton import triton.language as tl from torch._inductor.runtime.triton_heuristics import grid from torch._C import _cuda_getCurrentRawStream as get_raw_stream import torch.nn as nn import torch.nn.parallel import torch.optim import torch.u...
lkf59553/pyconv
PyConv4
false
15,946
[ "MIT" ]
295
d8b39cf43014b8fd277dcefc9eb7f8880511e977
https://github.com/lkf59553/pyconv/tree/d8b39cf43014b8fd277dcefc9eb7f8880511e977
ProtoNN
import torch import numpy as np import torch.nn as nn import torch.onnx class ProtoNN(nn.Module): def __init__(self, inputDimension, projectionDimension, numPrototypes, numOutputLabels, gamma, W=None, B=None, Z=None): """ Forward computation graph for ProtoNN. inputDimension: Inp...
import torch from torch._inductor.select_algorithm import extern_kernels import triton import triton.language 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 numpy ...
adityakusupati/EdgeML
ProtoNN
false
3,023
[ "MIT" ]
0
65933a6fdfc38945f4311043a62e120784b2b0bf
https://github.com/adityakusupati/EdgeML/tree/65933a6fdfc38945f4311043a62e120784b2b0bf
ConvElu
import torch from torch import nn import torch.cuda import torch.backends.cudnn import torch.backends.mkl import torch.backends.cuda import torch.backends.quantized class ConvElu(nn.Module): def __init__(self, in_channels, out_channels, kernel_size, image_size, inplace=False): super(ConvElu, self...
import torch from torch._inductor.select_algorithm import extern_kernels import triton import triton.language as tl from torch._inductor.runtime.triton_heuristics import grid from torch._C import _cuda_getCurrentRawStream as get_raw_stream from torch._inductor.runtime.triton_helpers import libdevice from torch import n...
Observer007/intel-extension-for-pytorch
ConvElu
false
5,690
[ "Apache-2.0" ]
1
f8ab25c305c89d5aaf06190a4fec0727aeb4dcd7
https://github.com/Observer007/intel-extension-for-pytorch/tree/f8ab25c305c89d5aaf06190a4fec0727aeb4dcd7
PA
# 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...
SLKaMiHi/ResT-UNet-unsupervised-medical-image-registration-network-based-on-Transformer-and-CNN
PA
false
5,790
[ "MIT" ]
1
728624f978f345a1e713046a7dde12d6f84fd3dd
https://github.com/SLKaMiHi/ResT-UNet-unsupervised-medical-image-registration-network-based-on-Transformer-and-CNN/tree/728624f978f345a1e713046a7dde12d6f84fd3dd
ScalableTanh
import torch from torch import nn class ScalableTanh(nn.Module): def __init__(self, input_size): super(ScalableTanh, self).__init__() self.scale = nn.Parameter(torch.zeros(input_size), requires_grad=True) def forward(self, x): return self.scale * torch.tanh(x) def get_inputs(): ...
import torch import triton import triton.language as tl from torch._inductor.runtime.triton_heuristics import grid from torch._C import _cuda_getCurrentRawStream as get_raw_stream from torch._inductor.runtime.triton_helpers import libdevice from torch import nn assert_size_stride = torch._C._dynamo.guards.assert_size_s...
hongyehu/NeuralRG
ScalableTanh
false
15,550
[ "Apache-2.0" ]
65
ff4eb18f7f9e083dac6f3da3995f3f69ecf381e8
https://github.com/hongyehu/NeuralRG/tree/ff4eb18f7f9e083dac6f3da3995f3f69ecf381e8
psi
import torch import torch.nn as nn class psi(nn.Module): def __init__(self, block_size): super(psi, self).__init__() self.block_size = block_size self.block_size_sq = block_size * block_size def inverse(self, input): output = input.permute(0, 2, 3, 1) batch_size, d_he...
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...
LuckMonkeys/ATSPrivacy
psi
false
8,481
[ "MIT" ]
14
6b580942c6b98b6348d313f2bf90202ec19cefce
https://github.com/LuckMonkeys/ATSPrivacy/tree/6b580942c6b98b6348d313f2bf90202ec19cefce
DilatedResidualLayer
import torch import torch.nn as nn import torch.nn.functional as F class DilatedResidualLayer(nn.Module): def __init__(self, dilation, in_channels, out_channels): super(DilatedResidualLayer, self).__init__() self.conv_dilated = nn.Conv1d(in_channels, out_channels, 3, padding =dilation...
import torch from torch._inductor.select_algorithm import extern_kernels import triton import triton.language as tl from 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_...
MarahGamdou/sign-segmentation
DilatedResidualLayer
false
2,620
[ "MIT" ]
0
f6ef1f23b252d09b66031bfb802f18cfb4b1f4c6
https://github.com/MarahGamdou/sign-segmentation/tree/f6ef1f23b252d09b66031bfb802f18cfb4b1f4c6
EncoderLayer
# 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....
Adelashl6/mask_transformers
EncoderLayer
false
4,842
[ "MIT" ]
1
2a2e4d1b40ae3ed546cb850d041af246806b63e7
https://github.com/Adelashl6/mask_transformers/tree/2a2e4d1b40ae3ed546cb850d041af246806b63e7
REINFORCE
# 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....
exe1023/GA-final
REINFORCE
false
10,176
[ "MIT" ]
0
dad84cda665ef24e9568a79a2e7ff0a00edf5851
https://github.com/exe1023/GA-final/tree/dad84cda665ef24e9568a79a2e7ff0a00edf5851
AddNorm
# 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...
lucmertins/CapDeepLearningBook
AddNorm
false
12,760
[ "MIT" ]
0
e5959b552c8716e7fc65a21ae9c13c58509544c1
https://github.com/lucmertins/CapDeepLearningBook/tree/e5959b552c8716e7fc65a21ae9c13c58509544c1
MLPSoftQNetwork
import torch import torch.nn as nn import torch.nn.functional as F class MLPSoftQNetwork(nn.Module): def __init__(self, num_inputs, num_actions, hidden_size1=1400, hidden_size2=1024, hidden_size3=256, init_w=0.003): super(MLPSoftQNetwork, self).__init__() self.linear1 = nn.Linear(num_inpu...
import torch from torch._inductor.select_algorithm import extern_kernels import triton import triton.language as tl from 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_...
SAMMiCA/DL_based_E2E_Driving
MLPSoftQNetwork
false
17,886
[ "MIT" ]
4
01f7d74a0db7ed745cf27b9a1ebab0246015ecbd
https://github.com/SAMMiCA/DL_based_E2E_Driving/tree/01f7d74a0db7ed745cf27b9a1ebab0246015ecbd
srcEncoder
# 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_...
qbhan/pathembed
srcEncoder
false
7,504
[ "MIT" ]
1
c21823529840593bf606e10696f5879e5adb51b2
https://github.com/qbhan/pathembed/tree/c21823529840593bf606e10696f5879e5adb51b2
CLNLayer
import torch import torch.nn.functional as F from torch import nn class CLN(nn.Module): def __init__(self, in_dim, use_style_fc=False, style_dim=None, which_linear=nn.Linear, spectral_norm=False, eps=1e-05, **kwargs): super(CLN, self).__init__() self.in_dim = in_dim self.use_style...
import torch from torch._inductor.select_algorithm import extern_kernels import triton import triton.language 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.fun...
PeterouZh/CIPS-3D
CLNLayer
false
14,170
[ "MIT" ]
308
9b8bfa0fb23f642af042e150ccd70408f9d137c6
https://github.com/PeterouZh/CIPS-3D/tree/9b8bfa0fb23f642af042e150ccd70408f9d137c6
ResUnit
import torch import torch.nn as nn class ResUnit(nn.Module): def __init__(self, in_channels, out_channels, dilation=1): super().__init__() self.norm_1 = nn.InstanceNorm2d(in_channels) self.norm_2 = nn.InstanceNorm2d(out_channels) self.activation = nn.ELU() self.conv_1 = nn...
import torch from torch._inductor.select_algorithm import extern_kernels import triton import triton.language as tl from torch._inductor.runtime.triton_heuristics import grid from torch._C import _cuda_getCurrentRawStream as get_raw_stream from torch._inductor.runtime.triton_helpers import libdevice import torch.nn as ...
MRSAIL-Mini-Robotics-Software-AI-Lab/GANVAS-models
ResUnit
false
17,668
[ "MIT" ]
5
9bc1530d5998da3908929152da2a3120832ca104
https://github.com/MRSAIL-Mini-Robotics-Software-AI-Lab/GANVAS-models/tree/9bc1530d5998da3908929152da2a3120832ca104
GroupNorm
# 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_...
generall/Torchlite
GroupNorm
false
6,735
[ "MIT" ]
1
2eb3e2a20b7619bd58b0b0fca120e2aefca0e79a
https://github.com/generall/Torchlite/tree/2eb3e2a20b7619bd58b0b0fca120e2aefca0e79a
ConvBlock
# AOT ID: ['0_forward'] from ctypes import c_void_p, c_long, c_int import torch import math import random import os import tempfile from math import inf, nan from torch._inductor.hooks import run_intermediate_hooks from torch._inductor.utils import maybe_profile from torch._inductor.codegen.memory_planning import _alig...
import torch from torch._inductor.select_algorithm import extern_kernels import triton import triton.language as tl from torch._inductor.runtime.triton_heuristics import grid from torch._C import _cuda_getCurrentRawStream as get_raw_stream from torch._inductor.runtime.triton_helpers import libdevice, math as tl_math im...
Fatmangh/VIDEO-ACTION-CLASSIFICATION-USING-PRETAINED-SELF-SUPERVISED-DEPTH-AWARE-DENSE-PREDICTIVE-CODING-
ConvBlock
false
2,236
[ "MIT" ]
0
13fac05601efed16ae8b29989aad487e04cd90a7
https://github.com/Fatmangh/VIDEO-ACTION-CLASSIFICATION-USING-PRETAINED-SELF-SUPERVISED-DEPTH-AWARE-DENSE-PREDICTIVE-CODING-/tree/13fac05601efed16ae8b29989aad487e04cd90a7