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
InceptionA
# 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_...
Hiroaki-Ozaki/modelib-classification
InceptionA
false
17,407
[ "WTFPL" ]
10
11077704cc0bc9a42fc4b94da60b57d31ff0f65c
https://github.com/Hiroaki-Ozaki/modelib-classification/tree/11077704cc0bc9a42fc4b94da60b57d31ff0f65c
AT
# 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 torch.nn as nn import torch._utils from itertools impor...
Capetian/FaceX-Zoo
AT
false
4,959
[ "Apache-2.0" ]
1
029786c40d8aba15d891d33973de25fcd7e5399a
https://github.com/Capetian/FaceX-Zoo/tree/029786c40d8aba15d891d33973de25fcd7e5399a
TemporalPooling
import torch import torch.nn as nn import torch.distributions import torch.nn.parallel import torch.optim import torch.utils.data import torch.utils.data.distributed class TemporalPooling(nn.Module): def __init__(self, frames, kernel_size=3, stride=2, mode='avg'): """ Parameters --------...
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.distributions import torch.nn.parallel import torch.optim import torch.utils.data import torch.utils.data...
IBM/AdaMML
TemporalPooling
false
8,256
[ "Apache-2.0" ]
32
be50c02188e6b31ca3a25f285b1b538c137d3d5c
https://github.com/IBM/AdaMML/tree/be50c02188e6b31ca3a25f285b1b538c137d3d5c
Binarizer
# AOT ID: ['0_forward'] from ctypes import c_void_p, c_long, c_int import torch import math import random import os import tempfile from math import inf, nan from torch._inductor.hooks import run_intermediate_hooks from torch._inductor.utils import maybe_profile from torch._inductor.codegen.memory_planning import _alig...
import torch from torch._inductor.select_algorithm import extern_kernels import triton import triton.language as tl from torch._inductor.runtime.triton_heuristics import grid from torch._C import _cuda_getCurrentRawStream as get_raw_stream from torch._inductor.runtime.triton_helpers import libdevice from torch.autograd...
MeMihir/SuperResCompression
Binarizer
false
5,586
[ "MIT" ]
1
c76bcf6b12d56ce3ad81ebb1b204fc0425f0e633
https://github.com/MeMihir/SuperResCompression/tree/c76bcf6b12d56ce3ad81ebb1b204fc0425f0e633
MyEntLoss
import torch import torch.nn as nn class MyEntLoss(nn.Module): def __init__(self): super().__init__() def forward(self, x): x = torch.nn.Softmax(dim=1)(x) p = x / torch.repeat_interleave(x.sum(dim=1).unsqueeze(-1), repeats =20, dim=1) logp = torch.log2(p) ...
import torch import triton import triton.language as tl from torch._inductor.runtime.triton_heuristics import grid from torch._C import _cuda_getCurrentRawStream as get_raw_stream from torch._inductor.runtime import triton_helpers from torch._inductor.runtime.triton_helpers import libdevice, math as tl_math import torc...
yuantn/MI-AOD
MyEntLoss
false
16,776
[ "Apache-2.0" ]
188
e57114d60f9ce5e43839cdf7068a90ee58092ec8
https://github.com/yuantn/MI-AOD/tree/e57114d60f9ce5e43839cdf7068a90ee58092ec8
RangeNorm2D
import torch import torch.nn as nn import torch.autograd class RangeNorm2D(nn.Module): """ This will normalize a saliency map to range from 0 to 1 via linear range function. Input and output will be a 3D tensor of size [batch size x height x width]. Input can be any rea...
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.autograd assert_size_stride = torch._C._dynamo.guards....
LLNL/fastcam
RangeNorm2D
false
8,427
[ "BSD-3-Clause" ]
25
99cefe37528014247319468cf05f54fef259d3bf
https://github.com/LLNL/fastcam/tree/99cefe37528014247319468cf05f54fef259d3bf
Model
# 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_...
positivevaib/semi-supervised-imagenet-classification
Model
false
4,144
[ "MIT" ]
0
4fb6427f5a72951c1b866a1ddbc2599811bb5770
https://github.com/positivevaib/semi-supervised-imagenet-classification/tree/4fb6427f5a72951c1b866a1ddbc2599811bb5770
LastBlock
# 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 numpy as np import torch.nn as nn assert_size_stride = torch._C._dynamo.g...
lelechen63/idinvert_pytorch
LastBlock
false
10,450
[ "MIT" ]
0
0469e1e5460ee4dd626c05bd35a83d52f9dc2cac
https://github.com/lelechen63/idinvert_pytorch/tree/0469e1e5460ee4dd626c05bd35a83d52f9dc2cac
NonLocal2d
# 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....
shunya-toyokawa/qanet_human_parts_segmentatiom
NonLocal2d
false
16,519
[ "MIT" ]
72
5527b247acd65534b455c26e3692a14b31669602
https://github.com/shunya-toyokawa/qanet_human_parts_segmentatiom/tree/5527b247acd65534b455c26e3692a14b31669602
FFN
# 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....
Anonymous1376/MOTR
FFN
false
2,516
[ "Apache-2.0" ]
0
804cac1a22068af8a8ae127eead8399026d07419
https://github.com/Anonymous1376/MOTR/tree/804cac1a22068af8a8ae127eead8399026d07419
BasicBlock
# AOT ID: ['0_forward'] from ctypes import c_void_p, c_long, c_int import torch import math import random import os import tempfile from math import inf, nan from torch._inductor.hooks import run_intermediate_hooks from torch._inductor.utils import maybe_profile from torch._inductor.codegen.memory_planning import _alig...
import torch from torch._inductor.select_algorithm import extern_kernels import triton import triton.language as tl from torch._inductor.runtime.triton_heuristics import grid from torch._C import _cuda_getCurrentRawStream as get_raw_stream from torch._inductor.runtime.triton_helpers import libdevice import torch.nn as ...
Limingxing00/Retinal-Vessel-Segmentation-ISBI2022
BasicBlock
false
17,580
[ "MIT" ]
9
9480de5c17dc3665a5f6d6d0117596bc5ffc108e
https://github.com/Limingxing00/Retinal-Vessel-Segmentation-ISBI2022/tree/9480de5c17dc3665a5f6d6d0117596bc5ffc108e
Critic
import torch import torch.nn as nn import torch.nn.functional as F class Encoder(nn.Module): """Encodes the static & dynamic states using 1d Convolution.""" def __init__(self, input_size, hidden_size): super(Encoder, self).__init__() self.conv = nn.Conv1d(input_size, hidden_size, kernel_size=...
import torch from torch._inductor.select_algorithm import extern_kernels import triton import triton.language as tl from torch._inductor.runtime.triton_heuristics import grid from torch._C import _cuda_getCurrentRawStream as get_raw_stream from torch._inductor.runtime import triton_helpers import torch.nn as nn assert_...
dimichai/City-Metro-Network-Expansion-with-RL
Critic
false
3,431
[ "MIT" ]
0
54cfec74d89b4e4fc912d480a3025e4c75e3b196
https://github.com/dimichai/City-Metro-Network-Expansion-with-RL/tree/54cfec74d89b4e4fc912d480a3025e4c75e3b196
ResidualAttentionBlock
import torch from typing import Callable from torch import nn from torch.nn import functional as F import torch.distributed.nn from collections import OrderedDict from typing import Optional class LayerNorm(nn.LayerNorm): """Subclass torch's LayerNorm to handle fp16.""" def forward(self, x: 'torch.Tensor'): ...
import torch from torch._inductor.select_algorithm import extern_kernels import triton import triton.language 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-DICE-Lab/open_clip
ResidualAttentionBlock
false
897
[ "MIT" ]
0
fd71804b503135fb1c7cc8de3a0d6599741c8ed9
https://github.com/NYU-DICE-Lab/open_clip/tree/fd71804b503135fb1c7cc8de3a0d6599741c8ed9
TorchDiv
import torch class TorchDiv(torch.nn.Module): def __init__(self): super(TorchDiv, self).__init__() def forward(self, x, y): return torch.div(x, y) def get_inputs(): return [torch.rand([4, 4, 4, 4]), torch.rand([4, 4, 4, 4])] def get_init_inputs(): return [[], {}]
import torch import triton import triton.language as tl from torch._inductor.runtime.triton_heuristics import grid from torch._C import _cuda_getCurrentRawStream as get_raw_stream assert_size_stride = torch._C._dynamo.guards.assert_size_stride empty_strided_cuda = torch._C._dynamo.guards._empty_strided_cuda @triton.j...
PogChamper/torch2trt
TorchDiv
false
14,215
[ "MIT" ]
3,363
43b12627ec0de4d212efb6d02b07570205085ccc
https://github.com/PogChamper/torch2trt/tree/43b12627ec0de4d212efb6d02b07570205085ccc
Net
# AOT ID: ['0_forward'] from ctypes import c_void_p, c_long, c_int import torch import math import random import os import tempfile from math import inf, nan from torch._inductor.hooks import run_intermediate_hooks from torch._inductor.utils import maybe_profile from torch._inductor.codegen.memory_planning import _alig...
import torch from torch._inductor.select_algorithm import extern_kernels import triton import triton.language as tl from torch._inductor.runtime.triton_heuristics import grid from torch._C import _cuda_getCurrentRawStream as get_raw_stream from torch._inductor.runtime import triton_helpers import torch.nn as nn assert_...
bm2-lab/MDML
Net
false
1,559
[ "MIT" ]
0
222fb22b2ee53dd3c1a6f2e99a88f71e9635e3a0
https://github.com/bm2-lab/MDML/tree/222fb22b2ee53dd3c1a6f2e99a88f71e9635e3a0
EntropicRiskMeasure
# 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 typing import C...
vishalbelsare/pfhedge
EntropicRiskMeasure
false
16,686
[ "MIT" ]
81
4d7ff173995e0795942bc6ec55f3fdc5bfb7a5f1
https://github.com/vishalbelsare/pfhedge/tree/4d7ff173995e0795942bc6ec55f3fdc5bfb7a5f1
CoAttention
# 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....
srlee-ai/claf
CoAttention
false
10,883
[ "MIT" ]
0
89b3e5c5ec0486886876ea3bac381508c6a6bf58
https://github.com/srlee-ai/claf/tree/89b3e5c5ec0486886876ea3bac381508c6a6bf58
GPool
from torch.nn import Module import torch from torch.nn import Sequential from torch.nn import Linear class FullyConnected(torch.nn.Module): def __init__(self, in_features, out_features, bias=True, activation=None): super().__init__() self.linear = torch.nn.Linear(in_features, out_features, bias=b...
import torch from torch._inductor.select_algorithm import extern_kernels import triton import triton.language as tl from torch._inductor.runtime.triton_heuristics import grid from torch._C import _cuda_getCurrentRawStream as get_raw_stream from torch._inductor.runtime import triton_helpers from torch._inductor.runtime....
RRemixx/DMRDenoise
GPool
false
14,278
[ "MIT" ]
79
026d25f9eaf98fdfd85a67caeb9b49cab71148e9
https://github.com/RRemixx/DMRDenoise/tree/026d25f9eaf98fdfd85a67caeb9b49cab71148e9
SpaceToDepth
import torch from torchvision import datasets as datasets import torch.nn as nn import torch.nn.parallel import torch.optim import torch.utils.data.distributed class SpaceToDepth(nn.Module): def __init__(self, block_size=4): super().__init__() assert block_size == 4 self.bs = block_size ...
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 torchvision import datasets as datasets import torch.nn as nn import torch.nn.parallel import torch.optim import torch.utils.data.distr...
adam-dziedzic/ASL
SpaceToDepth
false
12,101
[ "MIT" ]
0
cc063f5e7eda1498544ad2c3b224985203b0774a
https://github.com/adam-dziedzic/ASL/tree/cc063f5e7eda1498544ad2c3b224985203b0774a
EdgeCaseModel
import torch from typing import Any import torch.nn as nn class LayerWithRidiculouslyLongNameAndDoesntDoAnything(nn.Module): """ Model with a very long name. """ def __init__(self) ->None: super().__init__() self.identity = nn.Identity() def forward(self, x: 'Any') ->Any: return ...
import torch from torch._inductor.select_algorithm import extern_kernels import triton 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 Any import torch.nn as nn assert_size_stride = torch._C._dyna...
e-dorigatti/torchinfo
EdgeCaseModel
false
12,327
[ "MIT" ]
0
9fa0e677fb7002e89afd5b1bb372fe8c1dd813d6
https://github.com/e-dorigatti/torchinfo/tree/9fa0e677fb7002e89afd5b1bb372fe8c1dd813d6
HighwayLayer
# AOT ID: ['0_forward'] from ctypes import c_void_p, c_long, c_int import torch import math import random import os import tempfile from math import inf, nan from torch._inductor.hooks import run_intermediate_hooks from torch._inductor.utils import maybe_profile from torch._inductor.codegen.memory_planning import _alig...
import torch from torch._inductor.select_algorithm import extern_kernels import triton import triton.language as tl from torch._inductor.runtime.triton_heuristics import grid from torch._C import _cuda_getCurrentRawStream as get_raw_stream from torch._inductor.runtime.triton_helpers import libdevice import torch.nn as ...
Dhiraj100892/droidlet
HighwayLayer
false
11,340
[ "MIT" ]
0
e4ea578672531524552b6ff021165fc9371b0ec8
https://github.com/Dhiraj100892/droidlet/tree/e4ea578672531524552b6ff021165fc9371b0ec8
Joiner
import torch from torch import nn from torch.nn import functional as F class Joiner(nn.Module): def __init__(self, x_latent_dim, y_latent_dim, hidden_dim): super().__init__() self.fc1 = nn.Linear(x_latent_dim + y_latent_dim, hidden_dim) self.fc2 = nn.Linear(hidden_dim, 1) def forward...
import torch from torch._inductor.select_algorithm import extern_kernels import triton import triton.language 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...
Andrewzh112/experiments
Joiner
false
47
[ "MIT" ]
0
a35fd9e6157cd9a746f82229c2487539f668716a
https://github.com/Andrewzh112/experiments/tree/a35fd9e6157cd9a746f82229c2487539f668716a
ResidualBlock
import torch import torch.nn as nn from functools import partial def ncsn_conv3x3(in_planes, out_planes, stride=1, bias=True, dilation=1, init_scale=1.0, padding=1): """3x3 convolution with PyTorch initialization. Same as NCSNv1/NCSNv2.""" init_scale = 1e-10 if init_scale == 0 else init_scale conv = 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.triton_helpers import libdevice import torch.nn as ...
samsartor/score_sde
ResidualBlock
false
7,607
[ "Apache-2.0" ]
1
d25c8d092a68d643c796d771c55f80075aa041d1
https://github.com/samsartor/score_sde/tree/d25c8d092a68d643c796d771c55f80075aa041d1
MultiHeadAttention
# AOT ID: ['0_forward'] from ctypes import c_void_p, c_long, c_int import torch import math import random import os import tempfile from math import inf, nan from torch._inductor.hooks import run_intermediate_hooks from torch._inductor.utils import maybe_profile from torch._inductor.codegen.memory_planning import _alig...
import torch from torch._inductor.select_algorithm import extern_kernels import triton import triton.language as tl from torch._inductor.runtime.triton_heuristics import grid from torch._C import _cuda_getCurrentRawStream as get_raw_stream from torch._inductor.runtime import triton_helpers from torch._inductor.runtime....
ArrowLuo/GRACE
MultiHeadAttention
false
8,786
[ "Apache-2.0" ]
17
f27b500ba905685c03eee6d91d87adc9ef78b4d1
https://github.com/ArrowLuo/GRACE/tree/f27b500ba905685c03eee6d91d87adc9ef78b4d1
Memory
import torch import torch.nn as nn import torch.nn.parallel class Memory(nn.Module): def __init__(self): super(Memory, self).__init__() self.sm = nn.Softmax() self.mask = None def applyMask(self, mask): self.mask = mask def forward(self, input, context_key, content_value...
import torch from torch._inductor.select_algorithm import extern_kernels import triton import triton.language 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....
JoonHong-Kim/T2I_CL
Memory
false
8,382
[ "MIT" ]
35
c52aa73da903d6e4174eeef2663e5bc1163785b1
https://github.com/JoonHong-Kim/T2I_CL/tree/c52aa73da903d6e4174eeef2663e5bc1163785b1
CharbonnierCompLoss
import functools import torch import torch.nn as nn from torch.nn import functional as F def reduce_loss(loss, reduction): """Reduce loss as specified. Args: loss (Tensor): Elementwise loss tensor. reduction (str): Options are "none", "mean" and "sum". Returns: Tensor: Reduced lo...
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 functools import torc...
rivergold/mmediting
CharbonnierCompLoss
false
7,563
[ "Apache-2.0" ]
1
fd972635c48bb065db29d1b5090592a87c7263d2
https://github.com/rivergold/mmediting/tree/fd972635c48bb065db29d1b5090592a87c7263d2
DilatedNet
# 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...
tilacyn/dsb2018_topcoders
DilatedNet
false
16,589
[ "MIT" ]
413
e0f95ef70bc062d4dea321d2aa73231a9538cd63
https://github.com/tilacyn/dsb2018_topcoders/tree/e0f95ef70bc062d4dea321d2aa73231a9538cd63
TensorMin
# 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 assert_size_stride = torch._C._dynamo.guards.assert_size_stride empty_strided_cuda = torc...
Minyus/pipelinex
TensorMin
false
14,045
[ "Apache-2.0" ]
188
f35c524ec9c50751ee27d9a42d98317e16f1c544
https://github.com/Minyus/pipelinex/tree/f35c524ec9c50751ee27d9a42d98317e16f1c544
ContrastiveDistanceLoss
# AOT ID: ['0_inference'] from ctypes import c_void_p, c_long, c_int import torch import math import random import os import tempfile from math import inf, nan from torch._inductor.hooks import run_intermediate_hooks from torch._inductor.utils import maybe_profile from torch._inductor.codegen.memory_planning import _al...
import torch import triton import triton.language as tl from torch._inductor.runtime.triton_heuristics import grid from torch._C import _cuda_getCurrentRawStream as get_raw_stream from torch._inductor.runtime import triton_helpers import torch.nn as nn from torch.nn.modules.loss import * from torch.nn.modules import * ...
bbradt/catalyst
ContrastiveDistanceLoss
false
3,182
[ "Apache-2.0" ]
0
38a503c8af040906e377b7485d7fe15a7bc1de19
https://github.com/bbradt/catalyst/tree/38a503c8af040906e377b7485d7fe15a7bc1de19
ReOrgLayer
# 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.utils.data.distributed import torch._utils assert_size_stride = torch._C._dynamo....
DatatangAILAB/SuanFaShiXun04
ReOrgLayer
false
17,214
[ "Apache-2.0" ]
5
f478e40dd84240ac71cbb54e6bacf9ff556fbb3e
https://github.com/DatatangAILAB/SuanFaShiXun04/tree/f478e40dd84240ac71cbb54e6bacf9ff556fbb3e
M
# 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
M
false
5,820
[ "BSD-3-Clause" ]
1
2639cf050493df9d3cbf065d45e6025733add0f4
https://github.com/ShuaihuaLu/examples/tree/2639cf050493df9d3cbf065d45e6025733add0f4
APLoss_dist
# 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....
ByungHeeCha/visual_localization
APLoss_dist
false
17,040
[ "BSD-3-Clause" ]
3
787fb8f6ee5c6e69ece9e83a016d15596e5524bc
https://github.com/ByungHeeCha/visual_localization/tree/787fb8f6ee5c6e69ece9e83a016d15596e5524bc
BasicBlock
# 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....
Justin-Tan/ffjord
BasicBlock
false
703
[ "MIT" ]
0
2caf8a4ff84933672fe0d94255d665b3dd7a6791
https://github.com/Justin-Tan/ffjord/tree/2caf8a4ff84933672fe0d94255d665b3dd7a6791
CriticNetwork
import torch import torch.nn as nn import torch.nn.functional as F class CriticNetwork(nn.Module): def __init__(self, input_shape, output_shape, **kwargs): super().__init__() n_input = input_shape[-1] n_output = output_shape[0] self._h = nn.Linear(n_input, n_output) nn.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 from torch._inductor.runtime import triton_helpers import torch.nn as nn assert_...
TheCamusean/mushroom-rl
CriticNetwork
false
2,893
[ "MIT" ]
0
48585f883e546ea57224b8d446ecb9b8ba90cf73
https://github.com/TheCamusean/mushroom-rl/tree/48585f883e546ea57224b8d446ecb9b8ba90cf73
TorchTensorAttrNet
import torch import torch.nn.functional class TorchTensorAttrNet(torch.nn.Module): def __init__(self): super(TorchTensorAttrNet, self).__init__() self.conv1 = torch.nn.Conv2d(3, 4, kernel_size=1, stride=1) def forward(self, x): x = self.conv1(x) x = x * x.size(1) retu...
import torch from torch._inductor.select_algorithm import extern_kernels import triton import triton.language as tl from torch._inductor.runtime.triton_heuristics import grid from torch._C import _cuda_getCurrentRawStream as get_raw_stream import torch.nn.functional assert_size_stride = torch._C._dynamo.guards.assert_s...
elad-c/model_optimization
TorchTensorAttrNet
false
10,659
[ "Apache-2.0" ]
0
b0ecf41c3f9434008d57d7fe724ff8585e19d4cc
https://github.com/elad-c/model_optimization/tree/b0ecf41c3f9434008d57d7fe724ff8585e19d4cc
distLinear
import torch import torch.nn as nn from torch.nn.utils.weight_norm import WeightNorm import torch.utils.data class distLinear(nn.Module): def __init__(self, indim, outdim): super(distLinear, self).__init__() self.L = nn.Linear(indim, outdim, bias=False) self.class_wise_learnable_norm = Fa...
import torch from torch._inductor.select_algorithm import extern_kernels import triton import triton.language 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 ...
VisionLearningGroup/CDS
distLinear
false
18,054
[ "MIT" ]
7
5b3644c286f19f76acdc03c6f6021a6f6e4ec4fc
https://github.com/VisionLearningGroup/CDS/tree/5b3644c286f19f76acdc03c6f6021a6f6e4ec4fc
Encoder
import torch import torch.nn as nn class Encoder(nn.Module): def __init__(self, in_size, latent_size): super().__init__() self.linear1 = nn.Linear(in_size, int(in_size / 2)) self.linear2 = nn.Linear(int(in_size / 2), int(in_size / 4)) self.linear3 = nn.Linear(int(in_size / 4), lat...
import torch from torch._inductor.select_algorithm import extern_kernels import triton import triton.language 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_...
DuneeshaFernando/usad
Encoder
false
11,396
[ "BSD-3-Clause" ]
0
22653a96deefe57013b1df57bb6dc316ef423c95
https://github.com/DuneeshaFernando/usad/tree/22653a96deefe57013b1df57bb6dc316ef423c95
LinearScalerModel
# 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.utils.data import torch.nn as nn assert_size_stride = torch._C._dynamo.guards.assert_size_stride empty_strided_cuda = torch._C....
sergiolib/pytorch-CycleGAN-and-pix2pix
LinearScalerModel
false
12,964
[ "BSD-3-Clause" ]
0
cd3058a6a0522a0ed9178682b06cda538947e335
https://github.com/sergiolib/pytorch-CycleGAN-and-pix2pix/tree/cd3058a6a0522a0ed9178682b06cda538947e335
L1DistanceLoss
# 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...
wanyao1992/structural-probes
L1DistanceLoss
false
16,697
[ "Apache-2.0" ]
357
3071c93b23601d834628d79a74e46e8ab5e5a66b
https://github.com/wanyao1992/structural-probes/tree/3071c93b23601d834628d79a74e46e8ab5e5a66b
_leaky_relu
import torch from torch import nn import torch.optim import torch.utils.data class _leaky_relu(nn.Module): def __init__(self): super(_leaky_relu, self).__init__() def forward(self, x): x_neg = 0.1 * x return torch.max(x_neg, x) def get_inputs(): return [torch.rand([4, 4, 4, 4])...
import torch import triton import triton.language as tl from torch._inductor.runtime.triton_heuristics import grid from torch._C import _cuda_getCurrentRawStream as get_raw_stream from torch._inductor.runtime import triton_helpers from torch import nn import torch.optim import torch.utils.data assert_size_stride = torc...
ap229997/cc
_leaky_relu
false
9,828
[ "MIT" ]
0
d6f272b8270a371c877f4315047610b33a6e9f2d
https://github.com/ap229997/cc/tree/d6f272b8270a371c877f4315047610b33a6e9f2d
BertPredictionHeadTransform
# AOT ID: ['0_forward'] from ctypes import c_void_p, c_long, c_int import torch import math import random import os import tempfile from math import inf, nan from torch._inductor.hooks import run_intermediate_hooks from torch._inductor.utils import maybe_profile from torch._inductor.codegen.memory_planning import _alig...
import torch from torch._inductor.select_algorithm import extern_kernels import triton import triton.language as tl from torch._inductor.runtime.triton_heuristics import grid from torch._C import _cuda_getCurrentRawStream as get_raw_stream from torch._inductor.runtime.triton_helpers import libdevice import math from to...
Sy-Zhang/recurrent-transformer
BertPredictionHeadTransform
false
11,136
[ "MIT" ]
0
f66ba49a2c9ec42759d3d00d497b49ffe39e18de
https://github.com/Sy-Zhang/recurrent-transformer/tree/f66ba49a2c9ec42759d3d00d497b49ffe39e18de
Decoder
import torch import torch.nn as nn class Decoder(nn.Module): def __init__(self, latent_dim, hidden_dim, output_dim): super(Decoder, self).__init__() self.FC_hidden = nn.Linear(latent_dim, hidden_dim) self.FC_output = nn.Linear(hidden_dim, output_dim) def forward(self, x): 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 import torch.nn as nn assert_...
CsekM8/dtu_mlops
Decoder
false
11,318
[ "Apache-2.0" ]
0
5c96a9afac0298fab57b7d47e4c08497f4a5d8d9
https://github.com/CsekM8/dtu_mlops/tree/5c96a9afac0298fab57b7d47e4c08497f4a5d8d9
Maxout
import torch import torch.nn as nn class Maxout(nn.Module): def __init__(self, pool_size): super().__init__() self._pool_size = pool_size def forward(self, x): assert x.shape[-1 ] % self._pool_size == 0, 'Wrong input last dim size ({}) for Maxout({})'.format( ...
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...
hekaplex/FocusSeq2Seq
Maxout
false
10,186
[ "MIT" ]
0
9bab5d3aa020b4d587add9d7a070335cf0feb2d6
https://github.com/hekaplex/FocusSeq2Seq/tree/9bab5d3aa020b4d587add9d7a070335cf0feb2d6
Critic
# AOT ID: ['0_forward'] from ctypes import c_void_p, c_long, c_int import torch import math import random import os import tempfile from math import inf, nan from torch._inductor.hooks import run_intermediate_hooks from torch._inductor.utils import maybe_profile from torch._inductor.codegen.memory_planning import _alig...
import torch from torch._inductor.select_algorithm import extern_kernels import triton import triton.language as tl from torch._inductor.runtime.triton_heuristics import grid from torch._C import _cuda_getCurrentRawStream as get_raw_stream import numpy as np import torch.nn as nn assert_size_stride = torch._C._dynamo.g...
ahgit2021/deep-reinforcement-learning
Critic
false
3,046
[ "MIT" ]
0
081464ba45f803663e841e1635d829aa00cce870
https://github.com/ahgit2021/deep-reinforcement-learning/tree/081464ba45f803663e841e1635d829aa00cce870
Rot180
# 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...
ChristophReich1996/kornia
Rot180
false
273
[ "ECL-2.0", "Apache-2.0" ]
0
35f955b46e8015da1cb9faa28c6943ec2b09cc2a
https://github.com/ChristophReich1996/kornia/tree/35f955b46e8015da1cb9faa28c6943ec2b09cc2a
FM
# 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 sklearn.metrics import * assert_size_stride = torch._C._dynamo.guards.assert_size_stride empty_strided_cuda = tor...
chenkkkk/DeepCTR-PyTorch
FM
false
6,427
[ "Apache-2.0" ]
1
a10a3ace4ad79171e7fb182407b3e4d22bf753e7
https://github.com/chenkkkk/DeepCTR-PyTorch/tree/a10a3ace4ad79171e7fb182407b3e4d22bf753e7
TanhDeepLiftModel
# AOT ID: ['0_inference'] from ctypes import c_void_p, c_long, c_int import torch import math import random import os import tempfile from math import inf, nan from torch._inductor.hooks import run_intermediate_hooks from torch._inductor.utils import maybe_profile from torch._inductor.codegen.memory_planning import _al...
import torch import triton import triton.language as tl from torch._inductor.runtime.triton_heuristics import grid from torch._C import _cuda_getCurrentRawStream as get_raw_stream from torch._inductor.runtime.triton_helpers import libdevice import torch.nn as nn assert_size_stride = torch._C._dynamo.guards.assert_size_...
YNNEKUW/captum
TanhDeepLiftModel
false
11,994
[ "BSD-3-Clause" ]
0
c8b5357b21f2ddf440e5f0ce25635977292aa5d1
https://github.com/YNNEKUW/captum/tree/c8b5357b21f2ddf440e5f0ce25635977292aa5d1
Lookahead
# 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.distributed import torch.nn as nn assert_size_stride = t...
faboyds/deepspeech.pytorch
Lookahead
false
3,486
[ "MIT" ]
0
d20f3510a3c556a07f5d662a91a63acffc26633b
https://github.com/faboyds/deepspeech.pytorch/tree/d20f3510a3c556a07f5d662a91a63acffc26633b
AttModel
import torch import torch.nn as nn import torch.nn.functional as F class AttModel(nn.Module): def __init__(self, n_node, din, hidden_dim, dout): super(AttModel, self).__init__() self.fcv = nn.Linear(din, hidden_dim) self.fck = nn.Linear(din, hidden_dim) self.fcq = nn.Linear(din, 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....
jungwoohan72/DGN_pytorch
AttModel
false
10,357
[ "MIT" ]
0
65fe7ab4df661d97725f2a72a1fdb49df1b2ea44
https://github.com/jungwoohan72/DGN_pytorch/tree/65fe7ab4df661d97725f2a72a1fdb49df1b2ea44
BertAttention
# 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....
QuLiang132/nlp-notebook
BertAttention
false
5,743
[ "MIT" ]
1
b7659867b967d1e541bee5617cee017b3b67d9ba
https://github.com/QuLiang132/nlp-notebook/tree/b7659867b967d1e541bee5617cee017b3b67d9ba
ScaledDotAttention
import torch import torch.nn as nn from torch.nn import LayerNorm def scaled_dot_attention(q, k, v, mask=None, noise=0, dropout=lambda x: x): """ :param q: queries, (batch, time1, channels1) :param k: keys, (batch, time2, channels1) :param v: values, (batch, time2, channels2) :param mask: boolean ...
import torch from torch._inductor.select_algorithm import extern_kernels import triton import triton.language 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....
yhgon/speedyspeech
ScaledDotAttention
false
13,149
[ "BSD-3-Clause" ]
0
574c6a94091431f313e2aae8e154b8c80e6908ce
https://github.com/yhgon/speedyspeech/tree/574c6a94091431f313e2aae8e154b8c80e6908ce
Decoder
# 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...
roger-tseng/demucs
Decoder
false
12,947
[ "MIT" ]
0
4a54a3c523a86345df294798994b60c8194e0a43
https://github.com/roger-tseng/demucs/tree/4a54a3c523a86345df294798994b60c8194e0a43
APL
import torch from torch import nn from torch.nn.parameter import Parameter class APL(nn.Module): """ Implementation of APL (ADAPTIVE PIECEWISE LINEAR UNITS) unit: .. math:: APL(x_i) = max(0,x) + \\sum_{s=1}^{S}{a_i^s * max(0, -x + b_i^s)} with trainable parameters a and b, parameter...
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 from torch.nn.parameter import Parameter assert_size_stride = torch....
THEFASHIONGEEK/Echo
APL
false
11,905
[ "MIT" ]
0
8dcf279ca528f2bfd255f79de07c1a221512c6a0
https://github.com/THEFASHIONGEEK/Echo/tree/8dcf279ca528f2bfd255f79de07c1a221512c6a0
Concat
import torch from torch import nn from typing import * class Concat(nn.Module): def __init__(self): super(Concat, self).__init__() def forward(self, modalities): flattened = [] for modality in modalities: flattened.append(torch.flatten(modality, start_dim=1)) retu...
import torch import triton import triton.language as tl from torch._inductor.runtime.triton_heuristics import grid from torch._C import _cuda_getCurrentRawStream as get_raw_stream from torch import nn from typing import * assert_size_stride = torch._C._dynamo.guards.assert_size_stride empty_strided_cuda = torch._C._dyn...
HughMun/MultiBench
Concat
false
13,772
[ "MIT" ]
148
d5712a0815a9486b0e0c76b54cd63c880188fc8e
https://github.com/HughMun/MultiBench/tree/d5712a0815a9486b0e0c76b54cd63c880188fc8e
FinalTanh
import torch class FinalTanh(torch.nn.Module): def __init__(self, input_channels, hidden_channels, hidden_hidden_channels, num_hidden_layers): super(FinalTanh, self).__init__() self.input_channels = input_channels self.hidden_channels = hidden_channels self.hidden_hidden_c...
import torch from torch._inductor.select_algorithm import extern_kernels import triton import triton.language 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....
lysuk96/rl_representations
FinalTanh
false
15,977
[ "MIT" ]
438
19de69305e40c9b3a1d746a7af26d232c9fb3f6f
https://github.com/lysuk96/rl_representations/tree/19de69305e40c9b3a1d746a7af26d232c9fb3f6f
BoxOffsetIntersection
# 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...
HKUST-KnowComp/EFO-1-QA-benchmark
BoxOffsetIntersection
false
17,369
[ "MIT" ]
9
600fb02c76ab631f93ee362ceb789216ec085790
https://github.com/HKUST-KnowComp/EFO-1-QA-benchmark/tree/600fb02c76ab631f93ee362ceb789216ec085790
Actor
import torch import numpy as np import torch.nn.functional as F import torch.nn as nn def hidden_init(layer): fan_in = layer.weight.data.size()[0] lim = 1.0 / np.sqrt(fan_in) return -lim, lim class Actor(nn.Module): """Actor (Policy) Model.""" def __init__(self, state_size, action_size, seed, 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....
AntoniaSophia/deep-reinforcement-learning
Actor
false
8,849
[ "MIT" ]
0
1d1c77039eea22fcf6726c35c3dd2563adfcb519
https://github.com/AntoniaSophia/deep-reinforcement-learning/tree/1d1c77039eea22fcf6726c35c3dd2563adfcb519
_BoundaryRefineModule
# 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 from to...
Rocketbase-AI/rockets-mobilepose
_BoundaryRefineModule
false
5,775
[ "MIT" ]
1
be7273dff7fcf7d1023f431f4b63ac8d82978182
https://github.com/Rocketbase-AI/rockets-mobilepose/tree/be7273dff7fcf7d1023f431f4b63ac8d82978182
ResolutionScalingLayer
import torch import torch.utils.data import torch from torch import nn import torch.nn.functional as F class ResolutionScalingLayer(nn.Module): """Implements the resolution scaling layer. Basically, this layer can be used to upsample feature maps from spatial domain with nearest neighbor interpolation. """...
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 from torch import nn assert_size_stride = torch._C._dynamo.guards.assert_size_stride empty_strided_cuda...
IVRL/BIGPrior
ResolutionScalingLayer
false
572
[ "MIT" ]
0
6bf3b18fcbbd3c58bad7a792a8d28b017abb2411
https://github.com/IVRL/BIGPrior/tree/6bf3b18fcbbd3c58bad7a792a8d28b017abb2411
PatchSequential
# 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 math import warnings from typing import Dict from typing import Optional from typing import Tuple import torch.nn as nn import torch....
rozumden/kornia
PatchSequential
false
4,247
[ "ECL-2.0", "Apache-2.0" ]
0
f62f324b201eea50e1e50db3fbf3e968e0a337c5
https://github.com/rozumden/kornia/tree/f62f324b201eea50e1e50db3fbf3e968e0a337c5
BPRLoss
import torch import torch.nn as nn class BPRLoss(nn.Module): """ BPRLoss, based on Bayesian Personalized Ranking Args: - gamma(float): Small value to avoid division by zero Shape: - Pos_score: (N) - Neg_score: (N), same shape as the Pos_score - Output: scalar. Exampl...
import torch import triton import triton.language as tl from torch._inductor.runtime.triton_heuristics import grid from torch._C import _cuda_getCurrentRawStream as get_raw_stream from torch._inductor.runtime import triton_helpers from torch._inductor.runtime.triton_helpers import math as tl_math import torch.nn as nn ...
dreaming-qin/RecBole
BPRLoss
false
12,308
[ "MIT" ]
0
d6de39521484ded60c387ca604abaf86310acdbe
https://github.com/dreaming-qin/RecBole/tree/d6de39521484ded60c387ca604abaf86310acdbe
ReinforcedReceiver
import torch import torch.nn as nn import torch.nn.functional as F import torch.nn.parallel import torch.utils.data from torch.distributions import Bernoulli import torch.distributions class ReinforcedReceiver(nn.Module): def __init__(self, n_bits, n_hidden): super(ReinforcedReceiver, self).__init__() ...
import torch from torch._inductor.select_algorithm import extern_kernels import triton import triton.language as tl from torch._inductor.runtime.triton_heuristics import grid from torch._C import _cuda_getCurrentRawStream as get_raw_stream import torch.nn as nn import torch.nn.parallel import torch.utils.data import to...
cjlovering/EGG
ReinforcedReceiver
false
10,061
[ "MIT" ]
0
cce146e035decbc410e981f8bc7ada32979f3b6d
https://github.com/cjlovering/EGG/tree/cce146e035decbc410e981f8bc7ada32979f3b6d
LayerNormChannels
import torch import torch.nn as nn class LayerNormChannels(nn.Module): def __init__(self, c_in): """ This module applies layer norm across channels in an image. Has been shown to work well with ResNet connections. Inputs: c_in - Number of channels of the input """ ...
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_...
onlyrico/lightning-tutorials
LayerNormChannels
false
12,856
[ "Apache-2.0" ]
0
b5d5c4015422f8c70411e57734d73bb6c1472999
https://github.com/onlyrico/lightning-tutorials/tree/b5d5c4015422f8c70411e57734d73bb6c1472999
Highway
# AOT ID: ['0_forward'] from ctypes import c_void_p, c_long, c_int import torch import math import random import os import tempfile from math import inf, nan from torch._inductor.hooks import run_intermediate_hooks from torch._inductor.utils import maybe_profile from torch._inductor.codegen.memory_planning import _alig...
import torch from torch._inductor.select_algorithm import extern_kernels import triton import triton.language as tl from torch._inductor.runtime.triton_heuristics import grid from torch._C import _cuda_getCurrentRawStream as get_raw_stream from torch._inductor.runtime import triton_helpers from torch import nn import t...
YuWVandy/chemicalx
Highway
false
1,276
[ "Apache-2.0" ]
0
c02f979a502409c26700e6d5a1b2e6c0aa77e64c
https://github.com/YuWVandy/chemicalx/tree/c02f979a502409c26700e6d5a1b2e6c0aa77e64c
LinearPool
import torch from torch import nn class LinearPool(nn.Module): def __init__(self): super(LinearPool, self).__init__() def forward(self, feat_map): """ Arguments: feat_map(Tensor): tensor with shape (N, C, H, W) return(Tensor): tensor with shape (N, C, 1, 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 import nn assert_size_stride = torch._C._dynamo.guards.assert_size_stride empty_strided_cuda = torch._C._dynamo.guards._empty_str...
DavidChenL/Chexpert
LinearPool
false
13,619
[ "Apache-2.0" ]
202
0300057d3a51301cff35a65f79729436678b4a79
https://github.com/DavidChenL/Chexpert/tree/0300057d3a51301cff35a65f79729436678b4a79
GlobalAttentionGeneral
# 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....
Huy2122k/Project3-AttnGANwCLIP
GlobalAttentionGeneral
false
9,116
[ "MIT" ]
0
3fb8c643bf71599e1606ec468e86373ccde1ed20
https://github.com/Huy2122k/Project3-AttnGANwCLIP/tree/3fb8c643bf71599e1606ec468e86373ccde1ed20
BatchMeanCrossEntropyWithLogSoftmax
# 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...
cadurosar/graph_kd_dense_cifar100
BatchMeanCrossEntropyWithLogSoftmax
false
1,622
[ "MIT" ]
0
84054ab4f8f61c9db3460993661ba7bf1d951b36
https://github.com/cadurosar/graph_kd_dense_cifar100/tree/84054ab4f8f61c9db3460993661ba7bf1d951b36
VAE
# AOT ID: ['0_forward'] from ctypes import c_void_p, c_long, c_int import torch import math import random import os import tempfile from math import inf, nan from torch._inductor.hooks import run_intermediate_hooks from torch._inductor.utils import maybe_profile from torch._inductor.codegen.memory_planning import _alig...
import torch from torch import device from torch._inductor.select_algorithm import extern_kernels import triton import triton.language as tl from torch._inductor.runtime.triton_heuristics import grid from torch._C import _cuda_getCurrentRawStream as get_raw_stream from torch._inductor.runtime import triton_helpers from...
lshoek/creative-evo-controller
VAE
false
10,533
[ "MIT" ]
0
a5f1742c172255cca2338b76ae1c5b4db277bb0d
https://github.com/lshoek/creative-evo-controller/tree/a5f1742c172255cca2338b76ae1c5b4db277bb0d
MaxPool2d
# 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...
tomking/PySNN
MaxPool2d
false
16,598
[ "MIT" ]
175
c99ba6cd28a518dc07cab765acac9b69ac6fe36b
https://github.com/tomking/PySNN/tree/c99ba6cd28a518dc07cab765acac9b69ac6fe36b
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 ...
wang-tf/RepNet-MDNet-VehicleReID
FocalLoss
false
16,692
[ "MIT" ]
226
d3d184331206ca4bdb5ea399e5b90a9ccc53b400
https://github.com/wang-tf/RepNet-MDNet-VehicleReID/tree/d3d184331206ca4bdb5ea399e5b90a9ccc53b400
LabelPropagation
import torch import torch.nn.functional as F import torch.nn as nn class LabelPropagation(nn.Module): """label propagation model adapted from https://github.com/CUAI/CorrectAndSmooth `"Learning from Labeled and Unlabeled Datawith Label Propagation" <http://mlg.eng.cam.ac.uk/zoubin/papers/CMU-CALD-02-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 assert_...
EdisonLeeeee/Graphgallery
LabelPropagation
false
5,120
[ "MIT" ]
1
8ae9ef57d44f073d0ceaf3f33a3a998546f960a8
https://github.com/EdisonLeeeee/Graphgallery/tree/8ae9ef57d44f073d0ceaf3f33a3a998546f960a8
Residual_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 from torch._inductor.runtime import triton_helpers import torch.nn as nn from to...
vandit15/Self-Supervised-Gans-Pytorch
Residual_D
false
16,663
[ "MIT" ]
66
01408fcce3e6cf4795d90c0f9d27e6906d5b59f3
https://github.com/vandit15/Self-Supervised-Gans-Pytorch/tree/01408fcce3e6cf4795d90c0f9d27e6906d5b59f3
SimplifiedScaledDotProductAttention
# 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....
Nitin-Mane/External-Attention-pytorch
SimplifiedScaledDotProductAttention
false
14,110
[ "MIT" ]
4,466
1ceda306c41063af11c956334747763444a4d83f
https://github.com/Nitin-Mane/External-Attention-pytorch/tree/1ceda306c41063af11c956334747763444a4d83f
LocalDictionaryLoss
# 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 assert_size_stride = torch._C._dynamo.guards.assert_size_stride ...
pbt17/manifold-learning-with-simplex-constraints
LocalDictionaryLoss
false
7,452
[ "MIT" ]
1
36609e2d05600965ee1331823547a077ba7b5a51
https://github.com/pbt17/manifold-learning-with-simplex-constraints/tree/36609e2d05600965ee1331823547a077ba7b5a51
DDPGCritic
# 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_...
ikamensh/machin
DDPGCritic
false
6,857
[ "MIT" ]
1
af7b423c47bc1412530cf6c96c11bd3af9b3e239
https://github.com/ikamensh/machin/tree/af7b423c47bc1412530cf6c96c11bd3af9b3e239
Block_cls
import torch from torch import nn from functools import partial import torch.utils.data import torch.nn.parallel from torch import optim as optim def drop_path(x, drop_prob: 'float'=0.0, training: 'bool'=False): """Drop paths (Stochastic Depth) per sample (when applied in main path of residual blocks). This ...
import torch from torch._inductor.select_algorithm import extern_kernels import triton import triton.language 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....
TencentYoutuResearch/BaseArchitecture-EAT
Block_cls
false
18,034
[ "BSD-3-Clause" ]
9
b916738ef9b1314f5fdad780a0839cb4e010a208
https://github.com/TencentYoutuResearch/BaseArchitecture-EAT/tree/b916738ef9b1314f5fdad780a0839cb4e010a208
TensorClampOptionMax
# 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 assert_size_stride = torch._C._dynamo.guards.assert_size_stride empty_strided_cuda = torc...
PogChamper/torch2trt
TensorClampOptionMax
false
14,222
[ "MIT" ]
3,363
43b12627ec0de4d212efb6d02b07570205085ccc
https://github.com/PogChamper/torch2trt/tree/43b12627ec0de4d212efb6d02b07570205085ccc
FunctionalRelu6
# 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 assert_size_stride = torch._C._dynamo.guards.assert_size_stride empty_strided_cuda = torc...
NVIDIA-AI-IOT-private/torch2trt
FunctionalRelu6
false
10,504
[ "MIT" ]
0
953d60039e0c81e90eea467c3df2e6e3f7040242
https://github.com/NVIDIA-AI-IOT-private/torch2trt/tree/953d60039e0c81e90eea467c3df2e6e3f7040242
IoULoss
# 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 import torch.nn.parallel import torch.optim import torch.utils.data...
TransformersWsz/onestage_grounding
IoULoss
false
2,916
[ "MIT" ]
0
c939a7d5d7c7f9e1bfa8df2e6269397b8f840b5a
https://github.com/TransformersWsz/onestage_grounding/tree/c939a7d5d7c7f9e1bfa8df2e6269397b8f840b5a
HSigmoid
import torch import torch.nn as nn import torch.quantization class HSigmoid(nn.Module): """Hard Sigmoid.""" def __init__(self, inplace: 'bool'=True) ->None: """Initialize.""" super(HSigmoid, self).__init__() self.relu6 = nn.ReLU6(inplace=inplace) def forward(self, x: 'torch.Tenso...
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.quantization assert_size_stride = torch._C._dynamo.gua...
dhlee347/model_compression
HSigmoid
false
6,568
[ "MIT" ]
1
274b85ff56d81f0b7cf6907cbc1bd10e16cdb956
https://github.com/dhlee347/model_compression/tree/274b85ff56d81f0b7cf6907cbc1bd10e16cdb956
TAGConv
# 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.functional as F import torch.nn as nn assert_size_stride = torch...
sigeisler/grb
TAGConv
false
16,457
[ "MIT" ]
51
c89e21076dc05d1edb87dfe2eff20c29ba6bd0c1
https://github.com/sigeisler/grb/tree/c89e21076dc05d1edb87dfe2eff20c29ba6bd0c1
Upsample_interpolate
# 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...
Mathiebhan/darknet_ros
Upsample_interpolate
false
11,685
[ "BSD-3-Clause" ]
0
04a97b61b6b3b086da1a46331a747accd37d05f9
https://github.com/Mathiebhan/darknet_ros/tree/04a97b61b6b3b086da1a46331a747accd37d05f9
ExgLayer
# 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...
Yottaxx/T-LSTM
ExgLayer
false
18,152
[ "MIT" ]
9
92618d8c3ee2418b194a2e1592512548da955b77
https://github.com/Yottaxx/T-LSTM/tree/92618d8c3ee2418b194a2e1592512548da955b77
GDeconv1DBlock
import torch import torch.nn as nn from torch.nn.utils.spectral_norm import spectral_norm def build_norm_layer(norm_type, param=None, num_feats=None): if norm_type == 'bnorm': return nn.BatchNorm1d(num_feats) elif norm_type == 'snorm': spectral_norm(param) return None elif norm_typ...
import torch from torch._inductor.select_algorithm import extern_kernels import 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.utils.spectral_norm import spectral_norm ass...
silvadirceu/segan_pytorch
GDeconv1DBlock
false
10,802
[ "MIT" ]
0
2215e711f7223b144e0c4d4fb4ed1d4842b18c5f
https://github.com/silvadirceu/segan_pytorch/tree/2215e711f7223b144e0c4d4fb4ed1d4842b18c5f
ReduceDim
import torch import torch.nn as nn import torch.nn.functional as F class ReduceDim(nn.Module): def __init__(self, input_dimension, output_dimension): super(ReduceDim, self).__init__() self.fc = nn.Linear(input_dimension, output_dimension) def forward(self, x): x = self.fc(x) ...
import torch from torch._inductor.select_algorithm import extern_kernels import triton import triton.language 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....
iamshant/mmt
ReduceDim
false
15,580
[ "Apache-2.0" ]
201
2716e9037f2d59e9aadd92d607bcf753f0146946
https://github.com/iamshant/mmt/tree/2716e9037f2d59e9aadd92d607bcf753f0146946
BinaryClassificationHead
from _paritybench_helpers import _mock_config import torch class BinaryClassificationHead(torch.nn.Module): def __init__(self, config): super().__init__() self.config = config self.dense = torch.nn.Linear(config.hidden_size, config.hidden_size) self.dropout = torch.nn.Dropout(conf...
import torch from torch._inductor.select_algorithm import extern_kernels import triton import triton.language 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 ...
techthiyanes/DeepPavlov
BinaryClassificationHead
false
16,556
[ "Apache-2.0" ]
5,893
08555428388fed3c7b036c0a82a70a25efcabcff
https://github.com/techthiyanes/DeepPavlov/tree/08555428388fed3c7b036c0a82a70a25efcabcff
ConstantODE
import torch class ConstantODE(torch.nn.Module): def __init__(self): super(ConstantODE, self).__init__() self.a = torch.nn.Parameter(torch.tensor(0.2)) self.b = torch.nn.Parameter(torch.tensor(3.0)) def forward(self, t, y): return self.a + (y - (self.a * t + self.b)) ** 5 ...
import torch import triton import triton.language as tl from torch._inductor.runtime.triton_heuristics import grid from torch._C import _cuda_getCurrentRawStream as get_raw_stream assert_size_stride = torch._C._dynamo.guards.assert_size_stride empty_strided_cuda = torch._C._dynamo.guards._empty_strided_cuda @triton.j...
MaricelaM/torchdiffeq
ConstantODE
false
14,005
[ "MIT" ]
4,088
4e070fb687167e53082a91f32e102af7f4521058
https://github.com/MaricelaM/torchdiffeq/tree/4e070fb687167e53082a91f32e102af7f4521058
WSConv2d
import torch import torch.nn as nn import torch.utils.data class WSConv2d(nn.Module): """ Weight scaled Conv2d (Equalized Learning Rate) Note that input is multiplied rather than changing weights this will have the same result. Inspired by: https://github.com/nvnbny/progressive_growing_of_gan...
import torch from torch._inductor.select_algorithm import extern_kernels import 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
GatedLinearUnit
import torch import torch.nn as nn class GatedLinearUnit(nn.Module): def __init__(self, input_size, hidden_layer_size, dropout_rate, activation=None): super(GatedLinearUnit, self).__init__() self.input_size = input_size self.hidden_layer_size = hidden_layer_size self.dropo...
import torch from torch._inductor.select_algorithm import extern_kernels import triton import triton.language as tl from torch._inductor.runtime.triton_heuristics import grid from torch._C import _cuda_getCurrentRawStream as get_raw_stream import torch.nn as nn assert_size_stride = torch._C._dynamo.guards.assert_size_s...
sherpahu/AutoX
GatedLinearUnit
false
4,315
[ "Apache-2.0" ]
0
37aca6bb848ecfdde6868b9f8eb869563fece3eb
https://github.com/sherpahu/AutoX/tree/37aca6bb848ecfdde6868b9f8eb869563fece3eb
Net
import torch import torch.nn as nn import torch.nn.functional as F class Net(nn.Module): def __init__(self, n_obs, n_mid, n_action): super().__init__() self.fc1 = nn.Linear(n_obs, n_mid) self.fc2 = nn.Linear(n_mid, n_mid) self.fc3 = nn.Linear(n_mid, n_action) def forward(self...
import torch from torch._inductor.select_algorithm import extern_kernels import triton import triton.language as tl from torch._inductor.runtime.triton_heuristics import grid from torch._C import _cuda_getCurrentRawStream as get_raw_stream from torch._inductor.runtime import triton_helpers import torch.nn as nn assert_...
CUSP-NYU/autonomous-drone-swarm
Net
false
192
[ "MIT" ]
0
3bad474fd9641521588af61ddc48b84ffc746a74
https://github.com/CUSP-NYU/autonomous-drone-swarm/tree/3bad474fd9641521588af61ddc48b84ffc746a74
DiscriminatorLoss
# AOT ID: ['0_inference'] from ctypes import c_void_p, c_long, c_int import torch import math import random import os import tempfile from math import inf, nan from torch._inductor.hooks import run_intermediate_hooks from torch._inductor.utils import maybe_profile from torch._inductor.codegen.memory_planning import _al...
import torch import triton import triton.language as tl from torch._inductor.runtime.triton_heuristics import grid from torch._C import _cuda_getCurrentRawStream as get_raw_stream from torch._inductor.runtime import triton_helpers from torch._inductor.runtime.triton_helpers import libdevice, math as tl_math from torch ...
akanametov/CycleGAN
DiscriminatorLoss
false
6,129
[ "MIT" ]
1
a61e76134cfdda43306e326e3dbba38d8cb21163
https://github.com/akanametov/CycleGAN/tree/a61e76134cfdda43306e326e3dbba38d8cb21163
DeeperAutoencoder
# 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_...
mariajmolina/ML-for-S2S
DeeperAutoencoder
false
10,568
[ "MIT" ]
0
3de32e72042ba7e8b37a433579fa9c5630246d8c
https://github.com/mariajmolina/ML-for-S2S/tree/3de32e72042ba7e8b37a433579fa9c5630246d8c
LatentLoss
import torch from torch import Tensor import torch.nn as nn class LatentLoss(nn.Module): def forward(self, mu: 'Tensor', logvar: 'Tensor') ->Tensor: loss = -0.5 * torch.sum(1 + logvar - mu.pow(2) - logvar.exp()) return loss def get_inputs(): return [torch.rand([4, 4, 4, 4]), torch.rand([4, ...
import torch import triton import triton.language as tl from torch._inductor.runtime.triton_heuristics import grid from torch._C import _cuda_getCurrentRawStream as get_raw_stream from torch._inductor.runtime import triton_helpers from torch._inductor.runtime.triton_helpers import math as tl_math import torch.nn as nn ...
jinyeom/vae
LatentLoss
false
3,734
[ "MIT" ]
0
861cb2edd5cebc9f56c2677d7b79f5ab0a05f874
https://github.com/jinyeom/vae/tree/861cb2edd5cebc9f56c2677d7b79f5ab0a05f874
_Enc
# 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 assert_size_stride = torch._C._dynamo.guards.assert_size_stride empty_strided_cu...
SimonNick/metakbc
_Enc
false
5,825
[ "MIT" ]
1
b502104e00afcb274c673ecd3aaa0415933e745e
https://github.com/SimonNick/metakbc/tree/b502104e00afcb274c673ecd3aaa0415933e745e
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 from torch import nn import torch.nn.parallel import torch.optim import torch.utils.data ...
Ramstein/Retinopathy2
MaxPool
false
974
[ "MIT" ]
0
669e74206c466e6351d4e3df6087c6aa39b5c6c2
https://github.com/Ramstein/Retinopathy2/tree/669e74206c466e6351d4e3df6087c6aa39b5c6c2
NNMerge
# 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...
Justin-Yuan/learn-to-interact
NNMerge
false
5,414
[ "MIT" ]
1
eb013bb3bab269bda8a8075e64fe3bcd2964d8ae
https://github.com/Justin-Yuan/learn-to-interact/tree/eb013bb3bab269bda8a8075e64fe3bcd2964d8ae
MyModel
import torch import torch.nn as nn import torch.nn.functional as F class MyModel(nn.Module): def __init__(self, state_size, action_size): super(MyModel, self).__init__() self.fc1 = nn.Linear(state_size, 64) self.fc2 = nn.Linear(64, 64) self.fc3 = nn.Linear(64, action_size) 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 import torch.nn as nn assert_...
Ghazalmg/slimevolleygym
MyModel
false
2,295
[ "Apache-2.0" ]
0
d880a35625c22bbe0bc10fa0352495f0aea06364
https://github.com/Ghazalmg/slimevolleygym/tree/d880a35625c22bbe0bc10fa0352495f0aea06364
Net_mish_ranger
# 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...
kartheikiyer/dense_basis_toolbelt
Net_mish_ranger
false
12,660
[ "MIT" ]
0
5cae6e8f4ea6983fba3625f47413d40d6b3bc6e4
https://github.com/kartheikiyer/dense_basis_toolbelt/tree/5cae6e8f4ea6983fba3625f47413d40d6b3bc6e4
ResidualDenseBlock_5C
import torch import torch.nn as nn from torch.nn import Parameter def l2normalize(v, eps=1e-12): return v / (v.norm() + eps) class LayerNorm(nn.Module): def __init__(self, num_features, eps=1e-08, affine=True): super(LayerNorm, self).__init__() self.num_features = num_features self....
import torch from torch._inductor.select_algorithm import extern_kernels import triton import triton.language as tl from torch._inductor.runtime.triton_heuristics import grid from torch._C import _cuda_getCurrentRawStream as get_raw_stream import torch.nn as nn from torch.nn import Parameter assert_size_stride = torch....
LenKerr/Semantic-Colorization-GAN
ResidualDenseBlock_5C
false
5,528
[ "MIT" ]
1
2ce52406ca6fc92e69692b451b1c9ae66ba3b76f
https://github.com/LenKerr/Semantic-Colorization-GAN/tree/2ce52406ca6fc92e69692b451b1c9ae66ba3b76f
ScalarMix
import torch import torch.nn as nn class ScalarMix(nn.Module): """ Computes a parameterised scalar mixture of :math:`N` tensors, :math:`mixture = \\gamma * \\sum_{k}(s_k * tensor_k)` where :math:`s = \\mathrm{softmax}(w)`, with :math:`w` and :math:`\\gamma` scalar parameters. Args: n_layers (...
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...
KoichiYasuoka/SuPar
ScalarMix
false
11,617
[ "MIT" ]
0
9bcf10fb946cae75b6a311d4cd19bec5bb1a9487
https://github.com/KoichiYasuoka/SuPar/tree/9bcf10fb946cae75b6a311d4cd19bec5bb1a9487