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
TripletLoss
# 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 ...
Alonso94/Representation-learning
TripletLoss
false
18
[ "MIT" ]
0
c4410b3bc5d2d1de666fba2958c4a7024e2af79f
https://github.com/Alonso94/Representation-learning/tree/c4410b3bc5d2d1de666fba2958c4a7024e2af79f
Value
import torch import torch.nn as nn class Value(nn.Module): def __init__(self, num_inputs): super(Value, self).__init__() self.affine1 = nn.Linear(num_inputs, 64) self.affine2 = nn.Linear(64, 64) self.value_head = nn.Linear(64, 1) self.value_head.weight.data.mul_(0.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.triton_helpers import libdevice import torch.nn as ...
aranganath/pytorch-trpo
Value
false
9,753
[ "MIT" ]
0
a85bc48261eb4ed5833209da706379e9dc84592f
https://github.com/aranganath/pytorch-trpo/tree/a85bc48261eb4ed5833209da706379e9dc84592f
PatchEmbedding
import torch import torch.nn as nn class PatchEmbedding(nn.Module): def __init__(self, image_size, patch_size, embed_dim, channels): super().__init__() self.image_size = image_size if image_size[0] % patch_size != 0 or image_size[1] % patch_size != 0: raise ValueError( ...
import torch from torch._inductor.select_algorithm import extern_kernels import 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...
Curli-quan/fewshot-select
PatchEmbedding
false
17,205
[ "Apache-2.0" ]
7
34f8ce5069ed1fbd01c1fa73a3ef264c98dadafe
https://github.com/Curli-quan/fewshot-select/tree/34f8ce5069ed1fbd01c1fa73a3ef264c98dadafe
LayerNorm
# AOT ID: ['0_forward'] from ctypes import c_void_p, c_long, c_int import torch import math import random import os import tempfile from math import inf, nan from torch._inductor.hooks import run_intermediate_hooks from torch._inductor.utils import maybe_profile from torch._inductor.codegen.memory_planning import _alig...
import torch import triton import triton.language as tl from torch._inductor.runtime.triton_heuristics import grid from torch._C import _cuda_getCurrentRawStream as get_raw_stream from torch._inductor.runtime.triton_helpers import libdevice import torch.nn as nn import torch.utils.data assert_size_stride = torch._C._dy...
FadedCosine/Dependency-Guided-Neural-Text-Generation
LayerNorm
false
8,090
[ "Apache-2.0" ]
19
600ad563ce240c7807f839f7eee5251616b9325b
https://github.com/FadedCosine/Dependency-Guided-Neural-Text-Generation/tree/600ad563ce240c7807f839f7eee5251616b9325b
CriticVanilla
import torch import torch.nn as nn import torch.nn.functional as F class MLPBase(nn.Module): def __init__(self, num_inputs, num_outputs): super(MLPBase, self).__init__() self.l1 = nn.Linear(num_inputs, 400) self.l2 = nn.Linear(400, 300) self.l3 = nn.Linear(300, num_outputs) d...
import torch from torch._inductor.select_algorithm import extern_kernels import triton import triton.language as tl from torch._inductor.runtime.triton_heuristics import grid from torch._C import _cuda_getCurrentRawStream as get_raw_stream from torch._inductor.runtime import triton_helpers import torch.nn as nn import ...
yangfanthu/modular-rl
CriticVanilla
false
13,136
[ "BSD-2-Clause" ]
0
25c599bab641a7e732dbaf116cd240fa2358f113
https://github.com/yangfanthu/modular-rl/tree/25c599bab641a7e732dbaf116cd240fa2358f113
MuSigmaEncoder
import torch from typing import Tuple from torch import nn class MuSigmaEncoder(nn.Module): """ Maps a representation r to mu and sigma which will define the normal distribution from which we sample the latent variable z. Parameters ---------- r_dim : int Dimension of output representa...
import torch from torch._inductor.select_algorithm import extern_kernels import triton import triton.language 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...
deltaskelta/neural-processes
MuSigmaEncoder
false
1,823
[ "MIT" ]
0
34a6b98b7a9142f5e5f87f7f1644217d5aa9e1bb
https://github.com/deltaskelta/neural-processes/tree/34a6b98b7a9142f5e5f87f7f1644217d5aa9e1bb
L1Loss
# AOT ID: ['0_inference'] from ctypes import c_void_p, c_long, c_int import torch import math import random import os import tempfile from math import inf, nan from torch._inductor.hooks import run_intermediate_hooks from torch._inductor.utils import maybe_profile from torch._inductor.codegen.memory_planning import _al...
import torch import triton import triton.language as tl from torch._inductor.runtime.triton_heuristics import grid from torch._C import _cuda_getCurrentRawStream as get_raw_stream from torch._inductor.runtime import triton_helpers from torch._inductor.runtime.triton_helpers import math as tl_math assert_size_stride = t...
cviaai/MARL-NIR
L1Loss
false
3,364
[ "MIT" ]
0
f90f2353b03023546110c08ab1a24cf8edafb5fb
https://github.com/cviaai/MARL-NIR/tree/f90f2353b03023546110c08ab1a24cf8edafb5fb
LayerNorm
# AOT ID: ['0_forward'] from ctypes import c_void_p, c_long, c_int import torch import math import random import os import tempfile from math import inf, nan from torch._inductor.hooks import run_intermediate_hooks from torch._inductor.utils import maybe_profile from torch._inductor.codegen.memory_planning import _alig...
import torch import triton import triton.language as tl from torch._inductor.runtime.triton_heuristics import grid from torch._C import _cuda_getCurrentRawStream as get_raw_stream from torch._inductor.runtime.triton_helpers import libdevice import torch.nn as nn assert_size_stride = torch._C._dynamo.guards.assert_size_...
JieFeng-cse/power-system-rl
LayerNorm
false
9,179
[ "MIT" ]
0
8295d14da83a40c755b8e6a14785c53a238f9a64
https://github.com/JieFeng-cse/power-system-rl/tree/8295d14da83a40c755b8e6a14785c53a238f9a64
Mnist_CNN
import torch import torch.nn as nn import torch.nn.functional as F import torch.quantization import torch.onnx import torch.nn.parallel import torch.optim import torch.utils.data import torch.utils.data.distributed class Mnist_CNN(nn.Module): def __init__(self): super().__init__() self.conv1 = nn...
import torch from torch._inductor.select_algorithm import extern_kernels import triton import triton.language as tl from torch._inductor.runtime.triton_heuristics import grid from torch._C import _cuda_getCurrentRawStream as get_raw_stream from torch._inductor.runtime import triton_helpers import torch.nn as nn import ...
hongsam123/PyTorch-tutorials-kr
Mnist_CNN
false
10,204
[ "BSD-3-Clause" ]
0
e48bbbc7088bf6b9da66abb8862b8d0539662bd5
https://github.com/hongsam123/PyTorch-tutorials-kr/tree/e48bbbc7088bf6b9da66abb8862b8d0539662bd5
CenterLoss
# 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 torch.nn as nn assert...
grib0ed0v/face_recognition.pytorch
CenterLoss
false
15,466
[ "Apache-2.0" ]
158
05cb9b30e8220445fcb27988926d88f330091c12
https://github.com/grib0ed0v/face_recognition.pytorch/tree/05cb9b30e8220445fcb27988926d88f330091c12
PositionEmbedder
import torch import torch.nn class PositionEmbedder(torch.nn.Module): """ [batch_size, seq_length, embedding_size] """ def __init__(self, max_sequence_length: 'int', embedding_dim: 'int'): super(PositionEmbedder, self).__init__() self.embedding = torch.nn.Embedding(max_sequence_length...
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 assert_size_stride = torch._C._dynamo.guards.assert_size_stride empty_strided_cuda = torch._C._dynamo.guards._empty_strided_...
DanBerrebbi/shiba
PositionEmbedder
false
11,333
[ "Apache-2.0" ]
0
3f2793f3e1797be79dd6d491b7ecd2d7de765555
https://github.com/DanBerrebbi/shiba/tree/3f2793f3e1797be79dd6d491b7ecd2d7de765555
ContextGating
# 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...
venisehannoyer/Hear-me-GirlsInAI-team1
ContextGating
false
10,950
[ "Apache-2.0" ]
0
664b3af4befe9b73c28d4362969699bc2254bdf9
https://github.com/venisehannoyer/Hear-me-GirlsInAI-team1/tree/664b3af4befe9b73c28d4362969699bc2254bdf9
DC_layer
# AOT ID: ['0_forward'] from ctypes import c_void_p, c_long, c_int import torch import math import random import os import tempfile from math import inf, nan from torch._inductor.hooks import run_intermediate_hooks from torch._inductor.utils import maybe_profile from torch._inductor.codegen.memory_planning import _alig...
import torch from torch._inductor.select_algorithm import extern_kernels import triton import triton.language as tl from torch._inductor.runtime.triton_heuristics import grid from torch._C import _cuda_getCurrentRawStream as get_raw_stream import torch.nn as nn assert_size_stride = torch._C._dynamo.guards.assert_size_s...
Min-Sheng/Local-Crowd-Counting
DC_layer
false
14,103
[ "MIT" ]
75
388343d3ec2d08747d537437e4c880fd0047df83
https://github.com/Min-Sheng/Local-Crowd-Counting/tree/388343d3ec2d08747d537437e4c880fd0047df83
AEC
import torch import numpy as np import torch.nn.functional as F from torch import nn class AEC(nn.Module): def __init__(self, hidden_nodes, conv_width, pixel_patchsize, lambda_activation): super(AEC, self).__init__() self.hidden_nodes = hidden_nodes self.conv_width = conv_width ...
import torch from torch._inductor.select_algorithm import extern_kernels import triton import triton.language 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....
vdutell/biophys_encoder
AEC
false
13,077
[ "Apache-2.0" ]
0
2ca8011338c4f1eb6b50e7cb74e07d105d1e9669
https://github.com/vdutell/biophys_encoder/tree/2ca8011338c4f1eb6b50e7cb74e07d105d1e9669
MegatronFastGelu
# 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 import torch.onnx import torch.utils.checkpoint assert_size_str...
TingGong1/onnxruntime
MegatronFastGelu
false
5,894
[ "MIT" ]
1
435010ab6873974803591fa22262ed8b3e36e44d
https://github.com/TingGong1/onnxruntime/tree/435010ab6873974803591fa22262ed8b3e36e44d
VanillaRNN
import torch from torch import nn class VanillaRNN(nn.Module): """ An implementation of vanilla RNN using Pytorch Linear layers and activations. You will need to complete the class init function, forward function and hidden layer initialization. """ def __init__(self, input_size, hidden_size, out...
import torch from torch._inductor.select_algorithm import extern_kernels import triton import triton.language as tl from torch._inductor.runtime.triton_heuristics import grid from torch._C import _cuda_getCurrentRawStream as get_raw_stream from torch._inductor.runtime import triton_helpers from torch._inductor.runtime....
Kuga23/Deep-Learning
VanillaRNN
false
2,481
[ "MIT" ]
0
86980338208c702b6bfcbcfffdb18498e389a56b
https://github.com/Kuga23/Deep-Learning/tree/86980338208c702b6bfcbcfffdb18498e389a56b
BertMLP
from _paritybench_helpers import _mock_config import torch import torch.nn as nn class BertMLP(nn.Module): def __init__(self, config): super().__init__() self.dense_layer = nn.Linear(config.hidden_size, config.hidden_size) self.dense_to_labels_layer = nn.Linear(config.hidden_size, config....
import torch from torch._inductor.select_algorithm import extern_kernels import triton import triton.language 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 ...
JunnYu/GlyceBert_tokenizer
BertMLP
false
18,371
[ "MIT" ]
7
27ded9d20421e274ec2e7139e9c79da56d8ad42f
https://github.com/JunnYu/GlyceBert_tokenizer/tree/27ded9d20421e274ec2e7139e9c79da56d8ad42f
RobustLogisticRegression
# 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 numpy as np from torch import nn from torch.utils.data import DataLoader from torchvision import transforms from sklearn.preprocessin...
vitskvara/shape-guided-anomaly-detection
RobustLogisticRegression
false
4,732
[ "MIT" ]
0
6685b2e0b97968a6d0f478d2920486da107b277f
https://github.com/vitskvara/shape-guided-anomaly-detection/tree/6685b2e0b97968a6d0f478d2920486da107b277f
TransformerEncoderLayer
import torch import torch.nn as nn class MultiHeadAttention(nn.Module): """Multi-Head Attention module.""" def __init__(self, n_head=8, d_model=512, d_k=64, d_v=64, dropout=0.1, qkv_bias=False, mask_value=0): super().__init__() self.mask_value = mask_value self.n_head = n_head...
import torch from torch._inductor.select_algorithm import extern_kernels import triton import triton.language 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....
SamDM/mmocr
TransformerEncoderLayer
false
9,514
[ "Apache-2.0" ]
0
4cb69141ff8d28c8b1437bf28242e368a0e6ec4f
https://github.com/SamDM/mmocr/tree/4cb69141ff8d28c8b1437bf28242e368a0e6ec4f
ResizeTransform
# 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 assert_size_stride = torch._C._dynamo.guards.assert_size_stride empty_strided_cuda = torch._C._dyna...
Alison-brie/MultiPropReg
ResizeTransform
false
7,633
[ "MIT" ]
14
526d843b161c0e2e53ec5c7c47de6964c6a44c60
https://github.com/Alison-brie/MultiPropReg/tree/526d843b161c0e2e53ec5c7c47de6964c6a44c60
Encoder
import torch import torch.utils.data import torch.nn as nn import torch.nn.functional as F class Encoder(nn.Module): """ VAE encoder """ def __init__(self, img_channels, latent_size): super(Encoder, self).__init__() self.latent_size = latent_size self.img_channels = img_channels ...
import torch from torch._inductor.select_algorithm import extern_kernels import triton import triton.language as tl from torch._inductor.runtime.triton_heuristics import grid from torch._C import _cuda_getCurrentRawStream as get_raw_stream from torch._inductor.runtime import triton_helpers import torch.utils.data impor...
benedictquartey/modified-wm
Encoder
false
3,212
[ "MIT" ]
0
bc6cab1aadff24f4be8bb7b9c183b6ef266cf8ba
https://github.com/benedictquartey/modified-wm/tree/bc6cab1aadff24f4be8bb7b9c183b6ef266cf8ba
ChannelAvgPool
# 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...
joeization/CycleGAN
ChannelAvgPool
false
3,752
[ "MIT" ]
0
9635c8e3a7b1634b2e2eb5b5299f03a4e0786868
https://github.com/joeization/CycleGAN/tree/9635c8e3a7b1634b2e2eb5b5299f03a4e0786868
evolution_area
import torch import torch.nn as nn class evolution_area(nn.Module): """ calcaulate the area of evolution curve """ def __init__(self): super(evolution_area, self).__init__() def forward(self, mask_score, class_weight): curve_area = torch.sum(class_weight * mask_score) 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 import torch.nn as nn assert_size_stride = torch._C._dynamo.guards.assert_size_stride emp...
LiWentomng/boxlevelset
evolution_area
false
8,462
[ "Apache-2.0" ]
25
8cc40bf6ae4a343c482c676c72259cc12c29d31c
https://github.com/LiWentomng/boxlevelset/tree/8cc40bf6ae4a343c482c676c72259cc12c29d31c
SelfAttentionBatch
# 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....
Xiaolong-Qi/CRSLab
SelfAttentionBatch
false
5,999
[ "MIT" ]
1
d507378c86f4996727bf062482e1f224486d4533
https://github.com/Xiaolong-Qi/CRSLab/tree/d507378c86f4996727bf062482e1f224486d4533
TVLoss
# 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 typing import Tuple from torch.nn.modules.loss import _Loss from typing im...
photosynthesis-team/piq
TVLoss
false
16,256
[ "Apache-2.0" ]
471
79cccf887dd28ce57dea461972cda3648a79165a
https://github.com/photosynthesis-team/piq/tree/79cccf887dd28ce57dea461972cda3648a79165a
ResidualAttentionBlock
# 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....
Jack000/glid-3
ResidualAttentionBlock
false
8,310
[ "MIT" ]
31
4a18efc2785339ebc743e149a7955e34fff436fb
https://github.com/Jack000/glid-3/tree/4a18efc2785339ebc743e149a7955e34fff436fb
Sum
import torch import torch.nn as nn import torch.utils.data class Sum(nn.Module): def __init__(self, n, weight=False): super(Sum, self).__init__() self.weight = weight self.iter = range(n - 1) if weight: self.w = nn.Parameter(-torch.arange(1.0, n) / 2, requires_grad=Tru...
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....
Arui66/FPSAutomaticAiming
Sum
false
13,302
[ "Apache-2.0" ]
129
87674385d42b065b984b38a2ff59e7f2d4f07dc9
https://github.com/Arui66/FPSAutomaticAiming/tree/87674385d42b065b984b38a2ff59e7f2d4f07dc9
DQN
# 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_...
NickHclos/DDPG-PyTorch
DQN
false
11,754
[ "MIT" ]
0
9f6df328c275ff5c579fa0e4f7b30ab234cf236d
https://github.com/NickHclos/DDPG-PyTorch/tree/9f6df328c275ff5c579fa0e4f7b30ab234cf236d
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....
chenjun-110/WZCQ
MultiHeadAttention
false
1,695
[ "Apache-2.0" ]
0
e2de7743ad671e8632cfa084638555d7f1deb42f
https://github.com/chenjun-110/WZCQ/tree/e2de7743ad671e8632cfa084638555d7f1deb42f
DeepNN_v3
# 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 ...
SBIlab/NetBio
DeepNN_v3
false
11,831
[ "MIT" ]
0
7abd24b8989cea381147d912f76a72676750b9d2
https://github.com/SBIlab/NetBio/tree/7abd24b8989cea381147d912f76a72676750b9d2
PcamPool
# 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...
alinstein/X_RAY
PcamPool
false
18,253
[ "MIT" ]
4
35a39761d3b11ce9e47509025054f25e5f26aab9
https://github.com/alinstein/X_RAY/tree/35a39761d3b11ce9e47509025054f25e5f26aab9
VectorCrossEntropy
# 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 ...
PavelOstyakov/pipeline
VectorCrossEntropy
false
14,156
[ "MIT" ]
214
236c050af3be9dbb534e959589040e9433501e2b
https://github.com/PavelOstyakov/pipeline/tree/236c050af3be9dbb534e959589040e9433501e2b
IIDIsotropicGaussianUVLoss
import math import torch import torch.utils.data import torch.nn.functional as F from torch import nn class IIDIsotropicGaussianUVLoss(nn.Module): """ Loss for the case of iid residuals with isotropic covariance: $Sigma_i = sigma_i^2 I$ The loss (negative log likelihood) is then: $1/2 sum_{i=1}^n ...
import torch import triton import triton.language as tl from torch._inductor.runtime.triton_heuristics import grid from torch._C import _cuda_getCurrentRawStream as get_raw_stream from torch._inductor.runtime import triton_helpers from torch._inductor.runtime.triton_helpers import libdevice, math as tl_math import math...
FluteXu/DW-Research
IIDIsotropicGaussianUVLoss
false
13,687
[ "Apache-2.0" ]
780
6b559d2d1d440c07e5936a65cd74a3bc657962dc
https://github.com/FluteXu/DW-Research/tree/6b559d2d1d440c07e5936a65cd74a3bc657962dc
L2Norm
import torch from torch import nn class L2Norm(nn.Module): def forward(self, x, eps=1e-06): norm = x.norm(dim=1, keepdim=True).clamp(min=eps) return x / norm def get_inputs(): return [torch.rand([4, 4, 4, 4])] def get_init_inputs(): return [[], {}]
import torch import triton import triton.language as tl from torch._inductor.runtime.triton_heuristics import grid from torch._C import _cuda_getCurrentRawStream as get_raw_stream from torch._inductor.runtime import triton_helpers from torch._inductor.runtime.triton_helpers import libdevice from torch import nn assert_...
Mohan-Zhang-u/vit-pytorch
L2Norm
false
11,706
[ "MIT" ]
0
76050c812474d7c10d67db4e811f537e26c3996a
https://github.com/Mohan-Zhang-u/vit-pytorch/tree/76050c812474d7c10d67db4e811f537e26c3996a
Conv1d
# 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...
AstraliteHeart/cookietts
Conv1d
false
7,746
[ "BSD-3-Clause" ]
25
c871f5f7b5790656d5b57bcd9e63946a2da52f0f
https://github.com/AstraliteHeart/cookietts/tree/c871f5f7b5790656d5b57bcd9e63946a2da52f0f
RawArborist
import torch import torch.nn as nn class RawArborist(nn.Module): def __init__(self, l_dim, r_dim, k=5): super(RawArborist, self).__init__() self.u = nn.Linear(l_dim, k, bias=False) self.W = nn.Bilinear(l_dim, r_dim, k, bias=False) def forward(self, e, q): u = self.u(e) ...
import torch from torch._inductor.select_algorithm import extern_kernels import 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...
QingkaiZeng/GenTaxo
RawArborist
false
8,716
[ "MIT" ]
28
10257a1714d14c6a4c49cbfa0b507408f718cdf0
https://github.com/QingkaiZeng/GenTaxo/tree/10257a1714d14c6a4c49cbfa0b507408f718cdf0
BoxOffsetIntersection
import torch from torch import nn import torch.nn.functional as F class BoxOffsetIntersection(nn.Module): def __init__(self, dim): super(BoxOffsetIntersection, self).__init__() self.dim = dim self.layer1 = nn.Linear(self.dim, self.dim) self.layer2 = nn.Linear(self.dim, self.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 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
MRAE
# 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 ...
IVRL/Multi-Modal-Spectral-Image-Super-Resolution
MRAE
false
17,422
[ "MIT" ]
9
6afe35c16d4cc2466e5eb51f3ddc39b43f6f765e
https://github.com/IVRL/Multi-Modal-Spectral-Image-Super-Resolution/tree/6afe35c16d4cc2466e5eb51f3ddc39b43f6f765e
MinibatchStddev
import torch from torch import nn def Tstdeps(val): return torch.sqrt(((val - val.mean()) ** 2).mean() + 1e-08) class MinibatchStddev(nn.Module): def __init__(self): super(MinibatchStddev, self).__init__() self.eps = 1.0 def forward(self, x): stddev_mean = Tstdeps(x) ne...
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_...
deepsound-project/pggan-pytorch
MinibatchStddev
false
15,170
[ "MIT" ]
115
dab2ec79229c3800253a209304dbb1e7ac1d1219
https://github.com/deepsound-project/pggan-pytorch/tree/dab2ec79229c3800253a209304dbb1e7ac1d1219
ConvReLU2
import math import torch import torch.nn.functional as F from torch.nn import Conv2d from torch.nn import LeakyReLU class PadSameConv2d(torch.nn.Module): def __init__(self, kernel_size, stride=1): """ Imitates padding_mode="same" from tensorflow. :param kernel_size: Kernelsize of the conv...
import torch from torch._inductor.select_algorithm import extern_kernels import triton import triton.language as tl from torch._inductor.runtime.triton_heuristics import grid from torch._C import _cuda_getCurrentRawStream as get_raw_stream import math import torch.nn.functional as F from torch.nn import Conv2d from tor...
pc2005/MonoRec
ConvReLU2
false
12,873
[ "MIT" ]
0
6e1628eeef9987b1acce3e5e8bb6a6a324fc8d2c
https://github.com/pc2005/MonoRec/tree/6e1628eeef9987b1acce3e5e8bb6a6a324fc8d2c
MyLinear
import torch import torch.nn as nn class MyLinear(nn.Module): def __init__(self, in_sz, out_sz, bias=True): super(MyLinear, self).__init__() self.in_sz = in_sz self.out_sz = out_sz self.bias = bias self.W = nn.Parameter(torch.empty((in_sz, out_sz))) self.b = nn.Par...
import torch from torch._inductor.select_algorithm import extern_kernels import triton import triton.language as tl from torch._inductor.runtime.triton_heuristics import grid from torch._C import _cuda_getCurrentRawStream as get_raw_stream import torch.nn as nn assert_size_stride = torch._C._dynamo.guards.assert_size_s...
mahkons/orthogonal
MyLinear
false
3,960
[ "MIT" ]
0
19a69134ca9a01ef564eab624b8c1526291770aa
https://github.com/mahkons/orthogonal/tree/19a69134ca9a01ef564eab624b8c1526291770aa
OrthogonalLoss
import torch import torch.nn.functional as F from torch import nn class OrthogonalLoss(nn.Module): def __init__(self): super(OrthogonalLoss, self).__init__() def forward(self, features, descriptor, labels): features = F.normalize(features, dim=1) labels_equal = torch.eq(labels.unsque...
import torch from torch._inductor.select_algorithm import extern_kernels import triton import triton.language 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....
chrisbyd/ContrastiveVehicleQuant
OrthogonalLoss
false
9,921
[ "MIT" ]
0
bf471988868cf0cb9713002dd1d6726272ecce7f
https://github.com/chrisbyd/ContrastiveVehicleQuant/tree/bf471988868cf0cb9713002dd1d6726272ecce7f
MaxPool1D
import torch class MaxPool1D(torch.nn.Module): def __init__(self, kernel_size, stride=None, padding=0, ceil_mode=False): super().__init__() self.kernel_size = kernel_size self.stride = stride self.padding = padding self.ceil_mode = ceil_mode def forward(self, x): ...
import torch import triton import triton.language as tl from torch._inductor.runtime.triton_heuristics import grid from torch._C import _cuda_getCurrentRawStream as get_raw_stream from torch._inductor.runtime import triton_helpers assert_size_stride = torch._C._dynamo.guards.assert_size_stride empty_strided_cuda = torc...
Ilyabasharov/torch2trt
MaxPool1D
false
2,532
[ "MIT" ]
0
76bf298b3da408509665e23e2494922b131afb10
https://github.com/Ilyabasharov/torch2trt/tree/76bf298b3da408509665e23e2494922b131afb10
MegatronFastGelu
import torch import torch.nn import torch.onnx class MegatronFastGelu(torch.nn.Module): def forward(self, x): return 0.5 * x * (1.0 + torch.tanh(0.7978845608028654 * x * (1.0 + 0.044715 * x * x))) def get_inputs(): return [torch.rand([4, 4, 4, 4])] def get_init_inputs(): return [...
import torch import triton import triton.language as tl from torch._inductor.runtime.triton_heuristics import grid from torch._C import _cuda_getCurrentRawStream as get_raw_stream from torch._inductor.runtime.triton_helpers import libdevice import torch.nn import torch.onnx assert_size_stride = torch._C._dynamo.guards....
thilow/onnxruntime
MegatronFastGelu
false
11,014
[ "MIT" ]
0
1a3ddf0714e1bdf9b807a342eee5f6e160ad1ec9
https://github.com/thilow/onnxruntime/tree/1a3ddf0714e1bdf9b807a342eee5f6e160ad1ec9
DecoderLayer
# 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....
WOMMOW/AIT
DecoderLayer
false
1,233
[ "MIT" ]
0
305fe7962bf9c5c24b6854e3ff0b7e2e669bf5a5
https://github.com/WOMMOW/AIT/tree/305fe7962bf9c5c24b6854e3ff0b7e2e669bf5a5
GHMR
# 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...
ChengBo5/mask-text-detector
GHMR
false
272
[ "Apache-2.0" ]
0
ce93e45ed1d982ec0ef6ad977c02e49326bf255a
https://github.com/ChengBo5/mask-text-detector/tree/ce93e45ed1d982ec0ef6ad977c02e49326bf255a
Conv2dWithFastWeight
import torch from torch import Tensor from typing import Tuple from typing import Union import torch.nn as nn import torch.nn.functional as F class Conv2dWithFastWeight(nn.Conv2d): def __init__(self, in_channels: 'int', out_channels: 'int', kernel_size: 'Union[int, Tuple]', stride: 'Union[int, Tuple]'=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 typing import Tuple from typing import Union import torch.nn as nn assert_s...
BIGWangYuDong/mmfewshot
Conv2dWithFastWeight
false
13,361
[ "Apache-2.0" ]
376
dac097afc92df176bc2de76b7c90968584865197
https://github.com/BIGWangYuDong/mmfewshot/tree/dac097afc92df176bc2de76b7c90968584865197
ReferenceActivationBinarizationModule
# 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 from torchvision import models as models import torch.nn.parallel import torch.optim import torch.utils.data import tor...
aalborov/openvino_training_extensions
ReferenceActivationBinarizationModule
false
6,039
[ "Apache-2.0" ]
1
a0bb39424151a98e1ca80c4aa5c865636d401785
https://github.com/aalborov/openvino_training_extensions/tree/a0bb39424151a98e1ca80c4aa5c865636d401785
DeterministicSumming
# 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...
kiudee/cs-ranking
DeterministicSumming
false
15,832
[ "Apache-2.0" ]
65
47cf648fa286c37b9214bbad1926004d4d7d9796
https://github.com/kiudee/cs-ranking/tree/47cf648fa286c37b9214bbad1926004d4d7d9796
eSEModule
# 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 ...
BXuan694/basemodel-pytorch
eSEModule
false
4,890
[ "MIT" ]
1
a36c96904580be902e323db17eebbe2ea1f54176
https://github.com/BXuan694/basemodel-pytorch/tree/a36c96904580be902e323db17eebbe2ea1f54176
DIoU_loss
# 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...
debrouchovea/ReproduceGoturn
DIoU_loss
false
3,422
[ "MIT" ]
0
d60f13c781ca612cacc17536530bbee989bdfa45
https://github.com/debrouchovea/ReproduceGoturn/tree/d60f13c781ca612cacc17536530bbee989bdfa45
Gated_Conv_1d
# 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 ...
ioanvl/wavenet_classifier_torch
Gated_Conv_1d
false
6,894
[ "MIT" ]
1
de29bfce59d52ae46143f62c4d7a6158a04edf00
https://github.com/ioanvl/wavenet_classifier_torch/tree/de29bfce59d52ae46143f62c4d7a6158a04edf00
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....
Weiyuhong-1998/DI-engine
MultiHeadAttention
false
14,586
[ "Apache-2.0" ]
464
88658ea358298c6e61e95a454284b8853a3e9484
https://github.com/Weiyuhong-1998/DI-engine/tree/88658ea358298c6e61e95a454284b8853a3e9484
SimpleFloorModule
# 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._...
opti-mix/glow
SimpleFloorModule
false
7,397
[ "Apache-2.0" ]
1
4ba074df5da9822986a23a6679ab592c22660f6d
https://github.com/opti-mix/glow/tree/4ba074df5da9822986a23a6679ab592c22660f6d
Noise
# 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 import triton import 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....
Rexiome/lightweight-gan
Noise
false
2,747
[ "MIT" ]
0
4e5c18046fc105129c33995e0bffeb5f14963f4c
https://github.com/Rexiome/lightweight-gan/tree/4e5c18046fc105129c33995e0bffeb5f14963f4c
TripletLoss
import torch from torch import nn import torch.nn.functional as F from torch.nn import * from torch.optim.lr_scheduler import * def _batch_hard(mat_distance, mat_similarity, indice=False): sorted_mat_distance, positive_indices = torch.sort(mat_distance + - 9999999.0 * (1 - mat_similarity), dim=1, descendi...
import torch from torch._inductor.select_algorithm import extern_kernels import triton import triton.language 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....
chrizandr/MMT
TripletLoss
false
12,215
[ "MIT" ]
0
e2bb5984efb165e7ea1ed6080610cfe176344ac0
https://github.com/chrizandr/MMT/tree/e2bb5984efb165e7ea1ed6080610cfe176344ac0
PatchEmbed
import torch from torch import nn class PatchEmbed(nn.Module): def __init__(self, input_shape=[224, 224], patch_size=16, in_chans=3, num_features=768, norm_layer=None, flatten=True): super().__init__() self.num_patches = input_shape[0] // patch_size * (input_shape[1] // patch_...
import torch from torch._inductor.select_algorithm import extern_kernels import triton import triton.language as tl from torch._inductor.runtime.triton_heuristics import grid from torch._C import _cuda_getCurrentRawStream as get_raw_stream from torch import nn assert_size_stride = torch._C._dynamo.guards.assert_size_st...
bubbliiiing/classification-pytorch
PatchEmbed
false
14,989
[ "MIT" ]
88
ee62c05bd3094c3fab48bada5a57cb2ed8b61c11
https://github.com/bubbliiiing/classification-pytorch/tree/ee62c05bd3094c3fab48bada5a57cb2ed8b61c11
Gaussianize
import torch import torch.nn as nn class Gaussianize(nn.Module): """ Gaussianization per RealNVP sec 3.6 / fig 4b -- at each step half the variables are directly modeled as Gaussians. Model as Gaussians: x2 = z2 * exp(logs) + mu, so x2 ~ N(mu, exp(logs)^2) where mu, logs = f(x1) then to recover th...
import torch from torch._inductor.select_algorithm import extern_kernels import triton import triton.language 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....
ffraaz/flow_based_priors
Gaussianize
false
3,498
[ "MIT" ]
0
4f61ecc233a01375c9a069a8baf676152a3e20fa
https://github.com/ffraaz/flow_based_priors/tree/4f61ecc233a01375c9a069a8baf676152a3e20fa
HexaLinearScore
# AOT ID: ['0_forward'] from ctypes import c_void_p, c_long, c_int import torch import math import random import os import tempfile from math import inf, nan from torch._inductor.hooks import run_intermediate_hooks from torch._inductor.utils import maybe_profile from torch._inductor.codegen.memory_planning import _alig...
import torch from torch._inductor.select_algorithm import extern_kernels import triton import triton.language as tl from torch._inductor.runtime.triton_heuristics import grid from torch._C import _cuda_getCurrentRawStream as get_raw_stream import math import torch.nn as nn import torch.utils.data.dataloader import torc...
ciaochiaociao/CLNER
HexaLinearScore
false
3,378
[ "MIT" ]
0
a31fb1c3bfdaa5d62147dc892489d29a85e6b385
https://github.com/ciaochiaociao/CLNER/tree/a31fb1c3bfdaa5d62147dc892489d29a85e6b385
FCN8s
import torch import torch.utils.data import torch import torch.nn as nn from torchvision import models from numpy.random import * class FCN8s(nn.Module): def __init__(self, n_class=20): super(FCN8s, self).__init__() self.conv1_1 = nn.Conv2d(3, 64, 3, padding=100) self.relu1_1 = nn.ReLU(in...
import torch from torch._inductor.select_algorithm import extern_kernels import triton import triton.language as tl from torch._inductor.runtime.triton_heuristics import grid from torch._C import _cuda_getCurrentRawStream as get_raw_stream from torch._inductor.runtime import triton_helpers import torch.utils.data impor...
XomniaJADS/CycleGAN_Unsupervised_Domain_Adaptation
FCN8s
false
18,393
[ "MIT" ]
4
37165c74aac8f5743799c36d0f66ee23432068f4
https://github.com/XomniaJADS/CycleGAN_Unsupervised_Domain_Adaptation/tree/37165c74aac8f5743799c36d0f66ee23432068f4
tofp16
import torch import torch.nn as nn import torch.utils.data import torch.utils.data.distributed import torch.nn.parallel import torch.optim class tofp16(nn.Module): """ Model wrapper that implements:: def forward(self, input): return input.half() """ def __init__(self): su...
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.nn.parallel import torch.optim assert_size_st...
FDecaYed/apex
tofp16
false
2,235
[ "BSD-3-Clause" ]
0
789afd89fe2c5a3e772f557055a9cf0f5e9d1241
https://github.com/FDecaYed/apex/tree/789afd89fe2c5a3e772f557055a9cf0f5e9d1241
DeepNeuralNetwork
import torch import torch.nn as nn class DeepNeuralNetwork(nn.Module): def __init__(self, u): super(DeepNeuralNetwork, self).__init__() self.fc1 = nn.Linear(1, u) self.fc2 = nn.Linear(u, u) self.fc3 = nn.Linear(u, u) self.fc4 = nn.Linear(u, 1) self.ReLu = nn.ReLU()...
import torch from torch._inductor.select_algorithm import extern_kernels import triton import triton.language as tl from torch._inductor.runtime.triton_heuristics import grid from torch._C import _cuda_getCurrentRawStream as get_raw_stream from torch._inductor.runtime import triton_helpers from torch._inductor.runtime....
peacefighter1996/PlantRecognisionFromVoxels
DeepNeuralNetwork
false
12,882
[ "MIT" ]
0
4cc9a05dbe499d5ccdc6f933c4340c283a938b29
https://github.com/peacefighter1996/PlantRecognisionFromVoxels/tree/4cc9a05dbe499d5ccdc6f933c4340c283a938b29
Smooth_Loss
# AOT ID: ['0_inference'] from ctypes import c_void_p, c_long, c_int import torch import math import random import os import tempfile from math import inf, nan from torch._inductor.hooks import run_intermediate_hooks from torch._inductor.utils import maybe_profile from torch._inductor.codegen.memory_planning import _al...
import torch import triton import triton.language as tl from torch._inductor.runtime.triton_heuristics import grid from torch._C import _cuda_getCurrentRawStream as get_raw_stream from torch._inductor.runtime.triton_helpers import math as tl_math import torch.nn as nn assert_size_stride = torch._C._dynamo.guards.assert...
NeilDG/SGID-PFF
Smooth_Loss
false
17,740
[ "MIT" ]
8
e027ac65e63f3c052665290cd0438bb7bdeabf9f
https://github.com/NeilDG/SGID-PFF/tree/e027ac65e63f3c052665290cd0438bb7bdeabf9f
Normalize
import torch from torchvision.datasets import * import torch.nn.functional as F import torch.nn as nn from torchvision.transforms import * class Normalize(nn.Module): """Performs :math:`L_p` normalization of inputs over specified dimension. Does: .. math:: v = \\frac{v}{\\max(\\lVert v \\rVert_p...
import torch import triton import triton.language as tl from torch._inductor.runtime.triton_heuristics import grid from torch._C import _cuda_getCurrentRawStream as get_raw_stream from torch._inductor.runtime import triton_helpers from torch._inductor.runtime.triton_helpers import libdevice from torchvision.datasets im...
JJavierga/PyTorch-Encoding
Normalize
false
9,462
[ "MIT" ]
0
207254b2a60276a31ffa24b76ae84df27c6ebf94
https://github.com/JJavierga/PyTorch-Encoding/tree/207254b2a60276a31ffa24b76ae84df27c6ebf94
Sub
import torch import torch.nn as nn class Sub(nn.Module): def __init__(self): super(Sub, self).__init__() def forward(self, x): x = torch.sub(x, 20) return x def get_inputs(): return [torch.rand([4, 4, 4, 4])] def get_init_inputs(): return [[], {}]
import torch import triton import triton.language as tl from torch._inductor.runtime.triton_heuristics import grid from torch._C import _cuda_getCurrentRawStream as get_raw_stream import torch.nn as nn assert_size_stride = torch._C._dynamo.guards.assert_size_stride empty_strided_cuda = torch._C._dynamo.guards._empty_st...
yifanpu001/PytorchToCaffe
Sub
false
4,723
[ "MIT" ]
0
37c1ebfc3547e93b1c174721036d03c831c60e48
https://github.com/yifanpu001/PytorchToCaffe/tree/37c1ebfc3547e93b1c174721036d03c831c60e48
SpatialGatherModule
import torch import torch.nn.functional as F import torch.nn as nn class SpatialGatherModule(nn.Module): def __init__(self, scale=1, **kwargs): super(SpatialGatherModule, self).__init__() self.scale = scale """forward""" def forward(self, features, probs): batch_size, num_classes...
import torch from torch._inductor.select_algorithm import extern_kernels import triton import triton.language 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....
SegmentationBLWX/sssegmentation
SpatialGatherModule
false
14,388
[ "MIT" ]
411
0b2e3ff5abd7b97e15ac8daf63ea214688c26541
https://github.com/SegmentationBLWX/sssegmentation/tree/0b2e3ff5abd7b97e15ac8daf63ea214688c26541
ClassHead
import torch import torch.nn as nn from itertools import product as product class ClassHead(nn.Module): def __init__(self, inchannels=512, num_anchors=3): super(ClassHead, self).__init__() self.num_anchors = num_anchors self.conv1x1 = nn.Conv2d(inchannels, self.num_anchors * 2, ...
import torch from torch._inductor.select_algorithm import extern_kernels import triton import triton.language as tl from torch._inductor.runtime.triton_heuristics import grid from torch._C import _cuda_getCurrentRawStream as get_raw_stream import torch.nn as nn from itertools import product as product assert_size_strid...
Juggernaut93/InsightFace-v2
ClassHead
false
738
[ "Apache-2.0" ]
0
65e9b8d1f285a87472ffb913bec136d4e046798f
https://github.com/Juggernaut93/InsightFace-v2/tree/65e9b8d1f285a87472ffb913bec136d4e046798f
TripletLoss
import torch from torch import nn import torch.nn.functional as F from torch.optim.lr_scheduler import * def _batch_hard(mat_distance, mat_similarity, indice=False): sorted_mat_distance, positive_indices = torch.sort(mat_distance + - 9999999.0 * (1 - mat_similarity), dim=1, descending=True) hard_p = s...
import torch from torch._inductor.select_algorithm import extern_kernels import triton import triton.language as tl from torch._inductor.runtime.triton_heuristics import grid from torch._C import _cuda_getCurrentRawStream as get_raw_stream from torch._inductor.runtime import triton_helpers from torch._inductor.runtime....
Luxios22/IDM
TripletLoss
false
2,603
[ "MIT" ]
0
8d51103b7c252e6304e2a361976e16ed4b523944
https://github.com/Luxios22/IDM/tree/8d51103b7c252e6304e2a361976e16ed4b523944
FeatureSelect
# 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.optim import torch.nn as nn assert_size_stride = torch._C._dynamo.guards.ass...
Fyy10/UESTC-Thesis-DA
FeatureSelect
false
498
[ "MIT" ]
0
6cb16efd1f80aa569c90874a806a62dec8afaec4
https://github.com/Fyy10/UESTC-Thesis-DA/tree/6cb16efd1f80aa569c90874a806a62dec8afaec4
QNetwork
import torch import torch.nn.functional as F import torch.nn as nn class QNetwork(nn.Module): """Actor (Policy) Model.""" def __init__(self, state_size, action_size, seed): """Initialize parameters and build model. Params ====== state_size (int): Dimension of each state ...
import torch from torch._inductor.select_algorithm import extern_kernels import triton import triton.language 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_...
jibin-liu/deep-reinforcement-learning
QNetwork
false
3,741
[ "MIT" ]
0
2a91a66a931e891d08cd1af95da973a522381b52
https://github.com/jibin-liu/deep-reinforcement-learning/tree/2a91a66a931e891d08cd1af95da973a522381b52
C3D_td5
import torch import torch.nn as nn class Path(object): @staticmethod def db_dir(database): if database == 'ucf101': root_dir = ( '/Users/pingaowang/Google Drive/study/video_classification_research/datasets/UCF-101' ) output_dir = DATA_PATH ...
import torch from torch._inductor.select_algorithm import extern_kernels import triton import triton.language as tl from torch._inductor.runtime.triton_heuristics import grid from torch._C import _cuda_getCurrentRawStream as get_raw_stream from torch._inductor.runtime import triton_helpers import torch.nn as nn assert_...
pingaowang/pytorch-video-recognition
C3D_td5
false
16,754
[ "MIT" ]
946
096267f88d96a77a74ff743fb0115d997e2cdafd
https://github.com/pingaowang/pytorch-video-recognition/tree/096267f88d96a77a74ff743fb0115d997e2cdafd
CrossEntropyLoss
import torch from torch.nn import functional as F import torch.nn as nn import torch._C import torch.serialization from torch import optim as optim def reduce_loss(loss, reduction): """Reduce loss as specified. Args: loss (Tensor): Elementwise loss tensor. reduction (str): Options are "none",...
import torch import triton import triton.language as tl from torch._inductor.runtime.triton_heuristics import grid from torch._C import _cuda_getCurrentRawStream as get_raw_stream from torch._inductor.runtime import triton_helpers from torch._inductor.runtime.triton_helpers import math as tl_math from torch.nn import f...
Atten4Vis/DemystifyLocalViT
CrossEntropyLoss
false
13,344
[ "MIT" ]
64
2e2327caec6d56ae2c8aa861b32bb62f3cdb786e
https://github.com/Atten4Vis/DemystifyLocalViT/tree/2e2327caec6d56ae2c8aa861b32bb62f3cdb786e
Sine
import torch from torch import nn class Sine(nn.Module): def __init__(self, w0=30): super().__init__() self.w0 = w0 def forward(self, input): return torch.sin(self.w0 * input) def get_inputs(): return [torch.rand([4, 4, 4, 4])] def get_init_inputs(): return [[], {}]
import torch import triton import triton.language as tl from torch._inductor.runtime.triton_heuristics import grid from torch._C import _cuda_getCurrentRawStream as get_raw_stream from torch._inductor.runtime.triton_helpers import math as tl_math from torch import nn assert_size_stride = torch._C._dynamo.guards.assert_...
eliemichel/ACORN
Sine
false
15,290
[ "MIT" ]
186
ca1b776e585251bd20468038c343decbbd62abf3
https://github.com/eliemichel/ACORN/tree/ca1b776e585251bd20468038c343decbbd62abf3
GAT
# 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....
Anou9531/GUA
GAT
false
7,795
[ "MIT" ]
20
354acceb69656e76fb4ee296c66ae42c18cd939f
https://github.com/Anou9531/GUA/tree/354acceb69656e76fb4ee296c66ae42c18cd939f
Loss
# 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 ...
DmZhukov/CrossTask
Loss
false
13,587
[ "BSD-3-Clause" ]
58
2d79941d687dc8bd100898acd9c71c476b99def1
https://github.com/DmZhukov/CrossTask/tree/2d79941d687dc8bd100898acd9c71c476b99def1
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 from torch ...
sin1012/kaggle_baidu_autonomous_driving
FocalLoss
false
12,990
[ "Apache-2.0" ]
0
afa0da4fc06a05548306b885c6c804881104b403
https://github.com/sin1012/kaggle_baidu_autonomous_driving/tree/afa0da4fc06a05548306b885c6c804881104b403
UnaryMinModule
# 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.jit import torch.onnx import torch.nn assert_size_stride = torch._C._dynamo....
YaronBenAtar/glow
UnaryMinModule
false
14,686
[ "Apache-2.0" ]
2,838
a13706a4239fa7eaf059c670dc573e3eb0768f86
https://github.com/YaronBenAtar/glow/tree/a13706a4239fa7eaf059c670dc573e3eb0768f86
WeightShareConv1d
# 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 import torch.nn.functional import torch.ji...
JunLi-Galios/deq
WeightShareConv1d
false
13,922
[ "MIT" ]
548
80eb6b598357e8e01ad419126465fa3ed53b12c7
https://github.com/JunLi-Galios/deq/tree/80eb6b598357e8e01ad419126465fa3ed53b12c7
Critic
# AOT ID: ['0_forward'] from ctypes import c_void_p, c_long, c_int import torch import math import random import os import tempfile from math import inf, nan from torch._inductor.hooks import run_intermediate_hooks from torch._inductor.utils import maybe_profile from torch._inductor.codegen.memory_planning import _alig...
import torch from torch._inductor.select_algorithm import extern_kernels import triton import triton.language as tl from torch._inductor.runtime.triton_heuristics import grid from torch._C import _cuda_getCurrentRawStream as get_raw_stream from torch._inductor.runtime import triton_helpers import numpy as np import tor...
brabeem/deep-reinforcement-learning
Critic
false
12,187
[ "MIT" ]
0
aff919545a1b6d9d44f5aaaa13b9981c888e7169
https://github.com/brabeem/deep-reinforcement-learning/tree/aff919545a1b6d9d44f5aaaa13b9981c888e7169
SoftMaxAvgPoolModel
# AOT ID: ['0_inference'] from ctypes import c_void_p, c_long, c_int import torch import math import random import os import tempfile from math import inf, nan from torch._inductor.hooks import run_intermediate_hooks from torch._inductor.utils import maybe_profile from torch._inductor.codegen.memory_planning import _al...
import torch import triton import triton.language as tl from torch._inductor.runtime.triton_heuristics import grid from torch._C import _cuda_getCurrentRawStream as get_raw_stream from torch._inductor.runtime import triton_helpers from torch._inductor.runtime.triton_helpers import math as tl_math import torch.cuda impo...
quic-araha/aimet
SoftMaxAvgPoolModel
false
10,657
[ "BSD-3-Clause" ]
0
1afd5ce23f06bed74fec9812d5d2ea256ac4a650
https://github.com/quic-araha/aimet/tree/1afd5ce23f06bed74fec9812d5d2ea256ac4a650
GeM
# 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...
flrngel/DOLG-pytorch
GeM
false
15,372
[ "MIT" ]
56
97732d2932ef6733f17cf8ac1aee990effe6fd64
https://github.com/flrngel/DOLG-pytorch/tree/97732d2932ef6733f17cf8ac1aee990effe6fd64
NextMinBlock
# 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....
pgruening/ConvNeXt
NextMinBlock
false
12,895
[ "MIT" ]
0
e9a1beaf312f3a724f0c21d098efbe7db872b049
https://github.com/pgruening/ConvNeXt/tree/e9a1beaf312f3a724f0c21d098efbe7db872b049
ConvBlock
# 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...
MatusBako/MakeFacesGreatAgain
ConvBlock
false
828
[ "MIT" ]
0
e4941a8460db79dec566ed02d4b23eafb416a6db
https://github.com/MatusBako/MakeFacesGreatAgain/tree/e4941a8460db79dec566ed02d4b23eafb416a6db
Mapping
import torch import torch.nn as nn import torch.fft class Mapping(nn.Module): def __init__(self, z_size, out_size): super(Mapping, self).__init__() self.out_size = out_size self.mapping_layers = nn.ModuleList() self.linear = nn.Linear(z_size, z_size) self.relu = nn.ReLU(in...
import torch from torch._inductor.select_algorithm import extern_kernels import triton import triton.language as tl from torch._inductor.runtime.triton_heuristics import grid from torch._C import _cuda_getCurrentRawStream as get_raw_stream from torch._inductor.runtime import triton_helpers import torch.nn as nn import ...
NejcHirci/material-addon
Mapping
false
17,776
[ "MIT" ]
4
c08e2081413c3319b712c2f7193ac8013f601382
https://github.com/NejcHirci/material-addon/tree/c08e2081413c3319b712c2f7193ac8013f601382
ApplyStyle
import torch import torch.utils.data from torch import nn import torch.nn.functional as F class FC(nn.Module): def __init__(self, in_channels, out_channels, gain=2 ** 0.5, use_wscale =False, lrmul=1.0, bias=True): super(FC, self).__init__() he_std = gain * in_channels ** -0.5 if u...
import torch from torch._inductor.select_algorithm import extern_kernels import 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 import torch.nn.functional as F ass...
Archjbald/PoseStylizer
ApplyStyle
false
1,980
[ "BSD-3-Clause" ]
0
95aae02d1f4ac83536d91b8db5f78d12e7830f97
https://github.com/Archjbald/PoseStylizer/tree/95aae02d1f4ac83536d91b8db5f78d12e7830f97
TwoArgNet
import torch from torch import nn class TwoArgNet(nn.Module): def __init__(self, inc, outc): super().__init__() self.layer = nn.Linear(inc, outc) def forward(self, t1, t2): return self.layer(torch.cat((t1, t2), dim=1)).sigmoid() def get_inputs(): return [torch.rand([4, 4, 4, 4]...
import torch from torch._inductor.select_algorithm import extern_kernels import triton import triton.language as tl from torch._inductor.runtime.triton_heuristics import grid from torch._C import _cuda_getCurrentRawStream as get_raw_stream from torch import nn assert_size_stride = torch._C._dynamo.guards.assert_size_st...
nazarblch/style-based-gan-pytorch
TwoArgNet
false
4,050
[ "MIT" ]
0
5ed7fa114904501d77b414921cd9f439773ba24c
https://github.com/nazarblch/style-based-gan-pytorch/tree/5ed7fa114904501d77b414921cd9f439773ba24c
A2CNet
# 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_...
ayjabri/DeepRL
A2CNet
false
1,509
[ "MIT" ]
0
0be095e3a3d04f60b4cdc97ed330dffc17b3024a
https://github.com/ayjabri/DeepRL/tree/0be095e3a3d04f60b4cdc97ed330dffc17b3024a
Conv
import torch import torch.nn as nn from math import sqrt def equal_lr(module, name='weight'): EqualLR.apply(module, name) return module class EqualLR: def __init__(self, name): self.name = name def compute_weight(self, module): weight = getattr(module, self.name + '_orig') ...
import torch from torch._inductor.select_algorithm import extern_kernels import triton import triton.language as tl from torch._inductor.runtime.triton_heuristics import grid from torch._C import _cuda_getCurrentRawStream as get_raw_stream import torch.nn as nn from math import sqrt assert_size_stride = torch._C._dynam...
NethraGunti/Woven-Artificial-Profile-WARP-Face-Video-Synthesis-from-Profile-and-Audio
Conv
false
879
[ "MIT" ]
0
231d8daa8dddfd5eda8a092eb99c5d0e59d8b3f7
https://github.com/NethraGunti/Woven-Artificial-Profile-WARP-Face-Video-Synthesis-from-Profile-and-Audio/tree/231d8daa8dddfd5eda8a092eb99c5d0e59d8b3f7
LinearSum
# 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_...
JoannaLXY/block.bootstrap.pytorch
LinearSum
false
11,560
[ "BSD-3-Clause" ]
0
42c3e7616b704e05c6ff2376ff68b5b18044fe77
https://github.com/JoannaLXY/block.bootstrap.pytorch/tree/42c3e7616b704e05c6ff2376ff68b5b18044fe77
FocalLossBinary
# 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...
CamilaGL/nnUNet
FocalLossBinary
false
185
[ "Apache-2.0" ]
0
471ab73a6e4f67fc72d476183b5344be4cccf7ca
https://github.com/CamilaGL/nnUNet/tree/471ab73a6e4f67fc72d476183b5344be4cccf7ca
BertOutput
# AOT ID: ['0_forward'] from ctypes import c_void_p, c_long, c_int import torch import math import random import os import tempfile from math import inf, nan from torch._inductor.hooks import run_intermediate_hooks from torch._inductor.utils import maybe_profile from torch._inductor.codegen.memory_planning import _alig...
import torch from torch._inductor.select_algorithm import extern_kernels import triton import triton.language as tl from torch._inductor.runtime.triton_heuristics import grid from torch._C import _cuda_getCurrentRawStream as get_raw_stream from torch._inductor.runtime.triton_helpers import libdevice from torch import n...
Alwaysproblem/examples-1
BertOutput
false
1,876
[ "MIT" ]
0
9754fa63ed1931489a21ac1f5b299f945e369a5c
https://github.com/Alwaysproblem/examples-1/tree/9754fa63ed1931489a21ac1f5b299f945e369a5c
MultiHeadAttention
import math import torch import torch.nn as nn class SelfAttention(nn.Module): def __init__(self, dropout=0.1): super(SelfAttention, self).__init__() self.softmax = nn.Softmax(dim=-1) self._dropout = nn.Dropout(dropout) def forward(self, q, k, v, pad_mask=None): """ :...
import torch from torch._inductor.select_algorithm import extern_kernels import triton import triton.language as tl from torch._inductor.runtime.triton_heuristics import grid from torch._C import _cuda_getCurrentRawStream as get_raw_stream import math import torch.nn as nn assert_size_stride = torch._C._dynamo.guards.a...
LindgeW/BiaffineParser
MultiHeadAttention
false
17,586
[ "Apache-2.0" ]
4
3671f9f5d4fdbcad67d90ecfdafbeb316e4378db
https://github.com/LindgeW/BiaffineParser/tree/3671f9f5d4fdbcad67d90ecfdafbeb316e4378db
VGG_19
import torch import torch.nn as nn from torch.nn import init class conv(nn.Module): """ n*n conv with relu """ def __init__(self, in_dim, out_dim, kernal_size, stride, padding): super(conv, self).__init__() self.con_layer = nn.Conv2d(in_dim, out_dim, kernal_size, stride, p...
import torch from torch._inductor.select_algorithm import extern_kernels import triton import triton.language as tl from torch._inductor.runtime.triton_heuristics import grid from torch._C import _cuda_getCurrentRawStream as get_raw_stream from torch._inductor.runtime import triton_helpers import torch.nn as nn from to...
H-Liu1997/Pytorch_Pose_Estimation_Framework
VGG_19
false
5,311
[ "MIT" ]
1
06616b3459ff639f8486e6ea4f93922597788b2a
https://github.com/H-Liu1997/Pytorch_Pose_Estimation_Framework/tree/06616b3459ff639f8486e6ea4f93922597788b2a
VGGBase
# 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 torchvision from torch...
aarashfeizi/a-PyTorch-Tutorial-to-Object-Detection
VGGBase
false
1,906
[ "MIT" ]
0
a9e1f3092d4b8c094bff5cd0897e0e3c1e0bc9c2
https://github.com/aarashfeizi/a-PyTorch-Tutorial-to-Object-Detection/tree/a9e1f3092d4b8c094bff5cd0897e0e3c1e0bc9c2
QNetwork
# 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...
JulianoLagana/deep-machine-learning
QNetwork
false
13,927
[ "MIT" ]
49
0135a84067be357c8bc3d3a4298b60dcaf7d53d5
https://github.com/JulianoLagana/deep-machine-learning/tree/0135a84067be357c8bc3d3a4298b60dcaf7d53d5
TensorClampOptionMin
import torch class TensorClampOptionMin(torch.nn.Module): def forward(self, x): return x.clamp(min=-0.1) def get_inputs(): return [torch.rand([4, 4, 4, 4])] def get_init_inputs(): return [[], {}]
import torch import triton import triton.language as tl from torch._inductor.runtime.triton_heuristics import grid from torch._C import _cuda_getCurrentRawStream as get_raw_stream 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
TensorClampOptionMin
false
10,526
[ "MIT" ]
0
953d60039e0c81e90eea467c3df2e6e3f7040242
https://github.com/NVIDIA-AI-IOT-private/torch2trt/tree/953d60039e0c81e90eea467c3df2e6e3f7040242
ActorCritic
import torch import torch.nn.functional as F import torch.nn as nn def swish(x): return x * F.sigmoid(x) class ActorCritic(nn.Module): """Actor (Policy) Model.""" def __init__(self, state_size, action_size, seed, fc1_units=64, fc2_units=64): """Initialize parameters and build model. ...
import torch from torch._inductor.select_algorithm import extern_kernels import triton import triton.language 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...
postBG/deep-reinforcement-learning
ActorCritic
false
4,145
[ "MIT" ]
0
5df5662b091c4c3f00beba1aa6f9ce8a52001c93
https://github.com/postBG/deep-reinforcement-learning/tree/5df5662b091c4c3f00beba1aa6f9ce8a52001c93
BiDAFAttention
import torch import torch.nn as nn import torch.nn.functional as F def masked_softmax(logits, mask, dim=-1, log_softmax=False): """Take the softmax of `logits` over given dimension, and set entries to 0 wherever `mask` is 0. Args: logits (torch.Tensor): Inputs to the softmax function. mas...
import torch from torch._inductor.select_algorithm import extern_kernels import triton import triton.language 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....
mayankiitg/cs224n
BiDAFAttention
false
4,002
[ "MIT" ]
0
c67b7904101c8f19a5a231e4fe521e764470d41b
https://github.com/mayankiitg/cs224n/tree/c67b7904101c8f19a5a231e4fe521e764470d41b
NoiseZ
# AOT ID: ['0_forward'] from ctypes import c_void_p, c_long, c_int import torch import math import random import os import tempfile from math import inf, nan from torch._inductor.hooks import run_intermediate_hooks from torch._inductor.utils import maybe_profile from torch._inductor.codegen.memory_planning import _alig...
import torch import triton import triton.language as tl from torch._inductor.runtime.triton_heuristics import grid from torch._C import _cuda_getCurrentRawStream as get_raw_stream from torch import nn import torch.utils.data import torch.nn.init assert_size_stride = torch._C._dynamo.guards.assert_size_stride empty_stri...
ForrestPi/Unsupervised-Defect-Segmentation
NoiseZ
false
8,202
[ "MIT" ]
17
e366ac7c757bb1b45f38ebbc502dfee7ccb72398
https://github.com/ForrestPi/Unsupervised-Defect-Segmentation/tree/e366ac7c757bb1b45f38ebbc502dfee7ccb72398
PositionalEncoding
import torch from torch import nn class PositionalEncoding(nn.Module): def __init__(self, patch_num, d_model, dropout=0.1): super(PositionalEncoding, self).__init__() self.pe = nn.Parameter(torch.rand(patch_num + 1, d_model)) self.add_positional_encoding = lambda x: x + self.pe[:x.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 from torch import nn assert_size_stride = torch._C._dynamo.guards.assert_size_stride empty_strided_cuda = torch._C._dynamo.guards._empty_str...
hankyul2/ImageClassification
PositionalEncoding
false
6,782
[ "Apache-2.0" ]
1
c4df6bf3dc1ee804f9885d586aa581ebb4d7ca05
https://github.com/hankyul2/ImageClassification/tree/c4df6bf3dc1ee804f9885d586aa581ebb4d7ca05