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
CausalConv2d
# AOT ID: ['0_forward'] from ctypes import c_void_p, c_long, c_int import torch import math import random import os import tempfile from math import inf, nan from torch._inductor.hooks import run_intermediate_hooks from torch._inductor.utils import maybe_profile from torch._inductor.codegen.memory_planning import _alig...
import torch from torch._inductor.select_algorithm import extern_kernels import triton import triton.language as tl from torch._inductor.runtime.triton_heuristics import grid from torch._C import _cuda_getCurrentRawStream as get_raw_stream from torch._inductor.runtime.triton_helpers import libdevice from torch import n...
sajjad2014/vq-vae-2-pytorch
CausalConv2d
false
16,356
[ "MIT" ]
1,007
ef5f67c46f93624163776caec9e0d95063910eca
https://github.com/sajjad2014/vq-vae-2-pytorch/tree/ef5f67c46f93624163776caec9e0d95063910eca
KLDivLossWithLogits
import torch import torch.utils.data import torch from torchvision.transforms import functional as F from torch import nn from torch.nn import functional as F class AbstractConsistencyLoss(nn.Module): def __init__(self, reduction='mean'): super().__init__() self.reduction = reduction def for...
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...
lizhenbang56/END-TO-END-TEMPORAL-FEATURE-AGGREGATION-FOR-SIAMESE-TRACKERS
KLDivLossWithLogits
false
12,731
[ "MIT" ]
0
132b2e28b7f66c6ba0719774e9abd9b6515dd7e2
https://github.com/lizhenbang56/END-TO-END-TEMPORAL-FEATURE-AGGREGATION-FOR-SIAMESE-TRACKERS/tree/132b2e28b7f66c6ba0719774e9abd9b6515dd7e2
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....
malhotraa/transformer-experiments
Block
false
10,472
[ "MIT" ]
0
82931b89b14d26dbd6e4ffef8d6f2fd8b7279c0f
https://github.com/malhotraa/transformer-experiments/tree/82931b89b14d26dbd6e4ffef8d6f2fd8b7279c0f
SoftDiceLossSquared
import torch import torch.nn as nn import torch._C import torch.serialization class SoftDiceLossSquared(nn.Module): def __init__(self, apply_nonlin=None, batch_dice=False, do_bg=True, smooth=1.0): """ squares the terms in the denominator as proposed by Milletari et 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._C import torch.serialization assert_size_stride = torch._C._dynamo.guards.assert_size_stride empty_strid...
dkswxd/Swin-Transformer-Semantic-Segmentation
SoftDiceLossSquared
false
1,851
[ "Apache-2.0" ]
0
6af19736e5492a01d8952d4ee86a6d59b21c2ae1
https://github.com/dkswxd/Swin-Transformer-Semantic-Segmentation/tree/6af19736e5492a01d8952d4ee86a6d59b21c2ae1
SpeakNet
import math import torch import torch.nn as nn import torch.optim def xavier_init(module): """ Xavier initializer for module parameters. """ for parameter in module.parameters(): if len(parameter.data.shape) == 1: parameter.data.fill_(0) else: fan_in = parameter...
import torch from torch._inductor.select_algorithm import extern_kernels import triton import triton.language as tl from 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....
christiancosgrove/cs767hw3
SpeakNet
false
9,905
[ "MIT" ]
0
7c906d7b92394cc30ed94a714b199467c269cadf
https://github.com/christiancosgrove/cs767hw3/tree/7c906d7b92394cc30ed94a714b199467c269cadf
Accuracy
import torch import torch.nn as nn class Accuracy(nn.Module): def __init__(self, threshold=0.5): super().__init__() self.threshold = threshold def forward(self, y_true, y_pred): preds = (y_pred > self.threshold).int() return (preds == y_true).sum().float() / len(preds) def ...
import torch import triton import triton.language as tl from torch._inductor.runtime.triton_heuristics import grid from torch._C import _cuda_getCurrentRawStream as get_raw_stream from torch._inductor.runtime import triton_helpers import torch.nn as nn assert_size_stride = torch._C._dynamo.guards.assert_size_stride emp...
alessandroferrari/defeatcovid19-net-pytorch
Accuracy
false
18,239
[ "MIT" ]
9
fe9ed82563709bae92524093c3bc0bb887fbdf6d
https://github.com/alessandroferrari/defeatcovid19-net-pytorch/tree/fe9ed82563709bae92524093c3bc0bb887fbdf6d
BothContextGate
# 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 ...
AngusGLChen/qg
BothContextGate
false
4,870
[ "MIT" ]
1
3ebc5b94348a4c313829a6c71705fbc9dadd8181
https://github.com/AngusGLChen/qg/tree/3ebc5b94348a4c313829a6c71705fbc9dadd8181
Normalize
import torch import torch.nn as nn class Normalize(nn.Module): """Normalize nn.Module. As at pytorch, simplified""" def __init__(self, mean=[0.485, 0.456, 0.406], std=[0.229, 0.224, 0.225 ], inplace=False, dtype=torch.float32): super().__init__() mean = torch.as_tensor(mean, dtype=dty...
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...
ayasyrev/pt_utils
Normalize
false
1,503
[ "Apache-2.0" ]
0
cb29b8fb4a3981248e1055979cc773f719dccdc7
https://github.com/ayasyrev/pt_utils/tree/cb29b8fb4a3981248e1055979cc773f719dccdc7
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....
ChantalMP/Graphormer
EncoderLayer
false
8,968
[ "MIT" ]
0
5c384d0f2840afc88ee88aeb874f4b1f41d760bf
https://github.com/ChantalMP/Graphormer/tree/5c384d0f2840afc88ee88aeb874f4b1f41d760bf
MarginLoss
from torch.nn import Module import torch import torch.nn.functional as F import torch.utils.data import torch.nn.functional import torch.autograd class MarginLoss(Module): '\n ## Margin loss for class existence\n\n A separate margin loss is used for each output capsule and the total loss is the sum of them....
import torch import triton import triton.language as tl from torch._inductor.runtime.triton_heuristics import grid from torch._C import _cuda_getCurrentRawStream as get_raw_stream from torch._inductor.runtime import triton_helpers from torch._inductor.runtime.triton_helpers import libdevice from torch.nn import Module ...
ppvalluri09/annotated_deep_learning_paper_implementations
MarginLoss
false
11,079
[ "MIT" ]
0
387b6dfd1ef1f6d295e9394c24b5798071d9a3e4
https://github.com/ppvalluri09/annotated_deep_learning_paper_implementations/tree/387b6dfd1ef1f6d295e9394c24b5798071d9a3e4
Zeronet
import torch import torch.nn as nn class Zeronet(nn.Module): def forward(self, x): """ Return a zero-out copy of x :param x: torch.Tensor :return: x*0, type torch.Tensor """ return torch.zeros_like(x) def get_inputs(): return [torch.rand([4, 4, 4, 4])] def ...
import torch import triton import triton.language as tl from torch._inductor.runtime.triton_heuristics import grid from torch._C import _cuda_getCurrentRawStream as get_raw_stream import torch.nn as nn assert_size_stride = torch._C._dynamo.guards.assert_size_stride empty_strided_cuda = torch._C._dynamo.guards._empty_st...
hedixia/xhd_source
Zeronet
false
6,791
[ "MIT" ]
1
cb176bceb5f5349d68206aaf60014e251de36300
https://github.com/hedixia/xhd_source/tree/cb176bceb5f5349d68206aaf60014e251de36300
ContrastivePairwiseEmbeddingLoss
import torch import torch.nn as nn from torch.nn import functional as F from torch.nn.modules.loss import * from torch.nn.modules import * from torch.optim import * from torch.optim.lr_scheduler import * import torch.distributed import torch.multiprocessing import torch.backends class ContrastivePairwiseEmbeddingLoss...
import torch from torch._inductor.select_algorithm import extern_kernels import triton import triton.language as tl from 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....
Dokholyan/catalyst
ContrastivePairwiseEmbeddingLoss
false
378
[ "Apache-2.0" ]
0
de8e681676d76741fdb722d4cd77274ba616915d
https://github.com/Dokholyan/catalyst/tree/de8e681676d76741fdb722d4cd77274ba616915d
NetVLAD
# 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....
glee1228/segment_temporal_context_aggregation
NetVLAD
false
6,760
[ "Apache-2.0" ]
1
e5778f848f1cfd89bd1f77beb5e1b38a66a2f13d
https://github.com/glee1228/segment_temporal_context_aggregation/tree/e5778f848f1cfd89bd1f77beb5e1b38a66a2f13d
Classify
import torch import torch.nn as nn def autopad(k, p=None): if p is None: p = k // 2 if isinstance(k, int) else [(x // 2) for x in k] return p class Classify(nn.Module): def __init__(self, c1, c2, k=1, s=1, p=None, g=1): super(Classify, self).__init__() self.aap = nn.AdaptiveAvgP...
import torch from torch._inductor.select_algorithm import extern_kernels import 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...
Kumaken/fyp-vehicle-counting-system
Classify
false
2,473
[ "MIT" ]
0
51adb3bfc762d5489bc643da5f79bec3fa9eeb84
https://github.com/Kumaken/fyp-vehicle-counting-system/tree/51adb3bfc762d5489bc643da5f79bec3fa9eeb84
NatureHead
# 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_...
andy920262/pytorch-a2c-ppo-acktr
NatureHead
false
12,095
[ "MIT" ]
0
2e7e85219dfe737cb4036de3cf0c8b00706d640e
https://github.com/andy920262/pytorch-a2c-ppo-acktr/tree/2e7e85219dfe737cb4036de3cf0c8b00706d640e
mbr_convex_hull
import torch import torch.nn as nn class mbr_convex_hull(nn.Module): """ Miminum Bounding Rectangle (MBR) Algorithm core: The orientation of the MBR is the same as the one of one of the edges of the point cloud convex hull, which means the result rectangle must overlap with at least one of...
import torch from torch._inductor.select_algorithm import extern_kernels import triton import triton.language as tl from 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....
liuhuaijjin/rpn_rois_proposals_layers
mbr_convex_hull
false
7,122
[ "MIT" ]
1
c5f9f09b3ae8c52e4b6fa3fda391f993cb7d42c1
https://github.com/liuhuaijjin/rpn_rois_proposals_layers/tree/c5f9f09b3ae8c52e4b6fa3fda391f993cb7d42c1
RobertaClassificationHead
# AOT ID: ['0_forward'] from ctypes import c_void_p, c_long, c_int import torch import math import random import os import tempfile from math import inf, nan from torch._inductor.hooks import run_intermediate_hooks from torch._inductor.utils import maybe_profile from torch._inductor.codegen.memory_planning import _alig...
import torch from torch._inductor.select_algorithm import extern_kernels import triton import triton.language as tl from torch._inductor.runtime.triton_heuristics import grid from torch._C import _cuda_getCurrentRawStream as get_raw_stream from torch._inductor.runtime.triton_helpers import libdevice import torch.nn as ...
Hzfinfdu/Black-Box-Tuning
RobertaClassificationHead
false
4,733
[ "MIT" ]
0
64eb5505875dc1b242c6f0a2a2f07e4000c24cb4
https://github.com/Hzfinfdu/Black-Box-Tuning/tree/64eb5505875dc1b242c6f0a2a2f07e4000c24cb4
L1Loss
# 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 ...
ZephyrII/mmpose_charger
L1Loss
false
12,039
[ "Apache-2.0" ]
0
ca5f7ab439ae40c4ceab2c6fd1d58112dc0ea7cd
https://github.com/ZephyrII/mmpose_charger/tree/ca5f7ab439ae40c4ceab2c6fd1d58112dc0ea7cd
ReduceSum
import torch import torch.onnx import torch.nn as nn class ReduceSum(nn.Module): def forward(self, x): return torch.sum(x, -1, keepdim=True) def get_inputs(): return [torch.rand([4, 4, 4, 4])] def get_init_inputs(): return [[], {}]
import torch import triton import triton.language as tl from torch._inductor.runtime.triton_heuristics import grid from torch._C import _cuda_getCurrentRawStream as get_raw_stream import torch.onnx import torch.nn as nn assert_size_stride = torch._C._dynamo.guards.assert_size_stride empty_strided_cuda = torch._C._dynam...
mil-tokyo/webdnn
ReduceSum
false
16,079
[ "MIT" ]
1,967
38a60fd3e1a4e72bc01108189a3aa51e0752aecd
https://github.com/mil-tokyo/webdnn/tree/38a60fd3e1a4e72bc01108189a3aa51e0752aecd
ToMono
import torch import torch.nn as nn class ToMono(nn.Module): def forward(self, waveform: 'torch.Tensor') ->torch.Tensor: return torch.mean(waveform, dim=0, keepdim=True) def get_inputs(): return [torch.rand([4, 4, 4, 4])] def get_init_inputs(): return [[], {}]
import torch import triton import triton.language as tl from torch._inductor.runtime.triton_heuristics import grid from torch._C import _cuda_getCurrentRawStream as get_raw_stream import torch.nn as nn assert_size_stride = torch._C._dynamo.guards.assert_size_stride empty_strided_cuda = torch._C._dynamo.guards._empty_st...
icyda17/very-deep-CNNs
ToMono
false
10,216
[ "Apache-2.0" ]
0
c275ef222d50dae90e508345ec3be5adfa5e33ce
https://github.com/icyda17/very-deep-CNNs/tree/c275ef222d50dae90e508345ec3be5adfa5e33ce
RMulFloat
# 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...
Akababa/torch2trt
RMulFloat
false
18,402
[ "MIT" ]
2
03063b74a7eb40f5aac88d49be6b8b5e4e4e92d7
https://github.com/Akababa/torch2trt/tree/03063b74a7eb40f5aac88d49be6b8b5e4e4e92d7
MNISTClassifier
import torch import torchvision import torchvision.ops from torch import nn class DeformableConv2d(nn.Module): def __init__(self, in_channels, out_channels, kernel_size=3, stride=1, padding=1, bias=False): super(DeformableConv2d, self).__init__() assert type(kernel_size) == tuple or type(...
import torch from torch._inductor.select_algorithm import extern_kernels import triton import triton.language as tl from 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 torchvision import tor...
developer0hye/PyTorch-Deformable-Convolution-v2
MNISTClassifier
false
15,194
[ "MIT" ]
70
3ed601fa70ee111278b95b134caf29e085642bc2
https://github.com/developer0hye/PyTorch-Deformable-Convolution-v2/tree/3ed601fa70ee111278b95b134caf29e085642bc2
ScaleNorm
# 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 import triton_helpers from torch._inductor.runtime.triton_helpers import libdevice import math import torch.nn ...
Jh-SYSU/MolRep
ScaleNorm
false
13,882
[ "MIT" ]
57
b2c802d18d41d7db26c19c6dd644098f945e48a1
https://github.com/Jh-SYSU/MolRep/tree/b2c802d18d41d7db26c19c6dd644098f945e48a1
ClassificationModel
import torch from torch import nn class ClassificationModel(nn.Module): def __init__(self, num_features_in, num_anchors=9, num_classes=80, prior=0.01, feature_size=256): super(ClassificationModel, self).__init__() self.num_classes = num_classes self.num_anchors = num_anchors ...
import torch from torch._inductor.select_algorithm import extern_kernels import triton import triton.language as tl from 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...
DerekGloudemans/temporary-repo
ClassificationModel
false
5,101
[ "MIT" ]
1
f278e9c7c9c7c1f362a64aec492ddb8fb1f984ad
https://github.com/DerekGloudemans/temporary-repo/tree/f278e9c7c9c7c1f362a64aec492ddb8fb1f984ad
LuongAttentionDot
# 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....
beroguedou/nmt-pytorch
LuongAttentionDot
false
6,336
[ "MIT" ]
1
8758ba33e2d5f4eca7f1ac2d04582678332bbcd5
https://github.com/beroguedou/nmt-pytorch/tree/8758ba33e2d5f4eca7f1ac2d04582678332bbcd5
selfCrossEntropy
# 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 ...
FizzerYu/CollaborativeVAE
selfCrossEntropy
false
488
[ "MIT" ]
0
4714cce49acba258600b1b5bbcd3a1a4762385e6
https://github.com/FizzerYu/CollaborativeVAE/tree/4714cce49acba258600b1b5bbcd3a1a4762385e6
FFNNClassifier
from torch.nn import Module import torch from torch import FloatTensor from torch.nn import Linear from torch.nn.functional import tanh from torch.nn.functional import log_softmax from torch.autograd import Variable class FFNNClassifier(Module): def __init__(self, n_inputs, n_hidden, n_outputs): super(FF...
import torch from torch._inductor.select_algorithm import extern_kernels import triton import triton.language as tl from 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....
theofpa/ci-torcs
FFNNClassifier
false
4,424
[ "MIT" ]
0
fcd1e9822301f1ad8f633468ed6276059afa94b9
https://github.com/theofpa/ci-torcs/tree/fcd1e9822301f1ad8f633468ed6276059afa94b9
SplitAndConcat
# 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.quantization.quantize_fx import torch.utils.data assert_size_stride = torch._C._dynamo.guards.assert_size...
ananthsub/d2go
SplitAndConcat
false
18,318
[ "Apache-2.0" ]
3
8c3618d9e73518d32350ab4e6d0fb6509c9e08b6
https://github.com/ananthsub/d2go/tree/8c3618d9e73518d32350ab4e6d0fb6509c9e08b6
HyperConv2d
# AOT ID: ['0_forward'] from ctypes import c_void_p, c_long, c_int import torch import math import random import os import tempfile from math import inf, nan from torch._inductor.hooks import run_intermediate_hooks from torch._inductor.utils import maybe_profile from torch._inductor.codegen.memory_planning import _alig...
import torch from torch._inductor.select_algorithm import extern_kernels import triton import triton.language as tl from torch._inductor.runtime.triton_heuristics import grid from torch._C import _cuda_getCurrentRawStream as get_raw_stream import torch.nn as nn import torch.nn.functional as F import torch.utils.data as...
Justin-Tan/ffjord
HyperConv2d
false
698
[ "MIT" ]
0
2caf8a4ff84933672fe0d94255d665b3dd7a6791
https://github.com/Justin-Tan/ffjord/tree/2caf8a4ff84933672fe0d94255d665b3dd7a6791
ActFirstResBlock
import torch import torch.nn.functional as F from torch import nn class AdaptiveInstanceNorm2d(nn.Module): def __init__(self, num_features, eps=1e-05, momentum=0.1): super(AdaptiveInstanceNorm2d, self).__init__() self.num_features = num_features self.eps = eps self.momentum = mome...
import torch from torch._inductor.select_algorithm import extern_kernels import triton import triton.language 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....
MattAlexMiracle/SmartPatch
ActFirstResBlock
false
17,707
[ "MIT" ]
7
c485cb433d8e085d6eae10a335ee19f5e6c1a41c
https://github.com/MattAlexMiracle/SmartPatch/tree/c485cb433d8e085d6eae10a335ee19f5e6c1a41c
Attention
import torch from torch import nn import torch.nn.functional as F class Attention(nn.Module): """Implements additive attention and return the attention vector used to weight the values. Additive attention consists in concatenating key and query and then passing them trough a linear layer.""" def __in...
import torch from torch._inductor.select_algorithm import extern_kernels import triton import triton.language as tl from torch._inductor.runtime.triton_heuristics import grid from torch._C import _cuda_getCurrentRawStream as get_raw_stream from torch._inductor.runtime import triton_helpers from torch._inductor.runtime....
alpgokcek/turkish-qg-model
Attention
false
3,103
[ "MIT" ]
0
e90050d869958325aeaf639a2b1ff5eb2856e318
https://github.com/alpgokcek/turkish-qg-model/tree/e90050d869958325aeaf639a2b1ff5eb2856e318
FThreshold
import random import torch import torch.nn as nn class FThreshold(nn.Module): """ Test for nn.functional types """ def __init__(self): super(FThreshold, self).__init__() self.threshold = random.random() self.value = self.threshold + random.random() def forward(self, 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 import random import torch.nn as nn assert_size_stride = torch._C._dynamo.guards.assert_size_stride empty_strided_cuda = torch._C._dynamo.gu...
dawnclaude/onnx2keras
FThreshold
false
15,141
[ "MIT" ]
115
3d2a47c0a228b91fd434232274e216e491da36e3
https://github.com/dawnclaude/onnx2keras/tree/3d2a47c0a228b91fd434232274e216e491da36e3
AlphaGoCnn
import torch import torch.nn.functional as F import torch.nn as nn class AlphaGoCnn(nn.Module): def __init__(self): super(AlphaGoCnn, self).__init__() self.conv1 = nn.Conv2d(3, 32, 3, padding=1) self.conv2 = nn.Conv2d(32, 32, 3, padding=1) self.conv3 = nn.Conv2d(32, 32, 3, padding...
import torch from torch._inductor.select_algorithm import extern_kernels import triton import triton.language as tl from torch._inductor.runtime.triton_heuristics import grid from torch._C import _cuda_getCurrentRawStream as get_raw_stream import torch.nn as nn assert_size_stride = torch._C._dynamo.guards.assert_size_s...
Theomat/go-enseirb-2020
AlphaGoCnn
false
2,902
[ "Apache-2.0" ]
0
ae842888dfd61a23d3556c5f63c4474bdbb1685f
https://github.com/Theomat/go-enseirb-2020/tree/ae842888dfd61a23d3556c5f63c4474bdbb1685f
Alignment
from _paritybench_helpers import _mock_config from torch.nn import Module import math import torch import torch.nn as nn import torch.nn.functional as f class Module(nn.Module): def __init__(self): super().__init__() self.summary = {} def add_summary(self, name, val): if self.trainin...
import torch from torch._inductor.select_algorithm import extern_kernels import triton import triton.language as tl from 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....
Chriskuei/FedMatch
Alignment
false
18,378
[ "Apache-2.0" ]
4
305e8c4bbb398712b00c883a986dfec17b500f76
https://github.com/Chriskuei/FedMatch/tree/305e8c4bbb398712b00c883a986dfec17b500f76
Transition
# 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....
morimo27182/DeepKalmanFilter
Transition
false
12,794
[ "MIT" ]
0
5d78d2e700fdc24f2a5cfa2877ecdcfc8218c8b7
https://github.com/morimo27182/DeepKalmanFilter/tree/5d78d2e700fdc24f2a5cfa2877ecdcfc8218c8b7
_ResampleNorm
# AOT ID: ['0_forward'] from ctypes import c_void_p, c_long, c_int import torch import math import random import os import tempfile from math import inf, nan from torch._inductor.hooks import run_intermediate_hooks from torch._inductor.utils import maybe_profile from torch._inductor.codegen.memory_planning import _alig...
import torch import triton import triton.language as tl from torch._inductor.runtime.triton_heuristics import grid from torch._C import _cuda_getCurrentRawStream as get_raw_stream from torch._inductor.runtime.triton_helpers import libdevice import torch.nn as nn import torch.nn.functional as F assert_size_stride = torc...
Gian-Wiher/darts
_ResampleNorm
false
5,208
[ "Apache-2.0" ]
1
0d267e08643e2e3f88163a5d955b8be75840c2f6
https://github.com/Gian-Wiher/darts/tree/0d267e08643e2e3f88163a5d955b8be75840c2f6
SiameseMLP
import torch from torch import nn from torch.nn import functional as F class SiameseMLP(nn.Module): """ basic structure similar to the MLP input is splited into two 1*14*14 images for separating training, share the same parameters """ def __init__(self): super(SiameseMLP, 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 import nn assert_s...
EE559DeepLearningEPFL/Project1
SiameseMLP
false
391
[ "MIT" ]
0
cbafdfee26771ae0ba3cd36375e68d92e9f108b2
https://github.com/EE559DeepLearningEPFL/Project1/tree/cbafdfee26771ae0ba3cd36375e68d92e9f108b2
TargetContextGate
# 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 ...
LeeeeoLiu/OpenNMT-py
TargetContextGate
false
2,508
[ "MIT" ]
0
9be3a8951e9181aabe5440e4ea98173b7e749b5c
https://github.com/LeeeeoLiu/OpenNMT-py/tree/9be3a8951e9181aabe5440e4ea98173b7e749b5c
Actor
import torch import torch.nn.functional as F import torch.nn as nn class Actor(nn.Module): """ Neural Network for the Actor Model """ def __init__(self, state_size, action_size, max_action, seed=0, layer1_units=400, layer2_units=300): """Initialize parameters and build model. Params =...
import torch from torch._inductor.select_algorithm import extern_kernels import triton import triton.language as tl from torch._inductor.runtime.triton_heuristics import grid from torch._C import _cuda_getCurrentRawStream as get_raw_stream from torch._inductor.runtime import triton_helpers from torch._inductor.runtime....
FranckNdame/drlkit
Actor
false
8,137
[ "MIT" ]
33
698f3c182036cc5eed68f2a05b53a3e3670146bf
https://github.com/FranckNdame/drlkit/tree/698f3c182036cc5eed68f2a05b53a3e3670146bf
Critic
import torch import numpy as np import torch.nn.functional as F import torch.nn as nn def hidden_init(layer): fan_in = layer.weight.data.size()[0] lim = 1.0 / np.sqrt(fan_in) return -lim, lim class Critic(nn.Module): """Critic (Value) Model.""" def __init__(self, state_size, action_size, seed, ...
import torch from torch._inductor.select_algorithm import extern_kernels import triton import triton.language as tl from torch._inductor.runtime.triton_heuristics import grid from torch._C import _cuda_getCurrentRawStream as get_raw_stream from torch._inductor.runtime import triton_helpers import numpy as np import tor...
YufengJin/deep-reinforcement-learning
Critic
false
2,996
[ "MIT" ]
0
141cf00f169b46aa492c9e7520429bfdaab0117d
https://github.com/YufengJin/deep-reinforcement-learning/tree/141cf00f169b46aa492c9e7520429bfdaab0117d
SAGEConv
# 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....
sigeisler/grb
SAGEConv
false
16,451
[ "MIT" ]
51
c89e21076dc05d1edb87dfe2eff20c29ba6bd0c1
https://github.com/sigeisler/grb/tree/c89e21076dc05d1edb87dfe2eff20c29ba6bd0c1
Discriminator
import torch import torch.nn as nn import torch.nn.functional as F from sklearn.metrics import * class Discriminator(nn.Module): def __init__(self, outputs_size, K=2): super(Discriminator, self).__init__() self.fc1 = nn.Linear(outputs_size, outputs_size // K, bias=True) outputs_size = out...
import torch from torch._inductor.select_algorithm import extern_kernels import triton import triton.language as tl from torch._inductor.runtime.triton_heuristics import grid from torch._C import _cuda_getCurrentRawStream as get_raw_stream from torch._inductor.runtime import triton_helpers import torch.nn as nn from sk...
Ulian7/DeepCTR
Discriminator
false
1,184
[ "Apache-2.0" ]
0
d8f519a722a4d6a4f1fe18e04af54cfd1369c9a5
https://github.com/Ulian7/DeepCTR/tree/d8f519a722a4d6a4f1fe18e04af54cfd1369c9a5
ResidualAttentionBlock
import math import torch import torch as th import torch.nn as nn class LayerNorm(nn.LayerNorm): """ Implementation that supports fp16 inputs but fp32 gains/biases. """ def forward(self, x: 'th.Tensor'): return super().forward(x.float()) class QKVMultiheadAttention(nn.Module): def __in...
import torch from torch._inductor.select_algorithm import extern_kernels import triton import triton.language as tl from torch._inductor.runtime.triton_heuristics import grid from torch._C import _cuda_getCurrentRawStream as get_raw_stream from torch._inductor.runtime import triton_helpers from torch._inductor.runtime....
GastonMazzei/escher-project-website
ResidualAttentionBlock
false
17,315
[ "MIT" ]
5
b3861eeeca11a7c31502f539ded9ae718f3d9e2e
https://github.com/GastonMazzei/escher-project-website/tree/b3861eeeca11a7c31502f539ded9ae718f3d9e2e
TwoLayerNet
# 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.quantization imp...
harrydrippin/tutorials
TwoLayerNet
false
12,482
[ "BSD-3-Clause" ]
0
a8def2dfd44b4b8e22c36a3e4470f37b59ebedfb
https://github.com/harrydrippin/tutorials/tree/a8def2dfd44b4b8e22c36a3e4470f37b59ebedfb
pair_norm
# 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...
ngohienduong/Deep_GCN_Benchmarking
pair_norm
false
16,184
[ "MIT" ]
70
3ee57a265bbfd62d8e6f3ee6e3e9062dd5a44633
https://github.com/ngohienduong/Deep_GCN_Benchmarking/tree/3ee57a265bbfd62d8e6f3ee6e3e9062dd5a44633
ReRegualizedLinearMNACLayer
import collections import math import torch import torch.utils.data def sparsity_error(W): W_error = torch.min(torch.abs(W), torch.abs(1 - torch.abs(W))) return torch.max(W_error) def mnac(x, W, mode='prod'): out_size, in_size = W.size() x = x.view(x.size()[0], in_size, 1) W = W.t().view(1, in_s...
import torch import triton import triton.language as tl from torch._inductor.runtime.triton_heuristics import grid from torch._C import _cuda_getCurrentRawStream as get_raw_stream from torch._inductor.runtime import triton_helpers import collections import math import torch.utils.data assert_size_stride = torch._C._dyn...
hoedt/stable-nalu
ReRegualizedLinearMNACLayer
false
3,614
[ "MIT" ]
0
64b3d240db8bff4da857d955f213ef3c7e38e035
https://github.com/hoedt/stable-nalu/tree/64b3d240db8bff4da857d955f213ef3c7e38e035
EnvModel
# 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 ...
spacegoing/oc_hrl_pytorch
EnvModel
false
13,068
[ "MIT" ]
0
3e6c3b32b41d7dad40a9ee35f436f8cbcde8633b
https://github.com/spacegoing/oc_hrl_pytorch/tree/3e6c3b32b41d7dad40a9ee35f436f8cbcde8633b
AdaptiveInstanceNorm
import torch import torch.nn as nn from math import sqrt def equal_lr(module, name='weight'): EqualLR.apply(module, name) return module class EqualLR: def __init__(self, name): self.name = name def compute_weight(self, module): weight = getattr(module, self.name + '_orig') ...
import torch from torch._inductor.select_algorithm import extern_kernels import triton import triton.language 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 ...
KwonGihyun/DiagonalGAN
AdaptiveInstanceNorm
false
8,437
[ "MIT" ]
13
9e401c00e741d700f85df2c715ee11c1e66e1d1c
https://github.com/KwonGihyun/DiagonalGAN/tree/9e401c00e741d700f85df2c715ee11c1e66e1d1c
Project3D
import torch import torch.nn as nn import torch.utils.data class Project3D(nn.Module): """Layer which projects 3D points into a camera with intrinsics K and at position T """ def __init__(self, batch_size, height, width, eps=1e-07): super(Project3D, self).__init__() self.batch_size = batc...
import torch from torch._inductor.select_algorithm import extern_kernels import 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...
Uehwan/SimVODIS
Project3D
false
14,525
[ "MIT" ]
117
288ae6f3bf37336f2c829b3a6371793990b23214
https://github.com/Uehwan/SimVODIS/tree/288ae6f3bf37336f2c829b3a6371793990b23214
IndepAnisotropicGaussianUVLoss
# AOT ID: ['0_inference'] from ctypes import c_void_p, c_long, c_int import torch import math import random import os import tempfile from math import inf, nan from torch._inductor.hooks import run_intermediate_hooks from torch._inductor.utils import maybe_profile from torch._inductor.codegen.memory_planning import _al...
import torch import triton import triton.language as tl from torch._inductor.runtime.triton_heuristics import grid from torch._C import _cuda_getCurrentRawStream as get_raw_stream from torch._inductor.runtime import triton_helpers from torch._inductor.runtime.triton_helpers import libdevice, math as tl_math import math...
TinBacon/FastAutoAugmentation
IndepAnisotropicGaussianUVLoss
false
5,892
[ "Apache-2.0" ]
1
011e4e348fd9a937a29df11695dc71410f555d0a
https://github.com/TinBacon/FastAutoAugmentation/tree/011e4e348fd9a937a29df11695dc71410f555d0a
Squeezing
# 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...
hongyehu/NeuralRG
Squeezing
false
15,542
[ "Apache-2.0" ]
65
ff4eb18f7f9e083dac6f3da3995f3f69ecf381e8
https://github.com/hongyehu/NeuralRG/tree/ff4eb18f7f9e083dac6f3da3995f3f69ecf381e8
MatrixTree
import torch import torch.nn as nn import torch.cuda import torch.distributed class MatrixTree(nn.Module): """Implementation of the matrix-tree theorem for computing marginals of non-projective dependency parsing. This attention layer is used in the paper "Learning Structured Text Representations" :ci...
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.cuda import torch.distributed assert_s...
MaxatTezekbayev/OpenNMT-py-lexical
MatrixTree
false
5,613
[ "MIT" ]
1
44182999b863fc4074d67e0281c5bdab19abddfe
https://github.com/MaxatTezekbayev/OpenNMT-py-lexical/tree/44182999b863fc4074d67e0281c5bdab19abddfe
PositionalEncoding
# 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 numpy as np import torch.nn as nn assert_size_stride = torch._C._dynamo.guards.assert_size_stride empty_strided_cuda = torch._C._dyna...
TheoMoutakanni/hcrn-videoqa
PositionalEncoding
false
2,937
[ "Apache-2.0" ]
0
03a0fb1f24d756e7cd61d519f92925b610a91a29
https://github.com/TheoMoutakanni/hcrn-videoqa/tree/03a0fb1f24d756e7cd61d519f92925b610a91a29
PA
import torch import torch.nn as nn class PA(nn.Module): """PA is pixel attention""" def __init__(self, nf): super(PA, self).__init__() self.conv = nn.Conv2d(nf, nf, 1) self.sigmoid = nn.Sigmoid() def forward(self, x): y = self.conv(x) y = self.sigmoid(y) o...
import torch from torch._inductor.select_algorithm import extern_kernels import triton import triton.language as tl from torch._inductor.runtime.triton_heuristics import grid from torch._C import _cuda_getCurrentRawStream as get_raw_stream import torch.nn as nn assert_size_stride = torch._C._dynamo.guards.assert_size_s...
YingqiLiulll/scrips_for_SR
PA
false
1,262
[ "MIT" ]
0
04fa6fdaf157e913d3e2521cd80315a10a2ccedc
https://github.com/YingqiLiulll/scrips_for_SR/tree/04fa6fdaf157e913d3e2521cd80315a10a2ccedc
Discriminator
# AOT ID: ['0_forward'] from ctypes import c_void_p, c_long, c_int import torch import math import random import os import tempfile from math import inf, nan from torch._inductor.hooks import run_intermediate_hooks from torch._inductor.utils import maybe_profile from torch._inductor.codegen.memory_planning import _alig...
import torch from torch._inductor.select_algorithm import extern_kernels import triton import triton.language as tl from torch._inductor.runtime.triton_heuristics import grid from torch._C import _cuda_getCurrentRawStream as get_raw_stream import torch.nn as nn assert_size_stride = torch._C._dynamo.guards.assert_size_s...
davide-belli/deep-learning-labs
Discriminator
false
1,800
[ "MIT" ]
0
1acd37a527711dccdc00c1935724cc5de7c10955
https://github.com/davide-belli/deep-learning-labs/tree/1acd37a527711dccdc00c1935724cc5de7c10955
LayerNorm
# AOT ID: ['0_forward'] from ctypes import c_void_p, c_long, c_int import torch import math import random import os import tempfile from math import inf, nan from torch._inductor.hooks import run_intermediate_hooks from torch._inductor.utils import maybe_profile from torch._inductor.codegen.memory_planning import _alig...
import torch import triton import triton.language as tl from torch._inductor.runtime.triton_heuristics import grid from torch._C import _cuda_getCurrentRawStream as get_raw_stream from torch._inductor.runtime.triton_helpers import libdevice import torch.nn as nn import torch.utils.data assert_size_stride = torch._C._dy...
AllenPu/mbdg
LayerNorm
false
7,669
[ "MIT" ]
27
243f53a57dcf4bfb6e717c0c9f64a839cff8d548
https://github.com/AllenPu/mbdg/tree/243f53a57dcf4bfb6e717c0c9f64a839cff8d548
TemporalBlock
import torch from torch import nn import torch.utils.data import torch.onnx.operators import torch.optim import torch.optim.lr_scheduler def TemporalConvLayer(input_channels, output_channels, kernel_size): m = nn.Conv1d(in_channels=input_channels, out_channels=output_channels, kernel_size=kernel_size) ...
import torch from torch._inductor.select_algorithm import extern_kernels import triton import triton.language as tl from torch._inductor.runtime.triton_heuristics import grid from torch._C import _cuda_getCurrentRawStream as get_raw_stream from torch._inductor.runtime import triton_helpers from torch import nn import t...
verashira/TSPNet
TemporalBlock
false
16,671
[ "MIT" ]
83
ee454165dcc61cdbbff19565364e2221727ed2b8
https://github.com/verashira/TSPNet/tree/ee454165dcc61cdbbff19565364e2221727ed2b8
GCN
import torch from torch import nn import torch.nn.functional as F import torch.nn.parallel class Conv2D(nn.Module): def __init__(self, in_channels, out_channels, kernel_size, padding= 'same', stride=1, dilation=1, groups=1): super(Conv2D, self).__init__() assert type(kernel_size) in [int,...
import torch from torch._inductor.select_algorithm import extern_kernels import triton import triton.language as tl from torch._inductor.runtime.triton_heuristics import grid from torch._C import _cuda_getCurrentRawStream as get_raw_stream from torch import nn import torch.nn.functional as F import torch.nn.parallel as...
XDong18/AdelaiDet
GCN
false
12,062
[ "BSD-2-Clause" ]
0
837cd1078923892fe6e84ac29fd0963f1b2c474f
https://github.com/XDong18/AdelaiDet/tree/837cd1078923892fe6e84ac29fd0963f1b2c474f
Model
import torch import torch.nn.functional as F class Model(torch.nn.Module): def __init__(self): super().__init__() self.conv1 = torch.nn.Conv2d(3, 32, kernel_size=6, stride=1, padding=1) self.conv2 = torch.nn.Conv2d(32, 32, kernel_size=6, stride=1, padding=1 ) self.conv...
import torch from torch._inductor.select_algorithm import extern_kernels import triton import triton.language as tl from 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...
stepan-krivanek/image-recognition
Model
false
10,815
[ "MIT" ]
0
6c421e768e83db489e4caa22989f7dad95519578
https://github.com/stepan-krivanek/image-recognition/tree/6c421e768e83db489e4caa22989f7dad95519578
GeneralizedMeanPooling
from torch.nn import Module import torch import torch.nn.functional as F from torch.nn.modules import Module class GeneralizedMeanPooling(Module): """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)), ...
import torch import triton import triton.language as tl from torch._inductor.runtime.triton_heuristics import grid from torch._C import _cuda_getCurrentRawStream as get_raw_stream from torch._inductor.runtime import triton_helpers from torch._inductor.runtime.triton_helpers import libdevice from torch.nn import Module ...
ByungHeeCha/visual_localization
GeneralizedMeanPooling
false
17,020
[ "BSD-3-Clause" ]
3
787fb8f6ee5c6e69ece9e83a016d15596e5524bc
https://github.com/ByungHeeCha/visual_localization/tree/787fb8f6ee5c6e69ece9e83a016d15596e5524bc
OcrPtrNet
import math import torch from torch import nn class OcrPtrNet(nn.Module): def __init__(self, hidden_size, query_key_size=None): super().__init__() if query_key_size is None: query_key_size = hidden_size self.hidden_size = hidden_size self.query_key_size = query_key_siz...
import torch from torch._inductor.select_algorithm import extern_kernels import triton import triton.language as tl from torch._inductor.runtime.triton_heuristics import grid from torch._C import _cuda_getCurrentRawStream as get_raw_stream from torch import nn assert_size_stride = torch._C._dynamo.guards.assert_size_st...
junj2ejj/sam-textvqa
OcrPtrNet
false
15,744
[ "W3C" ]
48
6bf646d741fb2536e3a8f331c78b594f6199df15
https://github.com/junj2ejj/sam-textvqa/tree/6bf646d741fb2536e3a8f331c78b594f6199df15
SimpleXorModule
import torch import torch.jit import torch.onnx import torch.nn class SimpleXorModule(torch.nn.Module): def __init__(self): super(SimpleXorModule, self).__init__() def forward(self, a, b): c = torch.logical_xor(a, b) return torch.logical_xor(c, c) def get_inputs(): return [torc...
import torch import triton import triton.language as tl from torch._inductor.runtime.triton_heuristics import grid from torch._C import _cuda_getCurrentRawStream as get_raw_stream import torch.jit import torch.onnx import torch.nn assert_size_stride = torch._C._dynamo.guards.assert_size_stride empty_strided_cuda = torc...
opti-mix/glow
SimpleXorModule
false
7,416
[ "Apache-2.0" ]
1
4ba074df5da9822986a23a6679ab592c22660f6d
https://github.com/opti-mix/glow/tree/4ba074df5da9822986a23a6679ab592c22660f6d
FeatureResizer
import torch import torch.utils.data import torch import torch.nn import torch.optim import torch.utils from torch import nn import torch.distributed class FeatureResizer(nn.Module): """ This class takes as input a set of embeddings of dimension C1 and outputs a set of embedding of dimension C2, after a l...
import torch from torch._inductor.select_algorithm import extern_kernels import triton import triton.language as tl from torch._inductor.runtime.triton_heuristics import grid from torch._C import _cuda_getCurrentRawStream as get_raw_stream from torch._inductor.runtime.triton_helpers import libdevice import torch.utils....
mmaaz60/mdetr
FeatureResizer
false
10,485
[ "Apache-2.0" ]
0
fe1394c67e76a6c7e521bbda77d8294714038a3a
https://github.com/mmaaz60/mdetr/tree/fe1394c67e76a6c7e521bbda77d8294714038a3a
ConvWS2d
# 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 ...
BradleyBrown19/CustomObjectDetector
ConvWS2d
false
2,090
[ "Apache-2.0" ]
0
11c14ec6127c553ac365703c768b75dde33d9a4d
https://github.com/BradleyBrown19/CustomObjectDetector/tree/11c14ec6127c553ac365703c768b75dde33d9a4d
Softmax2d
# AOT ID: ['0_inference'] from ctypes import c_void_p, c_long, c_int import torch import math import random import os import tempfile from math import inf, nan from torch._inductor.hooks import run_intermediate_hooks from torch._inductor.utils import maybe_profile from torch._inductor.codegen.memory_planning import _al...
import torch import triton import triton.language as tl from torch._inductor.runtime.triton_heuristics import grid from torch._C import _cuda_getCurrentRawStream as get_raw_stream from torch._inductor.runtime import triton_helpers from torch._inductor.runtime.triton_helpers import math as tl_math from torch import nn a...
Yusoi/mmdetection
Softmax2d
false
9,739
[ "Apache-2.0" ]
0
cbb5fb00f6e124fbb2c15e7e3438d7fa76b8850a
https://github.com/Yusoi/mmdetection/tree/cbb5fb00f6e124fbb2c15e7e3438d7fa76b8850a
Conv2d
# 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 ...
MarcoForte/DeepInteractiveSegmentation
Conv2d
false
14,012
[ "MIT" ]
95
ddd7426ea9f36ff6a110d836b1b920a1215cbfee
https://github.com/MarcoForte/DeepInteractiveSegmentation/tree/ddd7426ea9f36ff6a110d836b1b920a1215cbfee
CausalConv1d
# 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...
heyitsmine/FewRel
CausalConv1d
false
10,255
[ "MIT" ]
0
2a2b8ae471298d9eb3557796a085c23b21982fb2
https://github.com/heyitsmine/FewRel/tree/2a2b8ae471298d9eb3557796a085c23b21982fb2
Snake
import torch import torch.nn as nn class Snake(nn.Module): """ Implementation of the snake activation function as a torch nn module The result of the activation function a(x) is calculated by a(x) = x + sin^2(x) With alpha is a trainab """ def __init__(self, frequency=10): """Constructor...
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...
ComputationalRadiationPhysics/NeuralSolvers
Snake
false
13,518
[ "MIT" ]
59
cc62b5a91d9eb70ffafdcca6d1fbba16d3bf588d
https://github.com/ComputationalRadiationPhysics/NeuralSolvers/tree/cc62b5a91d9eb70ffafdcca6d1fbba16d3bf588d
Wav2Vec2ClassificationHead
# 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 ...
Ayushk4/MedImaging
Wav2Vec2ClassificationHead
false
1,871
[ "MIT" ]
0
dbc8968f076385be0c8db42210817ae0940fa26a
https://github.com/Ayushk4/MedImaging/tree/dbc8968f076385be0c8db42210817ae0940fa26a
PositionGenerator
import torch import torch.nn as nn class LayerNorm(nn.Module): """Construct a layernorm module (See citation for details).""" def __init__(self, features, eps=1e-06): super(LayerNorm, self).__init__() self.a_2 = nn.Parameter(torch.ones(features)) self.b_2 = nn.Parameter(torch.zeros(fe...
import torch from torch._inductor.select_algorithm import extern_kernels import triton import triton.language 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 ...
nigelnnk/MATCh-sensitivity
PositionGenerator
false
7,336
[ "MIT" ]
1
aaf2b924ac98c8c5925bbf431481724d11a102f8
https://github.com/nigelnnk/MATCh-sensitivity/tree/aaf2b924ac98c8c5925bbf431481724d11a102f8
ToTensor
# 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.nn import Module assert_size_stride = torch._C._dynamo.guards.assert_size_stride empty_strided_cuda = torch._C._dynamo.guards._em...
AlexMontgomerie/finn
ToTensor
false
13,238
[ "BSD-3-Clause" ]
283
ec5f67b333ad4db4acf6191c3b5ab5e9067347aa
https://github.com/AlexMontgomerie/finn/tree/ec5f67b333ad4db4acf6191c3b5ab5e9067347aa
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 from math import sqrt assert_size_stride = torch._C._dynam...
NethraGunti/Woven-Artificial-Profile-WARP-Face-Video-Synthesis-from-Profile-and-Audio
Conv
false
879
[ "MIT" ]
0
231d8daa8dddfd5eda8a092eb99c5d0e59d8b3f7
https://github.com/NethraGunti/Woven-Artificial-Profile-WARP-Face-Video-Synthesis-from-Profile-and-Audio/tree/231d8daa8dddfd5eda8a092eb99c5d0e59d8b3f7
StyledConv
# 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...
ShinoharaHare/stylegan2-pytorch
StyledConv
false
2,839
[ "MIT", "BSD-2-Clause", "Apache-2.0" ]
0
5a4b1c4e9753681bc1694195f3b2391527c1b525
https://github.com/ShinoharaHare/stylegan2-pytorch/tree/5a4b1c4e9753681bc1694195f3b2391527c1b525
DiceLoss
import torch import torch.nn as nn def binaray_dice_loss(predict, target, smooth=1, p=2, weight=None): """Dice loss for binary classification Args: predict(Tensor): a tensor of shape [N, H, W] target(Tensor): a tensor of shape same with predict smooth(float): a float number to smooth ...
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...
hikopensource/DAVAR-Lab-OCR
DiceLoss
false
15,518
[ "Apache-2.0" ]
387
c65285f6668864cca7a12770ae4c8d083ea1cf1b
https://github.com/hikopensource/DAVAR-Lab-OCR/tree/c65285f6668864cca7a12770ae4c8d083ea1cf1b
RefineLavaLampModel
import torch import numpy as np import torch.nn as nn class SirenLayer(nn.Module): def __init__(self, in_f, out_f, w0=30, is_first=False, is_last=False): super().__init__() self.in_f = in_f self.w0 = w0 self.linear = nn.Linear(in_f, out_f) self.is_first = is_first ...
import torch from torch._inductor.select_algorithm import extern_kernels import triton import triton.language 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 ...
BoyuanChen/neural-state-variables
RefineLavaLampModel
false
7,866
[ "MIT" ]
17
10483d93ac8c006f3786c434fb57d70d9ab465ec
https://github.com/BoyuanChen/neural-state-variables/tree/10483d93ac8c006f3786c434fb57d70d9ab465ec
Conv1d
import torch import torch.nn as nn import torch.utils.data class Conv1d(nn.Conv1d): """ :param in_channels: Scalar :param out_channels: Scalar :param kernel_size: Scalar :param activation_fn: activation function :param drop_rate: Scalar. dropout rate :param stride: Scalar :param paddin...
import torch from torch._inductor.select_algorithm import extern_kernels import 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...
CookiePPP/mellotron
Conv1d
false
9,050
[ "BSD-3-Clause" ]
0
488425981c19cd0eddddea13d1348da4bfef8d26
https://github.com/CookiePPP/mellotron/tree/488425981c19cd0eddddea13d1348da4bfef8d26
SEModule
from torch.nn import Module import torch from torch.nn import Conv2d from torch.nn import ReLU from torch.nn import Sigmoid from torch.nn import AdaptiveAvgPool2d class SEModule(Module): def __init__(self, channels, reduction): super(SEModule, self).__init__() self.avg_pool = AdaptiveAvgPool2d(1)...
import torch from torch._inductor.select_algorithm import extern_kernels import triton import triton.language as tl from torch._inductor.runtime.triton_heuristics import grid from torch._C import _cuda_getCurrentRawStream as get_raw_stream from torch._inductor.runtime import triton_helpers from torch.nn import Module f...
AsianZeus/Diverse-Facial-Edit
SEModule
false
9,416
[ "Apache-2.0" ]
0
3d4b1b41546a08a1fa3cb164ade33e319806b12b
https://github.com/AsianZeus/Diverse-Facial-Edit/tree/3d4b1b41546a08a1fa3cb164ade33e319806b12b
IBWDCT
import torch import numpy as np import torch.nn.parallel import torch.utils.data from torch import nn import torch.fft class IBWDCT(nn.Module): def __init__(self): super().__init__() self.ibwdct = nn.ConvTranspose2d(64, 1, 8, 8, bias=False) self.ibwdct.weight.requires_grad = False ...
import torch from torch._inductor.select_algorithm import extern_kernels import 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.parallel import torch.utils.data from torch i...
KazutakaYamanouchi/bachelor-study
IBWDCT
false
2,663
[ "Apache-2.0" ]
0
a5b8392459e7649cb8a35d09e65bd269d13b5297
https://github.com/KazutakaYamanouchi/bachelor-study/tree/a5b8392459e7649cb8a35d09e65bd269d13b5297
KL_loss
import torch import torch.nn.functional class KL_loss(torch.nn.Module): def __init__(self): super(KL_loss, self).__init__() def forward(self, mu, logvar): KLD_element = mu.pow(2).add_(logvar.exp()).mul_(-1).add_(1).add_(logvar ) KLD = torch.sum(KLD_element).mul_(-0.5) ...
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.functi...
junyuchen245/TransMorph_Transformer_for_Medical_Image_Registration
KL_loss
false
15,739
[ "MIT" ]
82
dfa24a47a564a000aa9b4eea95a6e83a24568359
https://github.com/junyuchen245/TransMorph_Transformer_for_Medical_Image_Registration/tree/dfa24a47a564a000aa9b4eea95a6e83a24568359
Symmetric
# 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...
vishalbelsare/geotorch
Symmetric
false
16,675
[ "MIT" ]
422
ba38d406c245d609fee4b4dac3f6427bf6d73a8e
https://github.com/vishalbelsare/geotorch/tree/ba38d406c245d609fee4b4dac3f6427bf6d73a8e
FFNN1
import torch import torch.utils.data from torch import nn class FFNN1(nn.Module): def __init__(self, input_size, hidden_size, hidden_dropout_prob): super(FFNN1, self).__init__() self.input_size = input_size self.hidden_size = hidden_size self.hidden_dropout_prob = hidden_dropout_p...
import torch from torch._inductor.select_algorithm import extern_kernels import triton import triton.language as tl from 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 ...
MaurizioFD/recsys-challenge-2020-twitter
FFNN1
false
8,522
[ "Apache-2.0" ]
44
95dc024fb4f8777aa62e1304536daece640428de
https://github.com/MaurizioFD/recsys-challenge-2020-twitter/tree/95dc024fb4f8777aa62e1304536daece640428de
Foo
import torch import torch.nn.functional import torch.nn.parallel import torch.utils.data import torch.optim import torch.utils.data.distributed class Foo(torch.nn.Module): def __init__(self, size): super(Foo, self).__init__() self.n = torch.nn.Parameter(torch.ones(size)) self.m = torch.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 import torch.nn.functional import torch.nn.parallel import torch.utils.data import torch.optim import torch.utils.data.distributed assert_si...
alexshuang/apex
Foo
false
1,405
[ "BSD-3-Clause" ]
0
107f1ff569c40769de2ed8d366126282e63b63ce
https://github.com/alexshuang/apex/tree/107f1ff569c40769de2ed8d366126282e63b63ce
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 import ...
ctoto93/TD3
Critic
false
9,962
[ "MIT" ]
0
88482b9f1fb4441d74426ece60d5da13414aeb77
https://github.com/ctoto93/TD3/tree/88482b9f1fb4441d74426ece60d5da13414aeb77
EncoderLayer
import torch import torch.nn.functional as F 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_dropo...
import torch from torch._inductor.select_algorithm import extern_kernels import triton import triton.language as tl from 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....
AlbertiPot/attention-is-all-you-need-pytorch
EncoderLayer
false
37
[ "MIT" ]
0
c5ec40907db281b85b3bd7a5dd8016940291add0
https://github.com/AlbertiPot/attention-is-all-you-need-pytorch/tree/c5ec40907db281b85b3bd7a5dd8016940291add0
LayerScale
# AOT ID: ['0_forward'] from ctypes import c_void_p, c_long, c_int import torch import math import random import os import tempfile from math import inf, nan from torch._inductor.hooks import run_intermediate_hooks from torch._inductor.utils import maybe_profile from torch._inductor.codegen.memory_planning import _alig...
import torch import triton import triton.language as tl from torch._inductor.runtime.triton_heuristics import grid from torch._C import _cuda_getCurrentRawStream as get_raw_stream from torch import nn assert_size_stride = torch._C._dynamo.guards.assert_size_stride empty_strided_cuda = torch._C._dynamo.guards._empty_str...
DilwoarH/demucs
LayerScale
false
5,075
[ "MIT" ]
1
32d21592dfa015468aa117cace52b21e7af79d71
https://github.com/DilwoarH/demucs/tree/32d21592dfa015468aa117cace52b21e7af79d71
VGG19Decoder2
# 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....
chenhsiu48/PytorchWCT
VGG19Decoder2
false
9,936
[ "MIT" ]
0
c3346ebaec95358ad1d4d5a519d5d0e7de73bc75
https://github.com/chenhsiu48/PytorchWCT/tree/c3346ebaec95358ad1d4d5a519d5d0e7de73bc75
HighLightLayer
# 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.parallel import torch.nn as nn import torch.utils.data import to...
EGO4D/episodic-memory
HighLightLayer
false
8,084
[ "MIT" ]
27
2a3464882cd4f665c358c1b05a6397339e33c2e1
https://github.com/EGO4D/episodic-memory/tree/2a3464882cd4f665c358c1b05a6397339e33c2e1
G_Small
# 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_...
RQuispeC/pytorch-ACSCP
G_Small
false
8,762
[ "MIT" ]
25
c83f08632012c2245250ff9c5140814461db575c
https://github.com/RQuispeC/pytorch-ACSCP/tree/c83f08632012c2245250ff9c5140814461db575c
GatedConv
# AOT ID: ['0_forward'] from ctypes import c_void_p, c_long, c_int import torch import math import random import os import tempfile from math import inf, nan from torch._inductor.hooks import run_intermediate_hooks from torch._inductor.utils import maybe_profile from torch._inductor.codegen.memory_planning import _alig...
import torch from torch._inductor.select_algorithm import extern_kernels import triton import triton.language as tl from torch._inductor.runtime.triton_heuristics import grid from torch._C import _cuda_getCurrentRawStream as get_raw_stream import torch.nn as nn import torch.utils.data assert_size_stride = torch._C._dyn...
D-hash-code/ffjord
GatedConv
false
11,362
[ "MIT" ]
0
3647ab35537a8bac3b4dc1e45a593819ac8e2c18
https://github.com/D-hash-code/ffjord/tree/3647ab35537a8bac3b4dc1e45a593819ac8e2c18
MaskedMHCA
# 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....
yjh0410/actionformer_release
MaskedMHCA
false
16,801
[ "MIT" ]
61
7a97422111d3e29c8d2e14088c850c6975855ea7
https://github.com/yjh0410/actionformer_release/tree/7a97422111d3e29c8d2e14088c850c6975855ea7
Highway
# 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...
DennisMagnusson/voice2voice
Highway
false
2,154
[ "MIT" ]
0
cee95b3eda8c2159f6b85e1733652ff8b7a537ce
https://github.com/DennisMagnusson/voice2voice/tree/cee95b3eda8c2159f6b85e1733652ff8b7a537ce
my_Layernorm
# AOT ID: ['0_forward'] from ctypes import c_void_p, c_long, c_int import torch import math import random import os import tempfile from math import inf, nan from torch._inductor.hooks import run_intermediate_hooks from torch._inductor.utils import maybe_profile from torch._inductor.codegen.memory_planning import _alig...
import torch import triton import triton.language as tl from torch._inductor.runtime.triton_heuristics import grid from torch._C import _cuda_getCurrentRawStream as get_raw_stream from torch._inductor.runtime.triton_helpers import libdevice import torch.nn as nn assert_size_stride = torch._C._dynamo.guards.assert_size_...
MAZiqing/FEDformer
my_Layernorm
false
17,651
[ "MIT" ]
7
7914d39df829494a8172afb9676982c3789d491d
https://github.com/MAZiqing/FEDformer/tree/7914d39df829494a8172afb9676982c3789d491d
BertOutput
from _paritybench_helpers import _mock_config import torch from torch import nn import torch.onnx class BertLayerNorm(nn.Module): def __init__(self, hidden_size, eps=1e-12): """Construct a layernorm module in the TF style (epsilon inside the square root). """ super(BertLayerNorm, 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...
Splendon/examples
BertOutput
false
4,746
[ "MIT" ]
0
ed4a8a01857b6ddca49559141acf5d0986eb01e1
https://github.com/Splendon/examples/tree/ed4a8a01857b6ddca49559141acf5d0986eb01e1
LSoftLoss
import torch import torch.nn.functional as F import torch.nn as nn class LSoftLoss(nn.Module): def __init__(self): super().__init__() def forward(self, y_pred, y_true, beta): with torch.no_grad(): y_true_updated = beta * y_true + (1 - beta) * y_pred return F.binary_cross_...
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...
advian123/kaggle-birdsong-recognition
LSoftLoss
false
9,933
[ "MIT" ]
0
a4ca8ab81e166b919452fb5d6ca4c2912c65e904
https://github.com/advian123/kaggle-birdsong-recognition/tree/a4ca8ab81e166b919452fb5d6ca4c2912c65e904
InvConv2d
# 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 from torch.nn import functional as F assert_size_stride = t...
hologerry/glow-pytorch-1
InvConv2d
false
3,639
[ "MIT" ]
0
9d3f95f4ff7f0a1361796a9b2554e3c229aad9b7
https://github.com/hologerry/glow-pytorch-1/tree/9d3f95f4ff7f0a1361796a9b2554e3c229aad9b7
TanhDeepLiftModel
import torch import torch.nn as nn class TanhDeepLiftModel(nn.Module): """ Same as the ReLUDeepLiftModel, but with activations that can have negative outputs """ def __init__(self): super().__init__() self.tanh1 = nn.Tanh() self.tanh2 = nn.Tanh() def forward(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 libdevice import torch.nn as nn assert_size_stride = torch._C._dynamo.guards.assert_size_...
ngduduong/captum
TanhDeepLiftModel
false
4,078
[ "BSD-3-Clause" ]
0
6fe5f0f23ea975e73e0c0dee79bdc01b4223d283
https://github.com/ngduduong/captum/tree/6fe5f0f23ea975e73e0c0dee79bdc01b4223d283
ContextualCell
# 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...
xkp793003821/nas-segm-pytorch
ContextualCell
false
13,112
[ "BSD-2-Clause" ]
0
c4b59ab56bd539bf08493c6d85072849213a3d62
https://github.com/xkp793003821/nas-segm-pytorch/tree/c4b59ab56bd539bf08493c6d85072849213a3d62
PrototypicalNetwork
from _paritybench_helpers import _mock_config import torch import torch.nn as nn import torch.optim import torch.nn.parallel def L2SquareDist(A, B, average=True): assert A.dim() == 3 assert B.dim() == 3 assert A.size(0) == B.size(0) and A.size(2) == B.size(2) nB = A.size(0) Na = A.size(1) Nb =...
import torch from torch._inductor.select_algorithm import extern_kernels import triton import triton.language as tl from torch._inductor.runtime.triton_heuristics import grid from torch._C import _cuda_getCurrentRawStream as get_raw_stream import torch.nn as nn import torch.optim import torch.nn.parallel assert_size_st...
nikran1/Few_shot
PrototypicalNetwork
false
16,185
[ "MIT" ]
497
5298c98e208411e44ee7767e6f4d457006d373cb
https://github.com/nikran1/Few_shot/tree/5298c98e208411e44ee7767e6f4d457006d373cb
LinearCombine
# 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 import torch.nn as nn import torch.utils.data assert_size_stride = torch....
pkuyym/nni
LinearCombine
false
10,999
[ "MIT" ]
0
fe533e3bc65ea27997e16250adb503638548d500
https://github.com/pkuyym/nni/tree/fe533e3bc65ea27997e16250adb503638548d500
DirectMultiheadAttention
import torch import torch.nn as nn import torch.nn.functional as F class DirectMultiheadAttention(nn.Module): def __init__(self, d_in, d_out, heads, dropout=0.1): super(DirectMultiheadAttention, self).__init__() self.heads = heads self.proj_pair = nn.Linear(d_in, heads) self.drop ...
import torch from torch._inductor.select_algorithm import extern_kernels import triton import triton.language as tl from 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....
wukevin/RoseTTAFold
DirectMultiheadAttention
false
4,560
[ "MIT" ]
0
e3c15dbf4bc1e4f8726e26c63aca1625188da803
https://github.com/wukevin/RoseTTAFold/tree/e3c15dbf4bc1e4f8726e26c63aca1625188da803