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
ExponentialClass
import torch import torch.cuda import torch.distributed from torch.cuda.amp import autocast as autocast import torch.utils.data import torch.optim class ExponentialClass(torch.nn.Module): def __init__(self): super(ExponentialClass, self).__init__() def forward(self, x): return torch.exp(x) ...
import torch import triton import triton.language as tl from torch._inductor.runtime.triton_heuristics import grid from torch._C import _cuda_getCurrentRawStream as get_raw_stream from torch._inductor.runtime.triton_helpers import math as tl_math import torch.cuda import torch.distributed from torch.cuda.amp import aut...
MikyasDesta/NeMo
ExponentialClass
false
2,647
[ "Apache-2.0" ]
0
4995477e6ce49de55b123723e42021c9eff8e2c0
https://github.com/MikyasDesta/NeMo/tree/4995477e6ce49de55b123723e42021c9eff8e2c0
TD3Critic
# 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 ...
AkiraHero/rlll
TD3Critic
false
11,179
[ "MIT" ]
0
f86e1105600629d29b8dca7a7483e7dcb8253056
https://github.com/AkiraHero/rlll/tree/f86e1105600629d29b8dca7a7483e7dcb8253056
FocalLoss
# 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 ...
FadedFate/TrackerSiamRPN
FocalLoss
false
5,147
[ "MIT" ]
1
f4156fa4bed9a0ca6c7ac9b653c07e564d8a058d
https://github.com/FadedFate/TrackerSiamRPN/tree/f4156fa4bed9a0ca6c7ac9b653c07e564d8a058d
SmoothCrossEntropyLoss
import torch import torch.nn.functional as F from torch.nn.modules.loss import _WeightedLoss class SmoothCrossEntropyLoss(_WeightedLoss): def __init__(self, weight=None, reduction='mean', smoothing=0.0): super().__init__(weight=weight, reduction=reduction) self.smoothing = smoothing self....
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.modules....
cclauss/archai
SmoothCrossEntropyLoss
false
15,006
[ "MIT" ]
344
a5fb8f937f7f1319e3204120803b2a045e9f768b
https://github.com/cclauss/archai/tree/a5fb8f937f7f1319e3204120803b2a045e9f768b
eca_channel
import torch import torch.nn as nn import torch.utils class eca_channel(nn.Module): def __init__(self, channel, k_size=3): super(eca_channel, self).__init__() self.avg_pool = nn.AdaptiveAvgPool2d(1) self.conv = nn.Conv1d(1, 1, kernel_size=k_size, padding=(k_size - 1 ) // 2, bi...
import torch from torch._inductor.select_algorithm import extern_kernels import 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 assert_size_stride = torch._C._dynamo.g...
closest-git/QuantumFold
eca_channel
false
1,725
[ "Apache-2.0" ]
0
2dc6afa96cdee91b58f66543b440a2d7a8d32a8a
https://github.com/closest-git/QuantumFold/tree/2dc6afa96cdee91b58f66543b440a2d7a8d32a8a
L2Norm
import torch from math import sqrt as sqrt from itertools import product as product import torch.nn as nn import torch.nn.init as init class L2Norm(nn.Module): def __init__(self, n_channels, scale): super(L2Norm, self).__init__() self.n_channels = n_channels self.gamma = scale or None ...
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 math import sqrt as sqrt from itertools import product as product import t...
zhujiagang/realtime-neg
L2Norm
false
13,174
[ "MIT" ]
0
7e228edc5f2d93d0eee7f3880f0b8473d8c71d27
https://github.com/zhujiagang/realtime-neg/tree/7e228edc5f2d93d0eee7f3880f0b8473d8c71d27
SELayer
import torch import torch.utils.data import torch.nn as nn import torch.nn.functional as F import torch.optim import torch.backends.cudnn class SELayer(nn.Module): def __init__(self, in_channels, reduction): super(SELayer, self).__init__() mid_channels = in_channels // reduction self.fc1 ...
import torch from torch._inductor.select_algorithm import extern_kernels import triton import triton.language 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 impor...
CrazyStoneonRoad/pytorch_image_classification
SELayer
false
17,170
[ "MIT" ]
4
1dcf6d0ee8f4a102ca93cc6e5e325a2e9153918b
https://github.com/CrazyStoneonRoad/pytorch_image_classification/tree/1dcf6d0ee8f4a102ca93cc6e5e325a2e9153918b
LinearMask
# 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.optim import torch.nn as nn assert_size_stride = torch._C._dynamo.g...
DMIU-ShELL/deeprl-shell
LinearMask
false
9,019
[ "Apache-2.0" ]
0
a7845ab1c4967ba2af9486625086c3d0b176d293
https://github.com/DMIU-ShELL/deeprl-shell/tree/a7845ab1c4967ba2af9486625086c3d0b176d293
SpatialSoftArgmax
import torch from torch import Tensor import torch.nn as nn import torch.nn.functional as F class SpatialSoftArgmax(nn.Module): """Spatial softmax as defined in `1`_. Concretely, the spatial softmax of each feature map is used to compute a weighted mean of the pixel locations, effectively performing a so...
import torch import triton import triton.language as tl from torch._inductor.runtime.triton_heuristics import grid from torch._C import _cuda_getCurrentRawStream as get_raw_stream from torch._inductor.runtime import triton_helpers from torch._inductor.runtime.triton_helpers import math as tl_math from torch import Tens...
kevinzakka/torchkit
SpatialSoftArgmax
false
15,825
[ "MIT" ]
144
930dba9560d2473406b59b99a474dce1a6621813
https://github.com/kevinzakka/torchkit/tree/930dba9560d2473406b59b99a474dce1a6621813
EncoderLayer
import torch from abc import ABC import torch.nn as nn from torch import matmul class ScaledDotProductAttention(nn.Module, ABC): """ Scaled Dot-Product Attention """ def __init__(self, temperature, attn_dropout=0.1): super().__init__() self.temperature = temperature self.dropout = 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 from torch._inductor.runtime....
superMC5657/transformer
EncoderLayer
false
10,889
[ "MIT" ]
0
b9d9ca3a5f307f6587330a8235e8d5a2a3650510
https://github.com/superMC5657/transformer/tree/b9d9ca3a5f307f6587330a8235e8d5a2a3650510
ReLU
# 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, math as tl_math import numpy as np import torch.nn as nn from numbers import N...
collector-m/LiDAR-MOS
ReLU
false
15,061
[ "MIT" ]
268
7ccbb63b4ee7c40195b35dd0dddd71473fae25b1
https://github.com/collector-m/LiDAR-MOS/tree/7ccbb63b4ee7c40195b35dd0dddd71473fae25b1
ConvBlock
import torch import torch.nn as nn class Conv3x3(nn.Module): """Layer to pad and convolve input """ def __init__(self, in_channels, out_channels, use_refl=True): super(Conv3x3, self).__init__() if use_refl: self.pad = nn.ReflectionPad2d(1) else: self.pad = ...
import torch from torch._inductor.select_algorithm import extern_kernels import triton import triton.language as tl from torch._inductor.runtime.triton_heuristics import grid from torch._C import _cuda_getCurrentRawStream as get_raw_stream from torch._inductor.runtime.triton_helpers import libdevice, math as tl_math im...
minjabenho/image2pcl
ConvBlock
false
7,235
[ "Apache-2.0" ]
1
7e696ee48edae30814d32f32e605ad6cf8bf702c
https://github.com/minjabenho/image2pcl/tree/7e696ee48edae30814d32f32e605ad6cf8bf702c
GPT2Layer
from _paritybench_helpers import _mock_config import torch import torch.nn as nn import torch.nn.functional as F class MultiHeadSelfAttention(nn.Module): def __init__(self, d_ipt: 'int', n_head: 'int', dropout_p: 'float'=0.1): super(MultiHeadSelfAttention, self).__init__() self.qkv_linear = nn.Li...
import torch from torch._inductor.select_algorithm import extern_kernels import triton import triton.language 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....
DunZhang/GPT2SourceCode
GPT2Layer
false
7,627
[ "MIT" ]
1
d598dbae278c93f88469d45ec025da4cfa7d69ee
https://github.com/DunZhang/GPT2SourceCode/tree/d598dbae278c93f88469d45ec025da4cfa7d69ee
DotSelector
# 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 as th from torch...
NagisaZj/RODE
DotSelector
false
11,125
[ "Apache-2.0" ]
0
f7f6831fee58a7910e1d7c3a8ae19cef82ab8d03
https://github.com/NagisaZj/RODE/tree/f7f6831fee58a7910e1d7c3a8ae19cef82ab8d03
GramMSELoss
import torch import torch.utils.data import torch import torch.nn as nn class GramMatrix(nn.Module): def forward(self, input): b, c, h, w = input.size() F = input.view(b, c, h * w) G = torch.bmm(F, F.transpose(1, 2)) G.div_(h * w) return G class GramMSELoss(nn.Module): ...
import torch from torch._inductor.select_algorithm import extern_kernels import triton import triton.language as tl from torch._inductor.runtime.triton_heuristics import grid from torch._C import _cuda_getCurrentRawStream as get_raw_stream from torch._inductor.runtime import triton_helpers import torch.utils.data impor...
ckxy/1d_expan
GramMSELoss
false
6,456
[ "MIT" ]
1
29cc294e0314d738e8e041f34c995fd22f9f980b
https://github.com/ckxy/1d_expan/tree/29cc294e0314d738e8e041f34c995fd22f9f980b
spatial_attn_layer
# 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 ...
zhanzhibingshang/deblurganv2_mirnet
spatial_attn_layer
false
11,045
[ "BSD-3-Clause" ]
0
12fcc94ee0ff33335c557cf46a776a13cae3804b
https://github.com/zhanzhibingshang/deblurganv2_mirnet/tree/12fcc94ee0ff33335c557cf46a776a13cae3804b
Actor1D
# 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....
KuangenZhang/StructuredRL
Actor1D
false
5,458
[ "MIT" ]
1
9b05e5034ff0e045aabf83786efb0859f08e989a
https://github.com/KuangenZhang/StructuredRL/tree/9b05e5034ff0e045aabf83786efb0859f08e989a
CoxPHLoss
# 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, split_scan_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 ...
rohanshad/pycox
CoxPHLoss
false
16,335
[ "BSD-2-Clause" ]
449
5483489d21f3441e53f78f9f8898ce607f41c632
https://github.com/rohanshad/pycox/tree/5483489d21f3441e53f78f9f8898ce607f41c632
dnn_encoder
# 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...
Maitreyapatel/speech-conversion-between-different-modalities
dnn_encoder
false
8,510
[ "MIT" ]
23
f757b487d9e6c20aa4f7d37247ba16f9a967f573
https://github.com/Maitreyapatel/speech-conversion-between-different-modalities/tree/f757b487d9e6c20aa4f7d37247ba16f9a967f573
ANN
# 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....
GopikrishnanSasikumar/Rita
ANN
false
8,192
[ "BSD-3-Clause" ]
17
a9537c863140fc8c212f82b51f3d556e683e5f5a
https://github.com/GopikrishnanSasikumar/Rita/tree/a9537c863140fc8c212f82b51f3d556e683e5f5a
CustomBatchNormManualModule
# 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_...
davide-belli/deep-learning-labs
CustomBatchNormManualModule
false
1,799
[ "MIT" ]
0
1acd37a527711dccdc00c1935724cc5de7c10955
https://github.com/davide-belli/deep-learning-labs/tree/1acd37a527711dccdc00c1935724cc5de7c10955
FCUDown
import torch from torch import nn class FCUDown(nn.Module): def __init__(self, c1, c2, dw_stride): super().__init__() self.conv_project = nn.Conv2d(c1, c2, 1, 1, 0) self.sample_pooling = nn.AvgPool2d(dw_stride, dw_stride) self.ln = nn.LayerNorm(c2) self.act = nn.GELU() ...
import torch from torch._inductor.select_algorithm import extern_kernels import triton import triton.language 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...
sithu31296/image_classification
FCUDown
false
16,471
[ "MIT" ]
57
6b8cbce96100225621cee3166a73e852ba216cc3
https://github.com/sithu31296/image_classification/tree/6b8cbce96100225621cee3166a73e852ba216cc3
VGG16
# 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 numpy as np import tor...
candacelax/1-stage-wseg
VGG16
false
3,367
[ "Apache-2.0" ]
0
7a24791a3a78454e6611399ba55a808491551543
https://github.com/candacelax/1-stage-wseg/tree/7a24791a3a78454e6611399ba55a808491551543
BBoxTransform
import torch import torch.nn as nn import torch.nn.parallel import torch.optim import torch.utils.data import torch.utils.data.distributed class BBoxTransform(nn.Module): def forward(self, anchors, regression): """ decode_box_outputs adapted from https://github.com/google/automl/blob/master/effic...
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.nn.parallel import torch.optim import ...
NHERI-SimCenter/BRAILS
BBoxTransform
false
8,579
[ "BSD-3-Clause" ]
22
ec17bcd000b15cb8c2933728fe2fd1fb190cd852
https://github.com/NHERI-SimCenter/BRAILS/tree/ec17bcd000b15cb8c2933728fe2fd1fb190cd852
_Extraction
import torch from torch import Tensor import torch.onnx.operators def create_max_segment_mask(tensor: 'Tensor', max_segment_length): """ Create max-segment mask. Args: tensor: :math: (N, T, *) where T is target dimension Returns: - max-segment mask: :math:`(N,...
import torch import triton import triton.language as tl from torch._inductor.runtime.triton_heuristics import grid from torch._C import _cuda_getCurrentRawStream as get_raw_stream from torch._inductor.runtime import triton_helpers from torch._inductor.runtime.triton_helpers import libdevice from torch import Tensor imp...
godweiyang/ParaGen
_Extraction
false
15,437
[ "Apache-2.0" ]
50
9665d1244ea38a41fc06b4e0a7f6411985e2221f
https://github.com/godweiyang/ParaGen/tree/9665d1244ea38a41fc06b4e0a7f6411985e2221f
Att
from _paritybench_helpers import _mock_config import torch import torch.nn as nn class Att(nn.Module): def __init__(self, args): super(Att, self).__init__() self._sigmoid = nn.Sigmoid() self._ws1 = nn.Linear(args.video_feature_dim, 1, bias=False) self._init_weights() def _ini...
import torch from torch._inductor.select_algorithm import extern_kernels import 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...
HCShi/IONet
Att
false
18,380
[ "MIT" ]
4
42e3c0455a1ecb610f458e814d7310d685b2be7b
https://github.com/HCShi/IONet/tree/42e3c0455a1ecb610f458e814d7310d685b2be7b
GaussianCriticNet
# 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 numpy as np ...
G-Flor/deeprl
GaussianCriticNet
false
5,179
[ "Apache-2.0" ]
1
aeae2c5d585e5853dc638968b1f090eb60abd351
https://github.com/G-Flor/deeprl/tree/aeae2c5d585e5853dc638968b1f090eb60abd351
MSELoss
import torch import torch.nn as nn import torch.nn.functional as F import torch.nn.parallel import torch.optim import torch.utils.data import torch.utils.data.distributed import torch.onnx def _reduce(x, reduction='elementwise_mean'): if reduction == 'none': return x elif reduction == 'elementwise_mea...
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.parallel import torch.optim import torch.utils.data...
akshayka/gavel
MSELoss
false
14,772
[ "MIT" ]
67
40a22a725f2e70478483e98c9b07c6fc588e0c40
https://github.com/akshayka/gavel/tree/40a22a725f2e70478483e98c9b07c6fc588e0c40
HuberLoss
import torch import torch.nn as nn import torch.utils.data class HuberLoss(nn.Module): def __init__(self, delta=1): super().__init__() self.huber_loss_delta1 = nn.SmoothL1Loss() self.delta = delta def forward(self, x, x_hat): loss = self.huber_loss_delta1(x / self.delta, x_ha...
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 ...
Thibaud-Ardoin/d4rl_evaluations
HuberLoss
false
14,480
[ "Apache-2.0" ]
123
135b23d3aecc234aacaeaaa019fbc7101d9b87ec
https://github.com/Thibaud-Ardoin/d4rl_evaluations/tree/135b23d3aecc234aacaeaaa019fbc7101d9b87ec
MixtureSoftmax
# 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 import torch.nn as nn assert_size_stride = torch._C._dynamo.guards.assert_size_stride empty_strided_cuda = torch._C._dynamo.guards._empty_st...
anuar12/deep_game_theory
MixtureSoftmax
false
6,217
[ "MIT" ]
1
1debe5a498fe5f017f2791965a5e529b0dfb0529
https://github.com/anuar12/deep_game_theory/tree/1debe5a498fe5f017f2791965a5e529b0dfb0529
MmQAHead
from _paritybench_helpers import _mock_config import math import torch import torch.nn as nn def gelu(x): return x * 0.5 * (1.0 + torch.erf(x / math.sqrt(2.0))) class LayerNorm(nn.Module): def __init__(self, hidden_size, eps=1e-12): super(LayerNorm, self).__init__() self.weight = nn.Paramet...
import torch from torch._inductor.select_algorithm import extern_kernels import triton import triton.language 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 ...
MILVLG/rosita
MmQAHead
false
8,768
[ "Apache-2.0" ]
32
13f7e68350a64b4b5b2c44b9fa4e7448bbe7420c
https://github.com/MILVLG/rosita/tree/13f7e68350a64b4b5b2c44b9fa4e7448bbe7420c
MlpAttention
import torch import torch.nn as nn class Self_Attn1D(nn.Module): """ Self attention Layer """ def __init__(self, in_dim, activation, k=8): super(Self_Attn1D, self).__init__() self.chanel_in = in_dim self.activation = activation self.query_conv = nn.Conv1d(in_channels=in_dim, 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 from torch._inductor.runtime.triton_helpers import math as tl_math import torch....
Malta-Lab/IUPE
MlpAttention
false
8,557
[ "MIT" ]
10
44ddf119917538f02bb69509fec7a8314eed419f
https://github.com/Malta-Lab/IUPE/tree/44ddf119917538f02bb69509fec7a8314eed419f
ComposeModel
# 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....
ycsun2017/simple_transfer
ComposeModel
false
4,615
[ "Apache-2.0" ]
0
b807f7a9d818c5586c101f616d190fe9968fabbd
https://github.com/ycsun2017/simple_transfer/tree/b807f7a9d818c5586c101f616d190fe9968fabbd
Hsigmoid
# AOT ID: ['0_inference'] from ctypes import c_void_p, c_long, c_int import torch import math import random import os import tempfile from math import inf, nan from torch._inductor.hooks import run_intermediate_hooks from torch._inductor.utils import maybe_profile from torch._inductor.codegen.memory_planning import _al...
import torch import triton import triton.language as tl from torch._inductor.runtime.triton_heuristics import grid from torch._C import _cuda_getCurrentRawStream as get_raw_stream from torch._inductor.runtime import triton_helpers import torch.nn as nn from torch.quantization import QuantStub from torch.quantization im...
T-head-Semi/tvm
Hsigmoid
false
17,958
[ "Apache-2.0" ]
4
c1b8e06685c92fb7cacbe989e147b0622aee4503
https://github.com/T-head-Semi/tvm/tree/c1b8e06685c92fb7cacbe989e147b0622aee4503
StddevLayer
import torch from torch import nn class StddevLayer(nn.Module): def __init__(self, group_size=4, num_new_features=1): super().__init__() self.group_size = 4 self.num_new_features = 1 def forward(self, x): b, c, h, w = x.shape group_size = min(self.group_size, b) ...
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...
dubtor/EditGAN-Robert
StddevLayer
false
15,231
[ "BSD-2-Clause" ]
110
8e6d80e7647c3536827f11cf0a9abf51c42794b2
https://github.com/dubtor/EditGAN-Robert/tree/8e6d80e7647c3536827f11cf0a9abf51c42794b2
BPRLoss
import torch import torch.nn as nn import torch.nn.functional as F class BPRLoss(nn.Module): def __init__(self): super(BPRLoss, self).__init__() def forward(self, logit): """ Args: logit (BxB): Variable that stores the logits for the items in the mini-batch ...
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...
Ethan-Yys/GRU4REC-pytorch-master
BPRLoss
false
2,207
[ "Apache-2.0" ]
0
175ccb851f881d3506680c459491e76f50aa9898
https://github.com/Ethan-Yys/GRU4REC-pytorch-master/tree/175ccb851f881d3506680c459491e76f50aa9898
Downsample
import torch import torch.nn as nn class Downsample(nn.Module): def __init__(self, in_channels, out_channels): super().__init__() self.conv3d = nn.Conv3d(in_channels, out_channels, kernel_size=3, stride=2, padding=1) self.bn1 = nn.InstanceNorm3d(out_channels, affine=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 import triton_helpers from torch._inductor.runtime....
BCV-Uniandes/SAMA
Downsample
false
116
[ "BSD-3-Clause" ]
0
4c732c71486af17efed17480e363298cb65c851f
https://github.com/BCV-Uniandes/SAMA/tree/4c732c71486af17efed17480e363298cb65c851f
FeedForwardBlock
from _paritybench_helpers import _mock_config import torch import torch.nn as nn import torch.utils import torch.nn.functional as F class PositionwiseFeedForward(nn.Module): def __init__(self, config): super(PositionwiseFeedForward, self).__init__() self.w_1 = nn.Linear(config.d_model, config.d_f...
import torch from torch._inductor.select_algorithm import extern_kernels import triton import triton.language 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....
MSU-MLSys-Lab/CATE
FeedForwardBlock
false
8,584
[ "Apache-2.0" ]
15
654c393d7df888d2c3f3b90f9e6752faa061157e
https://github.com/MSU-MLSys-Lab/CATE/tree/654c393d7df888d2c3f3b90f9e6752faa061157e
Similarity
import torch import torch.nn as nn import torch.nn.parallel import torch.utils.data from torch.nn import functional as F class Similarity(nn.Module): def __init__(self, mem_dim, hidden_dim, num_classes): super(Similarity, self).__init__() self.mem_dim = mem_dim self.hidden_dim = hidden_di...
import torch from torch._inductor.select_algorithm import extern_kernels import triton import triton.language 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....
carol-hsu/relay-bench
Similarity
false
3,272
[ "Apache-2.0" ]
0
0facffedb3cbb0d5f110769a84bba68718cff72b
https://github.com/carol-hsu/relay-bench/tree/0facffedb3cbb0d5f110769a84bba68718cff72b
SegmentationHead
import torch import torch.nn as nn import torch.utils.data.dataloader class SegmentationHead(nn.Module): def __init__(self, descriptor_dimension, num_classes, **kwargs): super().__init__() self.descriptor_dimension = descriptor_dimension self.classifier = nn.Conv2d(in_channels=descriptor_...
import torch from torch._inductor.select_algorithm import extern_kernels import 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.dataloader assert_size_stride = to...
jamt9000/DVE
SegmentationHead
false
15,669
[ "MIT" ]
72
208514419dd1eb0d27ce60876ca836d1ab8c4f4a
https://github.com/jamt9000/DVE/tree/208514419dd1eb0d27ce60876ca836d1ab8c4f4a
myDecoder
import torch import torch.nn.functional as F class myDecoder(torch.nn.Module): def __init__(self, fomSize, romSize): super(myDecoder, self).__init__() self.romSize_ = romSize self.fomSize_ = fomSize self.fc1 = torch.nn.Linear(romSize, 64) self.fc2 = torch.nn.Linear(64, 200...
import torch from torch._inductor.select_algorithm import extern_kernels import triton import triton.language 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 ...
Pressio/pressio4py
myDecoder
false
17,816
[ "Unlicense", "BSD-3-Clause" ]
4
36676dbd112a7c7960ccbf302ff14d4376c819ec
https://github.com/Pressio/pressio4py/tree/36676dbd112a7c7960ccbf302ff14d4376c819ec
ActorDownAction
import torch import torch.nn as nn import torch.nn.functional as F class MLPBase(nn.Module): def __init__(self, num_inputs, num_outputs): super(MLPBase, self).__init__() self.l1 = nn.Linear(num_inputs, 400) self.l2 = nn.Linear(400, 300) self.l3 = nn.Linear(300, num_outputs) d...
import torch from torch._inductor.select_algorithm import extern_kernels import triton import triton.language 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....
yangfanthu/modular-rl
ActorDownAction
false
13,140
[ "BSD-2-Clause" ]
0
25c599bab641a7e732dbaf116cd240fa2358f113
https://github.com/yangfanthu/modular-rl/tree/25c599bab641a7e732dbaf116cd240fa2358f113
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 functools impor...
AtticusJohnson/mmdetection
L1Loss
false
11,222
[ "Apache-2.0" ]
0
d8d89bafcce13d3b32b1fb3366be3bb9830546c2
https://github.com/AtticusJohnson/mmdetection/tree/d8d89bafcce13d3b32b1fb3366be3bb9830546c2
HardSwish
# AOT ID: ['0_inference'] from ctypes import c_void_p, c_long, c_int import torch import math import random import os import tempfile from math import inf, nan from torch._inductor.hooks import run_intermediate_hooks from torch._inductor.utils import maybe_profile from torch._inductor.codegen.memory_planning import _al...
import torch import triton import triton.language as tl from torch._inductor.runtime.triton_heuristics import grid from torch._C import _cuda_getCurrentRawStream as get_raw_stream from torch._inductor.runtime import triton_helpers import torch.nn as nn assert_size_stride = torch._C._dynamo.guards.assert_size_stride emp...
DetectionBLWX/WSDDN.pytorch
HardSwish
false
17,212
[ "MIT" ]
7
05020d9d0445af90ba0af3f095aa12b18e3da7d2
https://github.com/DetectionBLWX/WSDDN.pytorch/tree/05020d9d0445af90ba0af3f095aa12b18e3da7d2
VGGBase
import torch import torchvision import torch.nn as nn import torch.nn.functional as F from itertools import product as product def decimate(tensor, m): """ Decimate a tensor by a factor 'm', i.e. downsample by keeping every 'm'th value. This is used when we convert FC layers to equivalent Convolutional 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 import triton_helpers import torchvision import tor...
ildoonet/ai-starthon-2019
VGGBase
false
15,740
[ "MIT" ]
69
148855adcb731741938a86545a2d3282287f0a50
https://github.com/ildoonet/ai-starthon-2019/tree/148855adcb731741938a86545a2d3282287f0a50
GlobalAvgPool2DBaseline
import torch import torch.nn as nn import torch.optim class GlobalAvgPool2DBaseline(nn.Module): def __init__(self): super(GlobalAvgPool2DBaseline, self).__init__() def forward(self, x): x_pool = torch.mean(x.view(x.size(0), x.size(1), x.size(2) * x.size (3)), dim=2) x_poo...
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.optim assert_size_stride = torch._C._dynamo.guards.assert_size_stride empty_strided_cuda = torch._C._dyna...
Bobholamovic/SimpleCV
GlobalAvgPool2DBaseline
false
7,800
[ "MIT" ]
44
f4edacf088d0155725a469e227de847820bdfa53
https://github.com/Bobholamovic/SimpleCV/tree/f4edacf088d0155725a469e227de847820bdfa53
BCEDiceLoss
import torch from torch import nn as nn def flatten(tensor): """Flattens a given tensor such that the channel axis is first. The shapes are transformed as follows: (N, C, D, H, W) -> (C, N * D * H * W) """ C = tensor.size(1) axis_order = (1, 0) + tuple(range(2, tensor.dim())) transposed...
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 ...
ciubecca/3dunet-cavity
BCEDiceLoss
false
1,717
[ "MIT" ]
0
cfcc827773b18a95d221ab86c1afc5e2f7c30ecb
https://github.com/ciubecca/3dunet-cavity/tree/cfcc827773b18a95d221ab86c1afc5e2f7c30ecb
LossyRGB
# 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.parallel import torch.utils.data from torch import nn import torch.fft assert_size_stride = torch._C._dynamo.guards.assert_s...
KazutakaYamanouchi/bachelor-study
LossyRGB
false
2,625
[ "Apache-2.0" ]
0
a5b8392459e7649cb8a35d09e65bd269d13b5297
https://github.com/KazutakaYamanouchi/bachelor-study/tree/a5b8392459e7649cb8a35d09e65bd269d13b5297
NNSmall
import torch import torch.nn as nn class NNSmall(nn.Module): """ Sammut et. al. benchmark """ def __init__(self, state_dim, output_dim): super(NNSmall, self).__init__() self.fc1 = nn.Linear(state_dim, 128) self.relu1 = nn.ReLU() self.fc2 = nn.Linear(128, 128) s...
import torch from torch._inductor.select_algorithm import extern_kernels import triton import triton.language 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_...
CORE-Robotics-Lab/Personalized_Neural_Trees
NNSmall
false
17,047
[ "MIT" ]
3
3e8dd12fe4fc850be65c96c847eb143ef3bcdc2e
https://github.com/CORE-Robotics-Lab/Personalized_Neural_Trees/tree/3e8dd12fe4fc850be65c96c847eb143ef3bcdc2e
HeatmapLoss
# 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 assert_size_stride = torch._C._dynamo.guards.assert_size_stride empty_strided_cuda = torch._C._dynamo.guards._empty_...
rm-rf-me/Study-stacked-hourglass
HeatmapLoss
false
7,572
[ "BSD-3-Clause" ]
1
48441f0dd5ae3397470c70db0f50ab5576b9d2f2
https://github.com/rm-rf-me/Study-stacked-hourglass/tree/48441f0dd5ae3397470c70db0f50ab5576b9d2f2
MuSigmaEncoder
# 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...
benjaminalt/neural-processes
MuSigmaEncoder
false
14,946
[ "MIT" ]
170
03d4f921fe0598c77787eecc53cbed23e326a5f5
https://github.com/benjaminalt/neural-processes/tree/03d4f921fe0598c77787eecc53cbed23e326a5f5
TinyConvNet2d
import torch class TinyConvNet2d(torch.nn.Module): def __init__(self, in_channels=1, out_channels=1): super().__init__() self.conv1 = torch.nn.Conv2d(in_channels, 16, 1) self.nlin1 = torch.nn.ReLU() self.conv2 = torch.nn.Conv2d(16, 64, 1) self.nlin2 = torch.nn.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 assert_size_stride = torch._C...
FynnBe/tiktorch
TinyConvNet2d
false
11,432
[ "MIT" ]
0
60c6fa9700e7ff73e44338e8755c56c6e8846f2f
https://github.com/FynnBe/tiktorch/tree/60c6fa9700e7ff73e44338e8755c56c6e8846f2f
SyntacticGCN
import torch import torch.nn as nn import torch.nn.functional as F class SyntacticGCN(nn.Module): def __init__(self, input_size, hidden_size, num_labels, bias=True): super(SyntacticGCN, self).__init__() self.input_size = input_size self.hidden_size = hidden_size self.num_labels = ...
import torch from torch._inductor.select_algorithm import extern_kernels import triton import triton.language 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_...
NLP-Discourse-SoochowU/TDDiscourseParser
SyntacticGCN
false
17,732
[ "Apache-2.0" ]
9
2f9c7cef85c564c47b368ee4935caf1fad7c598d
https://github.com/NLP-Discourse-SoochowU/TDDiscourseParser/tree/2f9c7cef85c564c47b368ee4935caf1fad7c598d
Scale
import torch import torch.nn as nn class Scale(nn.Module): def __init__(self, scale=30): super(Scale, self).__init__() self.scale = scale def forward(self, x): return x * self.scale def get_inputs(): return [torch.rand([4, 4, 4, 4])] def get_init_inputs(): return [[], {}]...
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...
MickeyZeng/Data-Visualization
Scale
false
832
[ "MIT" ]
0
c7005d1096545d7a5eb96dd0c9bc13e874d42fa4
https://github.com/MickeyZeng/Data-Visualization/tree/c7005d1096545d7a5eb96dd0c9bc13e874d42fa4
GradientLoss
import torch import torch.nn as nn class GradientLoss(nn.Module): """ L1 loss on the gradient of the picture """ def __init__(self): super(GradientLoss, self).__init__() def forward(self, a): gradient_a_x = torch.abs(a[:, :, :, :-1] - a[:, :, :, 1:]) gradient_a_y = 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.triton_helpers import math as tl_math import torch.nn as nn assert_size_stride = torch._C._dynamo.guards.assert...
GuYuanjie/DeepFusionPrior
GradientLoss
false
5,224
[ "MIT" ]
1
a7126e073ed8c49b6a9a662492b64aaeee56cc01
https://github.com/GuYuanjie/DeepFusionPrior/tree/a7126e073ed8c49b6a9a662492b64aaeee56cc01
LinearActor
# 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...
KuangenZhang/StructuredRL
LinearActor
false
5,448
[ "MIT" ]
1
9b05e5034ff0e045aabf83786efb0859f08e989a
https://github.com/KuangenZhang/StructuredRL/tree/9b05e5034ff0e045aabf83786efb0859f08e989a
MLP
import torch import torch.nn as nn class SharedDropout(nn.Module): """ SharedDropout differs from the vanilla dropout strategy in that the dropout mask is shared across one dimension. Args: p (float): The probability of an element to be zeroed. Default: 0.5. batch_first (b...
import torch from torch._inductor.select_algorithm import extern_kernels import triton import triton.language as tl from torch._inductor.runtime.triton_heuristics import grid from torch._C import _cuda_getCurrentRawStream as get_raw_stream import torch.nn as nn assert_size_stride = torch._C._dynamo.guards.assert_size_s...
ashim95/parser
MLP
false
6,238
[ "MIT" ]
1
61e9cd6bf16dcf1aa2b9d51b3a6c04ed048b3199
https://github.com/ashim95/parser/tree/61e9cd6bf16dcf1aa2b9d51b3a6c04ed048b3199
MetaBilinear
import re import torch import warnings from torch import 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 from torch import nn from collections import OrderedDict assert_size_stride = torch._C._dynamo.guards.assert_size_...
Timothy102/light-field-networks
MetaBilinear
false
14,504
[ "MIT" ]
95
0d2d6099ea1df4332b173fab47e5606d579b4293
https://github.com/Timothy102/light-field-networks/tree/0d2d6099ea1df4332b173fab47e5606d579b4293
SphereMSE
import math import torch from numpy import pi from torch import nn from torch.nn.parameter import Parameter import torch as th from torch.nn import Parameter from functools import * class SphereMSE(nn.Module): def __init__(self, h, w): super(SphereMSE, self).__init__() self.h, self.w = h, w ...
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 math from numpy import pi from torch import nn from torch.nn.parameter import Para...
JaviBite/TFG
SphereMSE
false
2,400
[ "MIT" ]
0
e406580697132f53b63a7c983daaa098af45b52c
https://github.com/JaviBite/TFG/tree/e406580697132f53b63a7c983daaa098af45b52c
ConvNet
import torch import torch.nn as nn class ConvNet(nn.Module): """Standard convolutional net for baseline Architecture: 2 convolutional layers, 3 fully connected layers. """ def __init__(self): super(ConvNet, self).__init__() args = {'stride': 1, 'padding': 1} self.conv1 = nn.Co...
import torch from torch._inductor.select_algorithm import extern_kernels import triton import triton.language as tl from torch._inductor.runtime.triton_heuristics import grid from torch._C import _cuda_getCurrentRawStream as get_raw_stream from torch._inductor.runtime import triton_helpers import torch.nn as nn assert_...
Allen-Z-4230/MoCo-CIFAR10
ConvNet
false
4,877
[ "MIT" ]
1
b2ade575b8ed1e05e32e4ec629acdfee55c8ff41
https://github.com/Allen-Z-4230/MoCo-CIFAR10/tree/b2ade575b8ed1e05e32e4ec629acdfee55c8ff41
RMulInt
# 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...
NVIDIA-AI-IOT-private/torch2trt
RMulInt
false
10,532
[ "MIT" ]
0
953d60039e0c81e90eea467c3df2e6e3f7040242
https://github.com/NVIDIA-AI-IOT-private/torch2trt/tree/953d60039e0c81e90eea467c3df2e6e3f7040242
Normalize
import torch from torch import nn class Normalize(nn.Module): def __init__(self, power=2): super(Normalize, self).__init__() self.power = power def forward(self, x): norm = x.pow(self.power).sum(1, keepdim=True).pow(1.0 / self.power) out = x.div(norm) return out 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.triton_helpers import libdevice from torch import nn assert_size_stride = torch._C._dynamo.guards.assert_size_s...
Electronicshelf/Few-shot-regularization
Normalize
false
405
[ "MIT" ]
0
3fd0fef52684af77a5e574b5d61cfd8dd557b14b
https://github.com/Electronicshelf/Few-shot-regularization/tree/3fd0fef52684af77a5e574b5d61cfd8dd557b14b
AdaptiveCatAvgMaxPool2d
import torch import torch.utils.data import torchvision.transforms.functional as F import torch.nn as nn import torch.nn.functional as F from torch import optim as optim import torch.nn.parallel def adaptive_catavgmax_pool2d(x, output_size=1): x_avg = F.adaptive_avg_pool2d(x, output_size) x_max = F.adaptive_m...
import torch import triton import triton.language as tl from torch._inductor.runtime.triton_heuristics import grid from torch._C import _cuda_getCurrentRawStream as get_raw_stream from torch._inductor.runtime import triton_helpers import torch.utils.data import torchvision.transforms.functional as F import torch.nn as ...
Exir-lxr/crldr-prune-pytorch
AdaptiveCatAvgMaxPool2d
false
2,688
[ "Apache-2.0" ]
0
adeb5e0b24ce66ff9531d4d947f72412c1b5c033
https://github.com/Exir-lxr/crldr-prune-pytorch/tree/adeb5e0b24ce66ff9531d4d947f72412c1b5c033
Critic
import torch import torch.nn as nn import torch.nn.functional as F class Critic(nn.Module): def __init__(self, state_dim, action_dim): super(Critic, self).__init__() self.l1 = nn.Linear(state_dim + action_dim, 256) self.l2 = nn.Linear(256, 256) self.l3 = nn.Linear(256, 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 import torch.nn as nn import ...
clairecw/TD3
Critic
false
1,734
[ "MIT" ]
0
22840c0ee1620086c2495d859be2c3b7a4c70f3f
https://github.com/clairecw/TD3/tree/22840c0ee1620086c2495d859be2c3b7a4c70f3f
PosEnc
# 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 import torch.nn as nn import torch.utils.data import torch.utils from matplotlib import cm as cm from torch.nn.parallel import * from torchv...
CrispyHarder/ppuda
PosEnc
false
806
[ "MIT" ]
0
15950ba297188163eaadd8ab69268ee7f6ffcf2a
https://github.com/CrispyHarder/ppuda/tree/15950ba297188163eaadd8ab69268ee7f6ffcf2a
PositionwiseFeedforward
import torch import torch.nn as nn import torch.nn.functional as F class PositionwiseFeedforward(nn.Module): def __init__(self, hid_dim, pf_dim, dropout): super().__init__() self.hid_dim = hid_dim self.pf_dim = pf_dim self.fc_1 = nn.Conv1d(hid_dim, pf_dim, 1) self.fc_2 = n...
import torch from torch._inductor.select_algorithm import extern_kernels import triton import triton.language 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_...
DingXiangYuanZhiXing/transformerCPI
PositionwiseFeedforward
false
11,353
[ "Apache-2.0" ]
0
1fba6b29f6ddba64bdfb264887307c24fdf5c607
https://github.com/DingXiangYuanZhiXing/transformerCPI/tree/1fba6b29f6ddba64bdfb264887307c24fdf5c607
WeightedMCEFocalloss
import torch import torch.nn.functional import torch.nn as nn import torch.nn.functional as F def centercrop(image, w, h): _nt, _ct, ht, wt = image.size() padw, padh = (wt - w) // 2, (ht - h) // 2 if padw > 0 and padh > 0: image = image[:, :, padh:-padh, padw:-padw] return image class Weight...
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...
HelenGuohx/cv-ferattn-code
WeightedMCEFocalloss
false
5,298
[ "MIT" ]
1
faa9b7850fe2a0f8c08193bb129b5fec4639d616
https://github.com/HelenGuohx/cv-ferattn-code/tree/faa9b7850fe2a0f8c08193bb129b5fec4639d616
AP
import torch import torch.nn as nn class AttentivePooling(nn.Module): """ Implementation of Attentive Pooling """ def __init__(self, input_dim, **kwargs): super(AttentivePooling, self).__init__() self.W_a = nn.Linear(input_dim, input_dim) self.W = nn.Linear(input_dim, 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._inductor.runtime....
gcambara/s3prl
AP
false
15,411
[ "MIT" ]
856
33284ebde3a903ed8604d6dae85669d0174ae1d3
https://github.com/gcambara/s3prl/tree/33284ebde3a903ed8604d6dae85669d0174ae1d3
Attention
import math import torch from torch import nn from torch.nn import functional as F class Attention(nn.Module): def __init__(self, hidden_size): super(Attention, self).__init__() self.hidden_size = hidden_size self.attn = nn.Linear(self.hidden_size * 2, hidden_size) self.v = nn.Par...
import torch from torch._inductor.select_algorithm import extern_kernels import triton import triton.language 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....
ronak-44/smiles-transformer
Attention
false
16,347
[ "MIT" ]
154
8965ca6211da721a8b708d1b3fa567b1bfd907cf
https://github.com/ronak-44/smiles-transformer/tree/8965ca6211da721a8b708d1b3fa567b1bfd907cf
PseudoCoord
import torch import torch.nn as nn import torch.utils.data class PseudoCoord(nn.Module): def __init__(self): super(PseudoCoord, self).__init__() def forward(self, b): """ Input: b: bounding box [batch, num_obj, 4] (x1,y1,x2,y2) Output: pseudo_coord ...
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...
KaihuaTang/VQA2.0-Recent-Approachs-2018.pytorch
PseudoCoord
false
13,933
[ "MIT" ]
298
52e1ba5a7f3b88c617115ccc755e2e7868e8de2b
https://github.com/KaihuaTang/VQA2.0-Recent-Approachs-2018.pytorch/tree/52e1ba5a7f3b88c617115ccc755e2e7868e8de2b
DynamicPreHead
# 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....
huanglf714/COMatchNet
DynamicPreHead
false
6,838
[ "Apache-2.0" ]
1
79023f5be65d354eb9bdac026d7e0d73110bc4aa
https://github.com/huanglf714/COMatchNet/tree/79023f5be65d354eb9bdac026d7e0d73110bc4aa
MaxPoolPad
import torch import torch.nn as nn import torch.nn.init class MaxPoolPad(nn.Module): def __init__(self): super(MaxPoolPad, self).__init__() self.pad = nn.ZeroPad2d((1, 0, 1, 0)) self.pool = nn.MaxPool2d(3, stride=2, padding=1) def forward(self, x): x = self.pad(x) x =...
import torch import triton import triton.language as tl from torch._inductor.runtime.triton_heuristics import grid from torch._C import _cuda_getCurrentRawStream as get_raw_stream from torch._inductor.runtime import triton_helpers import torch.nn as nn import torch.nn.init assert_size_stride = torch._C._dynamo.guards.a...
dowhilefalse/DeOldify
MaxPoolPad
false
12,302
[ "MIT" ]
0
08f012cdbe36e3f8482460f57e1844b361a7fb16
https://github.com/dowhilefalse/DeOldify/tree/08f012cdbe36e3f8482460f57e1844b361a7fb16
VAE
import torch import torch.nn as nn import torch.utils.data from torch.nn import functional as F class VAE(nn.Module): def __init__(self, n_features=24, z_dim=15): super(VAE, self).__init__() self.en1 = nn.Linear(n_features, 200) self.en2 = nn.Linear(200, 100) self.en3 = nn.Linear(...
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.triton_helpers import math...
Autoencoders-compression-anomaly/Various-AEs-Compression-Tensorflow
VAE
false
4,885
[ "Apache-2.0" ]
1
772ba547c2b7d5d90e79382bf4d8a50e4d733210
https://github.com/Autoencoders-compression-anomaly/Various-AEs-Compression-Tensorflow/tree/772ba547c2b7d5d90e79382bf4d8a50e4d733210
HSwish
import torch import torch.nn as nn import torch.nn.functional import torch.nn.parallel import torch.utils.data.distributed class HSwish(nn.Module): """ Applies the Hard-Swish function element-wise. `"Searching for MobileNetV3" <https://arxiv.org/pdf/1905.02244.pdf>`_ Examples: >>> m = Mish() ...
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.parallel import torch.ut...
doansangg/CGAN-PyTorch
HSwish
false
6,584
[ "Apache-2.0" ]
1
941f5bd75102bed7f2eccd7feb9af8e6134af0e4
https://github.com/doansangg/CGAN-PyTorch/tree/941f5bd75102bed7f2eccd7feb9af8e6134af0e4
BinResBlock
# 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_...
NeilDG/SGID-PFF
BinResBlock
false
17,751
[ "MIT" ]
8
e027ac65e63f3c052665290cd0438bb7bdeabf9f
https://github.com/NeilDG/SGID-PFF/tree/e027ac65e63f3c052665290cd0438bb7bdeabf9f
SoftMaxAvgPoolModel
# 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.cuda impo...
quic-kyunggeu/aimet
SoftMaxAvgPoolModel
false
13,208
[ "BSD-3-Clause" ]
0
877835d5aafcef17cf12864124977d3c128d4aca
https://github.com/quic-kyunggeu/aimet/tree/877835d5aafcef17cf12864124977d3c128d4aca
ReduceBranch
# 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...
dnddnjs/pytorch-vision
ReduceBranch
false
15,196
[ "MIT" ]
48
d432b467774f838bef37372d6cff3576c6559803
https://github.com/dnddnjs/pytorch-vision/tree/d432b467774f838bef37372d6cff3576c6559803
Beta
import torch import torch.nn as nn import torch.functional as F import torch.nn.functional as F class BoundedBeta(torch.distributions.Beta): def log_prob(self, x): return super().log_prob((x + 1) / 2) class Beta(nn.Module): def __init__(self, action_dim): super(Beta, 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, math as tl_math import torch.nn as nn assert_size_stride = torch._C._dynamo.gu...
samarth-robo/apex
Beta
false
4,254
[ "MIT" ]
0
db24044acacd0fcd006886eb1677eaa2f2beedad
https://github.com/samarth-robo/apex/tree/db24044acacd0fcd006886eb1677eaa2f2beedad
L2Norm
# 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 from torch.nn import Module ...
CodeLogist/Anti-Spoof_Face_recognitionV2
L2Norm
false
2,107
[ "MIT" ]
0
ca2738f3d07442ffca92e76002ea24b26da39517
https://github.com/CodeLogist/Anti-Spoof_Face_recognitionV2/tree/ca2738f3d07442ffca92e76002ea24b26da39517
GlobalAttentionGeneral
# 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....
Creling/DM-GAN
GlobalAttentionGeneral
false
2,120
[ "MIT" ]
0
ec2ce6d7fae4cf3ba2099b3db09926e544b2b759
https://github.com/Creling/DM-GAN/tree/ec2ce6d7fae4cf3ba2099b3db09926e544b2b759
EncoderLayer
import torch from torch import nn import torch.nn.functional as F from functools import partial class FFN(nn.Module): """ Feed-Forward Network """ def __init__(self, d_inner_hid, d_model, dropout_rate): super(FFN, self).__init__() self.dropout_rate = dropout_rate self.fc1 = 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 from torch._inductor.runtime....
DocYard-ai/UCR
EncoderLayer
false
8,026
[ "Apache-2.0" ]
10
7618aa336f56e71d9fd8cdc2d591e3d138e3dc68
https://github.com/DocYard-ai/UCR/tree/7618aa336f56e71d9fd8cdc2d591e3d138e3dc68
GatedLinearUnit
import torch import torch.nn.functional as F import torch.nn as nn class GatedLinearUnit(nn.Module): """Gated Linear Unit""" def __init__(self, input_size: 'int', hidden_size: 'int'=None, dropout: 'float'=None): super().__init__() if dropout is not None: self.dropout = 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 import torch.nn as nn assert_size_stride = torch._C._dynamo.guards.assert_size_s...
JustinNeumann/pytorch-forecasting
GatedLinearUnit
false
725
[ "MIT" ]
0
4f6e449cb3788b856e66c4283398a5db201aa6ff
https://github.com/JustinNeumann/pytorch-forecasting/tree/4f6e449cb3788b856e66c4283398a5db201aa6ff
AutoEncoder
# 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_...
Xanadu12138/DSCN-superpixels
AutoEncoder
false
18,097
[ "MIT" ]
4
babe16edde9c61699ef203effbfc9f03246765f3
https://github.com/Xanadu12138/DSCN-superpixels/tree/babe16edde9c61699ef203effbfc9f03246765f3
IrisClassifier
import torch import torch.nn as nn import torch.nn.functional as F import torch.onnx class IrisClassifier(nn.Module): def __init__(self): super(IrisClassifier, self).__init__() self.fc1 = nn.Linear(4, 10) self.fc2 = nn.Linear(10, 10) self.fc3 = nn.Linear(10, 3) def forward(se...
import torch from torch._inductor.select_algorithm import extern_kernels import triton import triton.language as tl from torch._inductor.runtime.triton_heuristics import grid from torch._C import _cuda_getCurrentRawStream as get_raw_stream from torch._inductor.runtime import triton_helpers import torch.nn as nn import ...
abhinavthomas/mlflow
IrisClassifier
false
12,036
[ "Apache-2.0" ]
0
1942d788e98e565229615373b4fd6c0899b4026b
https://github.com/abhinavthomas/mlflow/tree/1942d788e98e565229615373b4fd6c0899b4026b
CCCLoss
import torch import torch.nn as nn class CCCLoss(nn.Module): """CCC loss for VA regression """ def __init__(self, reduction='mean', loss_weight=1.0): super().__init__() self.reduction = reduction self.loss_weight = loss_weight def get_name(self): return 'CCC_loss' ...
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...
youqingxiaozhua/ABAW3
CCCLoss
false
11,055
[ "Apache-2.0" ]
0
51ab58ab311ecd6603a8485a45af0dcc39880e69
https://github.com/youqingxiaozhua/ABAW3/tree/51ab58ab311ecd6603a8485a45af0dcc39880e69
ClassHead
# 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 itertools import product as product import torch.nn as nn assert_size_strid...
Jung-Jun-Uk/UNPG
ClassHead
false
17,540
[ "Apache-2.0" ]
7
a6f9c1731a68fc035eb8fe8198f5a5c643825a5b
https://github.com/Jung-Jun-Uk/UNPG/tree/a6f9c1731a68fc035eb8fe8198f5a5c643825a5b
Sine
# 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...
CGruich/ocp
Sine
false
11,251
[ "MIT", "BSD-3-Clause" ]
0
dd97972b39d4a05e37f745e393a5245657ef5f9e
https://github.com/CGruich/ocp/tree/dd97972b39d4a05e37f745e393a5245657ef5f9e
BertLayer
from _paritybench_helpers import _mock_config import torch import torch.nn as nn import torch.nn.functional as F class BertSelfAttention(nn.Module): def __init__(self, config): super().__init__() self.num_attention_heads = config.num_attention_heads self.attention_head_size = int(config.h...
import torch from torch._inductor.select_algorithm import extern_kernels import triton import triton.language as tl from torch._inductor.runtime.triton_heuristics import grid from torch._C import _cuda_getCurrentRawStream as get_raw_stream from torch._inductor.runtime import triton_helpers from torch._inductor.runtime....
SamarthMM/cs769-assignments
BertLayer
false
4,736
[ "MIT" ]
0
bac2ad57c50043608276df8e0f21181ef62696c7
https://github.com/SamarthMM/cs769-assignments/tree/bac2ad57c50043608276df8e0f21181ef62696c7
NextSentencePrediction
# AOT ID: ['0_forward'] from ctypes import c_void_p, c_long, c_int import torch import math import random import os import tempfile from math import inf, nan from torch._inductor.hooks import run_intermediate_hooks from torch._inductor.utils import maybe_profile from torch._inductor.codegen.memory_planning import _alig...
import torch from torch._inductor.select_algorithm import extern_kernels import triton import triton.language as tl from torch._inductor.runtime.triton_heuristics import grid from torch._C import _cuda_getCurrentRawStream as get_raw_stream from torch._inductor.runtime import triton_helpers from torch._inductor.runtime....
SivilTaram/dialogue-utterance-rewriter-pytorch
NextSentencePrediction
false
2,915
[ "MIT" ]
0
92c2254958b7a1ee9199836f7f2236575270983f
https://github.com/SivilTaram/dialogue-utterance-rewriter-pytorch/tree/92c2254958b7a1ee9199836f7f2236575270983f
Discriminator
import torch import torch.nn as nn import torch.nn.functional as F import torch.nn.utils.weight_norm as weightNorm class TReLU(nn.Module): def __init__(self): super(TReLU, self).__init__() self.alpha = nn.Parameter(torch.FloatTensor(1), requires_grad=True) self.alpha.data.fill_(0) de...
import torch from torch._inductor.select_algorithm import extern_kernels import triton import triton.language as tl from torch._inductor.runtime.triton_heuristics import grid from torch._C import _cuda_getCurrentRawStream as get_raw_stream from torch._inductor.runtime import triton_helpers from torch._inductor.runtime....
archiroid003/ICCV2019-LearningToPaint
Discriminator
false
12,134
[ "MIT" ]
0
4b5fc263e4843c159a61e5956956b3f7812693f8
https://github.com/archiroid003/ICCV2019-LearningToPaint/tree/4b5fc263e4843c159a61e5956956b3f7812693f8
Gaussian
import torch from torch import Tensor import torch.utils.tensorboard import torch.utils.data class Gaussian(torch.nn.Module): """Gaussian activation""" def forward(self, x: 'Tensor') ->Tensor: return torch.exp(-x * x) def get_inputs(): return [torch.rand([4, 4, 4, 4])] def get_init_inputs(): ...
import torch import triton import triton.language as tl from torch._inductor.runtime.triton_heuristics import grid from torch._C import _cuda_getCurrentRawStream as get_raw_stream from torch._inductor.runtime.triton_helpers import math as tl_math import torch.utils.tensorboard import torch.utils.data assert_size_stride...
cdever01/torchani
Gaussian
false
4,042
[ "MIT" ]
0
3f7e1347a06422f50010c04a65219e22f2179bfa
https://github.com/cdever01/torchani/tree/3f7e1347a06422f50010c04a65219e22f2179bfa
InvertibleLinearFlow
# 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 typing import Dict from typing import Tuple import torch.nn as nn from torc...
juheeuu/flowseq
InvertibleLinearFlow
false
12,649
[ "Apache-2.0" ]
0
e6e50406656335ff7a2f9ed4bd81d7cc7d1195fb
https://github.com/juheeuu/flowseq/tree/e6e50406656335ff7a2f9ed4bd81d7cc7d1195fb
MyElementwiseModule
# 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.parallel import torch.utils.data import torch.onnx import torch.fx import torch.optim import torch.utils.data.distributed as...
ShuaihuaLu/examples
MyElementwiseModule
false
5,831
[ "BSD-3-Clause" ]
1
2639cf050493df9d3cbf065d45e6025733add0f4
https://github.com/ShuaihuaLu/examples/tree/2639cf050493df9d3cbf065d45e6025733add0f4
Conv2dZeroInit
# AOT ID: ['0_forward'] from ctypes import c_void_p, c_long, c_int import torch import math import random import os import tempfile from math import inf, nan from torch._inductor.hooks import run_intermediate_hooks from torch._inductor.utils import maybe_profile from torch._inductor.codegen.memory_planning import _alig...
import torch from torch._inductor.select_algorithm import extern_kernels import triton import triton.language as tl from torch._inductor.runtime.triton_heuristics import grid from torch._C import _cuda_getCurrentRawStream as get_raw_stream from torch._inductor.runtime.triton_helpers import math as tl_math import torch....
tychovdo/RevGAN
Conv2dZeroInit
false
16,633
[ "BSD-3-Clause" ]
79
2af25e6a8176eaab3d424db45fb6ee2cfc5dc9a3
https://github.com/tychovdo/RevGAN/tree/2af25e6a8176eaab3d424db45fb6ee2cfc5dc9a3
FCChain
import torch import torch.utils.data import torch.nn as nn def _get_activation(activation): valid = ['relu', 'leaky_relu', 'lrelu', 'tanh', 'sigmoid'] assert activation in valid, 'activation should be one of {}'.format(valid) if activation == 'relu': return nn.ReLU(inplace=True) if activation ...
import torch from torch._inductor.select_algorithm import extern_kernels import triton import triton.language as tl from torch._inductor.runtime.triton_heuristics import grid from torch._C import _cuda_getCurrentRawStream as get_raw_stream from torch._inductor.runtime import triton_helpers import torch.utils.data impor...
sutkarsh/ttools
FCChain
false
10,935
[ "MIT" ]
0
a2e5fbf308566c0c54ab9d6ad1d9f8bc63f8fe99
https://github.com/sutkarsh/ttools/tree/a2e5fbf308566c0c54ab9d6ad1d9f8bc63f8fe99
Scale
# 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 import torch.nn as nn from torch.nn.parameter import Parameter from itertools import product as product assert_size_stride = torch._C._dynam...
DongChengdongHangZhou/caffe-to-pytorch
Scale
false
2,227
[ "Apache-2.0" ]
0
5e3104f3aa77d35bad5d2de235b067460c136fd5
https://github.com/DongChengdongHangZhou/caffe-to-pytorch/tree/5e3104f3aa77d35bad5d2de235b067460c136fd5
GCNet
# 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_...
PetarV-/telesign
GCNet
false
17,805
[ "MIT" ]
4
05f58162b7c5fbc3993d320fdbc4d5465dd1c71e
https://github.com/PetarV-/telesign/tree/05f58162b7c5fbc3993d320fdbc4d5465dd1c71e
GatedConv2d
# AOT ID: ['0_forward'] from ctypes import c_void_p, c_long, c_int import torch import math import random import os import tempfile from math import inf, nan from torch._inductor.hooks import run_intermediate_hooks from torch._inductor.utils import maybe_profile from torch._inductor.codegen.memory_planning import _alig...
import torch from torch._inductor.select_algorithm import extern_kernels import triton import triton.language as tl from torch._inductor.runtime.triton_heuristics import grid from torch._C import _cuda_getCurrentRawStream as get_raw_stream import torch.utils.data import torch.nn as nn assert_size_stride = torch._C._dyn...
nicola-decao/M-NAF-experiments-VAE
GatedConv2d
false
4,087
[ "MIT" ]
0
b8e127205e84d94ae50618e95734f20d259f7934
https://github.com/nicola-decao/M-NAF-experiments-VAE/tree/b8e127205e84d94ae50618e95734f20d259f7934
PyramidModule
# 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 torchvision.transforms import * assert_size_stride = ...
arnon-weinberg/Upscale-interpolate-STARnet
PyramidModule
false
12,154
[ "MIT" ]
0
d898d38364a36f4633cfba8f914db20d9b900217
https://github.com/arnon-weinberg/Upscale-interpolate-STARnet/tree/d898d38364a36f4633cfba8f914db20d9b900217
PairwiseRankingLoss
# AOT ID: ['0_inference'] from ctypes import c_void_p, c_long, c_int import torch import math import random import os import tempfile from math import inf, nan from torch._inductor.hooks import run_intermediate_hooks from torch._inductor.utils import maybe_profile from torch._inductor.codegen.memory_planning import _al...
import torch import triton import triton.language as tl from torch._inductor.runtime.triton_heuristics import grid from torch._C import _cuda_getCurrentRawStream as get_raw_stream from torch._inductor.runtime import triton_helpers from torch import nn assert_size_stride = torch._C._dynamo.guards.assert_size_stride empt...
maksimovVva/SentEval
PairwiseRankingLoss
false
10,457
[ "BSD-3-Clause" ]
0
d3aa5f24dd84b48ea476e73f4b59a4e1ace7775c
https://github.com/maksimovVva/SentEval/tree/d3aa5f24dd84b48ea476e73f4b59a4e1ace7775c