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
ProposalNet
# 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 import t...
Syderny/NTS-Net
ProposalNet
false
3,167
[ "MIT" ]
0
02d29e8e46aca7698c3102626eec33b12ddd7669
https://github.com/Syderny/NTS-Net/tree/02d29e8e46aca7698c3102626eec33b12ddd7669
AdditiveAttention
# 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....
j-scharrenbach/Trajectron-plus-plus
AdditiveAttention
false
15,661
[ "MIT" ]
361
37040ca6e3f386c80ab39fbb4aa9984915c94813
https://github.com/j-scharrenbach/Trajectron-plus-plus/tree/37040ca6e3f386c80ab39fbb4aa9984915c94813
BMNLoss
# 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 import device import triton import triton.language as tl from torch._inductor.runtime.triton_heuristics import grid from torch._C import _cuda_getCurrentRawStream as get_raw_stream from torch._inductor.runtime import triton_helpers from torch._inductor.runtime.triton_helpers import math as tl_ma...
scenarios/dev
BMNLoss
false
4,471
[ "Apache-2.0" ]
0
9f91ebc142cea1c31231d233571ad59460ab6fba
https://github.com/scenarios/dev/tree/9f91ebc142cea1c31231d233571ad59460ab6fba
SmoothBCEwLogits
import torch import torch.utils.data import torch.nn.functional as F from torch.nn.modules.loss import _WeightedLoss class SmoothBCEwLogits(_WeightedLoss): def __init__(self, weight=None, reduction='mean', smoothing=0.0, pos_weight=None): super().__init__(weight=weight, reduction=reduction) ...
import torch import triton import triton.language as tl from torch._inductor.runtime.triton_heuristics import grid from torch._C import _cuda_getCurrentRawStream as get_raw_stream from torch._inductor.runtime import triton_helpers from torch._inductor.runtime.triton_helpers import libdevice, math as tl_math import torc...
broadinstitute/lincs-profiling-comparison
SmoothBCEwLogits
false
6,363
[ "BSD-3-Clause" ]
1
075c3bc60eeb3934fc42c30bae6aeed8cda1cd6d
https://github.com/broadinstitute/lincs-profiling-comparison/tree/075c3bc60eeb3934fc42c30bae6aeed8cda1cd6d
ConvMeanPool
import torch import torch.nn as nn def spectral_norm(layer, n_iters=1): return torch.nn.utils.spectral_norm(layer, n_power_iterations=n_iters) class ConvMeanPool(nn.Module): def __init__(self, input_dim, output_dim, kernel_size=3, biases=True, adjust_padding=False, spec_norm=False): super()...
import torch from torch._inductor.select_algorithm import extern_kernels import 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...
Sriram-Ravula/ncsnv2
ConvMeanPool
false
2,856
[ "MIT" ]
0
f610b59441a34063fae1c02aa06837b7eec95c03
https://github.com/Sriram-Ravula/ncsnv2/tree/f610b59441a34063fae1c02aa06837b7eec95c03
CombinedTargetMSELoss
import torch import torch.nn as nn class CombinedTargetMSELoss(nn.Module): """MSE loss for combined target. CombinedTarget: The combination of classification target (response map) and regression target (offset map). Paper ref: Huang et al. The Devil is in the Details: Delving into ...
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...
ALISCIFP/mmpose
CombinedTargetMSELoss
false
2,075
[ "Apache-2.0" ]
0
2433e3dbcc44baa2253e2a7c748ba0216937933e
https://github.com/ALISCIFP/mmpose/tree/2433e3dbcc44baa2253e2a7c748ba0216937933e
BCEDiceLoss
# 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 from torch ...
afperezm/road_building_extraction
BCEDiceLoss
false
14,758
[ "MIT" ]
76
e07458fcb36318ec93fc23feb764136cf0a0bffe
https://github.com/afperezm/road_building_extraction/tree/e07458fcb36318ec93fc23feb764136cf0a0bffe
RelationalTransformerEncoderLayer
import torch import warnings from torch import Tensor from torch.nn import TransformerEncoderLayer from torch.nn.functional import * from torch.nn.modules.activation import MultiheadAttention from torch.nn.modules.activation import xavier_uniform_ from torch.nn.modules.activation import xavier_normal_ from torch.nn.mod...
import torch from torch._inductor.select_algorithm import extern_kernels import triton import triton.language 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....
mfk3138/jiant
RelationalTransformerEncoderLayer
false
4,204
[ "MIT" ]
0
6e67ff1ecb1bb98533c1019a86af4ad2c04c6a64
https://github.com/mfk3138/jiant/tree/6e67ff1ecb1bb98533c1019a86af4ad2c04c6a64
SubpixelConvolutionLayer
import torch import torch.nn as nn class SubpixelConvolutionLayer(nn.Module): def __init__(self, channels: 'int'=64) ->None: """ Args: channels (int): Number of channels in the input image. (Default: 64) """ super(SubpixelConvolutionLayer, self).__init__() self...
import torch from torch._inductor.select_algorithm import extern_kernels import triton import triton.language as tl from torch._inductor.runtime.triton_heuristics import grid from torch._C import _cuda_getCurrentRawStream as get_raw_stream import torch.nn as nn assert_size_stride = torch._C._dynamo.guards.assert_size_s...
duylebkHCM/Anime-Face-Generator-
SubpixelConvolutionLayer
false
12,334
[ "MIT" ]
0
ffcbe22f2073971e81b1bbc61b7ef7970889f8a2
https://github.com/duylebkHCM/Anime-Face-Generator-/tree/ffcbe22f2073971e81b1bbc61b7ef7970889f8a2
QuantConv1d
import torch from torch import nn class QuantConv1d(nn.Module): """Quantized 1D Conv""" def __init__(self, in_channels, out_channels, kernel_size, stride=1, padding=0, dilation=1, groups=1, bias=True, padding_mode='zeros', **kwargs): super().__init__() self.qconv1d = nn.Conv1d...
import torch from torch._inductor.select_algorithm import extern_kernels import triton import 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...
TeaPoly/wenet
QuantConv1d
false
2,875
[ "Apache-2.0" ]
0
5681887e338e4c8b2c75ffc283140e11a9d56a6d
https://github.com/TeaPoly/wenet/tree/5681887e338e4c8b2c75ffc283140e11a9d56a6d
Conv2d_GN_ReLU
import torch import torch.nn as nn class Conv2d_GN_ReLU(nn.Module): """ Implements a module that performs conv2d + groupnorm + ReLU + Assumes kernel size is odd """ def __init__(self, in_channels, out_channels, num_groups, ksize=3, stride=1 ): super(Conv2d_GN_ReLU, ...
import torch from torch._inductor.select_algorithm import extern_kernels import triton import triton.language as tl from torch._inductor.runtime.triton_heuristics import grid from torch._C import _cuda_getCurrentRawStream as get_raw_stream from torch._inductor.runtime import triton_helpers from torch._inductor.runtime....
Guangyun-Xu/uois
Conv2d_GN_ReLU
false
13,730
[ "MIT" ]
106
00069af841dd3ea9a86e6e3a89c3b7222240e6e5
https://github.com/Guangyun-Xu/uois/tree/00069af841dd3ea9a86e6e3a89c3b7222240e6e5
Linear3D
# AOT ID: ['0_forward'] from ctypes import c_void_p, c_long, c_int import torch import math import random import os import tempfile from math import inf, nan from torch._inductor.hooks import run_intermediate_hooks from torch._inductor.utils import maybe_profile from torch._inductor.codegen.memory_planning import _alig...
import torch from torch._inductor.select_algorithm import extern_kernels import triton import triton.language as tl from torch._inductor.runtime.triton_heuristics import grid from torch._C import _cuda_getCurrentRawStream as get_raw_stream import math import torch as th from torch.nn import Parameter assert_size_stride...
BadrYoubiIdrissi/CausalDiscoveryToolbox
Linear3D
false
2,023
[ "MIT" ]
0
1e729d002a64ea1942caecd21b9dc8cc217ea0e2
https://github.com/BadrYoubiIdrissi/CausalDiscoveryToolbox/tree/1e729d002a64ea1942caecd21b9dc8cc217ea0e2
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 import triton_helpers import torch.nn as nn assert_...
SaneBow/AttentionAgentCarRacing
MLP
false
5,791
[ "Apache-2.0" ]
1
944dc18b99b2c51a25c206f722a0bbc43cb7bbb0
https://github.com/SaneBow/AttentionAgentCarRacing/tree/944dc18b99b2c51a25c206f722a0bbc43cb7bbb0
OutlookAttention
# 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....
LeftAttention/Attention-Codebase
OutlookAttention
false
17,597
[ "Apache-2.0" ]
6
348ec66233a7c0f95a3cb5f0f11641e2a7a9b9c3
https://github.com/LeftAttention/Attention-Codebase/tree/348ec66233a7c0f95a3cb5f0f11641e2a7a9b9c3
MseCriterion
# 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.nn.modules.loss import _Loss from torch.optim.lr_scheduler import * assert_siz...
johnson7788/mt-dnn
MseCriterion
false
3,895
[ "MIT" ]
0
26e5c4a5bfdbf1a1dd1c903e606db1c070568237
https://github.com/johnson7788/mt-dnn/tree/26e5c4a5bfdbf1a1dd1c903e606db1c070568237
RDivFloat
import torch class RDivFloat(torch.nn.Module): def __init__(self): super(RDivFloat, self).__init__() def forward(self, x): return 100.0 / 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 assert_size_stride = torch._C._dynamo.guards.assert_size_stride empty_strided_cuda = torch._C._dynamo.guards._empty_strided_cuda @triton.j...
ahangchen/torch2trt
RDivFloat
false
6,100
[ "MIT" ]
1
53c663f0e0570ef7ffd6771354ae3478f63bd328
https://github.com/ahangchen/torch2trt/tree/53c663f0e0570ef7ffd6771354ae3478f63bd328
CifarDownsampling
# 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...
alechat/PLCiL
CifarDownsampling
false
3,077
[ "Apache-2.0" ]
0
f71fe92cb7781097d3320c28601e06add70f64f9
https://github.com/alechat/PLCiL/tree/f71fe92cb7781097d3320c28601e06add70f64f9
SineODE
import math import torch class SineODE(torch.nn.Module): def forward(self, t, y): return 2 * y / t + t ** 4 * torch.sin(2 * t) - t ** 2 + 4 * t ** 3 def y_exact(self, t): return -0.5 * t ** 4 * torch.cos(2 * t) + 0.5 * t ** 3 * torch.sin( 2 * t) + 0.25 * t ** 2 * torch.cos(2 * t)...
import torch import triton import triton.language as tl from torch._inductor.runtime.triton_heuristics import grid from torch._C import _cuda_getCurrentRawStream as get_raw_stream from torch._inductor.runtime.triton_helpers import math as tl_math import math assert_size_stride = torch._C._dynamo.guards.assert_size_stri...
Lauu1023/torchdiffeq
SineODE
false
9,351
[ "MIT" ]
0
f4f3184a4c1b657da959c7d15bc8f727f1c25bd8
https://github.com/Lauu1023/torchdiffeq/tree/f4f3184a4c1b657da959c7d15bc8f727f1c25bd8
FeedForwardLayer
import torch import torch.nn as nn import torch.nn.functional as F from torch.nn import LayerNorm class FeedForwardLayer(nn.Module): def __init__(self, d_model, dim_feedforward=2048, dropout=0.1): super(FeedForwardLayer, self).__init__() self.linear1 = nn.Linear(d_model, dim_feedforward) ...
import torch from torch._inductor.select_algorithm import extern_kernels import triton import triton.language 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....
WeightsandBiases/deeplearningposeestimation
FeedForwardLayer
false
11,962
[ "BSD-3-Clause" ]
0
406761ba3e0b66ed8640c99bcd28e2b232c92a4f
https://github.com/WeightsandBiases/deeplearningposeestimation/tree/406761ba3e0b66ed8640c99bcd28e2b232c92a4f
ClassWisePool
import sys from torch.autograd import Function import torch from torch import nn class ClassWisePoolFunction(Function): @staticmethod def forward(ctx, input, args): ctx.num_maps = args batch_size, num_channels, h, w = input.size() if num_channels % ctx.num_maps != 0: None ...
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 sys from torch.autograd import Function from torch import nn assert_size_stride = torch._C._dynamo.guards.assert_size_stride empty_st...
nishanthta/wsl
ClassWisePool
false
7,346
[ "MIT" ]
1
5fda3b909a314b7f88ffa9ab27a6a142de6b0159
https://github.com/nishanthta/wsl/tree/5fda3b909a314b7f88ffa9ab27a6a142de6b0159
ArcMarginProduct_subcenter
import math import torch import torch.nn as nn import torch.nn.functional as F class ArcMarginProduct_subcenter(nn.Module): def __init__(self, in_features, out_features, k=3): super().__init__() self.weight = nn.Parameter(torch.FloatTensor(out_features * k, in_features)) self....
import torch from torch._inductor.select_algorithm import extern_kernels import triton import triton.language as tl from torch._inductor.runtime.triton_heuristics import grid from torch._C import _cuda_getCurrentRawStream as get_raw_stream from torch._inductor.runtime import triton_helpers from torch._inductor.runtime....
Husky95/Google-Landmark-Recognition-2020-3rd-Place-Solution
ArcMarginProduct_subcenter
false
9,157
[ "Apache-2.0" ]
0
48806b9e09beabf74e8f96575855dcfa13a4f996
https://github.com/Husky95/Google-Landmark-Recognition-2020-3rd-Place-Solution/tree/48806b9e09beabf74e8f96575855dcfa13a4f996
L2
import torch import torch.nn as nn class L2(nn.Module): def __init__(self): super(L2, self).__init__() def forward(self, output, target): lossvalue = torch.norm(output[:, None] - target, p=2, dim=1).mean() return lossvalue def get_inputs(): return [torch.rand([4, 4, 4, 4]), tor...
import torch import triton import triton.language as tl from torch._inductor.runtime.triton_heuristics import grid from torch._C import _cuda_getCurrentRawStream as get_raw_stream from torch._inductor.runtime import triton_helpers from torch._inductor.runtime.triton_helpers import libdevice import torch.nn as nn assert...
tomrunia/flownet2-pytorch
L2
false
4,452
[ "Apache-2.0" ]
0
759b09c375348cf64f52f914cf3bf3e9095cc959
https://github.com/tomrunia/flownet2-pytorch/tree/759b09c375348cf64f52f914cf3bf3e9095cc959
TotalVariation
# AOT ID: ['0_inference'] from ctypes import c_void_p, c_long, c_int import torch import math import random import os import tempfile from math import inf, nan from torch._inductor.hooks import run_intermediate_hooks from torch._inductor.utils import maybe_profile from torch._inductor.codegen.memory_planning import _al...
import torch import triton import triton.language as tl from torch._inductor.runtime.triton_heuristics import grid from torch._C import _cuda_getCurrentRawStream as get_raw_stream from torch._inductor.runtime.triton_helpers import math as tl_math import torch.nn as nn assert_size_stride = torch._C._dynamo.guards.assert...
IEM-Computer-Vision/kornia
TotalVariation
false
9,262
[ "ECL-2.0", "Apache-2.0" ]
0
f98bd9a2158a6e59cda076d55d476acf13f4e0af
https://github.com/IEM-Computer-Vision/kornia/tree/f98bd9a2158a6e59cda076d55d476acf13f4e0af
RNN
# 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....
tom-kuchler/vhive
RNN
false
16,600
[ "MIT" ]
138
ae1f2f5920e7607e9902ed1060bda62b56e332ac
https://github.com/tom-kuchler/vhive/tree/ae1f2f5920e7607e9902ed1060bda62b56e332ac
GLU
import torch import torch.nn as nn class GLU(nn.Module): """ Overview: Gating Linear Unit. This class does a thing like this: .. code::python # Inputs: input, context, output_size # The gate value is a learnt function of the input. gate = sigmoid(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 import torch.nn as nn assert_size_stride = torch._C._dynamo.guards.assert_size_s...
PaParaZz1/DI-engine
GLU
false
11,847
[ "Apache-2.0" ]
0
b38144117c1ebc6eb860d8637ec8866dfbcdf2de
https://github.com/PaParaZz1/DI-engine/tree/b38144117c1ebc6eb860d8637ec8866dfbcdf2de
TonemappedRelativeMSE
import torch def _tonemap(im): """Helper Reinhards tonemapper. Args: im(torch.Tensor): image to tonemap. Returns: (torch.Tensor) tonemaped image. """ im = torch.clamp(im, min=0) return im / (1 + im) class TonemappedRelativeMSE(torch.nn.Module): """Relative mean-squared er...
import torch import triton import triton.language as tl from torch._inductor.runtime.triton_heuristics import grid from torch._C import _cuda_getCurrentRawStream as get_raw_stream from torch._inductor.runtime import triton_helpers assert_size_stride = torch._C._dynamo.guards.assert_size_stride empty_strided_cuda = torc...
qbhan/pathembed
TonemappedRelativeMSE
false
7,497
[ "MIT" ]
1
c21823529840593bf606e10696f5879e5adb51b2
https://github.com/qbhan/pathembed/tree/c21823529840593bf606e10696f5879e5adb51b2
DownsampleA
# AOT ID: ['0_inference'] from ctypes import c_void_p, c_long, c_int import torch import math import random import os import tempfile from math import inf, nan from torch._inductor.hooks import run_intermediate_hooks from torch._inductor.utils import maybe_profile from torch._inductor.codegen.memory_planning import _al...
import torch import triton import triton.language as tl from torch._inductor.runtime.triton_heuristics import grid from torch._C import _cuda_getCurrentRawStream as get_raw_stream import torch.nn as nn import torch.nn.parallel import torch.optim import torch.utils.data import torch.utils.data.distributed import torch.n...
yuanjef/imagenet-fast
DownsampleA
false
16,769
[ "Apache-2.0" ]
298
4c1cb1ec11c3444982913fc6526720a0d29b97c5
https://github.com/yuanjef/imagenet-fast/tree/4c1cb1ec11c3444982913fc6526720a0d29b97c5
DiceBCELoss
import torch from torch import nn import torch.nn.functional as F class DiceBCELoss(nn.Module): def __init__(self, weight=None, size_average=True): super(DiceBCELoss, self).__init__() def forward(self, inputs, targets, smooth=1): inputs = inputs.view(-1) targets = targets.view(-1) ...
import torch import triton import triton.language as tl from torch._inductor.runtime.triton_heuristics import grid from torch._C import _cuda_getCurrentRawStream as get_raw_stream from torch._inductor.runtime import triton_helpers from torch._inductor.runtime.triton_helpers import libdevice, math as tl_math from torch ...
DeVriesMatt/cellshape-voxel
DiceBCELoss
false
5,058
[ "BSD-3-Clause" ]
1
64c2c57cc8b8ebe7f6ba1934caaaa3aaa1d6a0c1
https://github.com/DeVriesMatt/cellshape-voxel/tree/64c2c57cc8b8ebe7f6ba1934caaaa3aaa1d6a0c1
TransformerEncoderLayer
# 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....
Nial4/Gaze_HybirdModel
TransformerEncoderLayer
false
5,695
[ "MIT" ]
1
e738179408a45c380ec7de289c84bbd3965ae924
https://github.com/Nial4/Gaze_HybirdModel/tree/e738179408a45c380ec7de289c84bbd3965ae924
LinearBottleneckLayer
# 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....
Jincheng-Sun/Kylearn-pytorch
LinearBottleneckLayer
false
660
[ "MIT" ]
0
e72f2ab45a3f4724e843a27bec37664d3612fdca
https://github.com/Jincheng-Sun/Kylearn-pytorch/tree/e72f2ab45a3f4724e843a27bec37664d3612fdca
StandardWNetDown
import torch import torch.nn as nn import torch.jit import torch.nn class DepthWiseSeparableConv2d(nn.Module): def __init__(self, in_channels, out_channels, kernel_size, stride=1, padding=1, dilation=1, bias=True): """Depthwise separable 2D convolution. Args: in_channels (int): number ...
import torch from torch._inductor.select_algorithm import extern_kernels import triton import triton.language 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 ...
ankmathur96/torchsupport
StandardWNetDown
false
3,176
[ "MIT" ]
0
77bf4a90b8770a408665e2604428808c3ed2f979
https://github.com/ankmathur96/torchsupport/tree/77bf4a90b8770a408665e2604428808c3ed2f979
Conv
import torch import torch.nn as nn class Conv(nn.Module): """ Convolution Module """ def __init__(self, in_channels, out_channels, kernel_size=1, stride=1, padding=0, dilation=1, bias=True, w_init='linear'): """ :param in_channels: dimension of input :param out_channel...
import torch from torch._inductor.select_algorithm import extern_kernels import 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...
Labmem-Zhouyx/Attentron_FastSpeech2
Conv
false
5,496
[ "MIT" ]
1
ac1c0bd0d23e8314eb2518f3d5abffc9b4b9f5cb
https://github.com/Labmem-Zhouyx/Attentron_FastSpeech2/tree/ac1c0bd0d23e8314eb2518f3d5abffc9b4b9f5cb
ScaledDotProductAttention
import torch import torch.nn as nn import torch.nn.functional as F class ScaledDotProductAttention(nn.Module): def __init__(self, temperature, attn_dropout=0.1): super().__init__() self.temperature = temperature self.dropout = nn.Dropout(attn_dropout) def forward(self, q, k, v, mask=...
import torch from torch._inductor.select_algorithm import extern_kernels import triton import triton.language 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....
muberraozmen/MrMP
ScaledDotProductAttention
false
4,041
[ "MIT" ]
0
da6bcccbad85a682c848ff4aa1121c773d779e57
https://github.com/muberraozmen/MrMP/tree/da6bcccbad85a682c848ff4aa1121c773d779e57
SoftDiceLoss
import torch import torch.nn.functional as F import torch.nn as nn import torch.backends.cudnn import torch.utils.data class SoftDiceLoss(nn.Module): def __init__(self): super(SoftDiceLoss, self).__init__() def forward(self, logits, labels): probs = F.sigmoid(logits) num = labels.siz...
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.backends.cudnn import torch.utils.data assert_size_stride = torch._C._dynamo.guards.assert_size_stride em...
ArmenGhambaryan/kaggle_carvana_segmentation
SoftDiceLoss
false
13,299
[ "MIT" ]
447
648a6b5c807cb69011316fe6501241dacc027db2
https://github.com/ArmenGhambaryan/kaggle_carvana_segmentation/tree/648a6b5c807cb69011316fe6501241dacc027db2
MulticlassDiceLoss
import torch import torch.nn as nn class DiceLoss(nn.Module): def __init__(self): super(DiceLoss, self).__init__() def forward(self, input, target): N = target.size(0) smooth = 1 input_flat = input.view(N, -1) target_flat = target.view(N, -1) intersection = in...
import torch import triton import triton.language as tl from torch._inductor.runtime.triton_heuristics import grid from torch._C import _cuda_getCurrentRawStream as get_raw_stream import torch.nn as nn assert_size_stride = torch._C._dynamo.guards.assert_size_stride empty_strided_cuda = torch._C._dynamo.guards._empty_st...
lee-zq/VesselSeg-pytorch
MulticlassDiceLoss
false
15,906
[ "Apache-2.0" ]
83
b4f6571fc1fb1fbdaad60ff9282a54a1f1c455fa
https://github.com/lee-zq/VesselSeg-pytorch/tree/b4f6571fc1fb1fbdaad60ff9282a54a1f1c455fa
SymEncoder
import torch from torch import nn import torch.utils.data class SymEncoder(nn.Module): def __init__(self, featureSize, symmetrySize, hiddenSize): super(SymEncoder, self).__init__() self.left = nn.Linear(featureSize, hiddenSize) self.right = nn.Linear(symmetrySize, hiddenSize) 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...
BigkoalaZhu/SCORES
SymEncoder
false
7,789
[ "MIT" ]
16
8332733c375ee85c02bd34c2adce6a3213aad3c4
https://github.com/BigkoalaZhu/SCORES/tree/8332733c375ee85c02bd34c2adce6a3213aad3c4
DDM_Decoder
import torch import numpy as np import torch.nn as nn import torch.nn.functional as F import torch.nn.init as init def weights_init(m): classname = m.__class__.__name__ if classname.find('Conv') != -1: weight_shape = list(m.weight.data.size()) fan_in = np.prod(weight_shape[1:4]) fan_ou...
import torch from torch._inductor.select_algorithm import extern_kernels import triton import triton.language 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 numpy as np ...
MLforHealth/state_representations_for_RLinHealth
DDM_Decoder
false
8,515
[ "MIT" ]
24
aa8dbb7d56caa95bf4380e3e745e134996291b66
https://github.com/MLforHealth/state_representations_for_RLinHealth/tree/aa8dbb7d56caa95bf4380e3e745e134996291b66
BasicMotionEncoder
# 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_...
BrianPugh/RAFT-Stereo
BasicMotionEncoder
false
3,430
[ "MIT" ]
0
494dd79545411eee56e32540bfd6f45a16c74a19
https://github.com/BrianPugh/RAFT-Stereo/tree/494dd79545411eee56e32540bfd6f45a16c74a19
DiceLoss
import collections import torch import warnings from typing import Optional from typing import Union from typing import Any from typing import Callable from typing import Tuple import torch.nn from torch.nn.modules.loss import _Loss from enum import Enum import collections.abc def issequenceiterable(obj: 'Any') ->boo...
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 collections from typing import Optional from typing import Union from typing import Any from typing import Callable from typing impor...
Alxaline/MONAI
DiceLoss
false
4,856
[ "Apache-2.0" ]
1
6b8fdf9db7f13ed7d88d605155a0463840abcbf2
https://github.com/Alxaline/MONAI/tree/6b8fdf9db7f13ed7d88d605155a0463840abcbf2
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 ...
blandocs/Tag2Pix
AdaptiveInstanceNorm
false
14,967
[ "MIT" ]
232
733d729067608dbe2c1122c9128f2f38bc0a8edd
https://github.com/blandocs/Tag2Pix/tree/733d729067608dbe2c1122c9128f2f38bc0a8edd
VNMaxPool
# AOT ID: ['0_inference'] from ctypes import c_void_p, c_long, c_int import torch import math import random import os import tempfile from math import inf, nan from torch._inductor.hooks import run_intermediate_hooks from torch._inductor.utils import maybe_profile from torch._inductor.codegen.memory_planning import _al...
import torch from torch._inductor.select_algorithm import extern_kernels import triton import triton.language as tl from torch._inductor.runtime.triton_heuristics import grid from torch._C import _cuda_getCurrentRawStream as get_raw_stream import torch.nn as nn from itertools import product as product assert_size_strid...
david1309/SynergyNet_bonseyes
VNMaxPool
false
3,385
[ "MIT" ]
0
9d675f6e0c78222e1fa55e6598c3d11aa5dc799b
https://github.com/david1309/SynergyNet_bonseyes/tree/9d675f6e0c78222e1fa55e6598c3d11aa5dc799b
SimpleACosModule
# AOT ID: ['0_inference'] from ctypes import c_void_p, c_long, c_int import torch import math import random import os import tempfile from math import inf, nan from torch._inductor.hooks import run_intermediate_hooks from torch._inductor.utils import maybe_profile from torch._inductor.codegen.memory_planning import _al...
import torch import triton import triton.language as tl from torch._inductor.runtime.triton_heuristics import grid from torch._C import _cuda_getCurrentRawStream as get_raw_stream from torch._inductor.runtime.triton_helpers import libdevice import torch.jit import torch.onnx import torch.nn assert_size_stride = torch._...
briancoutinho/glow
SimpleACosModule
false
12,550
[ "Apache-2.0" ]
0
4c919d60b3c33296c4109aec8020a1733c98f5b5
https://github.com/briancoutinho/glow/tree/4c919d60b3c33296c4109aec8020a1733c98f5b5
FRN
import torch from torch import nn class FRN(nn.Module): def __init__(self, num_features, eps=1e-06): super(FRN, self).__init__() self.eps = eps self.gamma = nn.Parameter(torch.ones(1, num_features, 1, 1)) self.beta = nn.Parameter(torch.zeros(1, num_features, 1, 1)) self.t ...
import torch import triton import triton.language as tl from torch._inductor.runtime.triton_heuristics import grid from torch._C import _cuda_getCurrentRawStream as get_raw_stream from torch._inductor.runtime import triton_helpers from torch._inductor.runtime.triton_helpers import libdevice from torch import nn assert_...
WangGodder/deep-cross-modal-hashing
FRN
false
14,567
[ "MIT" ]
65
9784397c1076c81b43ebd856cb24b8a67cf8f41e
https://github.com/WangGodder/deep-cross-modal-hashing/tree/9784397c1076c81b43ebd856cb24b8a67cf8f41e
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...
OatsProduction/flair
CRF
false
11,760
[ "MIT" ]
0
1cf2c9a9ae487e279dce9f6b92c41fa32c4563cf
https://github.com/OatsProduction/flair/tree/1cf2c9a9ae487e279dce9f6b92c41fa32c4563cf
XOR
import torch import torch.utils.data.distributed import torch.nn as nn import torch.utils.data class XOR(nn.Module): def __init__(self, input_dim, output_dim): super(XOR, self).__init__() self.lin1 = nn.Linear(input_dim, 8) self.lin2 = nn.Linear(8, output_dim) def forward(self, featu...
import torch from torch._inductor.select_algorithm import extern_kernels import triton import triton.language 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....
IST-DASLab/horovod
XOR
false
11,506
[ "Apache-2.0" ]
0
d2611353c33b299f04e47fae0de741702de3130e
https://github.com/IST-DASLab/horovod/tree/d2611353c33b299f04e47fae0de741702de3130e
Adversarial_Loss
import torch import torch.nn as nn import torch.nn.functional import torch.nn class Adversarial_Loss(nn.Module): def __init__(self): super().__init__() def forward(self, fake_outputs): return torch.mean((fake_outputs - 1) ** 2 / 2) def get_inputs(): return [torch.rand([4, 4, 4, 4])] ...
import torch import triton import triton.language as tl from torch._inductor.runtime.triton_heuristics import grid from torch._C import _cuda_getCurrentRawStream as get_raw_stream from torch._inductor.runtime import triton_helpers import torch.nn as nn import torch.nn.functional import torch.nn assert_size_stride = tor...
ChmarsLuo/Hero_anomaly_prediction
Adversarial_Loss
false
4,990
[ "Apache-2.0" ]
1
dba2322dabb3476466e296db6c316fc08e0cb11d
https://github.com/ChmarsLuo/Hero_anomaly_prediction/tree/dba2322dabb3476466e296db6c316fc08e0cb11d
ScalarAttention
import torch import torch.nn as nn import torch.utils.data import torch.utils.checkpoint class ScalarAttention(nn.Module): def __init__(self, in_size, hidden_size): super(ScalarAttention, self).__init__() self.hidden = nn.Linear(in_size, hidden_size) nn.init.orthogonal_(self.hidden.weight...
import torch from torch._inductor.select_algorithm import extern_kernels import triton import triton.language as tl from torch._inductor.runtime.triton_heuristics import grid from torch._C import _cuda_getCurrentRawStream as get_raw_stream from torch._inductor.runtime import triton_helpers from torch._inductor.runtime....
MarvinLvn/platalea
ScalarAttention
false
861
[ "Apache-2.0" ]
0
31def0813c90a3259f86f7d86cb576cd66dca3fe
https://github.com/MarvinLvn/platalea/tree/31def0813c90a3259f86f7d86cb576cd66dca3fe
RawNTN
import torch import torch.nn as nn class RawNTN(nn.Module): def __init__(self, l_dim, r_dim, k=5, non_linear=torch.tanh): super(RawNTN, self).__init__() self.u_R = nn.Linear(k, 1, bias=False) self.f = non_linear self.W = nn.Bilinear(l_dim, r_dim, k, bias=True) self.V = 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 ...
QingkaiZeng/GenTaxo
RawNTN
false
8,715
[ "MIT" ]
28
10257a1714d14c6a4c49cbfa0b507408f718cdf0
https://github.com/QingkaiZeng/GenTaxo/tree/10257a1714d14c6a4c49cbfa0b507408f718cdf0
TinyCnn
import torch import torch.nn as nn class TinyCnn(nn.Module): def __init__(self, feature_extraction=False): super().__init__() self.feature_extraction = feature_extraction self.conv1 = nn.Conv2d(3, 3, 5) self.relu1 = nn.ReLU() self.pool1 = nn.MaxPool2d(2, 2) if not ...
import torch from torch._inductor.select_algorithm import extern_kernels import triton import triton.language 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_...
ngduduong/captum
TinyCnn
false
4,084
[ "BSD-3-Clause" ]
0
6fe5f0f23ea975e73e0c0dee79bdc01b4223d283
https://github.com/ngduduong/captum/tree/6fe5f0f23ea975e73e0c0dee79bdc01b4223d283
DeConvNet3
import torch import torch.nn as nn def get_activation(s_act): if s_act == 'relu': return nn.ReLU(inplace=True) elif s_act == 'sigmoid': return nn.Sigmoid() elif s_act == 'softplus': return nn.Softplus() elif s_act == 'linear': return None elif s_act == 'tanh': ...
import torch from torch._inductor.select_algorithm import extern_kernels import triton import triton.language 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_...
Neural-Diffusion-Research/normalized-autoencoders
DeConvNet3
false
8,638
[ "MIT" ]
30
0c77f7e29289e336c0fe5e941aaec8baa4a4fb82
https://github.com/Neural-Diffusion-Research/normalized-autoencoders/tree/0c77f7e29289e336c0fe5e941aaec8baa4a4fb82
VAEEncoder
import torch import torch.nn as nn import torch.nn.functional as F class VAEEncoder(nn.Module): def __init__(self, z_size): super(VAEEncoder, self).__init__() self.conv1 = nn.Conv2d(3, 32, 4, stride=2) self.conv2 = nn.Conv2d(32, 64, 4, stride=2) self.conv3 = nn.Conv2d(64, 128, 4, ...
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...
GSSJacky/neural-painters-pytorch
VAEEncoder
false
13,734
[ "MIT" ]
138
017b32f1eced4c36e6ae15b73b52b9682994d3e6
https://github.com/GSSJacky/neural-painters-pytorch/tree/017b32f1eced4c36e6ae15b73b52b9682994d3e6
Generator
import torch from torch import nn import torch.nn.functional as F class Generator(nn.Module): """ Define el paso de generación lineal + softmax """ def __init__(self, d_model, vocab): """ Constructor del generador lineal Parámetros: d_model: Dimensión del modelo vocab: Tamaño del vocabular...
import torch from torch._inductor.select_algorithm import extern_kernels import triton import triton.language 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....
AbeJLazaro/TraductorEspanolOtomi
Generator
false
1,911
[ "MIT" ]
0
75e1558d3b1a7efe9beb3c7d992c3bf1d3d88d0b
https://github.com/AbeJLazaro/TraductorEspanolOtomi/tree/75e1558d3b1a7efe9beb3c7d992c3bf1d3d88d0b
SEBlock
import torch import torch.nn as nn import torch.nn.parallel import torch.optim import torch.utils.data import torch.utils.data.distributed import torch.nn.functional as F class SEBlock(nn.Module): def __init__(self, input_channels, internal_neurons): super(SEBlock, self).__init__() self.down = 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 import triton_helpers import torch.nn as nn import ...
LeoMaximal/RepVGG
SEBlock
false
5,517
[ "MIT" ]
1
1e2e7bde551860a1453601424294f25fa7bcaa76
https://github.com/LeoMaximal/RepVGG/tree/1e2e7bde551860a1453601424294f25fa7bcaa76
ClampExp
import torch import torch.utils.data class ClampExp(torch.nn.Module): """ Nonlinearity min(exp(lam * x), 1) """ def __init__(self): """ Constructor :param lam: Lambda parameter """ super(ClampExp, self).__init__() def forward(self, x): one = torch....
import torch import triton import triton.language as tl from torch._inductor.runtime.triton_heuristics import grid from torch._C import _cuda_getCurrentRawStream as get_raw_stream from torch._inductor.runtime import triton_helpers from torch._inductor.runtime.triton_helpers import math as tl_math import torch.utils.dat...
pkulwj1994/normalizing-flows
ClampExp
false
16,255
[ "MIT" ]
96
326321c4aea4a3f6ab703f82e21277a79cd7d9e4
https://github.com/pkulwj1994/normalizing-flows/tree/326321c4aea4a3f6ab703f82e21277a79cd7d9e4
ASPP
# 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...
SimonCqk/towhee
ASPP
false
9,654
[ "Apache-2.0" ]
0
a187833b1411216106a80a71e6f2c6e68e1be330
https://github.com/SimonCqk/towhee/tree/a187833b1411216106a80a71e6f2c6e68e1be330
Unit3D
import torch import torch.nn as nn import torch.nn.functional as F class Unit3D(nn.Module): def __init__(self, in_channels, output_channels, kernel_shape=(1, 1, 1), stride=(1, 1, 1), padding='spatial_valid', activation_fn=F.relu, use_batch_norm=False, use_bias=False): """Initializes Unit3...
import torch from torch._inductor.select_algorithm import extern_kernels import triton import triton.language 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 ...
TencentYoutuResearch/ActionDetection-AFSD
Unit3D
false
14,466
[ "BSD-3-Clause" ]
112
ed86a0df91e58baa7d78c796ed29cff82b1f3fa6
https://github.com/TencentYoutuResearch/ActionDetection-AFSD/tree/ed86a0df91e58baa7d78c796ed29cff82b1f3fa6
FastGuidedFilter
# 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 import nn from tor...
HyeongminMoon/copy-paste-aug
FastGuidedFilter
false
11,492
[ "MIT" ]
0
38fcd770d70b5d4291de0cbb42073b37d7188537
https://github.com/HyeongminMoon/copy-paste-aug/tree/38fcd770d70b5d4291de0cbb42073b37d7188537
CutMixCrossEntropyLoss
from torch.nn import Module import torch from torch.nn.modules.module import Module import torch.nn.parallel import torch.optim import torch.utils.data import torch.utils.data.distributed def cross_entropy(input, target, size_average=True): """ Cross entropy that accepts soft targets Args: pred: pred...
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.nn import M...
bottlenome/cutmix
CutMixCrossEntropyLoss
false
9,791
[ "MIT" ]
0
d18c2bda47e7d1786819420edbb2c8e5ad43385f
https://github.com/bottlenome/cutmix/tree/d18c2bda47e7d1786819420edbb2c8e5ad43385f
LayerNorm
import torch from torch import nn class LayerNorm(nn.Module): """ Construye la capa de normalización """ def __init__(self, features, eps=1e-06): """ Constructor LayerNorm Parámetros: features: Tamaño del vector eps: Diferencia para la división """ super(LayerNorm, self).__init__...
import torch import triton import triton.language as tl from torch._inductor.runtime.triton_heuristics import grid from torch._C import _cuda_getCurrentRawStream as get_raw_stream from torch._inductor.runtime.triton_helpers import libdevice from torch import nn assert_size_stride = torch._C._dynamo.guards.assert_size_s...
AbeJLazaro/TraductorEspanolOtomi
LayerNorm
false
1,909
[ "MIT" ]
0
75e1558d3b1a7efe9beb3c7d992c3bf1d3d88d0b
https://github.com/AbeJLazaro/TraductorEspanolOtomi/tree/75e1558d3b1a7efe9beb3c7d992c3bf1d3d88d0b
SimpleAvgPool1dModule
import torch import torch.jit import torch.nn.functional as F import torch.onnx import torch.nn class SimpleAvgPool1dModule(torch.nn.Module): def __init__(self, kernel_size, stride=None, padding=0): super(SimpleAvgPool1dModule, self).__init__() self.kernel_size = kernel_size self.padding ...
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
SimpleAvgPool1dModule
false
14,653
[ "Apache-2.0" ]
2,838
a13706a4239fa7eaf059c670dc573e3eb0768f86
https://github.com/YaronBenAtar/glow/tree/a13706a4239fa7eaf059c670dc573e3eb0768f86
Unet
# 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....
royerloic/aydin
Unet
false
16,515
[ "BSD-3-Clause" ]
78
f9c61a24030891d008c318b250da5faec69fcd7d
https://github.com/royerloic/aydin/tree/f9c61a24030891d008c318b250da5faec69fcd7d
LRN
# AOT ID: ['0_inference'] from ctypes import c_void_p, c_long, c_int import torch import math import random import os import tempfile from math import inf, nan from torch._inductor.hooks import run_intermediate_hooks from torch._inductor.utils import maybe_profile from torch._inductor.codegen.memory_planning import _al...
import torch import triton import triton.language as tl from torch._inductor.runtime.triton_heuristics import grid from torch._C import _cuda_getCurrentRawStream as get_raw_stream from torch._inductor.runtime.triton_helpers import libdevice import torch.nn as nn assert_size_stride = torch._C._dynamo.guards.assert_size_...
bruinxiong/BNM
LRN
false
14,985
[ "MIT" ]
252
71d4b8c9beca00e77fcbc62a12b69bb093736a82
https://github.com/bruinxiong/BNM/tree/71d4b8c9beca00e77fcbc62a12b69bb093736a82
Binarizer
import torch from abc import ABC from sklearn.preprocessing import Binarizer class BaseOperator(ABC): """ Abstract class defining the basic structure for operator implementations in Hummingbird. """ def __init__(self, regression=False, classification=False, transformer= False, anomaly_detecti...
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 abc import ABC assert_size_stride = torch._C._dynamo.guards.assert_size_stride empty_strided_cuda = torch._C._dynamo.guards._empty_stri...
hannahaih/hummingbird
Binarizer
false
6,888
[ "MIT" ]
1
b8ec670b3c90ec7e87d3ae4a2b268075bd5eae65
https://github.com/hannahaih/hummingbird/tree/b8ec670b3c90ec7e87d3ae4a2b268075bd5eae65
GCN
# 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....
spacemanidol/CS512DM
GCN
false
4,375
[ "MIT" ]
0
fa664ceb7526e27b9cccd372b65b15c587095c49
https://github.com/spacemanidol/CS512DM/tree/fa664ceb7526e27b9cccd372b65b15c587095c49
ExtResNetBlock
import torch from torch import nn def conv3d(in_channels, out_channels, kernel_size, bias, padding=1): return nn.Conv3d(in_channels, out_channels, kernel_size, padding= padding, bias=bias) def create_conv(in_channels, out_channels, kernel_size, order, num_groups, padding=1): """ Create a lis...
import torch from torch._inductor.select_algorithm import extern_kernels import triton import triton.language 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...
hummat/convolutional_occupancy_networks
ExtResNetBlock
false
3,643
[ "MIT" ]
0
bb351edff59c196e01aa687943e19fee4ac11077
https://github.com/hummat/convolutional_occupancy_networks/tree/bb351edff59c196e01aa687943e19fee4ac11077
MLP
from _paritybench_helpers import _mock_config import math import torch import torch.nn as nn from torch.nn.parameter import Parameter def gelu(x): return 0.5 * x * (1 + torch.tanh(math.sqrt(2 / math.pi) * (x + 0.044715 * torch.pow(x, 3)))) class Conv1D(nn.Module): def __init__(self, nf, nx): ...
import torch from torch._inductor.select_algorithm import extern_kernels import triton import triton.language 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 ...
adi0229/gpt-2-flask-api
MLP
false
14,741
[ "MIT" ]
47
274d836ede9400566777893cea8662e61bbd5d8c
https://github.com/adi0229/gpt-2-flask-api/tree/274d836ede9400566777893cea8662e61bbd5d8c
L2Norm
import torch import torch.nn as nn import torch.nn.init import torch.nn class L2Norm(nn.Module): def __init__(self): super(L2Norm, self).__init__() self.eps = 1e-10 def forward(self, x): norm = torch.sqrt(torch.abs(torch.sum(x * x, dim=1)) + self.eps) x = x / norm.unsqueeze(1...
import torch import triton import triton.language as tl from torch._inductor.runtime.triton_heuristics import grid from torch._C import _cuda_getCurrentRawStream as get_raw_stream from torch._inductor.runtime.triton_helpers import libdevice, math as tl_math import torch.nn as nn import torch.nn.init import torch.nn ass...
rdguez-mariano/affnet
L2Norm
false
16,314
[ "MIT" ]
211
a3f0bb32d9001d1daf024f38d29867f37816ea78
https://github.com/rdguez-mariano/affnet/tree/a3f0bb32d9001d1daf024f38d29867f37816ea78
NormKLLoss
# AOT ID: ['0_inference'] from ctypes import c_void_p, c_long, c_int import torch import math import random import os import tempfile from math import inf, nan from torch._inductor.hooks import run_intermediate_hooks from torch._inductor.utils import maybe_profile from torch._inductor.codegen.memory_planning import _al...
import torch import triton import triton.language as tl from torch._inductor.runtime.triton_heuristics import grid from torch._C import _cuda_getCurrentRawStream as get_raw_stream from torch._inductor.runtime.triton_helpers import math as tl_math import torch.utils.data import torch.nn.init from torch.nn.modules.loss i...
msft-shahins/ConvLab-2
NormKLLoss
false
12,805
[ "Apache-2.0" ]
0
ad74c0e9e021916f9330af11e046ed72914b7740
https://github.com/msft-shahins/ConvLab-2/tree/ad74c0e9e021916f9330af11e046ed72914b7740
Skew
import torch import torch.nn as nn import torch.quantization import torch.onnx import torch.nn.parallel import torch.utils.data import torch.fx import torch.nn import torch.optim import torch.profiler class Skew(nn.Module): def forward(self, X): A = X.triu(1) return A - A.transpose(-1, -2) d...
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 import torch.onnx import torch.nn.parallel import torch.utils.data import torch.fx import to...
Lezcano/tutorials
Skew
false
5,512
[ "BSD-3-Clause" ]
1
24946b2e6d3d825afed6b35c1c4d618a70a88be8
https://github.com/Lezcano/tutorials/tree/24946b2e6d3d825afed6b35c1c4d618a70a88be8
MaxMarginRankingLoss
# 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 numpy as np import torch as th assert_size_stride = torch._C._dynamo.guards.assert...
HS310164/howto100m
MaxMarginRankingLoss
false
11,457
[ "Apache-2.0" ]
0
e3952a77c268466de2b9174ae8983c528b91397d
https://github.com/HS310164/howto100m/tree/e3952a77c268466de2b9174ae8983c528b91397d
group
import torch from torch import nn class mfm(nn.Module): def __init__(self, in_channels, out_channels, kernel_size=3, stride=1, padding=1, type=1): super(mfm, self).__init__() self.out_channels = out_channels if type == 1: self.filter = nn.Conv2d(in_channels, 2 * out_ch...
import torch from torch._inductor.select_algorithm import extern_kernels import triton import triton.language 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...
AnimeshKoratana/blurryface
group
false
57
[ "Apache-2.0" ]
0
c6cb5feec02f6d5af3acb1678336800390715d65
https://github.com/AnimeshKoratana/blurryface/tree/c6cb5feec02f6d5af3acb1678336800390715d65
Sum
# AOT ID: ['0_inference'] from ctypes import c_void_p, c_long, c_int import torch import math import random import os import tempfile from math import inf, nan from torch._inductor.hooks import run_intermediate_hooks from torch._inductor.utils import maybe_profile from torch._inductor.codegen.memory_planning import _al...
import torch import triton import triton.language as tl from torch._inductor.runtime.triton_heuristics import grid from torch._C import _cuda_getCurrentRawStream as get_raw_stream import torch.nn as nn import torch.onnx assert_size_stride = torch._C._dynamo.guards.assert_size_stride empty_strided_cuda = torch._C._dynam...
DDGRCF/YOLOX_OBB
Sum
false
7,963
[ "Apache-2.0" ]
39
27b80953306492b8bc83b86b1353d8cee01ef9b6
https://github.com/DDGRCF/YOLOX_OBB/tree/27b80953306492b8bc83b86b1353d8cee01ef9b6
MLSTM_cell
import torch import torch.nn as nn from torch.autograd import Variable class MLSTM_cell(nn.Module): def __init__(self, input_size, hidden_size, K, output_size): super(MLSTM_cell, self).__init__() self.hidden_size = hidden_size self.K = K self.output_size = output_size self...
import torch from torch._inductor.select_algorithm import extern_kernels import triton import triton.language as tl from torch._inductor.runtime.triton_heuristics import grid from torch._C import _cuda_getCurrentRawStream as get_raw_stream from torch._inductor.runtime.triton_helpers import libdevice import torch.nn as ...
Gladys-Zhao/mRNN-mLSTM
MLSTM_cell
false
8,280
[ "BSD-3-Clause" ]
15
23499f237ea8b0f68c96f756fbf0f4028836e64c
https://github.com/Gladys-Zhao/mRNN-mLSTM/tree/23499f237ea8b0f68c96f756fbf0f4028836e64c
DilConv1dWithGLU
# 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 ...
icyray/proGENTRL
DilConv1dWithGLU
false
6,880
[ "MIT" ]
1
c48305c3411ecb604c4f26f5e6b62f285e42e696
https://github.com/icyray/proGENTRL/tree/c48305c3411ecb604c4f26f5e6b62f285e42e696
Model
import torch from torch import nn class Model(nn.Module): def forward(self, img: 'torch.Tensor', scale: 'torch.Tensor', mean: 'torch.Tensor'): return torch.div(torch.sub(img, mean), scale) def get_inputs(): return [torch.rand([4, 4, 4, 4]), torch.rand([4, 4, 4, 4]), torch.rand( [4, ...
import torch import triton import triton.language as tl from torch._inductor.runtime.triton_heuristics import grid from torch._C import _cuda_getCurrentRawStream as get_raw_stream from torch import nn assert_size_stride = torch._C._dynamo.guards.assert_size_stride empty_strided_cuda = torch._C._dynamo.guards._empty_str...
ibaiGorordo/depthai-experiments
Model
false
6,846
[ "MIT" ]
1
cde67e277120ddac815cbad6360695759cca900f
https://github.com/ibaiGorordo/depthai-experiments/tree/cde67e277120ddac815cbad6360695759cca900f
GraphConvolution
# AOT ID: ['0_forward'] from ctypes import c_void_p, c_long, c_int import torch import math import random import os import tempfile from math import inf, nan from torch._inductor.hooks import run_intermediate_hooks from torch._inductor.utils import maybe_profile from torch._inductor.codegen.memory_planning import _alig...
import torch from torch._inductor.select_algorithm import extern_kernels import triton import triton.language as tl from torch._inductor.runtime.triton_heuristics import grid from torch._C import _cuda_getCurrentRawStream as get_raw_stream from torch.nn import Module import torch.autograd import torch.nn as nn from tor...
SowmyaAitha/Palmira
GraphConvolution
false
17,940
[ "MIT" ]
6
c3ae884e35b8b3703a5e4ba52d7b0bdae6da1bad
https://github.com/SowmyaAitha/Palmira/tree/c3ae884e35b8b3703a5e4ba52d7b0bdae6da1bad
global_avg_pool2d
# 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...
DevBruce/torch-implementation
global_avg_pool2d
false
11,338
[ "MIT" ]
0
73bb481e67c8dee7dfe8081c1049b1f4b62ce159
https://github.com/DevBruce/torch-implementation/tree/73bb481e67c8dee7dfe8081c1049b1f4b62ce159
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 import torch.utils.data from torch import nn assert_size_stride = torch._C._dynamo.guards.assert_size_stride empty_strided_cuda = torch._C._...
GOPIKA-0204/Clothing-Detection-and-Recolouring
GlobalAvgPool2d
false
9,052
[ "MIT" ]
0
b5d436a981b854228314729b41874f31948a33ba
https://github.com/GOPIKA-0204/Clothing-Detection-and-Recolouring/tree/b5d436a981b854228314729b41874f31948a33ba
BasicBlock
import torch import torch.nn as nn import torch.nn.functional as F from torch.nn.utils import weight_norm import torch.utils.data def conv3x3(in_planes, out_planes, stride=1): """3x3 convolution with padding""" return nn.Conv2d(in_planes, out_planes, kernel_size=3, stride=stride, padding=0, bias=True)...
import torch from torch._inductor.select_algorithm import extern_kernels import triton import triton.language as tl from torch._inductor.runtime.triton_heuristics import grid from torch._C import _cuda_getCurrentRawStream as get_raw_stream from torch._inductor.runtime.triton_helpers import math as tl_math import torch....
JaguAroo/SRResCGAN
BasicBlock
false
625
[ "MIT" ]
0
9aac612aff631f7fb9142e0a36de9559cfc1a62d
https://github.com/JaguAroo/SRResCGAN/tree/9aac612aff631f7fb9142e0a36de9559cfc1a62d
Encoder
import torch import numpy as np import torch.nn as nn import torch.nn.functional as F from collections import OrderedDict import torch.optim import torch._utils import torch.nn def drop_path(x, drop_prob: 'float'=0.0, training: 'bool'=False): """Drop paths (Stochastic Depth) per sample (when applied in main path ...
import torch from torch._inductor.select_algorithm import extern_kernels import triton import triton.language 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....
ModelTC/EOD
Encoder
false
14,089
[ "Apache-2.0" ]
196
164bff80486e9ae6a095a97667b365c46ceabd86
https://github.com/ModelTC/EOD/tree/164bff80486e9ae6a095a97667b365c46ceabd86
BasicBlock
import torch from torch import nn import torch.nn def conv3x3(in_planes, out_planes, stride=1, dilation=1): return nn.Conv2d(in_planes, out_planes, kernel_size=3, stride=stride, padding=dilation, dilation=dilation, bias=False) class BasicBlock(nn.Module): expansion = 1 def __init__(self, inplan...
import torch from torch._inductor.select_algorithm import extern_kernels import triton import triton.language 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...
Jack12xl/scene-representation-networks
BasicBlock
false
595
[ "MIT" ]
0
2691b23c956cf188a1fe4c84a888b19871cac8f4
https://github.com/Jack12xl/scene-representation-networks/tree/2691b23c956cf188a1fe4c84a888b19871cac8f4
WeightedFeatureFusion
import torch import torch.nn as nn class WeightedFeatureFusion(nn.Module): def __init__(self, layers, weight=False): super(WeightedFeatureFusion, self).__init__() self.layers = layers self.weight = weight self.n = len(layers) + 1 if weight: self.w = nn.Paramete...
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...
Royzon/YOLOV4_MCMOT
WeightedFeatureFusion
false
14,322
[ "MIT" ]
94
cd4c8b1b60f9cf809579609caa29d408432845ba
https://github.com/Royzon/YOLOV4_MCMOT/tree/cd4c8b1b60f9cf809579609caa29d408432845ba
SelfAttentionPooling
import torch import torch.nn as nn class SelfAttentionPooling(nn.Module): """ Implementation of SelfAttentionPooling Original Paper: Self-Attention Encoding and Pooling for Speaker Recognition https://arxiv.org/pdf/2008.01077v1.pdf """ def __init__(self, input_dim): super(SelfAttentio...
import torch from torch._inductor.select_algorithm import extern_kernels import triton import triton.language 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....
RayTzeng/s3m-membership-inference
SelfAttentionPooling
false
17,848
[ "MIT" ]
9
ec1ed9438afc4fd3d7a55fd10e6065d2ecc861c4
https://github.com/RayTzeng/s3m-membership-inference/tree/ec1ed9438afc4fd3d7a55fd10e6065d2ecc861c4
GradientReversalLayer
import torch import torch.nn as nn class GradientReversalFunction(torch.autograd.Function): """ From: https://github.com/jvanvugt/pytorch-domain-adaptation/blob/cb65581f20b71ff9883dd2435b2275a1fd4b90df/utils.py#L26 Gradient Reversal Layer from: Unsupervised Domain Adaptation by Backpropagation (G...
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...
CZSLwithCVAE/CZSL_CVAE
GradientReversalLayer
false
17,051
[ "MIT" ]
5
b77d40f7efde96d2512ac15ebe592ef56b13f2e3
https://github.com/CZSLwithCVAE/CZSL_CVAE/tree/b77d40f7efde96d2512ac15ebe592ef56b13f2e3
IDiv
# 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 @triton.jit def triton_poi_fused_div_0(in_ptr0, in_ptr1, out_ptr1, xnumel,...
Akababa/torch2trt
IDiv
false
18,424
[ "MIT" ]
2
03063b74a7eb40f5aac88d49be6b8b5e4e4e92d7
https://github.com/Akababa/torch2trt/tree/03063b74a7eb40f5aac88d49be6b8b5e4e4e92d7
ParentChildClassifier
import torch from torch import nn class ParentChildClassifier(nn.Module): def __init__(self, parent_dim, child_short_dim, child_full_dim, hidden_dim ): super(ParentChildClassifier, self).__init__() if child_full_dim is not None: self.hidden = nn.Linear(parent_dim + child_short...
import torch from torch._inductor.select_algorithm import extern_kernels import triton import triton.language 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....
YilunZhou/wikihow-embedding
ParentChildClassifier
false
18,135
[ "MIT" ]
8
bfbcaf6aca854cd7e0dedfd5ecf77627138e8425
https://github.com/YilunZhou/wikihow-embedding/tree/bfbcaf6aca854cd7e0dedfd5ecf77627138e8425
MetaBilinear
import re import torch import warnings import torch.nn as nn import torch.nn.functional as F from collections import OrderedDict class MetaModule(nn.Module): """ Base class for PyTorch meta-learning modules. These modules accept an additional argument `params` in their `forward` method. Notes ---...
import torch import triton import triton.language as tl from torch._inductor.runtime.triton_heuristics import grid from torch._C import _cuda_getCurrentRawStream as get_raw_stream import re import warnings import torch.nn as nn from collections import OrderedDict assert_size_stride = torch._C._dynamo.guards.assert_size...
SDivakarBhat/pytorch-meta
MetaBilinear
false
11,860
[ "MIT" ]
0
74cbc8ae625d85c6b954aad159ccb26b523b2240
https://github.com/SDivakarBhat/pytorch-meta/tree/74cbc8ae625d85c6b954aad159ccb26b523b2240
LayerScaling
import torch import torch.nn as nn import torch.nn.parallel import torch.optim import torch.utils.data import torch.utils.data.distributed class LayerScaling(nn.Module): """Scales inputs by the second moment for the entire layer. .. math:: y = \\frac{x}{\\sqrt{\\mathrm{E}[x^2] + \\epsilon}} Args...
import torch import triton import triton.language as tl from torch._inductor.runtime.triton_heuristics import grid from torch._C import _cuda_getCurrentRawStream as get_raw_stream from torch._inductor.runtime.triton_helpers import libdevice import torch.nn as nn import torch.nn.parallel import torch.optim import torch....
Ajk4/online-normalization
LayerScaling
false
8,826
[ "BSD-3-Clause" ]
0
84895855fb8b099ad8c1266dc325bec41d72ecf5
https://github.com/Ajk4/online-normalization/tree/84895855fb8b099ad8c1266dc325bec41d72ecf5
DenseBlock
# 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 assert_size_stride = torch...
Linfeng-Tang/SeAFusion
DenseBlock
false
8,506
[ "MIT" ]
18
54cf7ee116da3f726941560279bf12fedd0d434d
https://github.com/Linfeng-Tang/SeAFusion/tree/54cf7ee116da3f726941560279bf12fedd0d434d
F_fully_convolutional
# 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...
Xenovortex/INN_Embedding_Classification
F_fully_convolutional
false
1,266
[ "MIT" ]
0
df31ec3dcf70780cae5140a69ffafdd64f218e5f
https://github.com/Xenovortex/INN_Embedding_Classification/tree/df31ec3dcf70780cae5140a69ffafdd64f218e5f
MaxPoolStride1
import torch import torch.nn as nn import torch.nn.functional as F import torch.utils.data class MaxPoolStride1(nn.Module): def __init__(self): super(MaxPoolStride1, self).__init__() def forward(self, x): x = F.max_pool2d(F.pad(x, (0, 1, 0, 1), mode='replicate'), 2, stride=1) return ...
import torch import triton import triton.language as tl from torch._inductor.runtime.triton_heuristics import grid from torch._C import _cuda_getCurrentRawStream as get_raw_stream from torch._inductor.runtime import triton_helpers import torch.nn as nn import torch.utils.data assert_size_stride = torch._C._dynamo.guard...
AP-EPFL/DA-segmentation-driven-pose
MaxPoolStride1
false
4,763
[ "MIT" ]
1
451b8ee3619b16db152ac37ba2b64f7ebf5e2832
https://github.com/AP-EPFL/DA-segmentation-driven-pose/tree/451b8ee3619b16db152ac37ba2b64f7ebf5e2832
ACNetwork
import torch import torch.nn as nn import torch.nn.functional as F class ACNetwork(nn.Module): def __init__(self, input_size, action_size): super(ACNetwork, self).__init__() self.fc1 = nn.Linear(input_size, 256) self.fc2 = nn.Linear(256, 256) self.logits_p = nn.Linear(256, action_...
import torch from torch._inductor.select_algorithm import extern_kernels import triton import triton.language 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_...
NeuralFlux/rl-analysis
ACNetwork
false
5,655
[ "MIT" ]
1
bb45e1f8bb9da4683cce4bd0a5e687770a4005e2
https://github.com/NeuralFlux/rl-analysis/tree/bb45e1f8bb9da4683cce4bd0a5e687770a4005e2
MulScalarNegative
# 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 from torch.quantization import QuantStub from torch.quantization import DeQuantStub assert_size_stride = torch._C._dyn...
T-head-Semi/tvm
MulScalarNegative
false
17,967
[ "Apache-2.0" ]
4
c1b8e06685c92fb7cacbe989e147b0622aee4503
https://github.com/T-head-Semi/tvm/tree/c1b8e06685c92fb7cacbe989e147b0622aee4503
Atan
# AOT ID: ['0_inference'] from ctypes import c_void_p, c_long, c_int import torch import math import random import os import tempfile from math import inf, nan from torch._inductor.hooks import run_intermediate_hooks from torch._inductor.utils import maybe_profile from torch._inductor.codegen.memory_planning import _al...
import torch import triton import triton.language as tl from torch._inductor.runtime.triton_heuristics import grid from torch._C import _cuda_getCurrentRawStream as get_raw_stream from torch._inductor.runtime.triton_helpers import libdevice import torch.nn as nn assert_size_stride = torch._C._dynamo.guards.assert_size_...
awlange/pysurvival
Atan
false
14,916
[ "Apache-2.0" ]
242
841b9bc6ce700ba8898d2a1488aa9cd25ee7a8e6
https://github.com/awlange/pysurvival/tree/841b9bc6ce700ba8898d2a1488aa9cd25ee7a8e6
SuperpointDecoder
# 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_...
B1ueber2y/SOLD2
SuperpointDecoder
false
11,271
[ "MIT" ]
0
f85ca5387ea7464314614c3fb4d07af5678a9de3
https://github.com/B1ueber2y/SOLD2/tree/f85ca5387ea7464314614c3fb4d07af5678a9de3
SplitCosineLinear
# 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....
QIU023/continual-learning-reproduce
SplitCosineLinear
false
9,483
[ "MIT" ]
0
772faa6904b3488fa5deee14f03d86f3b3664a87
https://github.com/QIU023/continual-learning-reproduce/tree/772faa6904b3488fa5deee14f03d86f3b3664a87
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 as nn import torch.utils.data import torch.backends.cudnn assert...
IsaacChanghau/VSLNet
HighLightLayer
false
13,854
[ "MIT" ]
62
3793c625f2e251a5f19a0d59f0c83b12e386f808
https://github.com/IsaacChanghau/VSLNet/tree/3793c625f2e251a5f19a0d59f0c83b12e386f808
UpsamplingBlock
import torch import torch.nn as nn class UpsamplingBlock(nn.Module): def __init__(self, input_nc, output_nc, kernel, stride, pad): """ Single block of upsampling operation Input: - int input_nc : Input number of channels - int output_nc : Output 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 from torch._inductor.runtime import triton_helpers import torch.nn as nn assert_...
Jay2020-01/TextureGAN--Flask
UpsamplingBlock
false
17,484
[ "MIT" ]
5
cddea505b0d66b58d58fb24435f8bae42fd5a852
https://github.com/Jay2020-01/TextureGAN--Flask/tree/cddea505b0d66b58d58fb24435f8bae42fd5a852
InteractingLayer
# 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....
Fanxingye/DeepRS
InteractingLayer
false
14,047
[ "Apache-2.0" ]
1,770
06b98cf2cb2781656805eafc577fbd088f37d17d
https://github.com/Fanxingye/DeepRS/tree/06b98cf2cb2781656805eafc577fbd088f37d17d
MLPNet
import torch import torch.nn as nn import torch.nn.functional as F class MLPNet(nn.Module): def __init__(self): super(MLPNet, self).__init__() self.fc1 = nn.Linear(28 * 28, 500) self.fc2 = nn.Linear(500, 256) self.fc3 = nn.Linear(256, 10) def forward(self, x): x = x.v...
import torch from torch._inductor.select_algorithm import extern_kernels import triton import triton.language 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....
bluebibi/flask_rest
MLPNet
false
12,181
[ "MIT" ]
0
9b1ee876060bca5d97459bb894c73530f66c4c15
https://github.com/bluebibi/flask_rest/tree/9b1ee876060bca5d97459bb894c73530f66c4c15