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
CBOWClassifier
import torch from torch import nn class CBOWClassifier(nn.Module): """ Continuous bag of words classifier. """ def __init__(self, hidden_size, input_size, max_pool, dropout=0.5): """ :param hidden_size: :param input_size: :param max_pool: if true then max pool over wor...
import torch from torch._inductor.select_algorithm import extern_kernels import triton import triton.language 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....
nyu-mll/CoLA-baselines
CBOWClassifier
false
16,233
[ "MIT" ]
54
dd095d3646ed05a315280aaa8ed4ec84ba435b3e
https://github.com/nyu-mll/CoLA-baselines/tree/dd095d3646ed05a315280aaa8ed4ec84ba435b3e
EncoderImagePrecomp
# 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 ...
AndresPMD/semantic_adaptive_margin
EncoderImagePrecomp
false
7,662
[ "Apache-2.0" ]
12
1e8bf2f1836498c48df030cb0a967b72b52e8460
https://github.com/AndresPMD/semantic_adaptive_margin/tree/1e8bf2f1836498c48df030cb0a967b72b52e8460
GaussianSmearing
import torch import torch.nn as nn class GaussianSmearing(nn.Module): def __init__(self, in_features, start=0, end=1, num_freqs=50): super(GaussianSmearing, self).__init__() self.num_freqs = num_freqs offset = torch.linspace(start, end, num_freqs) self.coeff = -0.5 / (offset[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 math as tl_math import torch.nn as nn assert_size_stride = torch._C._dynamo.guards.assert...
CGruich/ocp
GaussianSmearing
false
11,253
[ "MIT", "BSD-3-Clause" ]
0
dd97972b39d4a05e37f745e393a5245657ef5f9e
https://github.com/CGruich/ocp/tree/dd97972b39d4a05e37f745e393a5245657ef5f9e
SimpleErfModule
# 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._...
mciprian13/glow
SimpleErfModule
false
3,992
[ "Apache-2.0" ]
0
90f88205d9bf8baff8df5bbda51c9d138e3e668b
https://github.com/mciprian13/glow/tree/90f88205d9bf8baff8df5bbda51c9d138e3e668b
DistillMSE
import torch from torch import nn import torch.nn.functional as F class DistillMSE(nn.Module): """Distilling the Knowledge in a Neural Network""" def __init__(self): super(DistillMSE, self).__init__() pass def forward(self, y_s, y_t): loss = nn.MSELoss(reduction='mean')(F.softmax...
import torch import triton import triton.language as tl from torch._inductor.runtime.triton_heuristics import grid from torch._C import _cuda_getCurrentRawStream as get_raw_stream from torch._inductor.runtime import triton_helpers from torch._inductor.runtime.triton_helpers import math as tl_math from torch import nn a...
Alibaba-MIIL/HeadSharingKD
DistillMSE
false
7,688
[ "BSD-2-Clause" ]
15
8e2738bf069c7d12ec933f9b9107f267f7b6603a
https://github.com/Alibaba-MIIL/HeadSharingKD/tree/8e2738bf069c7d12ec933f9b9107f267f7b6603a
MaskedConv1d
# 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...
lonePatient/TorchBlocks
MaskedConv1d
false
15,955
[ "MIT" ]
82
4a65d746cc8a396cb7df73ed4644d97ddf843e29
https://github.com/lonePatient/TorchBlocks/tree/4a65d746cc8a396cb7df73ed4644d97ddf843e29
CELossWeightedMasked
import torch import torch.nn as nn class WeightedLoss(nn.Module): def __init__(self): super(WeightedLoss, self).__init__() self.weighted = False def generate_weight_mask(self, mask, to_ignore=None): """ Generates a weight mask where pixel weights are inversely proportional to ...
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 ...
Guangyun-Xu/uois
CELossWeightedMasked
false
13,741
[ "MIT" ]
106
00069af841dd3ea9a86e6e3a89c3b7222240e6e5
https://github.com/Guangyun-Xu/uois/tree/00069af841dd3ea9a86e6e3a89c3b7222240e6e5
BinaryFocalLoss
# 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 ...
VisualComputingInstitute/Person_MinkUNet
BinaryFocalLoss
false
18,041
[ "MIT" ]
4
fa39764245a022740c0a3d8c85026532fff93e74
https://github.com/VisualComputingInstitute/Person_MinkUNet/tree/fa39764245a022740c0a3d8c85026532fff93e74
MaxPool3x3
import torch import torch.nn as nn class MaxPool3x3(nn.Module): """3x3 max pool with no subsampling.""" def __init__(self, in_channels, out_channels, kernel_size=3, stride=1, padding=1): super(MaxPool3x3, self).__init__() self.maxpool = nn.MaxPool2d(kernel_size, stride, 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 from torch._inductor.runtime import triton_helpers import torch.nn as nn assert_size_stride = torch._C._dynamo.guards.assert_size_stride emp...
VascoLopes/GEA
MaxPool3x3
false
18,024
[ "MIT" ]
4
ab80dbb9851dfc215102e5222e8d5f70e855dd15
https://github.com/VascoLopes/GEA/tree/ab80dbb9851dfc215102e5222e8d5f70e855dd15
InnerProductDecoder
# AOT ID: ['0_inference'] from ctypes import c_void_p, c_long, c_int import torch import math import random import os import tempfile from math import inf, nan from torch._inductor.hooks import run_intermediate_hooks from torch._inductor.utils import maybe_profile from torch._inductor.codegen.memory_planning import _al...
import torch from torch._inductor.select_algorithm import extern_kernels import triton import triton.language as tl from torch._inductor.runtime.triton_heuristics import grid from torch._C import _cuda_getCurrentRawStream as get_raw_stream import torch.nn as nn assert_size_stride = torch._C._dynamo.guards.assert_size_s...
LymanSong/suwon_bus_stop_competition
InnerProductDecoder
false
11,660
[ "MIT" ]
0
42297c8cfb0f109f28d8aeead097a57bb5d6be53
https://github.com/LymanSong/suwon_bus_stop_competition/tree/42297c8cfb0f109f28d8aeead097a57bb5d6be53
ConvolutionLayer
import torch import torch.nn as nn class ConvolutionLayer(nn.Module): def __init__(self, channels, filters, kernel_size, stride=1, dilation=1): super(ConvolutionLayer, self).__init__() padding = kernel_size // 2 padding += padding * (dilation - 1) self.conv = nn.Conv1d(channels, 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 import torch.nn as nn assert_size_stride = torch._C._dynamo.guards.assert_size_s...
huak95/attacut
ConvolutionLayer
false
15,537
[ "MIT" ]
54
100333931023cd009daeddec0cba4cdfce3d0b68
https://github.com/huak95/attacut/tree/100333931023cd009daeddec0cba4cdfce3d0b68
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 import nn import torch.nn.functional as F import torch.nn.parallel as...
XDong18/AdelaiDet
GCN
false
12,062
[ "BSD-2-Clause" ]
0
837cd1078923892fe6e84ac29fd0963f1b2c474f
https://github.com/XDong18/AdelaiDet/tree/837cd1078923892fe6e84ac29fd0963f1b2c474f
DICELoss
import torch import torch.nn as nn class DICELoss(nn.Module): def __init__(self): super(DICELoss, self).__init__() def forward(self, output, mask): probs = torch.squeeze(output, 1) mask = torch.squeeze(mask, 1) intersection = probs * mask intersection = torch.sum(inte...
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...
Rehan-Ahmar/UNet-Zoo
DICELoss
false
14,300
[ "MIT" ]
345
630f9290d487fda828e7118a3d953575b27a2686
https://github.com/Rehan-Ahmar/UNet-Zoo/tree/630f9290d487fda828e7118a3d953575b27a2686
MultiheadAttention
from torch.nn import Module import torch from torch.nn import Linear from torch.nn.init import xavier_uniform_ from torch.nn.init import constant_ from torch.nn.init import xavier_normal_ from torch.nn.parameter import Parameter from torch.nn import functional as F class MultiheadAttention(Module): """Allows the ...
import torch from torch._inductor.select_algorithm import extern_kernels import triton import triton.language 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....
Mehrad0711/HUBERT
MultiheadAttention
false
17,714
[ "MIT" ]
3
2f13fd2f7f5a2ec13544f4007158b582ae7408c3
https://github.com/Mehrad0711/HUBERT/tree/2f13fd2f7f5a2ec13544f4007158b582ae7408c3
DistMultLayer
import torch import torch.utils.data import torch.nn as nn class DistMultLayer(nn.Module): def __init__(self): super(DistMultLayer, self).__init__() def forward(self, sub_emb, obj_emb, rel_emb): return torch.sum(sub_emb * obj_emb * rel_emb, dim=-1) def predict(self, sub_emb, obj_emb, re...
import torch import triton import triton.language as tl from torch._inductor.runtime.triton_heuristics import grid from torch._C import _cuda_getCurrentRawStream as get_raw_stream import torch.utils.data import torch.nn as nn assert_size_stride = torch._C._dynamo.guards.assert_size_stride empty_strided_cuda = torch._C....
Brickser/cogdl
DistMultLayer
false
2,262
[ "MIT" ]
0
3952dd11075634cc0f3b669996cfc780635ce026
https://github.com/Brickser/cogdl/tree/3952dd11075634cc0f3b669996cfc780635ce026
DistillationLoss
import torch class DistillationLoss(torch.nn.Module): def __init__(self, temperature: 'float'=1.0): super().__init__() self.temperature = 1.0 def forward(self, student_logits, teacher_logits): teacher_prediction = torch.exp(torch.log_softmax(teacher_logits / self.temperat...
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 assert_size_stride = t...
Gugutse/Poly-Encoder
DistillationLoss
false
9,043
[ "MIT" ]
0
aa3151d5accb240c32ac3d54bc785d904f78fcc7
https://github.com/Gugutse/Poly-Encoder/tree/aa3151d5accb240c32ac3d54bc785d904f78fcc7
Conv2dSame
# AOT ID: ['0_forward'] from ctypes import c_void_p, c_long, c_int import torch import math import random import os import tempfile from math import inf, nan from torch._inductor.hooks import run_intermediate_hooks from torch._inductor.utils import maybe_profile from torch._inductor.codegen.memory_planning import _alig...
import torch from torch._inductor.select_algorithm import extern_kernels import triton import triton.language as tl from torch._inductor.runtime.triton_heuristics import grid from torch._C import _cuda_getCurrentRawStream as get_raw_stream import math from torch import nn from typing import List from typing import Unio...
L-Net-1992/towhee
Conv2dSame
false
13,982
[ "Apache-2.0" ]
365
471de97bf9c5443efaf3b62fd440b3ebdb6d5903
https://github.com/L-Net-1992/towhee/tree/471de97bf9c5443efaf3b62fd440b3ebdb6d5903
FCDiscriminator_Local
# 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_...
gabriel-tjio/ASH
FCDiscriminator_Local
false
15,588
[ "MIT" ]
300
40ae044a7ca1809f91ba89671d223a96eda327da
https://github.com/gabriel-tjio/ASH/tree/40ae044a7ca1809f91ba89671d223a96eda327da
MLP
import torch import torch.nn.functional as F import torch.nn as nn import torch.utils.data def create_all_possible_moves(m, n): """Create all moves on a (m,n) board.""" moves = [] for i in range(m): for j in range(n): moves.append((i, j)) return list(set(moves)) class MLP(nn.Modu...
import torch from torch._inductor.select_algorithm import extern_kernels import triton import triton.language 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....
CoAxLab/azad
MLP
false
17,204
[ "MIT" ]
6
d1498069dd8856e93ae077b34dd7c9f1c7ce80e6
https://github.com/CoAxLab/azad/tree/d1498069dd8856e93ae077b34dd7c9f1c7ce80e6
ConcatSquashLinear
import torch import torch.nn as nn class ConcatSquashLinear(nn.Module): def __init__(self, dim_in, dim_out): super(ConcatSquashLinear, self).__init__() self._layer = nn.Linear(dim_in, dim_out) self._hyper_bias = nn.Linear(1, dim_out, bias=False) self._hyper_gate = nn.Linear(1, dim...
import torch from torch._inductor.select_algorithm import extern_kernels import triton import triton.language as tl from torch._inductor.runtime.triton_heuristics import grid from torch._C import _cuda_getCurrentRawStream as get_raw_stream import torch.nn as nn assert_size_stride = torch._C._dynamo.guards.assert_size_s...
D-hash-code/ffjord-rnode-finalweek-mnist
ConcatSquashLinear
false
2,140
[ "MIT" ]
0
4cabcbadda79c68df53ec25f1f8fe03cfeee78f9
https://github.com/D-hash-code/ffjord-rnode-finalweek-mnist/tree/4cabcbadda79c68df53ec25f1f8fe03cfeee78f9
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 libdevice, math as tl_math import torc...
HexaFarms/MMClassification
FocalLoss
false
11,480
[ "Apache-2.0" ]
0
d61d0448b6bcd2fd4c0a408688f603a53ab16ca2
https://github.com/HexaFarms/MMClassification/tree/d61d0448b6bcd2fd4c0a408688f603a53ab16ca2
Naked
from torch.nn import Module import torch from torch import Tensor class Naked(Module): """Returns a tensor filled with the scalar value zero. Args: out_features (int, default=1): Size of each output sample. Shape: - Input: :math:`(N, *, H_{\\text{in}})` where :math:`*` means an...
import torch import triton import triton.language as tl from torch._inductor.runtime.triton_heuristics import grid from torch._C import _cuda_getCurrentRawStream as get_raw_stream from torch.nn import Module assert_size_stride = torch._C._dynamo.guards.assert_size_stride empty_strided_cuda = torch._C._dynamo.guards._em...
vishalbelsare/pfhedge
Naked
false
16,679
[ "MIT" ]
81
4d7ff173995e0795942bc6ec55f3fdc5bfb7a5f1
https://github.com/vishalbelsare/pfhedge/tree/4d7ff173995e0795942bc6ec55f3fdc5bfb7a5f1
ScaleNorm
# AOT ID: ['0_forward'] from ctypes import c_void_p, c_long, c_int import torch import math import random import os import tempfile from math import inf, nan from torch._inductor.hooks import run_intermediate_hooks from torch._inductor.utils import maybe_profile from torch._inductor.codegen.memory_planning import _alig...
import torch import triton import triton.language as tl from torch._inductor.runtime.triton_heuristics import grid from torch._C import _cuda_getCurrentRawStream as get_raw_stream from torch._inductor.runtime import triton_helpers from torch._inductor.runtime.triton_helpers import libdevice import math import torch.nn ...
QMrpy/deepchem
ScaleNorm
false
2,740
[ "MIT" ]
0
f38a21c71e7bc4fd1fa59601be2b79ce7d744bd6
https://github.com/QMrpy/deepchem/tree/f38a21c71e7bc4fd1fa59601be2b79ce7d744bd6
GradLoss
import torch import torch.nn as nn import torch.utils.data import torch.optim class GradLoss(nn.Module): def __init__(model): super(GradLoss, model).__init__() def forward(model, grad_fake, grad_real): return torch.sum(torch.mean(torch.abs(grad_real - grad_fake))) def get_inputs(): ret...
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 ...
domo23/DeepSFM
GradLoss
false
10,014
[ "BSD-3-Clause" ]
0
9456c1505e63b467417496545f17363ca17d02e4
https://github.com/domo23/DeepSFM/tree/9456c1505e63b467417496545f17363ca17d02e4
NLayerNorm
import torch from torch import Tensor import torch.nn as nn from torch.nn import Parameter class NLayerNorm(nn.Module): def __init__(self, n_features: 'int', d: 'int') ->None: super().__init__() self.weight = Parameter(torch.ones(n_features, d)) self.bias = Parameter(torch.zeros(n_feature...
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 from torch.nn import Parameter assert_size_stride = torch...
Yura52/tabular-dl-num-embeddings
NLayerNorm
false
14,711
[ "MIT" ]
57
e49e95c52f829ad0ab7d653e0776c2a84c03e261
https://github.com/Yura52/tabular-dl-num-embeddings/tree/e49e95c52f829ad0ab7d653e0776c2a84c03e261
GaussianVAE2D
# AOT ID: ['0_forward'] from ctypes import c_void_p, c_long, c_int import torch import math import random import os import tempfile from math import inf, nan from torch._inductor.hooks import run_intermediate_hooks from torch._inductor.utils import maybe_profile from torch._inductor.codegen.memory_planning import _alig...
import torch from torch._inductor.select_algorithm import extern_kernels import triton import triton.language as tl from torch._inductor.runtime.triton_heuristics import grid from torch._C import _cuda_getCurrentRawStream as get_raw_stream from torch._inductor.runtime.triton_helpers import libdevice, math as tl_math im...
ast0414/semit
GaussianVAE2D
false
3,139
[ "MIT" ]
0
c221222ba06f14611e3d030969cdb9f7c17ff98f
https://github.com/ast0414/semit/tree/c221222ba06f14611e3d030969cdb9f7c17ff98f
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 from torch._inductor.runtime import triton_helpers import torch.nn as nn assert_...
finloop/usad
Encoder
false
15,355
[ "BSD-3-Clause" ]
65
5e1bf326af5f1325fa4676a2de978cae6db0481c
https://github.com/finloop/usad/tree/5e1bf326af5f1325fa4676a2de978cae6db0481c
FactorTransfer
import torch from torch import nn import torch.nn.functional as F class FactorTransfer(nn.Module): """Paraphrasing Complex Network: Network Compression via Factor Transfer, NeurIPS 2018""" def __init__(self, p1=2, p2=1): super(FactorTransfer, self).__init__() self.p1 = p1 self.p2 = p2...
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 ...
UBCDingXin/RepDistiller
FactorTransfer
false
14,530
[ "BSD-2-Clause" ]
1,347
dcc043277f2820efafd679ffb82b8e8195b7e222
https://github.com/UBCDingXin/RepDistiller/tree/dcc043277f2820efafd679ffb82b8e8195b7e222
AvgPoolPad
# AOT ID: ['0_inference'] from ctypes import c_void_p, c_long, c_int import torch import math import random import os import tempfile from math import inf, nan from torch._inductor.hooks import run_intermediate_hooks from torch._inductor.utils import maybe_profile from torch._inductor.codegen.memory_planning import _al...
import torch import triton import triton.language as tl from torch._inductor.runtime.triton_heuristics import grid from torch._C import _cuda_getCurrentRawStream as get_raw_stream from torch import nn assert_size_stride = torch._C._dynamo.guards.assert_size_stride empty_strided_cuda = torch._C._dynamo.guards._empty_str...
MarioProjects/pytorchlib
AvgPoolPad
false
5,575
[ "MIT" ]
1
81ea32304d899fbd10ae1efe1d124c0d7bc96f5c
https://github.com/MarioProjects/pytorchlib/tree/81ea32304d899fbd10ae1efe1d124c0d7bc96f5c
WRNUnit
import torch import torch.utils.data import torch.nn as nn def wrn_conv1x1(in_channels, out_channels, stride, activate): """ 1x1 version of the WRN specific convolution block. Parameters: ---------- in_channels : int Number of input channels. out_channels : int Number of outpu...
import torch from torch._inductor.select_algorithm import extern_kernels import triton import triton.language 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...
HyperGAN/imgclsmob
WRNUnit
false
17,691
[ "MIT" ]
9
88b9776a5a927dc9a54e85e31978c4a9ec5ecbf3
https://github.com/HyperGAN/imgclsmob/tree/88b9776a5a927dc9a54e85e31978c4a9ec5ecbf3
MConnBlock
# AOT ID: ['0_forward'] from ctypes import c_void_p, c_long, c_int import torch import math import random import os import tempfile from math import inf, nan from torch._inductor.hooks import run_intermediate_hooks from torch._inductor.utils import maybe_profile from torch._inductor.codegen.memory_planning import _alig...
import torch from torch._inductor.select_algorithm import extern_kernels import triton import triton.language as tl from torch._inductor.runtime.triton_heuristics import grid from torch._C import _cuda_getCurrentRawStream as get_raw_stream import torch.nn as nn import torch.nn.functional as F import torch.cuda import t...
LeeeeoLiu/OpenNMT-py
MConnBlock
false
2,517
[ "MIT" ]
0
9be3a8951e9181aabe5440e4ea98173b7e749b5c
https://github.com/LeeeeoLiu/OpenNMT-py/tree/9be3a8951e9181aabe5440e4ea98173b7e749b5c
Squash
# AOT ID: ['0_inference'] from ctypes import c_void_p, c_long, c_int import torch import math import random import os import tempfile from math import inf, nan from torch._inductor.hooks import run_intermediate_hooks from torch._inductor.utils import maybe_profile from torch._inductor.codegen.memory_planning import _al...
import torch import triton import triton.language as tl from torch._inductor.runtime.triton_heuristics import grid from torch._C import _cuda_getCurrentRawStream as get_raw_stream from torch._inductor.runtime.triton_helpers import libdevice from torch.nn import Module import torch.utils.data import torch.nn.functional ...
techthiyanes/annotated_deep_learning_paper_implementations
Squash
false
16,570
[ "MIT" ]
3,714
8af24da2dd39a9a87482a4d18c2dc829bbd3fd47
https://github.com/techthiyanes/annotated_deep_learning_paper_implementations/tree/8af24da2dd39a9a87482a4d18c2dc829bbd3fd47
LipNormLinear
import torch from torch import nn import torch.nn.functional as F import torch.utils.data.distributed def _max_except_dim(input, dim): maxed = input for axis in range(input.ndimension() - 1, dim, -1): maxed, _ = maxed.max(axis, keepdim=True) for axis in range(dim - 1, -1, -1): maxed, _ = m...
import torch from torch._inductor.select_algorithm import extern_kernels import triton import triton.language as tl from torch._inductor.runtime.triton_heuristics import grid from torch._C import _cuda_getCurrentRawStream as get_raw_stream from torch._inductor.runtime.triton_helpers import math as tl_math from torch im...
rh-ia/color-information
LipNormLinear
false
4,291
[ "MIT" ]
0
e912a1667e4fffb339dbc574c85020ec6cf78b02
https://github.com/rh-ia/color-information/tree/e912a1667e4fffb339dbc574c85020ec6cf78b02
fixed_loss
import torch import torch.nn as nn import torch.nn.functional as F class fixed_loss(nn.Module): def __init__(self): super().__init__() def forward(self, out_image, gt_image, est_noise, gt_noise, if_asym): h_x = est_noise.size()[2] w_x = est_noise.size()[3] count_h = self._ten...
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 ...
delldu/ImageClean
fixed_loss
false
1,824
[ "MIT" ]
0
ffa5b180d36afb3840c6b36c08a767c520068498
https://github.com/delldu/ImageClean/tree/ffa5b180d36afb3840c6b36c08a767c520068498
Atom_Wise_Convolution
# AOT ID: ['0_forward'] from ctypes import c_void_p, c_long, c_int import torch import math import random import os import tempfile from math import inf, nan from torch._inductor.hooks import run_intermediate_hooks from torch._inductor.utils import maybe_profile from torch._inductor.codegen.memory_planning import _alig...
import torch from torch._inductor.select_algorithm import extern_kernels import triton import triton.language as tl from torch._inductor.runtime.triton_heuristics import grid from torch._C import _cuda_getCurrentRawStream as get_raw_stream from torch._inductor.runtime.triton_helpers import libdevice, math as tl_math im...
JoseAntonioSiguenza/deepchem
Atom_Wise_Convolution
false
9,215
[ "MIT" ]
0
05fe1b186ec154e18de9aa1b110e9258dc484e21
https://github.com/JoseAntonioSiguenza/deepchem/tree/05fe1b186ec154e18de9aa1b110e9258dc484e21
JaccardLoss
import torch import torch.nn as nn import torch.utils.data class JaccardLoss(nn.Module): """Jaccard loss. """ def __init__(self, size_average=True, reduce=True, smooth=1.0): super(JaccardLoss, self).__init__() self.smooth = smooth self.reduce = reduce def jaccard_loss(self, p...
import torch import triton import triton.language as tl from torch._inductor.runtime.triton_heuristics import grid from torch._C import _cuda_getCurrentRawStream as get_raw_stream import torch.nn as nn import torch.utils.data assert_size_stride = torch._C._dynamo.guards.assert_size_stride empty_strided_cuda = torch._C....
divyam-goel/pytorch_connectomics
JaccardLoss
false
6,576
[ "MIT" ]
1
a2c70a7cc60fd84d67be6f225c123ff11daadb83
https://github.com/divyam-goel/pytorch_connectomics/tree/a2c70a7cc60fd84d67be6f225c123ff11daadb83
BertAttention
from _paritybench_helpers import _mock_config import math import torch from torch import nn import torch.utils.data class BertLayerNorm(nn.Module): def __init__(self, hidden_size, eps=1e-05): """Construct a layernorm module in the TF style (epsilon inside the square root).""" super(BertLayerNorm,...
import torch from torch._inductor.select_algorithm import extern_kernels import triton import triton.language 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....
zdxdsw/WebQA_VLP
BertAttention
false
11,063
[ "Apache-2.0" ]
0
443bcd7e9b36db47e2ab4502abaaa3724800f394
https://github.com/zdxdsw/WebQA_VLP/tree/443bcd7e9b36db47e2ab4502abaaa3724800f394
Similarity
import torch import torch.nn as nn class Similarity(nn.Module): """ Dot product or cosine similarity """ def __init__(self, temp): super().__init__() self.temp = temp self.cos = nn.CosineSimilarity(dim=-1) def forward(self, x, y): return self.cos(x, y) / self.temp...
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...
BDBC-KG-NLP/MixCSE_AAAI2022
Similarity
false
4,884
[ "MIT" ]
1
884145e24a5258c044fedb658df9999f012df875
https://github.com/BDBC-KG-NLP/MixCSE_AAAI2022/tree/884145e24a5258c044fedb658df9999f012df875
Downsample
import torch import torch.nn as nn import torch.nn.functional as F class Downsample(nn.Module): def __init__(self, in_ch=None, out_ch=None, with_conv=False, fir=False, fir_kernel=(1, 3, 3, 1)): super().__init__() out_ch = out_ch if out_ch else in_ch if not fir: if with...
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...
chen-hao-chao/dlsm
Downsample
false
3,273
[ "Apache-2.0" ]
0
aea88aa7e59a02fe44f25f4de9d6f2eaf044093b
https://github.com/chen-hao-chao/dlsm/tree/aea88aa7e59a02fe44f25f4de9d6f2eaf044093b
ResidualSineLayer
import torch import numpy as np import torch.nn as nn import torch.utils.data class ResidualSineLayer(nn.Module): """ From Lu & Berger 2021, Compressive Neural Representations of Volumetric Scalar Fields https://github.com/matthewberger/neurcomp/blob/main/siren.py """ def __init__(self, features:...
import torch from torch._inductor.select_algorithm import extern_kernels import triton import triton.language as tl from torch._inductor.runtime.triton_heuristics import grid from torch._C import _cuda_getCurrentRawStream as get_raw_stream from torch._inductor.runtime.triton_helpers import math as tl_math import numpy ...
khoehlein/fV-SRN
ResidualSineLayer
false
3,839
[ "MIT" ]
0
601f3e952b090df92e875c233c2c9ca646523948
https://github.com/khoehlein/fV-SRN/tree/601f3e952b090df92e875c233c2c9ca646523948
Conv2d
# AOT ID: ['0_forward'] from ctypes import c_void_p, c_long, c_int import torch import math import random import os import tempfile from math import inf, nan from torch._inductor.hooks import run_intermediate_hooks from torch._inductor.utils import maybe_profile from torch._inductor.codegen.memory_planning import _alig...
import torch from torch._inductor.select_algorithm import extern_kernels import triton import triton.language as tl from torch._inductor.runtime.triton_heuristics import grid from torch._C import _cuda_getCurrentRawStream as get_raw_stream import torch.utils.data assert_size_stride = torch._C._dynamo.guards.assert_size...
AbirKhan96/facebook-detectron2
Conv2d
false
16,865
[ "Apache-2.0" ]
5
6a3bf813353d74bbeb8674e3566e7bbb33eb5c87
https://github.com/AbirKhan96/facebook-detectron2/tree/6a3bf813353d74bbeb8674e3566e7bbb33eb5c87
Discriminator
import torch import torch.nn as nn class Discriminator(nn.Module): def __init__(self, n_in, n_out): super(Discriminator, self).__init__() self.f_k = nn.Bilinear(n_in, n_out, 1) self.sigm = nn.Sigmoid() for m in self.modules(): self.weights_init(m) def weights_init...
import torch import triton import triton.language as tl from torch._inductor.runtime.triton_heuristics import grid from torch._C import _cuda_getCurrentRawStream as get_raw_stream import torch.nn as nn assert_size_stride = torch._C._dynamo.guards.assert_size_stride reinterpret_tensor = torch._C._dynamo.guards._reinterp...
caojiangxia/BiGI
Discriminator
false
14,996
[ "MIT" ]
57
ed54c20523a5b3f295b90a9c08f7c54e8258d04a
https://github.com/caojiangxia/BiGI/tree/ed54c20523a5b3f295b90a9c08f7c54e8258d04a
TransitionUp
# 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...
LPF2020hit/sttr
TransitionUp
false
2,479
[ "Apache-2.0" ]
0
6460951fb29842d3a7c455a9b06708ff61ee36d3
https://github.com/LPF2020hit/sttr/tree/6460951fb29842d3a7c455a9b06708ff61ee36d3
InformedSender
# 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....
vengalraoguttha/EGG
InformedSender
false
16,677
[ "MIT" ]
254
e4f8412f197543ec7f1f00cf89b5a364b038dc57
https://github.com/vengalraoguttha/EGG/tree/e4f8412f197543ec7f1f00cf89b5a364b038dc57
GlobalAttention
import torch import torch.nn as nn import torch.cuda def aeq(*args): """ Assert all arguments have the same value """ arguments = (arg for arg in args) first = next(arguments) assert all(arg == first for arg in arguments ), 'Not all arguments have the same value: ' + str(args) def se...
import torch from torch._inductor.select_algorithm import extern_kernels import triton import triton.language as tl from torch._inductor.runtime.triton_heuristics import grid from torch._C import _cuda_getCurrentRawStream as get_raw_stream from torch._inductor.runtime import triton_helpers from torch._inductor.runtime....
andy-yangz/birnn-decoder-NMT
GlobalAttention
false
1,457
[ "MIT" ]
0
112293f463d93ef0e08cdcb363b908ed9ad5198e
https://github.com/andy-yangz/birnn-decoder-NMT/tree/112293f463d93ef0e08cdcb363b908ed9ad5198e
Upsample
import torch import torch.nn as nn class Upsample(nn.Module): def __init__(self, stride=2): super(Upsample, self).__init__() self.stride = stride def forward(self, x): stride = self.stride assert x.data.dim() == 4 B = x.data.size(0) C = x.data.size(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 import torch.nn as nn assert_size_stride = torch._C._dynamo.guards.assert_size_stride empty_strided_cuda = torch._C._dynamo.guards._empty_st...
AlexRogalskiy/smart-social-distancing
Upsample
false
13,243
[ "Apache-2.0" ]
113
2def6738038035e67ac79fc9b72ba072e190321f
https://github.com/AlexRogalskiy/smart-social-distancing/tree/2def6738038035e67ac79fc9b72ba072e190321f
ResBlock
# AOT ID: ['0_forward'] from ctypes import c_void_p, c_long, c_int import torch import math import random import os import tempfile from math import inf, nan from torch._inductor.hooks import run_intermediate_hooks from torch._inductor.utils import maybe_profile from torch._inductor.codegen.memory_planning import _alig...
import torch from torch._inductor.select_algorithm import extern_kernels import triton import triton.language as tl from torch._inductor.runtime.triton_heuristics import grid from torch._C import _cuda_getCurrentRawStream as get_raw_stream from torch._inductor.runtime import triton_helpers from torch._inductor.runtime....
MaricelaM/torchdiffeq
ResBlock
false
14,010
[ "MIT" ]
4,088
4e070fb687167e53082a91f32e102af7f4521058
https://github.com/MaricelaM/torchdiffeq/tree/4e070fb687167e53082a91f32e102af7f4521058
Transformer
# AOT ID: ['0_forward'] from ctypes import c_void_p, c_long, c_int import torch import math import random import os import tempfile from math import inf, nan from torch._inductor.hooks import run_intermediate_hooks from torch._inductor.utils import maybe_profile from torch._inductor.codegen.memory_planning import _alig...
import torch from torch._inductor.select_algorithm import extern_kernels import triton import triton.language as tl from torch._inductor.runtime.triton_heuristics import grid from torch._C import _cuda_getCurrentRawStream as get_raw_stream from torch._inductor.runtime import triton_helpers from torch._inductor.runtime....
leaderj1001/Synthesizer-Rethinking-Self-Attention-Transformer-Models
Transformer
false
15,885
[ "MIT" ]
58
3ee5829438a8f9c063ae485e77c9ce7649d24139
https://github.com/leaderj1001/Synthesizer-Rethinking-Self-Attention-Transformer-Models/tree/3ee5829438a8f9c063ae485e77c9ce7649d24139
SelfAttentionLayer
# 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....
eldadp100/The-Mesh-Transformer
SelfAttentionLayer
false
6,651
[ "MIT" ]
1
b3ab18f774251feff1093040dfdcf7b836a43505
https://github.com/eldadp100/The-Mesh-Transformer/tree/b3ab18f774251feff1093040dfdcf7b836a43505
DisaggregatedPinballLoss
import torch import torch.nn as nn class DisaggregatedPinballLoss(nn.Module): """ Pinball Loss Computes the pinball loss between y and y_hat. Parameters ---------- y: tensor actual values in torch tensor. y_hat: tensor (same shape as y) predicted values in torch tensor. tau: float, between ...
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...
FedericoGarza/esrnn_torch
DisaggregatedPinballLoss
false
11,423
[ "MIT" ]
0
9f28f38e27dc0ba12cc965e60f7e08e635c8b19d
https://github.com/FedericoGarza/esrnn_torch/tree/9f28f38e27dc0ba12cc965e60f7e08e635c8b19d
Feature
# 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.serialization im...
vis-opt-group/GTANet
Feature
false
4,499
[ "MIT" ]
0
269ff4418ee5f0267987e1fa4c69bda13e5cb00d
https://github.com/vis-opt-group/GTANet/tree/269ff4418ee5f0267987e1fa4c69bda13e5cb00d
DiracInitBlock
import torch import torch.utils.data import torch.nn as nn class DiracInitBlock(nn.Module): """ DiracNetV2 specific initial block. Parameters: ---------- in_channels : int Number of input channels. out_channels : int Number of output channels. """ def __init__(self, i...
import torch from torch._inductor.select_algorithm import extern_kernels import triton import triton.language 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...
HyperGAN/imgclsmob
DiracInitBlock
false
17,671
[ "MIT" ]
9
88b9776a5a927dc9a54e85e31978c4a9ec5ecbf3
https://github.com/HyperGAN/imgclsmob/tree/88b9776a5a927dc9a54e85e31978c4a9ec5ecbf3
ActFirstResBlock
# 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....
hendraet/research-GANwriting
ActFirstResBlock
false
12,498
[ "MIT" ]
0
e62a16529db3037169d9b33ecba5735c99e73bc3
https://github.com/hendraet/research-GANwriting/tree/e62a16529db3037169d9b33ecba5735c99e73bc3
MSELoss
import functools import torch import torch.nn as nn from torch.nn import functional as F import torch.nn.parallel def reduce_loss(loss, reduction): """Reduce loss as specified. Args: loss (Tensor): Elementwise loss tensor. reduction (str): Options are "none", "mean" and "sum". 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 functools import torch.nn as nn from torch.nn import functional as F import torch....
Fanzhongjie/ARFE
MSELoss
false
464
[ "Apache-2.0" ]
0
4b96b8c5bc0895d3d30acec2a490f81a860fe860
https://github.com/Fanzhongjie/ARFE/tree/4b96b8c5bc0895d3d30acec2a490f81a860fe860
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 libdevice, math as tl_math assert_size...
rskmoi/kaggle-imet
FocalLoss
false
7,582
[ "MIT" ]
1
483e9e6dbae5b1d8e023e0812c4b990afca874bc
https://github.com/rskmoi/kaggle-imet/tree/483e9e6dbae5b1d8e023e0812c4b990afca874bc
LossyYCbCr
import torch import torch.nn.parallel import torch.utils.data from torch import nn import torch.fft class LossyYCbCr(nn.Module): def forward(self, rgb: 'torch.Tensor'): return torch.cat([0.299 * rgb[:, 0:1] + 0.587 * rgb[:, 1:2] + 0.114 * rgb[:, 2:3], -0.16875 * rgb[:, 0:1] - 0.33126 * rgb[:,...
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
LossyYCbCr
false
2,623
[ "Apache-2.0" ]
0
a5b8392459e7649cb8a35d09e65bd269d13b5297
https://github.com/KazutakaYamanouchi/bachelor-study/tree/a5b8392459e7649cb8a35d09e65bd269d13b5297
LinearDeepQNetwork
# 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 ...
joaomanojr/tecprog
LinearDeepQNetwork
false
12,617
[ "MIT" ]
0
825ae3dd9f2ddd0bce2d410af7deae8eb5ba3d21
https://github.com/joaomanojr/tecprog/tree/825ae3dd9f2ddd0bce2d410af7deae8eb5ba3d21
SmoothnessLoss
import torch import torch.nn as nn import torch.nn.functional as F class SmoothnessLoss(nn.Module): def __init__(self): super().__init__() def forward(self, pred_label): _n, _c, w, h = pred_label.size() loss = torch.tensor(0.0, device=pred_label.device) for i in range(w - 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 math as tl_math import torch.nn as nn assert_size_stride = torch._C._dynamo.guards.assert...
hologerry/DewarpNet
SmoothnessLoss
false
3,617
[ "MIT" ]
0
b0a11b9fbb98bd124e65d3165ce177d9ebf2e836
https://github.com/hologerry/DewarpNet/tree/b0a11b9fbb98bd124e65d3165ce177d9ebf2e836
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....
Deepest-Project/AlignTTS
TransformerEncoderLayer
false
13,597
[ "MIT" ]
70
ed9c29d845f65ceb44c87f293b2919b9bbc6a6de
https://github.com/Deepest-Project/AlignTTS/tree/ed9c29d845f65ceb44c87f293b2919b9bbc6a6de
ResBlock
import torch from torch import nn import torch.utils.data import torch.autograd class ResBlock(nn.Module): def __init__(self, num_features, use_batch_norm=False): super(ResBlock, self).__init__() self.num_features = num_features self.conv_layer1 = nn.Conv2d(num_features, num_features, ...
import torch from torch._inductor.select_algorithm import extern_kernels import triton import triton.language 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...
HubBucket-Team/annotated_deep_learning_paper_implementations
ResBlock
false
5,312
[ "MIT" ]
1
4a9716b01e336c57739dfdbdd90648276b53c433
https://github.com/HubBucket-Team/annotated_deep_learning_paper_implementations/tree/4a9716b01e336c57739dfdbdd90648276b53c433
NN_logsoftmax
import torch from torch import nn import torch.nn.functional as F class NN_logsoftmax(nn.Module): """Build a new class for the network you want to run, returning log softmax""" def set_parameters(self, initializers): """Set the parameter values obtained from vanilla NN as initializers""" ...
import torch from torch._inductor.select_algorithm import extern_kernels import triton import triton.language 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....
laravomfell/tvd_loss
NN_logsoftmax
false
7,070
[ "MIT" ]
1
b30a925f95985a03ff70bfa40a6ec3662432779d
https://github.com/laravomfell/tvd_loss/tree/b30a925f95985a03ff70bfa40a6ec3662432779d
MOTION_ReplaceBlock_D
# AOT ID: ['0_forward'] from ctypes import c_void_p, c_long, c_int import torch import math import random import os import tempfile from math import inf, nan from torch._inductor.hooks import run_intermediate_hooks from torch._inductor.utils import maybe_profile from torch._inductor.codegen.memory_planning import _alig...
import torch from torch._inductor.select_algorithm import extern_kernels import triton import triton.language as tl from torch._inductor.runtime.triton_heuristics import grid from torch._C import _cuda_getCurrentRawStream as get_raw_stream import torch.nn.parallel import torch.optim import torch import torch.nn as nn a...
RongchangLi/DEN
MOTION_ReplaceBlock_D
false
17,875
[ "MIT" ]
4
f8b744f96a3a68cf0784080ffd561a5279715727
https://github.com/RongchangLi/DEN/tree/f8b744f96a3a68cf0784080ffd561a5279715727
AbsModel
# AOT ID: ['0_inference'] from ctypes import c_void_p, c_long, c_int import torch import math import random import os import tempfile from math import inf, nan from torch._inductor.hooks import run_intermediate_hooks from torch._inductor.utils import maybe_profile from torch._inductor.codegen.memory_planning import _al...
import torch import triton import triton.language as tl from torch._inductor.runtime.triton_heuristics import grid from torch._C import _cuda_getCurrentRawStream as get_raw_stream from torch._inductor.runtime.triton_helpers import math as tl_math from torch.nn import Module from torch import Tensor from torch.nn import...
Ektagavas/avalanche
AbsModel
false
11,448
[ "MIT" ]
0
6671dc748078532709aad07b9e28ad6c903ab12b
https://github.com/Ektagavas/avalanche/tree/6671dc748078532709aad07b9e28ad6c903ab12b
MaxPool
# 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...
SwaggyZhang/Geometry-aware
MaxPool
false
1,104
[ "Apache-2.0" ]
0
a750c00aa2f0bda5160dfdeee2eef5230fd9d993
https://github.com/SwaggyZhang/Geometry-aware/tree/a750c00aa2f0bda5160dfdeee2eef5230fd9d993
Classify
# 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...
Aditya239233/MDP
Classify
false
16,896
[ "MIT" ]
4
87491e1d67e547c11f4bdd5d784d120473429eae
https://github.com/Aditya239233/MDP/tree/87491e1d67e547c11f4bdd5d784d120473429eae
EqualConvTranspose2d
# AOT ID: ['0_forward'] from ctypes import c_void_p, c_long, c_int import torch import math import random import os import tempfile from math import inf, nan from torch._inductor.hooks import run_intermediate_hooks from torch._inductor.utils import maybe_profile from torch._inductor.codegen.memory_planning import _alig...
import torch from torch._inductor.select_algorithm import extern_kernels import triton import triton.language as tl from torch._inductor.runtime.triton_heuristics import grid from torch._C import _cuda_getCurrentRawStream as get_raw_stream import math from torch import nn assert_size_stride = torch._C._dynamo.guards.as...
PeterouZh/CIPS-3D
EqualConvTranspose2d
false
14,169
[ "MIT" ]
308
9b8bfa0fb23f642af042e150ccd70408f9d137c6
https://github.com/PeterouZh/CIPS-3D/tree/9b8bfa0fb23f642af042e150ccd70408f9d137c6
GeneratorLoss
import torch from torch import nn import torch.utils.data import torch class TVLoss(nn.Module): def __init__(self, tv_loss_weight=1): super(TVLoss, self).__init__() self.tv_loss_weight = tv_loss_weight def forward(self, x): batch_size = x.size()[0] h_x = x.size()[2] 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 from torch import nn import torch.utils.data import torch assert_size_stride = torch._C._...
LiFH/MySR
GeneratorLoss
false
768
[ "MIT" ]
0
f6075f8711853aba6f0aae9cef18c5da84abb78c
https://github.com/LiFH/MySR/tree/f6075f8711853aba6f0aae9cef18c5da84abb78c
CMDS_Loss
import torch from torch import nn def Covariance(m, bias=False, rowvar=True, inplace=False): """ Estimate a covariance matrix given data(tensor). Covariance indicates the level to which two variables vary together. If we examine N-dimensional samples, `X = [x_1, x_2, ... x_N]^T`, then the covariance m...
import torch from torch._inductor.select_algorithm import extern_kernels import triton import triton.language 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...
Gustoaxel/Cells_Cycle
CMDS_Loss
false
11,456
[ "MIT" ]
0
d211dea8c05a8d5535e6e72d95c781d6bc02baeb
https://github.com/Gustoaxel/Cells_Cycle/tree/d211dea8c05a8d5535e6e72d95c781d6bc02baeb
LocationLayer
# 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 from torch import nn assert_size_stride = torch._C._dyna...
Charlottecuc/Cross-Lingual-Voice-Cloning
LocationLayer
false
8,897
[ "BSD-3-Clause" ]
0
8bc8ead0ca121d9ef606c46e1ccc42467661ebdc
https://github.com/Charlottecuc/Cross-Lingual-Voice-Cloning/tree/8bc8ead0ca121d9ef606c46e1ccc42467661ebdc
TensorSigmoid
# 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
TensorSigmoid
false
10,530
[ "MIT" ]
0
953d60039e0c81e90eea467c3df2e6e3f7040242
https://github.com/NVIDIA-AI-IOT-private/torch2trt/tree/953d60039e0c81e90eea467c3df2e6e3f7040242
CoFusion
import torch import torch.nn.functional as F import torch.nn as nn class CoFusion(nn.Module): def __init__(self, in_ch, out_ch): super(CoFusion, self).__init__() self.conv1 = nn.Conv2d(in_ch, 64, kernel_size=3, stride=1, padding=1) self.conv2 = nn.Conv2d(64, 64, kernel_size=3, stride=1, p...
import torch from torch._inductor.select_algorithm import extern_kernels import triton import triton.language as tl from torch._inductor.runtime.triton_heuristics import grid from torch._C import _cuda_getCurrentRawStream as get_raw_stream from torch._inductor.runtime import triton_helpers from torch._inductor.runtime....
cordob/DexiNed
CoFusion
false
10,023
[ "MIT" ]
0
9e084652f8051155c98277c02eecefa927bfe04c
https://github.com/cordob/DexiNed/tree/9e084652f8051155c98277c02eecefa927bfe04c
MultiHeadSelfAttention
# 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 numpy ...
limhj159/NewsRecommendation
MultiHeadSelfAttention
false
15,913
[ "MIT" ]
125
5d19566b63b6cf35b5be0c2b175c5050e51f57b8
https://github.com/limhj159/NewsRecommendation/tree/5d19566b63b6cf35b5be0c2b175c5050e51f57b8
AddBroadcastPosEmbed
import torch import torch.nn as nn def tensor_slice(x, begin, size): assert all([(b >= 0) for b in begin]) size = [(l - b if s == -1 else s) for s, b, l in zip(size, begin, x.shape)] assert all([(s >= 0) for s in size]) slices = [slice(b, b + s) for b, s in zip(begin, size)] return x[slices] cla...
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...
pointoflight/VideoGPT
AddBroadcastPosEmbed
false
7,483
[ "MIT" ]
1
85f19d8cb0d251238f295f0294e69b9299c13e21
https://github.com/pointoflight/VideoGPT/tree/85f19d8cb0d251238f295f0294e69b9299c13e21
RUM
# 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....
omri123/rotational-unit-of-memory
RUM
false
16,262
[ "MIT" ]
82
e796c841e1e837df09497ba77c3bc285db47d02d
https://github.com/omri123/rotational-unit-of-memory/tree/e796c841e1e837df09497ba77c3bc285db47d02d
IDPredictor
# 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...
JasonQSY/Associative3D
IDPredictor
false
8,350
[ "MIT" ]
25
c50818b593ec48c38ed7ee3e109c23531089da32
https://github.com/JasonQSY/Associative3D/tree/c50818b593ec48c38ed7ee3e109c23531089da32
Attention
# AOT ID: ['0_forward'] from ctypes import c_void_p, c_long, c_int import torch import math import random import os import tempfile from math import inf, nan from torch._inductor.hooks import run_intermediate_hooks from torch._inductor.utils import maybe_profile from torch._inductor.codegen.memory_planning import _alig...
import torch from torch._inductor.select_algorithm import extern_kernels import triton import triton.language as tl from torch._inductor.runtime.triton_heuristics import grid from torch._C import _cuda_getCurrentRawStream as get_raw_stream from torch._inductor.runtime import triton_helpers from torch._inductor.runtime....
AeroXi/CPM-Generate-Pytorch
Attention
false
8,913
[ "Apache-2.0" ]
0
a1530ad2848a690c6e1557f996fe58538fe86884
https://github.com/AeroXi/CPM-Generate-Pytorch/tree/a1530ad2848a690c6e1557f996fe58538fe86884
OnnxErf
import torch from torch import nn class OnnxToTorchModule: """ Marker class for onnx2torch modules. """ pass class OnnxErf(nn.Module, OnnxToTorchModule): def forward(self, input_tensor: 'torch.Tensor') ->torch.Tensor: return torch.erf(input_tensor) def get_inputs(): return [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 libdevice from torch import nn assert_size_stride = torch._C._dynamo.guards.assert_size_s...
ENOT-AutoDL/onnx2torch
OnnxErf
false
13,616
[ "Apache-2.0" ]
144
2391987b3349bed1670ac3c1bc9062a37323abe3
https://github.com/ENOT-AutoDL/onnx2torch/tree/2391987b3349bed1670ac3c1bc9062a37323abe3
DomainAdaptationLayer
# 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...
Muntasir13/Face-Spoofing-Detection-using-Depth-Wise-Convolution
DomainAdaptationLayer
false
2,695
[ "MIT" ]
0
f5b1b5d2ad2f29286afbc14e98075534b572c555
https://github.com/Muntasir13/Face-Spoofing-Detection-using-Depth-Wise-Convolution/tree/f5b1b5d2ad2f29286afbc14e98075534b572c555
GATModelVAE
# AOT ID: ['0_forward'] from ctypes import c_void_p, c_long, c_int import torch import math import random import os import tempfile from math import inf, nan from torch._inductor.hooks import run_intermediate_hooks from torch._inductor.utils import maybe_profile from torch._inductor.codegen.memory_planning import _alig...
import torch from torch import device from torch._inductor.select_algorithm import extern_kernels import triton import triton.language as tl from torch._inductor.runtime.triton_heuristics import grid from torch._C import _cuda_getCurrentRawStream as get_raw_stream from torch._inductor.runtime import triton_helpers from...
jiangnanboy/gcn_for_prediction_of_protein_interactions
GATModelVAE
false
6,970
[ "Apache-2.0" ]
1
b2a9eb06cdfe0971d0c352299db1075ec4827dd9
https://github.com/jiangnanboy/gcn_for_prediction_of_protein_interactions/tree/b2a9eb06cdfe0971d0c352299db1075ec4827dd9
Classification
import torch import torch.nn as nn import torch.nn.functional as F class Classification(torch.nn.Module): def __init__(self, num_class, hidden_dim): super(Classification, self).__init__() self.num_class = num_class self.label = nn.Linear(hidden_dim, num_class) def forward(self, input...
import torch from torch._inductor.select_algorithm import extern_kernels import triton import triton.language as tl from torch._inductor.runtime.triton_heuristics import grid from torch._C import _cuda_getCurrentRawStream as get_raw_stream from torch._inductor.runtime import triton_helpers from torch._inductor.runtime....
bentherien/measevalcompetition
Classification
false
1,539
[ "MIT" ]
0
1d285991eb26403682a633a728629a9900923d80
https://github.com/bentherien/measevalcompetition/tree/1d285991eb26403682a633a728629a9900923d80
BasicModel_MaxPool_ReLU
import torch import torch.nn as nn class BasicModel_MaxPool_ReLU(nn.Module): def __init__(self, inplace=False) ->None: super().__init__() self.maxpool = nn.MaxPool1d(3) self.relu = nn.ReLU(inplace=inplace) def forward(self, x): return self.relu(self.maxpool(x)).sum(dim=1) 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 from torch._inductor.runtime import triton_helpers import torch.nn as nn assert_size_stride = torch._C._dynamo.guards.assert_size_stride emp...
sagnik/captum
BasicModel_MaxPool_ReLU
false
4,348
[ "BSD-3-Clause" ]
0
d6b663745ee6c01f072a4358233dec381324c283
https://github.com/sagnik/captum/tree/d6b663745ee6c01f072a4358233dec381324c283
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...
Alan-Paul/ECN
Normalize
false
11,147
[ "Apache-2.0" ]
0
5e9a9081ff0c1e36cc0381df3ce9038a79a537e9
https://github.com/Alan-Paul/ECN/tree/5e9a9081ff0c1e36cc0381df3ce9038a79a537e9
Projection
# AOT ID: ['0_inference'] from ctypes import c_void_p, c_long, c_int import torch import math import random import os import tempfile from math import inf, nan from torch._inductor.hooks import run_intermediate_hooks from torch._inductor.utils import maybe_profile from torch._inductor.codegen.memory_planning import _al...
import torch import triton import triton.language as tl from torch._inductor.runtime.triton_heuristics import grid from torch._C import _cuda_getCurrentRawStream as get_raw_stream from typing import Tuple assert_size_stride = torch._C._dynamo.guards.assert_size_stride empty_strided_cuda = torch._C._dynamo.guards._empty...
kpoeppel/pytorch_probgraph
Projection
false
15,851
[ "BSD-3-Clause" ]
47
b78595ab03bbe92595ad2f6b35f5dd8bf84d6da0
https://github.com/kpoeppel/pytorch_probgraph/tree/b78595ab03bbe92595ad2f6b35f5dd8bf84d6da0
softmaxtripletLoss
# AOT ID: ['0_inference'] from ctypes import c_void_p, c_long, c_int import torch import math import random import os import tempfile from math import inf, nan from torch._inductor.hooks import run_intermediate_hooks from torch._inductor.utils import maybe_profile from torch._inductor.codegen.memory_planning import _al...
import torch import triton import triton.language as tl from torch._inductor.runtime.triton_heuristics import grid from torch._C import _cuda_getCurrentRawStream as get_raw_stream from torch._inductor.runtime import triton_helpers from torch._inductor.runtime.triton_helpers import libdevice, math as tl_math import torc...
MingzheWu418/plastering
softmaxtripletLoss
false
9,327
[ "MIT" ]
0
322531e934c3acf2ecc8f520b37a6d255b9959c2
https://github.com/MingzheWu418/plastering/tree/322531e934c3acf2ecc8f520b37a6d255b9959c2
linear_module
# AOT ID: ['0_forward'] from ctypes import c_void_p, c_long, c_int import torch import math import random import os import tempfile from math import inf, nan from torch._inductor.hooks import run_intermediate_hooks from torch._inductor.utils import maybe_profile from torch._inductor.codegen.memory_planning import _alig...
import torch import triton import triton.language as tl from torch._inductor.runtime.triton_heuristics import grid from torch._C import _cuda_getCurrentRawStream as get_raw_stream from torch._inductor.runtime.triton_helpers import math as tl_math import torch.nn as nn assert_size_stride = torch._C._dynamo.guards.assert...
yelingqun/toolkit_demos
linear_module
false
10,971
[ "MIT" ]
0
12dd9431b2e306312c3b6059356be9a91b68409a
https://github.com/yelingqun/toolkit_demos/tree/12dd9431b2e306312c3b6059356be9a91b68409a
DiceLoss
import torch import torch.nn as nn import torch.nn.parallel class DiceLoss(nn.Module): def __init__(self): super(DiceLoss, self).__init__() self.smooth = 1.0 def forward(self, y_pred, y_true): assert y_pred.size() == y_true.size() y_pred = y_pred[:, 0].contiguous().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 import torch.nn as nn import torch.nn.parallel assert_size_stride = torch._C._dynamo.guards.assert_size_stride empty_strided_cuda = torch._C...
mkoivi-ms/unet-pytorch-azureml
DiceLoss
false
16,095
[ "MIT" ]
517
f0fa5b15cfad19f6b04bb309a965726c25c39e03
https://github.com/mkoivi-ms/unet-pytorch-azureml/tree/f0fa5b15cfad19f6b04bb309a965726c25c39e03
WSConv2d
# AOT ID: ['0_forward'] from ctypes import c_void_p, c_long, c_int import torch import math import random import os import tempfile from math import inf, nan from torch._inductor.hooks import run_intermediate_hooks from torch._inductor.utils import maybe_profile from torch._inductor.codegen.memory_planning import _alig...
import torch from torch._inductor.select_algorithm import extern_kernels import triton import triton.language as tl from torch._inductor.runtime.triton_heuristics import grid from torch._C import _cuda_getCurrentRawStream as get_raw_stream import torch.nn as nn import torch.utils.data assert_size_stride = torch._C._dyn...
ZonePG/Machine-Learning-Collection
WSConv2d
false
14,727
[ "MIT" ]
3,094
85f1e761fab85b61d4dbd44285d6483b75ba649c
https://github.com/ZonePG/Machine-Learning-Collection/tree/85f1e761fab85b61d4dbd44285d6483b75ba649c
Upsample
import torch import torch.nn as nn class Upsample(nn.Module): def __init__(self, in_channels, with_conv): super().__init__() self.with_conv = with_conv if self.with_conv: self.conv = torch.nn.Conv2d(in_channels, in_channels, kernel_size=3, stride=1, padding=1) ...
import torch from torch._inductor.select_algorithm import extern_kernels import triton import triton.language as tl from torch._inductor.runtime.triton_heuristics import grid from torch._C import _cuda_getCurrentRawStream as get_raw_stream import torch.nn as nn assert_size_stride = torch._C._dynamo.guards.assert_size_s...
AkioHayakawa/SDEdit
Upsample
false
1,938
[ "MIT" ]
0
54d793bc013ea99ae81c539bc559254fa8746e19
https://github.com/AkioHayakawa/SDEdit/tree/54d793bc013ea99ae81c539bc559254fa8746e19
SigmoidRange
# 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 typing import * assert_size_stride = torch._C._dynamo.guards.assert_size_stride empty_strided_cuda = torch._C._dy...
DineshChauhan/fastai_docs
SigmoidRange
false
11,354
[ "Apache-2.0" ]
0
cf4d88073fb6f3ef7331b5360618b8dd95eb9345
https://github.com/DineshChauhan/fastai_docs/tree/cf4d88073fb6f3ef7331b5360618b8dd95eb9345
LinearBlock
import torch from torch import nn from scipy.stats import truncnorm def truncated_normal_(tensor, mean=0.0, std=1.0): values = truncnorm.rvs(-2, 2, size=tensor.shape) values = mean + std * values tensor.copy_(torch.from_numpy(values)) return tensor def fc_init_(module): if hasattr(module, 'weigh...
import torch from torch._inductor.select_algorithm import extern_kernels import triton import triton.language 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....
joemzhao/learn2learn
LinearBlock
false
12,769
[ "MIT" ]
0
e161e0a9e0de513d64315c4ceaf2d8608e4cef4d
https://github.com/joemzhao/learn2learn/tree/e161e0a9e0de513d64315c4ceaf2d8608e4cef4d
FRN
# AOT ID: ['0_forward'] from ctypes import c_void_p, c_long, c_int import torch import math import random import os import tempfile from math import inf, nan from torch._inductor.hooks import run_intermediate_hooks from torch._inductor.utils import maybe_profile from torch._inductor.codegen.memory_planning import _alig...
import torch import triton import triton.language as tl from torch._inductor.runtime.triton_heuristics import grid from torch._C import _cuda_getCurrentRawStream as get_raw_stream from torch._inductor.runtime import triton_helpers from torch._inductor.runtime.triton_helpers import libdevice 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
Biaffine
# AOT ID: ['0_forward'] from ctypes import c_void_p, c_long, c_int import torch import math import random import os import tempfile from math import inf, nan from torch._inductor.hooks import run_intermediate_hooks from torch._inductor.utils import maybe_profile from torch._inductor.codegen.memory_planning import _alig...
import torch from torch._inductor.select_algorithm import extern_kernels import triton import triton.language as tl from torch._inductor.runtime.triton_heuristics import grid from torch._C import _cuda_getCurrentRawStream as get_raw_stream import torch.nn as nn assert_size_stride = torch._C._dynamo.guards.assert_size_s...
tpimentelms/dep-parser
Biaffine
false
10,893
[ "MIT" ]
0
be622cdd9a8b0ba85a28c39129ae2cdbfef03901
https://github.com/tpimentelms/dep-parser/tree/be622cdd9a8b0ba85a28c39129ae2cdbfef03901
ATOCAttentionUnit
# AOT ID: ['0_forward'] from ctypes import c_void_p, c_long, c_int import torch import math import random import os import tempfile from math import inf, nan from torch._inductor.hooks import run_intermediate_hooks from torch._inductor.utils import maybe_profile from torch._inductor.codegen.memory_planning import _alig...
import torch from torch._inductor.select_algorithm import extern_kernels import triton import triton.language as tl from torch._inductor.runtime.triton_heuristics import grid from torch._C import _cuda_getCurrentRawStream as get_raw_stream from torch._inductor.runtime import triton_helpers import torch.nn as nn import ...
Hcnaeg/DI-engine
ATOCAttentionUnit
false
2,377
[ "Apache-2.0" ]
0
aba0c629f87649854091e9e59d948f83962e3e1e
https://github.com/Hcnaeg/DI-engine/tree/aba0c629f87649854091e9e59d948f83962e3e1e
DAInsHead
import torch import torch.utils.data from torchvision.transforms import functional as F from torch import nn import torch.nn.functional as F class DAInsHead(nn.Module): """ Adds a simple Instance-level Domain Classifier head """ def __init__(self, in_channels): """ Arguments: ...
import torch from torch._inductor.select_algorithm import extern_kernels import triton import triton.language as tl from torch._inductor.runtime.triton_heuristics import grid from torch._C import _cuda_getCurrentRawStream as get_raw_stream from torch._inductor.runtime import triton_helpers import torch.utils.data from ...
FengJunJian/Domain-Adaptive-Faster-RCNN-PyTorch
DAInsHead
false
9,318
[ "MIT" ]
0
35aa8d208fec22af8c502f8d6d2f562e857d4175
https://github.com/FengJunJian/Domain-Adaptive-Faster-RCNN-PyTorch/tree/35aa8d208fec22af8c502f8d6d2f562e857d4175
Lowerer
# 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.distributions import torch.utils.data assert_size_stride = torch._C._dynamo....
AlexMeinke/Provable-OOD-Detection
Lowerer
false
7,694
[ "MIT" ]
21
9a132aec994ff718c96b81885736ab866df60d87
https://github.com/AlexMeinke/Provable-OOD-Detection/tree/9a132aec994ff718c96b81885736ab866df60d87
DiceLoss
# 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.utils.data import torch assert_size_stride = torch._C._dynamo.guards.assert_size_stride empty_strided_cud...
ayanglab/HDL
DiceLoss
false
6,305
[ "Apache-2.0" ]
1
5ff778d713331671ffa85e9fb63378d8c0a57769
https://github.com/ayanglab/HDL/tree/5ff778d713331671ffa85e9fb63378d8c0a57769
policy1
import torch import torch.nn as nn class policy1(nn.Module): def __init__(self): super(policy1, self).__init__() self.sm = nn.Softmax(dim=-1) self.actor = nn.Parameter(torch.FloatTensor([-0.35, 0.4, 1])) def forward(self): mu = self.sm(self.actor) return mu def get_...
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 ...
JWongDude/FruitLoops
policy1
false
11,527
[ "MIT" ]
0
f4346d9db16ba619d71ce5bb819f5da08a88a120
https://github.com/JWongDude/FruitLoops/tree/f4346d9db16ba619d71ce5bb819f5da08a88a120
JointL2Loss
# AOT ID: ['0_inference'] from ctypes import c_void_p, c_long, c_int import torch import math import random import os import tempfile from math import inf, nan from torch._inductor.hooks import run_intermediate_hooks from torch._inductor.utils import maybe_profile from torch._inductor.codegen.memory_planning import _al...
import torch import triton import triton.language as tl from torch._inductor.runtime.triton_heuristics import grid from torch._C import _cuda_getCurrentRawStream as get_raw_stream from torch._inductor.runtime import triton_helpers from torch._inductor.runtime.triton_helpers import libdevice import torch.nn as nn import...
dejianwei/HigherA2J
JointL2Loss
false
6,541
[ "MIT" ]
1
655d993d4b835ec58396887a85b68ef506b5df9e
https://github.com/dejianwei/HigherA2J/tree/655d993d4b835ec58396887a85b68ef506b5df9e
ConcatConv2d
import torch import torch.nn as nn import torch.utils.data class ConcatConv2d(nn.Module): def __init__(self, dim_in, dim_out, ksize=3, stride=1, padding=0, dilation=1, groups=1, bias=True, transpose=False): super(ConcatConv2d, self).__init__() module = nn.ConvTranspose2d if transpose else...
import torch from torch._inductor.select_algorithm import extern_kernels import triton import triton.language as tl from torch._inductor.runtime.triton_heuristics import grid from torch._C import _cuda_getCurrentRawStream as get_raw_stream import torch.nn as nn import torch.utils.data assert_size_stride = torch._C._dyn...
Justin-Tan/ffjord
ConcatConv2d
false
700
[ "MIT" ]
0
2caf8a4ff84933672fe0d94255d665b3dd7a6791
https://github.com/Justin-Tan/ffjord/tree/2caf8a4ff84933672fe0d94255d665b3dd7a6791
SmoothCrossEntropyLoss
# AOT ID: ['0_inference'] from ctypes import c_void_p, c_long, c_int import torch import math import random import os import tempfile from math import inf, nan from torch._inductor.hooks import run_intermediate_hooks from torch._inductor.utils import maybe_profile from torch._inductor.codegen.memory_planning import _al...
import torch import triton import triton.language as tl from torch._inductor.runtime.triton_heuristics import grid from torch._C import _cuda_getCurrentRawStream as get_raw_stream from torch._inductor.runtime import triton_helpers from torch._inductor.runtime.triton_helpers import math as tl_math from torch.nn.modules....
cclauss/archai
SmoothCrossEntropyLoss
false
15,006
[ "MIT" ]
344
a5fb8f937f7f1319e3204120803b2a045e9f768b
https://github.com/cclauss/archai/tree/a5fb8f937f7f1319e3204120803b2a045e9f768b