entry_point
stringlengths
1
65
original_triton_code
stringlengths
4.5k
619k
python_code
stringlengths
208
60.9k
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
pytorch_code
stringlengths
200
4.05k
CONV1d_FusionBlock
# 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 torch.nn.parallel import torch.optim import torch import torch.nn as nn class CONV1d_FusionBlock(nn.Module): def __init__(self, in_channels, n_segment, n_div): super(CONV1d_FusionBlock, self).__init__() self.n_div = n_div self.fold = in_channels // n_div self.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 import torch.nn.parallel import torch.optim import torch import torch.nn as nn a...
RongchangLi/DEN
CONV1d_FusionBlock
false
17,884
[ "MIT" ]
4
f8b744f96a3a68cf0784080ffd561a5279715727
https://github.com/RongchangLi/DEN/tree/f8b744f96a3a68cf0784080ffd561a5279715727
import torch import torch.nn.parallel import torch.optim import torch import torch.nn as nn class Model(nn.Module): def __init__(self, in_channels, n_segment, n_div): super().__init__() self.n_div = n_div self.fold = in_channels // n_div self.n_segment = n_segment self.tem...
channel_attention
# AOT ID: ['0_forward'] from ctypes import c_void_p, c_long, c_int import torch import math import random import os import tempfile from math import inf, nan from torch._inductor.hooks import run_intermediate_hooks from torch._inductor.utils import maybe_profile from torch._inductor.codegen.memory_planning import _alig...
import torch from torch import nn class channel_attention(nn.Module): def __init__(self, in_channels, feature_size): super(channel_attention, self).__init__() self.fc1 = nn.Linear(feature_size * feature_size, feature_size, bias=False) self.relu1 = nn.ReLU(inplace=True) ...
import torch from torch._inductor.select_algorithm import extern_kernels import triton import triton.language as tl from torch._inductor.runtime.triton_heuristics import grid from torch._C import _cuda_getCurrentRawStream as get_raw_stream from torch._inductor.runtime import triton_helpers from torch._inductor.runtime....
SCUT-AILab/AFA
channel_attention
false
17,885
[ "BSD-3-Clause" ]
7
acfb42236ce0114d63f22a821fc5954c8c149f45
https://github.com/SCUT-AILab/AFA/tree/acfb42236ce0114d63f22a821fc5954c8c149f45
import torch from torch import nn class Model(nn.Module): def __init__(self, in_channels, feature_size): super().__init__() self.fc1 = nn.Linear(feature_size * feature_size, feature_size, bias=False) self.relu1 = nn.ReLU(inplace=True) self.fc2 = nn.Linear(feature_size,...
MLPSoftQNetwork
# 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 torch.nn as nn import torch.nn.functional as F class MLPSoftQNetwork(nn.Module): def __init__(self, num_inputs, num_actions, hidden_size1=1400, hidden_size2=1024, hidden_size3=256, init_w=0.003): super(MLPSoftQNetwork, self).__init__() self.linear1 = nn.Linear(num_inpu...
import torch from torch._inductor.select_algorithm import extern_kernels import triton import triton.language as tl from 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_...
SAMMiCA/DL_based_E2E_Driving
MLPSoftQNetwork
false
17,886
[ "MIT" ]
4
01f7d74a0db7ed745cf27b9a1ebab0246015ecbd
https://github.com/SAMMiCA/DL_based_E2E_Driving/tree/01f7d74a0db7ed745cf27b9a1ebab0246015ecbd
import torch import torch.nn as nn import torch.nn.functional as F class Model(nn.Module): def __init__(self, num_inputs, num_actions, hidden_size1=1400, hidden_size2=1024, hidden_size3=256, init_w=0.003): super().__init__() self.linear1 = nn.Linear(num_inputs + num_actions, hidden_size1)...
Fusion
# 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 torch.nn as nn class Fusion(nn.Module): """ Crazy multi-modal fusion: negative squared difference minus relu'd sum """ def __init__(self): super().__init__() def forward(self, x, y): return -(x - y) ** 2 + torch.relu(x + y) def get_inputs(): return [torch.ra...
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...
Ruiver/CTCNet
Fusion
false
17,887
[ "Apache-2.0" ]
6
539e55ec9fed06028379d35dfd5cd4074755ffd8
https://github.com/Ruiver/CTCNet/tree/539e55ec9fed06028379d35dfd5cd4074755ffd8
import torch import torch.nn as nn class Model(nn.Module): """ Crazy multi-modal fusion: negative squared difference minus relu'd sum """ def __init__(self): super().__init__() def forward(self, x, y): return -(x - y) ** 2 + torch.relu(x + y) def get_inputs(): return [torch.ran...
EncoderBlock
# 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 torch.nn.functional as F from torch import nn class EncoderBlock(nn.Module): """ Encoder block class """ def __init__(self, in_channels, out_channels, k_size, pad_size): super(EncoderBlock, self).__init__() self.conv1 = nn.Conv3d(in_channels, out_channels, kernel_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....
SVRTK/Segmentation_FetalMRI
EncoderBlock
false
17,888
[ "Apache-2.0" ]
6
9344a2248cbe8e4cccbe05ca98214626dcf62805
https://github.com/SVRTK/Segmentation_FetalMRI/tree/9344a2248cbe8e4cccbe05ca98214626dcf62805
import torch import torch.nn.functional as F from torch import nn class Model(nn.Module): """ Encoder block class """ def __init__(self, in_channels, out_channels, k_size, pad_size): super().__init__() self.conv1 = nn.Conv3d(in_channels, out_channels, kernel_size= k_size, ...
pixel_attention
# AOT ID: ['0_forward'] from ctypes import c_void_p, c_long, c_int import torch import math import random import os import tempfile from math import inf, nan from torch._inductor.hooks import run_intermediate_hooks from torch._inductor.utils import maybe_profile from torch._inductor.codegen.memory_planning import _alig...
import torch from torch import nn class pixel_attention(nn.Module): def __init__(self, in_channels, feature_size): super(pixel_attention, self).__init__() self.fc1 = nn.Linear(feature_size * feature_size, feature_size, bias=False) self.relu1 = nn.ReLU(inplace=True) sel...
import torch from torch._inductor.select_algorithm import extern_kernels import triton import triton.language as tl from 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....
SCUT-AILab/AFA
pixel_attention
false
17,889
[ "BSD-3-Clause" ]
7
acfb42236ce0114d63f22a821fc5954c8c149f45
https://github.com/SCUT-AILab/AFA/tree/acfb42236ce0114d63f22a821fc5954c8c149f45
import torch from torch import nn class Model(nn.Module): def __init__(self, in_channels, feature_size): super().__init__() self.fc1 = nn.Linear(feature_size * feature_size, feature_size, bias=False) self.relu1 = nn.ReLU(inplace=True) self.fc2 = nn.Linear(feature_size,...
QREmbeddingBag
# 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 numpy as np import torch.nn as nn import torch.nn.functional as F from torch.nn.parameter import Parameter class QREmbeddingBag(nn.Module): """Computes sums or means over two 'bags' of embeddings, one using the quotient of the indices and the other using the remainder of the indices, witho...
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 numpy as np import torch.nn as nn from torch.nn.parameter import Paramet...
STAR-Laboratory/Accelerating-RecSys-Training
QREmbeddingBag
false
17,890
[ "MIT" ]
5
e43cae6fd543813b352b01510e846febd67944ad
https://github.com/STAR-Laboratory/Accelerating-RecSys-Training/tree/e43cae6fd543813b352b01510e846febd67944ad
import torch import numpy as np import torch.nn as nn import torch.nn.functional as F from torch.nn.parameter import Parameter class Model(nn.Module): """Computes sums or means over two 'bags' of embeddings, one using the quotient of the indices and the other using the remainder of the indices, without in...
Classifier
# 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 torch.nn as nn class FCNet(nn.Module): def __init__(self, in_size, out_size, activate=None, drop=0.0): super(FCNet, self).__init__() self.lin = nn.Linear(in_size, out_size) self.drop_value = drop self.drop = nn.Dropout(drop) self.activate = activate.low...
import torch from torch._inductor.select_algorithm import extern_kernels import 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...
Ruiver/CTCNet
Classifier
false
17,891
[ "Apache-2.0" ]
6
539e55ec9fed06028379d35dfd5cd4074755ffd8
https://github.com/Ruiver/CTCNet/tree/539e55ec9fed06028379d35dfd5cd4074755ffd8
import torch import torch.nn as nn class FCNet(nn.Module): def __init__(self, in_size, out_size, activate=None, drop=0.0): super().__init__() self.lin = nn.Linear(in_size, out_size) self.drop_value = drop self.drop = nn.Dropout(drop) self.activate = activate.lower() if act...
MLPPolicyNetwork
# 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 torch.nn as nn import torch.nn.functional as F from torch.distributions import Normal class MLPPolicyNetwork(nn.Module): def __init__(self, num_inputs, num_actions, hidden_size1=1400, hidden_size2=1024, hidden_size3=256, init_w=0.003, log_std_min=-20, log_std_max=2): s...
import torch from torch._inductor.select_algorithm import extern_kernels import triton import triton.language as tl from torch._inductor.runtime.triton_heuristics import grid from torch._C import _cuda_getCurrentRawStream as get_raw_stream from torch._inductor.runtime import triton_helpers import torch.nn as nn from to...
SAMMiCA/DL_based_E2E_Driving
MLPPolicyNetwork
false
17,892
[ "MIT" ]
4
01f7d74a0db7ed745cf27b9a1ebab0246015ecbd
https://github.com/SAMMiCA/DL_based_E2E_Driving/tree/01f7d74a0db7ed745cf27b9a1ebab0246015ecbd
import torch import torch.nn as nn import torch.nn.functional as F from torch.distributions import Normal class Model(nn.Module): def __init__(self, num_inputs, num_actions, hidden_size1=1400, hidden_size2=1024, hidden_size3=256, init_w=0.003, log_std_min=-20, log_std_max=2): super().__in...
HardWeightedSum
# 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 nn class HardWeightedSum(nn.Module): def __init__(self, op_number=2, act=nn.ReLU, eps=0.0001): super(HardWeightedSum, self).__init__() shape = op_number, 1, 1, 1, 1 self.weights = nn.Parameter(torch.ones(shape), requires_grad=True) self.act = act() ...
import torch import triton import triton.language as tl from torch._inductor.runtime.triton_heuristics import grid from torch._C import _cuda_getCurrentRawStream as get_raw_stream from torch._inductor.runtime import triton_helpers from torch import nn assert_size_stride = torch._C._dynamo.guards.assert_size_stride empt...
Senyaaa/detection-experiments
HardWeightedSum
false
17,893
[ "Apache-2.0" ]
5
5e80dd458e886ca27db5420d25ade8f9d74ae5a8
https://github.com/Senyaaa/detection-experiments/tree/5e80dd458e886ca27db5420d25ade8f9d74ae5a8
import torch from torch import nn class Model(nn.Module): def __init__(self, op_number=2, act=nn.ReLU, eps=0.0001): super().__init__() shape = op_number, 1, 1, 1, 1 self.weights = nn.Parameter(torch.ones(shape), requires_grad=True) self.act = act() self.eps = eps def ...
DecoderBlock
# 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 functools import partial import torch.nn.functional as F from torch import nn class DecoderBlock(nn.Module): """ Decoder block class """ def __init__(self, in_channels, middle_channels, out_channels, k_size, pad_size): super(DecoderBlock, self).__init__() sel...
import torch from torch._inductor.select_algorithm import extern_kernels import triton import triton.language as tl from 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....
SVRTK/Segmentation_FetalMRI
DecoderBlock
false
17,894
[ "Apache-2.0" ]
6
9344a2248cbe8e4cccbe05ca98214626dcf62805
https://github.com/SVRTK/Segmentation_FetalMRI/tree/9344a2248cbe8e4cccbe05ca98214626dcf62805
import torch from functools import partial import torch.nn.functional as F from torch import nn class Model(nn.Module): """ Decoder block class """ def __init__(self, in_channels, middle_channels, out_channels, k_size, pad_size): super().__init__() self.conv1 = nn.Conv3d(in_ch...
SoftMaxWeightedSum
# 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 nn class SoftMaxWeightedSum(nn.Module): def __init__(self, op_number=2): super(SoftMaxWeightedSum, self).__init__() shape = op_number, 1, 1, 1, 1 self.weights = nn.Parameter(torch.ones(shape), requires_grad=True) def forward(self, x): return tor...
import torch import triton import triton.language as tl from torch._inductor.runtime.triton_heuristics import grid from torch._C import _cuda_getCurrentRawStream as get_raw_stream from torch._inductor.runtime import triton_helpers from torch._inductor.runtime.triton_helpers import math as tl_math from torch import nn a...
Senyaaa/detection-experiments
SoftMaxWeightedSum
false
17,895
[ "Apache-2.0" ]
5
5e80dd458e886ca27db5420d25ade8f9d74ae5a8
https://github.com/Senyaaa/detection-experiments/tree/5e80dd458e886ca27db5420d25ade8f9d74ae5a8
import torch from torch import nn class Model(nn.Module): def __init__(self, op_number=2): super().__init__() shape = op_number, 1, 1, 1, 1 self.weights = nn.Parameter(torch.ones(shape), requires_grad=True) def forward(self, x): return torch.sum(torch.softmax(self.weights, di...
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 import torch.nn as nn class Decoder(nn.Module): def __init__(self, n_features, n_modes, T): super(Decoder, self).__init__() self.n_modes = n_modes self.T = T self.linear1 = nn.Linear(n_features, 4096) self.linear2 = nn.Linear(512, n_modes * T * 2) self...
import torch from torch._inductor.select_algorithm import extern_kernels import triton import triton.language as tl from torch._inductor.runtime.triton_heuristics import grid from torch._C import _cuda_getCurrentRawStream as get_raw_stream from torch._inductor.runtime import triton_helpers from torch._inductor.runtime....
SambaranRepo/VectorNet_Waymo
Decoder
false
17,896
[ "MIT" ]
4
454016a5020444e78943786c14e4e12a75ce052e
https://github.com/SambaranRepo/VectorNet_Waymo/tree/454016a5020444e78943786c14e4e12a75ce052e
import torch import torch.nn as nn class Model(nn.Module): def __init__(self, n_features, n_modes, T): super().__init__() self.n_modes = n_modes self.T = T self.linear1 = nn.Linear(n_features, 4096) self.linear2 = nn.Linear(512, n_modes * T * 2) self.linear3 = nn.L...
resBlock
# AOT ID: ['0_forward'] from ctypes import c_void_p, c_long, c_int import torch import math import random import os import tempfile from math import inf, nan from torch._inductor.hooks import run_intermediate_hooks from torch._inductor.utils import maybe_profile from torch._inductor.codegen.memory_planning import _alig...
import torch import torch.nn as nn import torch.nn.functional as F class resBlock(nn.Module): def __init__(self, channelDepth, windowSize=3): super(resBlock, self).__init__() self.pad = nn.ReflectionPad2d(1) self.IN_conv1 = nn.InstanceNorm2d(channelDepth) self.conv1 = nn.Conv2d(ch...
import torch from torch._inductor.select_algorithm import extern_kernels import triton import triton.language as tl from torch._inductor.runtime.triton_heuristics import grid from torch._C import _cuda_getCurrentRawStream as get_raw_stream from torch._inductor.runtime import triton_helpers from torch._inductor.runtime....
SeokjaeLIM/DSSN_release-Pytorch
resBlock
false
17,897
[ "Apache-2.0" ]
7
fef1dac120d7b83367b4c69f239b089ab5f004d7
https://github.com/SeokjaeLIM/DSSN_release-Pytorch/tree/fef1dac120d7b83367b4c69f239b089ab5f004d7
import torch import torch.nn as nn import torch.nn.functional as F class Model(nn.Module): def __init__(self, channelDepth, windowSize=3): super().__init__() self.pad = nn.ReflectionPad2d(1) self.IN_conv1 = nn.InstanceNorm2d(channelDepth) self.conv1 = nn.Conv2d(channelDepth, chann...
WeightedFeatureFusion
# 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 torch.nn as nn from torchvision.models.resnet import * import torch.utils.data class WeightedFeatureFusion(nn.Module): def __init__(self, layers, weight=False): super(WeightedFeatureFusion, self).__init__() self.layers = layers self.weight = weight self.n = len...
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 torchvision.models.resnet import * import torch.utils.data assert_size_stride = torch._C._dynamo.guards.assert_si...
PanJason/ML_Proj
WeightedFeatureFusion
false
17,898
[ "MIT" ]
4
663be12e8eb6e30e3c902a4984ac0db33bfce605
https://github.com/PanJason/ML_Proj/tree/663be12e8eb6e30e3c902a4984ac0db33bfce605
import torch import torch.nn as nn from torchvision.models.resnet import * import torch.utils.data class Model(nn.Module): def __init__(self, layers, weight=False): super().__init__() self.layers = layers self.weight = weight self.n = len(layers) + 1 if weight: ...
ConformerFeedForward
# 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 nn import torch.utils.data import torch.optim class Swish(nn.Module): """ Swish activation function introduced in 'https://arxiv.org/abs/1710.05941' """ def forward(self, x): return x * torch.sigmoid(x) class ConformerFeedForward(nn.Module): """ feed-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 import nn import torch.utils.data import torch.optim assert_size_stri...
ShantanuNair/NeMo
ConformerFeedForward
false
17,899
[ "Apache-2.0" ]
10
d01b7bbc3fdb1bbf14789f71b8f368cf0aa8f86b
https://github.com/ShantanuNair/NeMo/tree/d01b7bbc3fdb1bbf14789f71b8f368cf0aa8f86b
import torch from torch import nn import torch.utils.data import torch.optim class Swish(nn.Module): """ Swish activation function introduced in 'https://arxiv.org/abs/1710.05941' """ def forward(self, x): return x * torch.sigmoid(x) class Model(nn.Module): """ feed-forward module o...
FusionAttention
# 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 torch.nn.functional as F import torch.nn as nn class FusionAttention(nn.Module): def __init__(self, dim): super(FusionAttention, self).__init__() self.attention_matrix = nn.Linear(dim, dim) self.project_weight = nn.Linear(dim, 1) def forward(self, inputs): ...
import torch from torch._inductor.select_algorithm import extern_kernels import triton import triton.language as tl from 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....
Seondong/Customs-Fraud-Detection
FusionAttention
false
17,900
[ "MIT" ]
7
eb9e4641a78cb32d73787de86dd72ebb09df1452
https://github.com/Seondong/Customs-Fraud-Detection/tree/eb9e4641a78cb32d73787de86dd72ebb09df1452
import torch import torch.nn.functional as F import torch.nn as nn class Model(nn.Module): def __init__(self, dim): super().__init__() self.attention_matrix = nn.Linear(dim, dim) self.project_weight = nn.Linear(dim, 1) def forward(self, inputs): query_project = self.attention...
MultiLayerPerceptron
# 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 torch.utils.data import torch.optim class MultiLayerPerceptron(torch.nn.Module): """ A simple MLP that can either be used independently or put on top of pretrained models (such as BERT) and act as a classifier. Args: hidden_size (int): the size of each layer num_cla...
import torch from torch._inductor.select_algorithm import extern_kernels import triton import triton.language as tl from 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....
ShantanuNair/NeMo
MultiLayerPerceptron
false
17,901
[ "Apache-2.0" ]
10
d01b7bbc3fdb1bbf14789f71b8f368cf0aa8f86b
https://github.com/ShantanuNair/NeMo/tree/d01b7bbc3fdb1bbf14789f71b8f368cf0aa8f86b
import torch import torch.utils.data import torch.optim class Model(torch.nn.Module): """ A simple MLP that can either be used independently or put on top of pretrained models (such as BERT) and act as a classifier. Args: hidden_size (int): the size of each layer num_classes (int): num...
_Residual_Block
# 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 torch.nn as nn class _Residual_Block(nn.Module): def __init__(self): super(_Residual_Block, self).__init__() self.conv1 = nn.Conv2d(in_channels=64, out_channels=64, kernel_size =3, stride=1, padding=1, bias=False) self.in1 = nn.InstanceNorm2d(64, affine=Tru...
import torch from torch._inductor.select_algorithm import extern_kernels import triton import triton.language as tl from 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....
Shandilya21/Improved-Optimization-Tecniques-for-Super-Resoultion-in-Images
_Residual_Block
false
17,902
[ "MIT" ]
10
d903d99706f557d74e00d4395e7d316172a9f7ee
https://github.com/Shandilya21/Improved-Optimization-Tecniques-for-Super-Resoultion-in-Images/tree/d903d99706f557d74e00d4395e7d316172a9f7ee
import torch import torch.nn as nn class Model(nn.Module): def __init__(self): super().__init__() self.conv1 = nn.Conv2d(in_channels=64, out_channels=64, kernel_size =3, stride=1, padding=1, bias=False) self.in1 = nn.InstanceNorm2d(64, affine=True) self.relu = nn.Leaky...
DyIntraModalityUpdate
# 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 torch.nn as nn import torch.nn.functional as F class FCNet(nn.Module): def __init__(self, in_size, out_size, activate=None, drop=0.0): super(FCNet, self).__init__() self.lin = nn.Linear(in_size, out_size) self.drop_value = drop self.drop = nn.Dropout(drop) ...
import torch from torch._inductor.select_algorithm import extern_kernels import triton import triton.language as tl from 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....
Ruiver/CTCNet
DyIntraModalityUpdate
false
17,903
[ "Apache-2.0" ]
6
539e55ec9fed06028379d35dfd5cd4074755ffd8
https://github.com/Ruiver/CTCNet/tree/539e55ec9fed06028379d35dfd5cd4074755ffd8
import torch import torch.nn as nn import torch.nn.functional as F class FCNet(nn.Module): def __init__(self, in_size, out_size, activate=None, drop=0.0): super().__init__() self.lin = nn.Linear(in_size, out_size) self.drop_value = drop self.drop = nn.Dropout(drop) self.ac...
ResnetDecoder
# 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 torch.nn as nn class ResnetDecoder(nn.Module): """ This class represents the tail of ResNet. It performs a global pooling and maps the output to the correct class by using a fully connected layer. """ def __init__(self, in_features, n_classes): super().__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 assert_size_stride = torch._C._dynamo.guards.assert_size_s...
SeffyVon/ECG_MICResNet
ResnetDecoder
false
17,904
[ "BSD-3-Clause" ]
5
8c6a319b5822ddfb130738eb1d9cdc3c21b24209
https://github.com/SeffyVon/ECG_MICResNet/tree/8c6a319b5822ddfb130738eb1d9cdc3c21b24209
import torch import torch.nn as nn class Model(nn.Module): """ This class represents the tail of ResNet. It performs a global pooling and maps the output to the correct class by using a fully connected layer. """ def __init__(self, in_features, n_classes): super().__init__() self....
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 import torch.nn as nn import torch.nn.init as init class Net(nn.Module): def __init__(self, upscale_factor): super(Net, self).__init__() self.upscale_factor = int(upscale_factor) self.relu = nn.ReLU() self.conv1 = nn.Conv2d(1, 64, kernel_size=5, padding=2) sel...
import torch from torch._inductor.select_algorithm import extern_kernels import triton import triton.language as tl from 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 ...
PiSchool/esa-superresolution-forecasting
Net
false
17,905
[ "MIT" ]
4
3c01770dd64749d6b6c40e1068a96a3307c8c035
https://github.com/PiSchool/esa-superresolution-forecasting/tree/3c01770dd64749d6b6c40e1068a96a3307c8c035
import torch import torch.nn as nn import torch.nn.init as init class Model(nn.Module): def __init__(self, upscale_factor): super().__init__() self.upscale_factor = int(upscale_factor) self.relu = nn.ReLU() self.conv1 = nn.Conv2d(1, 64, kernel_size=5, padding=2) self.conv2...
OneSideInterModalityUpdate
# 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 torch.nn as nn import torch.nn.functional as F class FCNet(nn.Module): def __init__(self, in_size, out_size, activate=None, drop=0.0): super(FCNet, self).__init__() self.lin = nn.Linear(in_size, out_size) self.drop_value = drop self.drop = nn.Dropout(drop) ...
import torch from torch._inductor.select_algorithm import extern_kernels import triton import triton.language as tl from 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....
Ruiver/CTCNet
OneSideInterModalityUpdate
false
17,906
[ "Apache-2.0" ]
6
539e55ec9fed06028379d35dfd5cd4074755ffd8
https://github.com/Ruiver/CTCNet/tree/539e55ec9fed06028379d35dfd5cd4074755ffd8
import torch import torch.nn as nn import torch.nn.functional as F class FCNet(nn.Module): def __init__(self, in_size, out_size, activate=None, drop=0.0): super().__init__() self.lin = nn.Linear(in_size, out_size) self.drop_value = drop self.drop = nn.Dropout(drop) self.ac...
DiceLoss
# AOT ID: ['0_inference'] from ctypes import c_void_p, c_long, c_int import torch import math import random import os import tempfile from math import inf, nan from torch._inductor.hooks import run_intermediate_hooks from torch._inductor.utils import maybe_profile from torch._inductor.codegen.memory_planning import _al...
import torch import torch.nn as nn class DiceLoss(nn.Module): def __init__(self): super(DiceLoss, self).__init__() def forward(self, input, target): N = target.size(0) smooth = 1 input_flat = input.view(N, -1) target_flat = target.view(N, -1) intersection = in...
import torch import triton import triton.language as tl from torch._inductor.runtime.triton_heuristics import grid from torch._C import _cuda_getCurrentRawStream as get_raw_stream import torch.nn as nn assert_size_stride = torch._C._dynamo.guards.assert_size_stride empty_strided_cuda = torch._C._dynamo.guards._empty_st...
SeffyVon/ECG_MICResNet
DiceLoss
false
17,907
[ "BSD-3-Clause" ]
5
8c6a319b5822ddfb130738eb1d9cdc3c21b24209
https://github.com/SeffyVon/ECG_MICResNet/tree/8c6a319b5822ddfb130738eb1d9cdc3c21b24209
import torch import torch.nn as nn class Model(nn.Module): def __init__(self): super().__init__() def forward(self, input, target): N = target.size(0) smooth = 1 input_flat = input.view(N, -1) target_flat = target.view(N, -1) intersection = input_flat * target...
deepmind
# 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 torch.nn as nn import torch.nn.functional as F class deepmind(nn.Module): def __init__(self): super(deepmind, self).__init__() self.conv1 = nn.Conv2d(4, 32, 8, stride=4) self.conv2 = nn.Conv2d(32, 64, 4, stride=2) self.conv3 = nn.Conv2d(64, 32, 3, stride=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_...
Rowing0914/TF2_RL
deepmind
false
17,908
[ "MIT" ]
8
c1b7f9b376cbecf01deb17f76f8e761035ed336a
https://github.com/Rowing0914/TF2_RL/tree/c1b7f9b376cbecf01deb17f76f8e761035ed336a
import torch import torch.nn as nn import torch.nn.functional as F class Model(nn.Module): def __init__(self): super().__init__() self.conv1 = nn.Conv2d(4, 32, 8, stride=4) self.conv2 = nn.Conv2d(32, 64, 4, stride=2) self.conv3 = nn.Conv2d(64, 32, 3, stride=1) nn.init.orth...
Bias
# 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 torch.nn as nn class Bias(nn.Module): def __init__(self): super(Bias, self).__init__() self.bias = nn.Parameter(torch.zeros(1)) def forward(self, feat_img, feat_sound): B, C, H, W = feat_sound.size() feat_img = feat_img.view(B, 1, C) z = torch.bmm(...
import torch from torch._inductor.select_algorithm import extern_kernels import 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...
SheldonTsui/Minus-Plus-Network
Bias
false
17,909
[ "Apache-2.0" ]
5
7aa281b17f637a9f168aaf250039e560027a3817
https://github.com/SheldonTsui/Minus-Plus-Network/tree/7aa281b17f637a9f168aaf250039e560027a3817
import torch import torch.nn as nn class Model(nn.Module): def __init__(self): super().__init__() self.bias = nn.Parameter(torch.zeros(1)) def forward(self, feat_img, feat_sound): B, C, H, W = feat_sound.size() feat_img = feat_img.view(B, 1, C) z = torch.bmm(feat_img,...
projection_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 class projection_model(torch.nn.Module): def __init__(self, neo_hidden, clip_hidden=512): super(projection_model, self).__init__() self.fc1 = torch.nn.Linear(neo_hidden, neo_hidden // 2) self.act = torch.nn.GELU() self.fc2 = torch.nn.Linear(neo_hidden // 2, clip_hidde...
import torch from torch._inductor.select_algorithm import extern_kernels import triton import triton.language 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 ...
ShivanshuPurohit/GPT-Neo-visual-grounding
projection_model
false
17,910
[ "Apache-2.0" ]
4
9c938257a688ef5ae8bc1b87b61d943aa158e880
https://github.com/ShivanshuPurohit/GPT-Neo-visual-grounding/tree/9c938257a688ef5ae8bc1b87b61d943aa158e880
import torch class Model(torch.nn.Module): def __init__(self, neo_hidden, clip_hidden=512): super().__init__() self.fc1 = torch.nn.Linear(neo_hidden, neo_hidden // 2) self.act = torch.nn.GELU() self.fc2 = torch.nn.Linear(neo_hidden // 2, clip_hidden) def forward(self, input_t...
DSCLoss
# 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 torch.nn as nn class DSCLoss(nn.Module): def __init__(self): super(DSCLoss, self).__init__() def forward(self, input, target): N = target.size(0) smooth = 1 input_flat = input.view(N, -1) target_flat = target.view(N, -1) input_flat * target...
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...
SeffyVon/ECG_MICResNet
DSCLoss
false
17,911
[ "BSD-3-Clause" ]
5
8c6a319b5822ddfb130738eb1d9cdc3c21b24209
https://github.com/SeffyVon/ECG_MICResNet/tree/8c6a319b5822ddfb130738eb1d9cdc3c21b24209
import torch import torch.nn as nn class Model(nn.Module): def __init__(self): super().__init__() def forward(self, input, target): N = target.size(0) smooth = 1 input_flat = input.view(N, -1) target_flat = target.view(N, -1) input_flat * target_flat n...
TwoMLPHead
# 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 torch.nn as nn import torch.nn.functional as F class TwoMLPHead(nn.Module): """ Standard heads for FPN-based models Arguments: in_channels (int): number of input channels representation_size (int): size of the intermediate representation """ def __init__(self, ...
import torch from torch._inductor.select_algorithm import extern_kernels import triton import triton.language as tl from torch._inductor.runtime.triton_heuristics import grid from torch._C import _cuda_getCurrentRawStream as get_raw_stream from torch._inductor.runtime import triton_helpers import torch.nn as nn assert_...
Sense-GVT/BigPretrain
TwoMLPHead
false
17,912
[ "Apache-2.0" ]
8
d8d9b43d94dd1364c18c1e5ba21b85a31cdbba9e
https://github.com/Sense-GVT/BigPretrain/tree/d8d9b43d94dd1364c18c1e5ba21b85a31cdbba9e
import torch import torch.nn as nn import torch.nn.functional as F class Model(nn.Module): """ Standard heads for FPN-based models Arguments: in_channels (int): number of input channels representation_size (int): size of the intermediate representation """ def __init__(self, in_ch...
InterModalityUpdate
# 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 torch.nn as nn import torch.nn.functional as F class FCNet(nn.Module): def __init__(self, in_size, out_size, activate=None, drop=0.0): super(FCNet, self).__init__() self.lin = nn.Linear(in_size, out_size) self.drop_value = drop self.drop = nn.Dropout(drop) ...
import torch from torch._inductor.select_algorithm import extern_kernels import triton import triton.language as tl from 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....
Ruiver/CTCNet
InterModalityUpdate
false
17,913
[ "Apache-2.0" ]
6
539e55ec9fed06028379d35dfd5cd4074755ffd8
https://github.com/Ruiver/CTCNet/tree/539e55ec9fed06028379d35dfd5cd4074755ffd8
import torch import torch.nn as nn import torch.nn.functional as F class FCNet(nn.Module): def __init__(self, in_size, out_size, activate=None, drop=0.0): super().__init__() self.lin = nn.Linear(in_size, out_size) self.drop_value = drop self.drop = nn.Dropout(drop) self.ac...
C3D_mini
# 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 torch.nn as nn class C3D_mini(nn.Module): """ The C3D_mini network """ def __init__(self, num_classes=2, pretrained=False): super(C3D_mini, self).__init__() self.conv1 = nn.Conv3d(3, 64, kernel_size=(3, 3, 3), padding=(1, 1, 1)) self.pool1 = nn.MaxPool3d(kernel_siz...
import torch from torch._inductor.select_algorithm import extern_kernels import triton import triton.language as tl from 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_...
Ontheway361/C3D
C3D_mini
false
17,914
[ "MIT" ]
7
7aa5364d8c0c6bddc17b1b8939b198fe66e282ca
https://github.com/Ontheway361/C3D/tree/7aa5364d8c0c6bddc17b1b8939b198fe66e282ca
import torch import torch.nn as nn class Model(nn.Module): """ The C3D_mini network """ def __init__(self, num_classes=2, pretrained=False): super().__init__() self.conv1 = nn.Conv3d(3, 64, kernel_size=(3, 3, 3), padding=(1, 1, 1)) self.pool1 = nn.MaxPool3d(kernel_size=(1, 2, 2), stri...
InnerProd
# 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 torch.nn as nn class InnerProd(nn.Module): def __init__(self, fc_dim): super(InnerProd, self).__init__() self.scale = nn.Parameter(torch.ones(fc_dim)) self.bias = nn.Parameter(torch.zeros(1)) def forward(self, feat_img, feat_sound): sound_size = feat_sound...
import torch from torch._inductor.select_algorithm import extern_kernels import 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...
SheldonTsui/Minus-Plus-Network
InnerProd
false
17,915
[ "Apache-2.0" ]
5
7aa281b17f637a9f168aaf250039e560027a3817
https://github.com/SheldonTsui/Minus-Plus-Network/tree/7aa281b17f637a9f168aaf250039e560027a3817
import torch import torch.nn as nn class Model(nn.Module): def __init__(self, fc_dim): super().__init__() self.scale = nn.Parameter(torch.ones(fc_dim)) self.bias = nn.Parameter(torch.zeros(1)) def forward(self, feat_img, feat_sound): sound_size = feat_sound.size() B, ...
Actor
# 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 torch.nn as nn import torch.nn.parallel import torch.optim import torch.utils.data class Actor(nn.Module): def __init__(self, nb_states, nb_actions, hidden1=400, hidden2=300, init_w=0.003): super(Actor, self).__init__() self.fc1 = nn.Linear(nb_states, hidden1) ...
import torch from torch._inductor.select_algorithm import extern_kernels import triton import triton.language as tl from 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 ...
Sharpiless/HAQ-for-Mobilenetv3-Quantization
Actor
false
17,916
[ "MIT" ]
5
76b7d98471adb666ad140abd2518bce6f0de3cfa
https://github.com/Sharpiless/HAQ-for-Mobilenetv3-Quantization/tree/76b7d98471adb666ad140abd2518bce6f0de3cfa
import torch import torch.nn as nn import torch.nn.parallel import torch.optim import torch.utils.data class Model(nn.Module): def __init__(self, nb_states, nb_actions, hidden1=400, hidden2=300, init_w=0.003): super().__init__() self.fc1 = nn.Linear(nb_states, hidden1) self.fc2 = ...
FeedForward
# 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 math import torch import torch.nn as nn def activation(act_type='swish'): if act_type == 'swish': act = swish() return act else: act = nn.ReLU(inplace=True) return act class swish(nn.Module): def __init__(self): super(swish, self).__init__() def forwa...
import torch from torch._inductor.select_algorithm import extern_kernels import triton import triton.language as tl from torch._inductor.runtime.triton_heuristics import grid from torch._C import _cuda_getCurrentRawStream as get_raw_stream from torch._inductor.runtime.triton_helpers import libdevice import math import ...
Sense-GVT/BigPretrain
FeedForward
false
17,917
[ "Apache-2.0" ]
8
d8d9b43d94dd1364c18c1e5ba21b85a31cdbba9e
https://github.com/Sense-GVT/BigPretrain/tree/d8d9b43d94dd1364c18c1e5ba21b85a31cdbba9e
import math import torch import torch.nn as nn def activation(act_type='swish'): if act_type == 'swish': act = swish() return act else: act = nn.ReLU(inplace=True) return act class swish(nn.Module): def __init__(self): super().__init__() def forward(self, x)...
SIMPA
# 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 typing import Optional from typing import Tuple import torch.nn as nn from torch.nn.parameter import Parameter from typing import Union class SIMPA(nn.Module): """The signed mixed-path aggregation model. Args: hop (int): Number of hops to consider. directed (bool, optional):...
import torch from torch._inductor.select_algorithm import extern_kernels import triton import triton.language as tl from torch._inductor.runtime.triton_heuristics import grid from torch._C import _cuda_getCurrentRawStream as get_raw_stream import torch.nn as nn from torch.nn.parameter import Parameter assert_size_strid...
SherylHYX/SSSNET_Signed_Clustering
SIMPA
false
17,918
[ "MIT" ]
5
85736c18e86b396d64177d22b8c7f9859dfd794c
https://github.com/SherylHYX/SSSNET_Signed_Clustering/tree/85736c18e86b396d64177d22b8c7f9859dfd794c
import torch from typing import Optional from typing import Tuple import torch.nn as nn from torch.nn.parameter import Parameter from typing import Union class Model(nn.Module): """The signed mixed-path aggregation model. Args: hop (int): Number of hops to consider. directed (bool, optional):...
SparseConv2d
# 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 torch.nn as nn import torch.nn.functional as F from torch import autograd class Sparse(autograd.Function): """" Prune the unimprotant weight for the forwards phase, but pass the gradient to dense weight using SR-STE in the backwards phase """ @staticmethod def forward(ctx,...
import torch from torch._inductor.select_algorithm import extern_kernels import triton import triton.language as tl from 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....
Sense-GVT/BigPretrain
SparseConv2d
false
17,920
[ "Apache-2.0" ]
8
d8d9b43d94dd1364c18c1e5ba21b85a31cdbba9e
https://github.com/Sense-GVT/BigPretrain/tree/d8d9b43d94dd1364c18c1e5ba21b85a31cdbba9e
import torch import torch.nn as nn import torch.nn.functional as F from torch import autograd class Sparse(autograd.Function): """" Prune the unimprotant weight for the forwards phase, but pass the gradient to dense weight using SR-STE in the backwards phase """ @staticmethod def forward(ctx,...
GCNConv_diag
# 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 sklearn.metrics.pairwise import * from torch.optim.lr_scheduler import * class GCNConv_diag(torch.nn.Module): """ A GCN convolution layer of diagonal matrix multiplication """ def __init__(self, input_size, device): super(GCNConv_diag, self).__init__() self.W = torch...
import torch from torch._inductor.select_algorithm import extern_kernels import triton import triton.language as tl from torch._inductor.runtime.triton_heuristics import grid from torch._C import _cuda_getCurrentRawStream as get_raw_stream from sklearn.metrics.pairwise import * from torch.optim.lr_scheduler import * as...
STK101/GRCN
GCNConv_diag
false
17,921
[ "MIT" ]
4
7389000a13d5969bcc77dc4cf73a4107acc68403
https://github.com/STK101/GRCN/tree/7389000a13d5969bcc77dc4cf73a4107acc68403
import torch from sklearn.metrics.pairwise import * from torch.optim.lr_scheduler import * class Model(torch.nn.Module): """ A GCN convolution layer of diagonal matrix multiplication """ def __init__(self, input_size, device): super().__init__() self.W = torch.nn.Parameter(torch.ones(...
Balance_Theory
# 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 typing import Optional from typing import Tuple import torch.nn as nn import torch.nn.functional as F from torch.nn.parameter import Parameter from typing import Union class Balance_Theory(nn.Module): """The signed graph clustering model with balance theory, restricted to 2 hops for fair compari...
import torch from torch._inductor.select_algorithm import extern_kernels import triton import triton.language as tl from 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....
SherylHYX/SSSNET_Signed_Clustering
Balance_Theory
false
17,922
[ "MIT" ]
5
85736c18e86b396d64177d22b8c7f9859dfd794c
https://github.com/SherylHYX/SSSNET_Signed_Clustering/tree/85736c18e86b396d64177d22b8c7f9859dfd794c
import torch from typing import Optional from typing import Tuple import torch.nn as nn import torch.nn.functional as F from torch.nn.parameter import Parameter from typing import Union class Model(nn.Module): """The signed graph clustering model with balance theory, restricted to 2 hops for fair comparison with ...
LSN
# AOT ID: ['0_inference'] from ctypes import c_void_p, c_long, c_int import torch import math import random import os import tempfile from math import inf, nan from torch._inductor.hooks import run_intermediate_hooks from torch._inductor.utils import maybe_profile from torch._inductor.codegen.memory_planning import _al...
import torch from torch import Tensor import torch.nn as nn import torch.utils.data import torch.nn.parallel import torch.nn.functional as F class LSN(nn.Module): """ Custom Linear layer that modifies standard ReLU layer""" __constants__ = ['inplace'] inplace: 'bool' def __init__(self, scale: 'int'=2...
import torch import triton import triton.language as tl from torch._inductor.runtime.triton_heuristics import grid from torch._C import _cuda_getCurrentRawStream as get_raw_stream from torch._inductor.runtime import triton_helpers import torch.nn as nn import torch.utils.data import torch.nn.parallel assert_size_stride...
SindiLab/ACTIVA
LSN
false
17,923
[ "MIT" ]
6
599f57478c5e13868d27879632c54964bf7b02ad
https://github.com/SindiLab/ACTIVA/tree/599f57478c5e13868d27879632c54964bf7b02ad
import torch from torch import Tensor import torch.nn as nn import torch.utils.data import torch.nn.parallel import torch.nn.functional as F class Model(nn.Module): """ Custom Linear layer that modifies standard ReLU layer""" __constants__ = ['inplace'] inplace: 'bool' def __init__(self, scale: 'int'...
EncoderImagePrecomp
# AOT ID: ['0_forward'] from ctypes import c_void_p, c_long, c_int import torch import math import random import os import tempfile from math import inf, nan from torch._inductor.hooks import run_intermediate_hooks from torch._inductor.utils import maybe_profile from torch._inductor.codegen.memory_planning import _alig...
import torch import numpy as np from torch import nn from collections import OrderedDict import torch.nn.init def l2norm(X): """L2-normalize columns of X """ norm = torch.pow(X, 2).sum(dim=1, keepdim=True).sqrt() X = torch.div(X, norm) return X class EncoderImagePrecomp(nn.Module): def __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.triton_helpers import libdevice import numpy as np ...
Shiyang-Yan/Discrete-continous-PG-for-Retrieval
EncoderImagePrecomp
false
17,924
[ "Apache-2.0" ]
8
39fd7a81f732ae043c2ea20352a0c55b72834639
https://github.com/Shiyang-Yan/Discrete-continous-PG-for-Retrieval/tree/39fd7a81f732ae043c2ea20352a0c55b72834639
import torch import numpy as np from torch import nn from collections import OrderedDict import torch.nn.init def l2norm(X): """L2-normalize columns of X """ norm = torch.pow(X, 2).sum(dim=1, keepdim=True).sqrt() X = torch.div(X, norm) return X class Model(nn.Module): def __init__(self, img...
SSSNET
# 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 typing import Optional from typing import Tuple import torch.nn as nn import torch.nn.functional as F from torch.nn.parameter import Parameter from typing import Union class SIMPA(nn.Module): """The signed mixed-path aggregation model. Args: hop (int): Number of hops to consider. ...
import torch from torch._inductor.select_algorithm import extern_kernels import triton import triton.language as tl from 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....
SherylHYX/SSSNET_Signed_Clustering
SSSNET
false
17,925
[ "MIT" ]
5
85736c18e86b396d64177d22b8c7f9859dfd794c
https://github.com/SherylHYX/SSSNET_Signed_Clustering/tree/85736c18e86b396d64177d22b8c7f9859dfd794c
import torch from typing import Optional from typing import Tuple import torch.nn as nn import torch.nn.functional as F from torch.nn.parameter import Parameter from typing import Union class SIMPA(nn.Module): """The signed mixed-path aggregation model. Args: hop (int): Number of hops to consider. ...
DenseNet_conv
# 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 torch.nn as nn def xavier_init(module, gain=1, bias=0, distribution='normal'): assert distribution in ['uniform', 'normal'] if distribution == 'uniform': nn.init.xavier_uniform_(module.weight, gain=gain) else: nn.init.xavier_normal_(module.weight, gain=gain) if hasa...
import torch from torch._inductor.select_algorithm import extern_kernels import triton import triton.language as tl from 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_...
Shiaoming/DensefromRGBS
DenseNet_conv
false
17,926
[ "MIT" ]
7
d69f5f60c5512da876b002a2007ec42d4a3fbb8e
https://github.com/Shiaoming/DensefromRGBS/tree/d69f5f60c5512da876b002a2007ec42d4a3fbb8e
import torch import torch.nn as nn def xavier_init(module, gain=1, bias=0, distribution='normal'): assert distribution in ['uniform', 'normal'] if distribution == 'uniform': nn.init.xavier_uniform_(module.weight, gain=gain) else: nn.init.xavier_normal_(module.weight, gain=gain) if hasa...
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 from torchvision.transforms import functional as F import torch.utils.data from torch import nn import torch.nn.functional as F class TripletLoss(nn.Module): """ Triplet loss Takes embeddings [N*dim_embed] of an anchor sample, a positive sample and a negative sample """ def __init__(...
import torch import triton import triton.language as tl from torch._inductor.runtime.triton_heuristics import grid from torch._C import _cuda_getCurrentRawStream as get_raw_stream from torch._inductor.runtime import triton_helpers import torch.utils.data from torch import nn assert_size_stride = torch._C._dynamo.guards...
Sigma10010/nuclei_cells_det
TripletLoss
false
17,927
[ "MIT" ]
4
c074175fec8938472bb4cddabd83d1d0ea78f230
https://github.com/Sigma10010/nuclei_cells_det/tree/c074175fec8938472bb4cddabd83d1d0ea78f230
import torch from torchvision.transforms import functional as F import torch.utils.data from torch import nn import torch.nn.functional as F class Model(nn.Module): """ Triplet loss Takes embeddings [N*dim_embed] of an anchor sample, a positive sample and a negative sample """ def __init__(self, ...
CPULayerNorm
# 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 torch.nn as nn class CPULayerNorm(nn.Module): def __init__(self, features, eps=1e-06): super().__init__() self.features = features self.eps = eps def forward(self, x, gamma, beta): mean = x.mean(-1, keepdim=True) std = x.std(-1, keepdim=True) ...
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_...
Smerity/pytorch-qrnn
CPULayerNorm
false
17,928
[ "BSD-3-Clause" ]
4
907c8ea53f689136fcc50996b6474de967745202
https://github.com/Smerity/pytorch-qrnn/tree/907c8ea53f689136fcc50996b6474de967745202
import torch import torch.nn as nn class Model(nn.Module): def __init__(self, features, eps=1e-06): super().__init__() self.features = features self.eps = eps def forward(self, x, gamma, beta): mean = x.mean(-1, keepdim=True) std = x.std(-1, keepdim=True) retu...
MixerBlock
# 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 torch.nn as nn 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 is the same as the DropConnect impl I created for EfficientNet, etc networks, however, the original name is ...
import torch from torch._inductor.select_algorithm import extern_kernels import triton import triton.language 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 ...
Sense-GVT/BigPretrain
MixerBlock
false
17,929
[ "Apache-2.0" ]
8
d8d9b43d94dd1364c18c1e5ba21b85a31cdbba9e
https://github.com/Sense-GVT/BigPretrain/tree/d8d9b43d94dd1364c18c1e5ba21b85a31cdbba9e
import torch import torch.nn as nn 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 is the same as the DropConnect impl I created for EfficientNet, etc networks, however, the original name is ...
SelfAttention
# 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 torch.nn as nn class SelfAttention(nn.Module): def __init__(self, embed_dims, heads): super(SelfAttention, self).__init__() self.heads = heads self.embed_dims = embed_dims self.depth = embed_dims // heads self.query = nn.Linear(self.depth, self.depth) ...
import torch from torch._inductor.select_algorithm import extern_kernels import triton import triton.language as tl from 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....
ShivamRajSharma/Transformer-Text-To-Spech
SelfAttention
false
17,930
[ "MIT" ]
10
2e1cf84a791497e414fb72ae04d954fce934a32a
https://github.com/ShivamRajSharma/Transformer-Text-To-Spech/tree/2e1cf84a791497e414fb72ae04d954fce934a32a
import torch import torch.nn as nn class Model(nn.Module): def __init__(self, embed_dims, heads): super().__init__() self.heads = heads self.embed_dims = embed_dims self.depth = embed_dims // heads self.query = nn.Linear(self.depth, self.depth) self.key = nn.Linear...
ContrastiveLoss
# 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 torchvision.transforms import functional as F import torch.utils.data from torch import nn import torch.nn.functional as F class ContrastiveLoss(nn.Module): """ Contrastive loss Takes embeddings of two samples and a target label == 1 if samples are from the same class and label == 0 othe...
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.utils.data from...
Sigma10010/nuclei_cells_det
ContrastiveLoss
false
17,931
[ "MIT" ]
4
c074175fec8938472bb4cddabd83d1d0ea78f230
https://github.com/Sigma10010/nuclei_cells_det/tree/c074175fec8938472bb4cddabd83d1d0ea78f230
import torch from torchvision.transforms import functional as F import torch.utils.data from torch import nn import torch.nn.functional as F class Model(nn.Module): """ Contrastive loss Takes embeddings of two samples and a target label == 1 if samples are from the same class and label == 0 otherwise ...
AttentionLayer
# 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 math import torch from torch import nn from torch.nn import functional as F import torch.nn.init def Linear(in_features, out_features, dropout=0.0): m = nn.Linear(in_features, out_features) m.weight.data.normal_(mean=0, std=math.sqrt((1 - dropout) / in_features)) m.bias.data.zero_() return nn.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 from torch._inductor.runtime import triton_helpers from torch._inductor.runtime....
Shiyang-Yan/Discrete-continous-PG-for-Retrieval
AttentionLayer
false
17,932
[ "Apache-2.0" ]
8
39fd7a81f732ae043c2ea20352a0c55b72834639
https://github.com/Shiyang-Yan/Discrete-continous-PG-for-Retrieval/tree/39fd7a81f732ae043c2ea20352a0c55b72834639
import math import torch from torch import nn from torch.nn import functional as F import torch.nn.init def Linear(in_features, out_features, dropout=0.0): m = nn.Linear(in_features, out_features) m.weight.data.normal_(mean=0, std=math.sqrt((1 - dropout) / in_features)) m.bias.data.zero_() return nn.u...
wide_basic
# 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 torch.nn as nn import torch.utils import torch.utils.data def get_norm(n_filters, norm): if norm is None: return Identity() elif norm == 'batch': return nn.BatchNorm2d(n_filters, momentum=0.9) elif norm == 'instance': return nn.InstanceNorm2d(n_filters, affine=T...
import torch from torch._inductor.select_algorithm import extern_kernels import 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 import torch.utils.data assert_size_str...
Silent-Zebra/JEM
wide_basic
false
17,933
[ "Apache-2.0" ]
6
33440aff8429d9a24a8ba858d0209f4b48be8e05
https://github.com/Silent-Zebra/JEM/tree/33440aff8429d9a24a8ba858d0209f4b48be8e05
import torch import torch.nn as nn import torch.utils import torch.utils.data def get_norm(n_filters, norm): if norm is None: return Identity() elif norm == 'batch': return nn.BatchNorm2d(n_filters, momentum=0.9) elif norm == 'instance': return nn.InstanceNorm2d(n_filters, affine=T...
CPUReverseForgetMult
# 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 class CPUReverseForgetMult(torch.nn.Module): def __init__(self): super(CPUReverseForgetMult, self).__init__() def forward(self, f, x, hidden_init=None): result = [] forgets = f.split(1, dim=0)[::-1] inputs = (f * x).split(1, dim=0)[::-1] prev_h = hidden_i...
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 reinterpret...
Smerity/pytorch-qrnn
CPUReverseForgetMult
false
17,934
[ "BSD-3-Clause" ]
4
907c8ea53f689136fcc50996b6474de967745202
https://github.com/Smerity/pytorch-qrnn/tree/907c8ea53f689136fcc50996b6474de967745202
import torch class Model(torch.nn.Module): def __init__(self): super().__init__() def forward(self, f, x, hidden_init=None): result = [] forgets = f.split(1, dim=0)[::-1] inputs = (f * x).split(1, dim=0)[::-1] prev_h = hidden_init for i, h in enumerate(inputs)...
Project3D
# 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 torch.nn as nn class Project3D(nn.Module): """Layer which projects 3D points into a camera with intrinsics K and at position T """ def __init__(self, batch_size, height, width, eps=1e-07): super(Project3D, self).__init__() self.batch_size = batch_size self.heig...
import torch from torch._inductor.select_algorithm import extern_kernels import 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...
Sid1057/sid1057.github.io
Project3D
false
17,935
[ "MIT" ]
4
623d1731e308b42b6f86304dcfd671a061b414bf
https://github.com/Sid1057/sid1057.github.io/tree/623d1731e308b42b6f86304dcfd671a061b414bf
import torch import torch.nn as nn class Model(nn.Module): """Layer which projects 3D points into a camera with intrinsics K and at position T """ def __init__(self, batch_size, height, width, eps=1e-07): super().__init__() self.batch_size = batch_size self.height = height ...
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 import torch.nn as nn class Conv3x3(nn.Module): """Layer to pad and convolve input """ def __init__(self, in_channels, out_channels, use_refl=True): super(Conv3x3, self).__init__() if use_refl: self.pad = nn.ReflectionPad2d(1) else: self.pad = ...
import torch from torch._inductor.select_algorithm import extern_kernels import triton import triton.language as tl from torch._inductor.runtime.triton_heuristics import grid from torch._C import _cuda_getCurrentRawStream as get_raw_stream from torch._inductor.runtime.triton_helpers import libdevice, math as tl_math im...
Sid1057/sid1057.github.io
ConvBlock
false
17,936
[ "MIT" ]
4
623d1731e308b42b6f86304dcfd671a061b414bf
https://github.com/Sid1057/sid1057.github.io/tree/623d1731e308b42b6f86304dcfd671a061b414bf
import torch import torch.nn as nn class Conv3x3(nn.Module): """Layer to pad and convolve input """ def __init__(self, in_channels, out_channels, use_refl=True): super().__init__() if use_refl: self.pad = nn.ReflectionPad2d(1) else: self.pad = nn.ZeroPad2d(...
VirtualBatchNorm1d
# 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...
from torch.nn import Module import torch import torch.utils import torch.utils.data from torch.nn.parameter import Parameter from torch.nn.modules import Module class VirtualBatchNorm1d(Module): """ Module for Virtual Batch Normalization. Implementation borrowed and modified from Rafael_Valle's code + hel...
import torch import triton import triton.language as tl from torch._inductor.runtime.triton_heuristics import grid from torch._C import _cuda_getCurrentRawStream as get_raw_stream from torch._inductor.runtime.triton_helpers import libdevice from torch.nn import Module import torch.utils import torch.utils.data from tor...
Silent-Zebra/JEM
VirtualBatchNorm1d
false
17,937
[ "Apache-2.0" ]
6
33440aff8429d9a24a8ba858d0209f4b48be8e05
https://github.com/Silent-Zebra/JEM/tree/33440aff8429d9a24a8ba858d0209f4b48be8e05
from torch.nn import Module import torch import torch.utils import torch.utils.data from torch.nn.parameter import Parameter from torch.nn.modules import Module class Model(Module): """ Module for Virtual Batch Normalization. Implementation borrowed and modified from Rafael_Valle's code + help of SimonW f...
WeightNet_DW
# 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 torch.nn as nn import torch.nn.functional as F class WeightNet_DW(nn.Module): """ Here we show a grouping manner when we apply WeightNet to a depthwise convolution. The grouped fc layer directly generates the convolutional kernel, has fewer parameters while achieving comparable res...
import torch from torch._inductor.select_algorithm import extern_kernels import 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...
Sense-GVT/BigPretrain
WeightNet_DW
false
17,938
[ "Apache-2.0" ]
8
d8d9b43d94dd1364c18c1e5ba21b85a31cdbba9e
https://github.com/Sense-GVT/BigPretrain/tree/d8d9b43d94dd1364c18c1e5ba21b85a31cdbba9e
import torch import torch.nn as nn import torch.nn.functional as F class Model(nn.Module): """ Here we show a grouping manner when we apply WeightNet to a depthwise convolution. The grouped fc layer directly generates the convolutional kernel, has fewer parameters while achieving comparable results. ...
SSIM
# 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 torch.nn as nn class SSIM(nn.Module): """Layer to compute the SSIM loss between a pair of images """ def __init__(self): super(SSIM, self).__init__() self.mu_x_pool = nn.AvgPool2d(3, 1) self.mu_y_pool = nn.AvgPool2d(3, 1) self.sig_x_pool = nn.AvgPool2d(...
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 ...
Sid1057/sid1057.github.io
SSIM
false
17,939
[ "MIT" ]
4
623d1731e308b42b6f86304dcfd671a061b414bf
https://github.com/Sid1057/sid1057.github.io/tree/623d1731e308b42b6f86304dcfd671a061b414bf
import torch import torch.nn as nn class Model(nn.Module): """Layer to compute the SSIM loss between a pair of images """ def __init__(self): super().__init__() self.mu_x_pool = nn.AvgPool2d(3, 1) self.mu_y_pool = nn.AvgPool2d(3, 1) self.sig_x_pool = nn.AvgPool2d(3, 1) ...
GraphConvolution
# AOT ID: ['0_forward'] from ctypes import c_void_p, c_long, c_int import torch import math import random import os import tempfile from math import inf, nan from torch._inductor.hooks import run_intermediate_hooks from torch._inductor.utils import maybe_profile from torch._inductor.codegen.memory_planning import _alig...
from torch.nn import Module import torch import torch.autograd import torch.nn as nn from torch.nn.modules.module import Module class GraphConvolution(Module): """ Simple GCN layer, similar to https://arxiv.org/abs/1609.02907. """ def __init__(self, state_dim, name='', out_state_dim=None): su...
import torch from torch._inductor.select_algorithm import extern_kernels import triton import triton.language as tl from torch._inductor.runtime.triton_heuristics import grid from torch._C import _cuda_getCurrentRawStream as get_raw_stream from torch.nn import Module import torch.autograd import torch.nn as nn from tor...
SowmyaAitha/Palmira
GraphConvolution
false
17,940
[ "MIT" ]
6
c3ae884e35b8b3703a5e4ba52d7b0bdae6da1bad
https://github.com/SowmyaAitha/Palmira/tree/c3ae884e35b8b3703a5e4ba52d7b0bdae6da1bad
from torch.nn import Module import torch import torch.autograd import torch.nn as nn from torch.nn.modules.module import Module class Model(Module): """ Simple GCN layer, similar to https://arxiv.org/abs/1609.02907. """ def __init__(self, state_dim, name='', out_state_dim=None): super().__ini...
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 import torch.nn as nn class Decoder(nn.Module): def __init__(self): super(Decoder, self).__init__() self.pre11 = nn.ReflectionPad2d((1, 1, 1, 1)) self.conv11 = nn.Conv2d(in_channels=512, out_channels=256, kernel_size=3, stride=1) self.relu11 = nn.ReLU(inpl...
import torch from torch._inductor.select_algorithm import extern_kernels import triton import triton.language as tl from 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....
ShiZhuming/StyleTransfer
Decoder
false
17,941
[ "MIT" ]
10
cba2a3ceb733a2d129d52d4a3cac07c7651bd928
https://github.com/ShiZhuming/StyleTransfer/tree/cba2a3ceb733a2d129d52d4a3cac07c7651bd928
import torch import torch.nn as nn class Model(nn.Module): def __init__(self): super().__init__() self.pre11 = nn.ReflectionPad2d((1, 1, 1, 1)) self.conv11 = nn.Conv2d(in_channels=512, out_channels=256, kernel_size=3, stride=1) self.relu11 = nn.ReLU(inplace=True) ...
SH2Signal
# 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 numpy as np import torch.nn as nn from scipy import special as sci def cart2sph(x, y, z): """ cart2sph(x, y, z) -> theta, phi, r Computes the corresponding spherical coordinate of the given input parameters :attr:`x`, :attr:`y` and :attr:`x`. Args: x (Number): x position ...
import torch from torch._inductor.select_algorithm import extern_kernels import 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 from scipy import special as sci assert...
SimonKoppers/DELIMIT
SH2Signal
false
17,942
[ "MIT" ]
7
d778a567bbec1beef2395ead60aa1e30086bb07c
https://github.com/SimonKoppers/DELIMIT/tree/d778a567bbec1beef2395ead60aa1e30086bb07c
import torch import numpy as np import torch.nn as nn from scipy import special as sci def cart2sph(x, y, z): """ cart2sph(x, y, z) -> theta, phi, r Computes the corresponding spherical coordinate of the given input parameters :attr:`x`, :attr:`y` and :attr:`x`. Args: x (Number): x position ...
GraphResConvolution
# 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...
from torch.nn import Module import torch import torch.autograd import torch.nn as nn from torch.nn.modules.module import Module class GraphConvolution(Module): """ Simple GCN layer, similar to https://arxiv.org/abs/1609.02907. """ def __init__(self, state_dim, name='', out_state_dim=None): su...
import torch from torch._inductor.select_algorithm import extern_kernels import triton import triton.language as tl from torch._inductor.runtime.triton_heuristics import grid from torch._C import _cuda_getCurrentRawStream as get_raw_stream from torch._inductor.runtime import triton_helpers from torch.nn import Module i...
SowmyaAitha/Palmira
GraphResConvolution
false
17,943
[ "MIT" ]
6
c3ae884e35b8b3703a5e4ba52d7b0bdae6da1bad
https://github.com/SowmyaAitha/Palmira/tree/c3ae884e35b8b3703a5e4ba52d7b0bdae6da1bad
from torch.nn import Module import torch import torch.autograd import torch.nn as nn from torch.nn.modules.module import Module class GraphConvolution(Module): """ Simple GCN layer, similar to https://arxiv.org/abs/1609.02907. """ def __init__(self, state_dim, name='', out_state_dim=None): su...
SharedDropoutMLP
# 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 torch.nn as nn class SharedDropout(nn.Module): """ SharedDropout differs from the vanilla dropout strategy in that the dropout mask is shared across one dimension. Args: p (float): The probability of an element to be zeroed. Default: 0.5. batch_first (b...
import torch from torch._inductor.select_algorithm import extern_kernels import triton import triton.language as tl from torch._inductor.runtime.triton_heuristics import grid from torch._C import _cuda_getCurrentRawStream as get_raw_stream import torch.nn as nn assert_size_stride = torch._C._dynamo.guards.assert_size_s...
Spico197/REx
SharedDropoutMLP
false
17,944
[ "MIT" ]
4
bb3cdb845765a63e9bd18070068af52a1b2db3f3
https://github.com/Spico197/REx/tree/bb3cdb845765a63e9bd18070068af52a1b2db3f3
import torch import torch.nn as nn class SharedDropout(nn.Module): """ SharedDropout differs from the vanilla dropout strategy in that the dropout mask is shared across one dimension. Args: p (float): The probability of an element to be zeroed. Default: 0.5. batch_first (b...
SubjObjSpan
# 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 numpy as np from typing import Iterable from typing import Optional import torch.nn as nn def find_closest_span_pairs(head: 'Iterable', tail: 'Iterable', backtrace: 'Optional[bool]'=True): """ Find all span pairs. Args: head: list of start position predictions, either 1 or...
import torch from torch._inductor.select_algorithm import extern_kernels import 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 typing import Iterable from typing import Optional impor...
Spico197/REx
SubjObjSpan
false
17,945
[ "MIT" ]
4
bb3cdb845765a63e9bd18070068af52a1b2db3f3
https://github.com/Spico197/REx/tree/bb3cdb845765a63e9bd18070068af52a1b2db3f3
import torch import numpy as np from typing import Iterable from typing import Optional import torch.nn as nn def find_closest_span_pairs(head: 'Iterable', tail: 'Iterable', backtrace: 'Optional[bool]'=True): """ Find all span pairs. Args: head: list of start position predictions, either 1 or...
make_dense
# 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 torch.nn as nn import torch.utils.model_zoo class make_dense(nn.Module): def __init__(self, channels_in, channels_out, kernel_size=3): super(make_dense, self).__init__() self.leaky_relu = nn.LeakyReLU(0.1, inplace=True) self.conv = nn.Conv2d(channels_in, channels_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 import torch.nn as nn import torch.utils.model_zoo assert_size_stride = torch._C...
SeleSchaefer/super_resolution
make_dense
false
17,946
[ "MIT" ]
5
bf28a959fb150ceeadbd9f0bcfc12f3025cf82f4
https://github.com/SeleSchaefer/super_resolution/tree/bf28a959fb150ceeadbd9f0bcfc12f3025cf82f4
import torch import torch.nn as nn import torch.utils.model_zoo class Model(nn.Module): def __init__(self, channels_in, channels_out, kernel_size=3): super().__init__() self.leaky_relu = nn.LeakyReLU(0.1, inplace=True) self.conv = nn.Conv2d(channels_in, channels_out, kernel_size= ...
CE_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 torch.nn as nn import torch.utils.model_zoo class CE_loss(nn.Module): def __init__(self): super().__init__() self.loss = nn.CrossEntropyLoss() def forward(self, predict, target): n, _c, h, w = target.data.shape predict = predict.permute(0, 2, 3, 1).contigu...
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 ...
SeleSchaefer/super_resolution
CE_loss
false
17,947
[ "MIT" ]
5
bf28a959fb150ceeadbd9f0bcfc12f3025cf82f4
https://github.com/SeleSchaefer/super_resolution/tree/bf28a959fb150ceeadbd9f0bcfc12f3025cf82f4
import torch import torch.nn as nn import torch.utils.model_zoo class Model(nn.Module): def __init__(self): super().__init__() self.loss = nn.CrossEntropyLoss() def forward(self, predict, target): n, _c, h, w = target.data.shape predict = predict.permute(0, 2, 3, 1).contiguou...
LogSTFTMagnitude
# 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 torch.nn as nn import torch.nn.functional as F import torch.utils.data class LogSTFTMagnitude(nn.Module): def __init__(self): super().__init__() def forward(self, predicts_mag, targets_mag): log_predicts_mag = torch.log(predicts_mag) log_targets_mag = torch.log(ta...
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 ...
SolomidHero/speech-regeneration-enhancer
LogSTFTMagnitude
false
17,948
[ "MIT" ]
8
eb43907ff085d68a707ff7bc3af14e93ff66fd65
https://github.com/SolomidHero/speech-regeneration-enhancer/tree/eb43907ff085d68a707ff7bc3af14e93ff66fd65
import torch import torch.nn as nn import torch.nn.functional as F import torch.utils.data class Model(nn.Module): def __init__(self): super().__init__() def forward(self, predicts_mag, targets_mag): log_predicts_mag = torch.log(predicts_mag) log_targets_mag = torch.log(targets_mag) ...
Smoother
# 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...
from torch.nn import Module import torch from torch import Tensor from typing import Optional import torch.nn.functional as F from torch.nn import Dropout from torch.nn import LayerNorm from torch.nn import Conv1d from torch.nn import MultiheadAttention class Smoother(Module): """Convolutional Transformer Encoder...
import torch from torch._inductor.select_algorithm import extern_kernels import triton import triton.language as tl from 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....
SolomidHero/FragmentVC-with-RAdam
Smoother
false
17,949
[ "MIT" ]
6
a0ee884155a4e8f47d8950a35258e58987f6289e
https://github.com/SolomidHero/FragmentVC-with-RAdam/tree/a0ee884155a4e8f47d8950a35258e58987f6289e
from torch.nn import Module import torch from torch import Tensor from typing import Optional import torch.nn.functional as F from torch.nn import Dropout from torch.nn import LayerNorm from torch.nn import Conv1d from torch.nn import MultiheadAttention class Model(Module): """Convolutional Transformer Encoder La...
Extractor
# 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...
from torch.nn import Module import torch from torch import Tensor from typing import Optional from typing import Tuple import torch.nn.functional as F from torch.nn import Dropout from torch.nn import LayerNorm from torch.nn import Conv1d from torch.nn import MultiheadAttention class Extractor(Module): """Convolu...
import torch from torch._inductor.select_algorithm import extern_kernels import triton import triton.language as tl from 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....
SolomidHero/FragmentVC-with-RAdam
Extractor
false
17,950
[ "MIT" ]
6
a0ee884155a4e8f47d8950a35258e58987f6289e
https://github.com/SolomidHero/FragmentVC-with-RAdam/tree/a0ee884155a4e8f47d8950a35258e58987f6289e
from torch.nn import Module import torch from torch import Tensor from typing import Optional from typing import Tuple import torch.nn.functional as F from torch.nn import Dropout from torch.nn import LayerNorm from torch.nn import Conv1d from torch.nn import MultiheadAttention class Model(Module): """Convolution...
State_Autoencoder
# AOT ID: ['0_forward'] from ctypes import c_void_p, c_long, c_int import torch import math import random import os import tempfile from math import inf, nan from torch._inductor.hooks import run_intermediate_hooks from torch._inductor.utils import maybe_profile from torch._inductor.codegen.memory_planning import _alig...
import torch import torch.nn as nn from collections import OrderedDict class State_Autoencoder(nn.Module): def __init__(self, frame_stacks=1, channels=3): super(State_Autoencoder, self).__init__() self.encoder = nn.Sequential(OrderedDict([('encoder_conv1', nn. Conv2d(channels * frame_...
import torch from torch._inductor.select_algorithm import extern_kernels import triton import triton.language as tl from 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 co...
Squishy123/GDE_net
State_Autoencoder
false
17,951
[ "Apache-2.0" ]
4
9094cbf58edbf0d62a2b2cd66743322597f66269
https://github.com/Squishy123/GDE_net/tree/9094cbf58edbf0d62a2b2cd66743322597f66269
import torch import torch.nn as nn from collections import OrderedDict class Model(nn.Module): def __init__(self, frame_stacks=1, channels=3): super().__init__() self.encoder = nn.Sequential(OrderedDict([('encoder_conv1', nn. Conv2d(channels * frame_stacks, 16, kernel_size=3, stride=2...
SmallMnistNoDropout
# 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 torch.nn as nn import torch.nn import torch.utils.data import torch.utils.tensorboard._pytorch_graph import torch.onnx.symbolic_caffe2 class SmallMnistNoDropout(nn.Module): def __init__(self): super(SmallMnistNoDropout, self).__init__() self.conv1 = nn.Conv2d(1, 10, kernel_siz...
import torch from torch._inductor.select_algorithm import extern_kernels import triton import triton.language as tl from 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....
Rohan-Chaudhury/aimet
SmallMnistNoDropout
false
17,952
[ "BSD-3-Clause" ]
3
1c38cac8cc0fd32dca40ce5e39940805d29f7a4a
https://github.com/Rohan-Chaudhury/aimet/tree/1c38cac8cc0fd32dca40ce5e39940805d29f7a4a
import torch import torch.nn as nn import torch.nn import torch.utils.data import torch.utils.tensorboard._pytorch_graph import torch.onnx.symbolic_caffe2 class Model(nn.Module): def __init__(self): super().__init__() self.conv1 = nn.Conv2d(1, 10, kernel_size=5) self.relu1 = nn.ReLU() ...
SmallMnist
# 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 torch.nn as nn import torch.nn import torch.utils.data import torch.utils.tensorboard._pytorch_graph import torch.onnx.symbolic_caffe2 class SmallMnist(nn.Module): def __init__(self): super(SmallMnist, self).__init__() self.conv1 = nn.Conv2d(1, 10, kernel_size=5) self....
import torch from torch._inductor.select_algorithm import extern_kernels import triton import triton.language as tl from torch._inductor.runtime.triton_heuristics import grid from torch._C import _cuda_getCurrentRawStream as get_raw_stream from torch._inductor.runtime import triton_helpers from torch._inductor.runtime....
Rohan-Chaudhury/aimet
SmallMnist
false
17,953
[ "BSD-3-Clause" ]
3
1c38cac8cc0fd32dca40ce5e39940805d29f7a4a
https://github.com/Rohan-Chaudhury/aimet/tree/1c38cac8cc0fd32dca40ce5e39940805d29f7a4a
import torch import torch.nn as nn import torch.nn import torch.utils.data import torch.utils.tensorboard._pytorch_graph import torch.onnx.symbolic_caffe2 class Model(nn.Module): def __init__(self): super().__init__() self.conv1 = nn.Conv2d(1, 10, kernel_size=5) self.relu1 = nn.ReLU() ...
SingleBlock
# 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 torch.nn as nn import torch.nn.functional as F class FCNet(nn.Module): def __init__(self, in_size, out_size, activate=None, drop=0.0): super(FCNet, self).__init__() self.lin = nn.Linear(in_size, out_size) self.drop_value = drop self.drop = nn.Dropout(drop) ...
import torch from torch._inductor.select_algorithm import extern_kernels import triton import triton.language as tl from 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....
Ruiver/CTCNet
SingleBlock
false
17,954
[ "Apache-2.0" ]
6
539e55ec9fed06028379d35dfd5cd4074755ffd8
https://github.com/Ruiver/CTCNet/tree/539e55ec9fed06028379d35dfd5cd4074755ffd8
import torch import torch.nn as nn import torch.nn.functional as F class FCNet(nn.Module): def __init__(self, in_size, out_size, activate=None, drop=0.0): super().__init__() self.lin = nn.Linear(in_size, out_size) self.drop_value = drop self.drop = nn.Dropout(drop) self.ac...
Subtract
# 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 torch.nn import torch.utils.data import torch.utils.tensorboard._pytorch_graph import torch.onnx.symbolic_caffe2 class Subtract(torch.nn.Module): """ Subtract module for a functional subtract""" def forward(self, x, y): """ Forward-pass routine for subtact op """ ...
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 import torch.utils.data import torch.utils.tensorboard._pytorch_graph import torch.onnx.symbolic_caffe2 assert_size_stride =...
Rohan-Chaudhury/aimet
Subtract
false
17,955
[ "BSD-3-Clause" ]
3
1c38cac8cc0fd32dca40ce5e39940805d29f7a4a
https://github.com/Rohan-Chaudhury/aimet/tree/1c38cac8cc0fd32dca40ce5e39940805d29f7a4a
import torch import torch.nn import torch.utils.data import torch.utils.tensorboard._pytorch_graph import torch.onnx.symbolic_caffe2 class Model(torch.nn.Module): """ Subtract module for a functional subtract""" def forward(self, x, y): """ Forward-pass routine for subtact op """ ...
SpectralConvergence
# 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 torch.nn as nn import torch.utils.data class SpectralConvergence(nn.Module): def __init__(self): """Initilize spectral convergence loss module.""" super().__init__() def forward(self, predicts_mag, targets_mag): """Calculate norm of difference operator. Args: ...
import torch import triton import triton.language as tl from torch._inductor.runtime.triton_heuristics import grid from torch._C import _cuda_getCurrentRawStream as get_raw_stream from torch._inductor.runtime.triton_helpers import libdevice import torch.nn as nn import torch.utils.data assert_size_stride = torch._C._dy...
SolomidHero/speech-regeneration-enhancer
SpectralConvergence
false
17,956
[ "MIT" ]
8
eb43907ff085d68a707ff7bc3af14e93ff66fd65
https://github.com/SolomidHero/speech-regeneration-enhancer/tree/eb43907ff085d68a707ff7bc3af14e93ff66fd65
import torch import torch.nn as nn import torch.utils.data class Model(nn.Module): def __init__(self): """Initilize spectral convergence loss module.""" super().__init__() def forward(self, predicts_mag, targets_mag): """Calculate norm of difference operator. Args: predicts...
GumbelSoftmaxLayer
# 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 torch.nn as nn from torch.distributions import RelaxedOneHotCategorical import torch.nn.parallel import torch.utils.data import torch.distributions def gumbel_softmax_sample(logits: 'torch.Tensor', temperature: 'float'=1.0, training: 'bool'=True, straight_through: 'bool'=False): size = log...
import torch import triton import triton.language as tl from torch._inductor.runtime.triton_heuristics import grid from torch._C import _cuda_getCurrentRawStream as get_raw_stream import torch.nn as nn from torch.distributions import RelaxedOneHotCategorical import torch.nn.parallel import torch.utils.data import torch...
Slowika/GameBias-EmeCom2020
GumbelSoftmaxLayer
false
17,957
[ "MIT" ]
5
5b94c47559f8202bca99c26fc1bcb078dd0509a6
https://github.com/Slowika/GameBias-EmeCom2020/tree/5b94c47559f8202bca99c26fc1bcb078dd0509a6
import torch import torch.nn as nn from torch.distributions import RelaxedOneHotCategorical import torch.nn.parallel import torch.utils.data import torch.distributions def gumbel_softmax_sample(logits: 'torch.Tensor', temperature: 'float'=1.0, training: 'bool'=True, straight_through: 'bool'=False): size = log...
Hsigmoid
# AOT ID: ['0_inference'] from ctypes import c_void_p, c_long, c_int import torch import math import random import os import tempfile from math import inf, nan from torch._inductor.hooks import run_intermediate_hooks from torch._inductor.utils import maybe_profile from torch._inductor.codegen.memory_planning import _al...
import torch import torch.nn as nn from torch.quantization import QuantStub from torch.quantization import DeQuantStub class Hsigmoid(nn.Module): def __init__(self, add_stub=False): super().__init__() self.quant = QuantStub() self.dequant = DeQuantStub() self.add_stub = add_stub ...
import torch import triton import triton.language as tl from torch._inductor.runtime.triton_heuristics import grid from torch._C import _cuda_getCurrentRawStream as get_raw_stream from torch._inductor.runtime import triton_helpers import torch.nn as nn from torch.quantization import QuantStub from torch.quantization im...
T-head-Semi/tvm
Hsigmoid
false
17,958
[ "Apache-2.0" ]
4
c1b8e06685c92fb7cacbe989e147b0622aee4503
https://github.com/T-head-Semi/tvm/tree/c1b8e06685c92fb7cacbe989e147b0622aee4503
import torch import torch.nn as nn from torch.quantization import QuantStub from torch.quantization import DeQuantStub class Model(nn.Module): def __init__(self, add_stub=False): super().__init__() self.quant = QuantStub() self.dequant = DeQuantStub() self.add_stub = add_stub ...
_TestNetStrided
# 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 torch.nn.functional as F import torch.nn import torch.utils.data import torch.utils.tensorboard._pytorch_graph import torch.onnx.symbolic_caffe2 class _TestNetStrided(torch.nn.Module): def __init__(self): super(_TestNetStrided, self).__init__() self.conv1 = torch.nn.Conv2d(1, ...
import torch from torch._inductor.select_algorithm import extern_kernels import triton import triton.language as tl from torch._inductor.runtime.triton_heuristics import grid from torch._C import _cuda_getCurrentRawStream as get_raw_stream from torch._inductor.runtime import triton_helpers from torch._inductor.runtime....
Rohan-Chaudhury/aimet
_TestNetStrided
false
17,959
[ "BSD-3-Clause" ]
3
1c38cac8cc0fd32dca40ce5e39940805d29f7a4a
https://github.com/Rohan-Chaudhury/aimet/tree/1c38cac8cc0fd32dca40ce5e39940805d29f7a4a
import torch import torch.nn.functional as F import torch.nn import torch.utils.data import torch.utils.tensorboard._pytorch_graph import torch.onnx.symbolic_caffe2 class Model(torch.nn.Module): def __init__(self): super().__init__() self.conv1 = torch.nn.Conv2d(1, 20, kernel_size=5) self...
Divide
# 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 torch.nn import torch.utils.data import torch.utils.tensorboard._pytorch_graph import torch.onnx.symbolic_caffe2 class Divide(torch.nn.Module): """ Divide module for a functional divide""" def forward(self, x, y): """ Forward-pass routine for divide op """ ...
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 import torch.utils.data import torch.utils.tensorboard._pytorch_graph import torch.onnx.symbolic_caffe2 assert_size_stride =...
Rohan-Chaudhury/aimet
Divide
false
17,960
[ "BSD-3-Clause" ]
3
1c38cac8cc0fd32dca40ce5e39940805d29f7a4a
https://github.com/Rohan-Chaudhury/aimet/tree/1c38cac8cc0fd32dca40ce5e39940805d29f7a4a
import torch import torch.nn import torch.utils.data import torch.utils.tensorboard._pytorch_graph import torch.onnx.symbolic_caffe2 class Model(torch.nn.Module): """ Divide module for a functional divide""" def forward(self, x, y): """ Forward-pass routine for divide op """ r...
Hswish
# 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 torch.nn as nn from torch.quantization import QuantStub from torch.quantization import DeQuantStub class Hswish(nn.Module): def __init__(self, add_stub=False): super().__init__() self.quant = QuantStub() self.dequant = DeQuantStub() self.add_stub = add_stub ...
import torch import triton import triton.language as tl from torch._inductor.runtime.triton_heuristics import grid from torch._C import _cuda_getCurrentRawStream as get_raw_stream from torch._inductor.runtime import triton_helpers import torch.nn as nn from torch.quantization import QuantStub from torch.quantization im...
T-head-Semi/tvm
Hswish
false
17,961
[ "Apache-2.0" ]
4
c1b8e06685c92fb7cacbe989e147b0622aee4503
https://github.com/T-head-Semi/tvm/tree/c1b8e06685c92fb7cacbe989e147b0622aee4503
import torch import torch.nn as nn from torch.quantization import QuantStub from torch.quantization import DeQuantStub class Model(nn.Module): def __init__(self, add_stub=False): super().__init__() self.quant = QuantStub() self.dequant = DeQuantStub() self.add_stub = add_stub ...
VirtualBatchNormNN
# 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...
from torch.nn import Module import torch import torch.utils import torch.utils.data from torch.nn.parameter import Parameter from torch.nn.modules import Module class VirtualBatchNormNN(Module): """ Module for Virtual Batch Normalization. Implementation borrowed and modified from Rafael_Valle's code + hel...
import torch import triton import triton.language as tl from torch._inductor.runtime.triton_heuristics import grid from torch._C import _cuda_getCurrentRawStream as get_raw_stream from torch._inductor.runtime.triton_helpers import libdevice from torch.nn import Module import torch.utils import torch.utils.data from tor...
Silent-Zebra/JEM
VirtualBatchNormNN
false
17,962
[ "Apache-2.0" ]
6
33440aff8429d9a24a8ba858d0209f4b48be8e05
https://github.com/Silent-Zebra/JEM/tree/33440aff8429d9a24a8ba858d0209f4b48be8e05
from torch.nn import Module import torch import torch.utils import torch.utils.data from torch.nn.parameter import Parameter from torch.nn.modules import Module class Model(Module): """ Module for Virtual Batch Normalization. Implementation borrowed and modified from Rafael_Valle's code + help of SimonW f...
GEGLU
# 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 torch.nn.functional as F from torch import nn class GEGLU(nn.Module): def forward(self, x): x, gates = x.chunk(2, dim=-1) return x * F.gelu(gates) 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 from torch import nn assert_size_stride = torch._C._dynamo.guards.assert_size_s...
TabbenBenchmark/tabben
GEGLU
false
17,963
[ "MIT" ]
5
d74114afc4b6f67be488ab6bf8ad6fd316fdb888
https://github.com/TabbenBenchmark/tabben/tree/d74114afc4b6f67be488ab6bf8ad6fd316fdb888
import torch import torch.nn.functional as F from torch import nn class Model(nn.Module): def forward(self, x): x, gates = x.chunk(2, dim=-1) return x * F.gelu(gates) def get_inputs(): return [torch.rand([4, 4, 4, 4])] def get_init_inputs(): return []
Conv3x3
# 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 torch.nn as nn class Conv3x3(nn.Module): """Layer to pad and convolve input """ def __init__(self, in_channels, out_channels, use_refl=True): super(Conv3x3, self).__init__() if use_refl: self.pad = nn.ReflectionPad2d(1) else: self.pad = ...
import torch from torch._inductor.select_algorithm import extern_kernels import triton import triton.language as tl from torch._inductor.runtime.triton_heuristics import grid from torch._C import _cuda_getCurrentRawStream as get_raw_stream from torch._inductor.runtime.triton_helpers import math as tl_math import torch....
Sid1057/sid1057.github.io
Conv3x3
false
17,964
[ "MIT" ]
4
623d1731e308b42b6f86304dcfd671a061b414bf
https://github.com/Sid1057/sid1057.github.io/tree/623d1731e308b42b6f86304dcfd671a061b414bf
import torch import torch.nn as nn class Model(nn.Module): """Layer to pad and convolve input """ def __init__(self, in_channels, out_channels, use_refl=True): super().__init__() if use_refl: self.pad = nn.ReflectionPad2d(1) else: self.pad = nn.ZeroPad2d(1)...
ReinforcedReceiver
# 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 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...
Slowika/GameBias-EmeCom2020
ReinforcedReceiver
false
17,965
[ "MIT" ]
5
5b94c47559f8202bca99c26fc1bcb078dd0509a6
https://github.com/Slowika/GameBias-EmeCom2020/tree/5b94c47559f8202bca99c26fc1bcb078dd0509a6
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 Model(nn.Module): def __init__(self, n_bits, n_hidden): super().__init__() self.emb_column = nn.Linear(n_b...
VonmisesLossBiternion
# 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 class VonmisesLossBiternion(torch.nn.Module): """Von mises loss function for biternion inputs see: Beyer et al.: Biternion Nets: Continuous Head Pose Regression from Discrete Training Labels, GCPR 2015. """ def __init__(self, kappa): super(VonmisesLossBiternion, self)._...
import torch from torch._inductor.select_algorithm import extern_kernels import triton import triton.language as tl from torch._inductor.runtime.triton_heuristics import grid from torch._C import _cuda_getCurrentRawStream as get_raw_stream from torch._inductor.runtime.triton_helpers import math as tl_math assert_size_s...
TUI-NICR/multi-task-person-perception
VonmisesLossBiternion
false
17,966
[ "BSD-3-Clause" ]
4
81666eb42be9522fd726448e82e8bbf04138ffa3
https://github.com/TUI-NICR/multi-task-person-perception/tree/81666eb42be9522fd726448e82e8bbf04138ffa3
import torch class Model(torch.nn.Module): """Von mises loss function for biternion inputs see: Beyer et al.: Biternion Nets: Continuous Head Pose Regression from Discrete Training Labels, GCPR 2015. """ def __init__(self, kappa): super().__init__() self._kappa = kappa ...
MulScalarNegative
# AOT ID: ['0_inference'] from ctypes import c_void_p, c_long, c_int import torch import math import random import os import tempfile from math import inf, nan from torch._inductor.hooks import run_intermediate_hooks from torch._inductor.utils import maybe_profile from torch._inductor.codegen.memory_planning import _al...
import torch import torch.nn as nn from torch.quantization import QuantStub from torch.quantization import DeQuantStub class MulScalarNegative(nn.Module): def __init__(self): super().__init__() self.float_op = nn.quantized.FloatFunctional() self.quant = QuantStub() self.dequant = ...
import torch import triton import triton.language as tl from torch._inductor.runtime.triton_heuristics import grid from torch._C import _cuda_getCurrentRawStream as get_raw_stream import torch.nn as nn from torch.quantization import QuantStub from torch.quantization import DeQuantStub assert_size_stride = torch._C._dyn...
T-head-Semi/tvm
MulScalarNegative
false
17,967
[ "Apache-2.0" ]
4
c1b8e06685c92fb7cacbe989e147b0622aee4503
https://github.com/T-head-Semi/tvm/tree/c1b8e06685c92fb7cacbe989e147b0622aee4503
import torch import torch.nn as nn from torch.quantization import QuantStub from torch.quantization import DeQuantStub class Model(nn.Module): def __init__(self): super().__init__() self.float_op = nn.quantized.FloatFunctional() self.quant = QuantStub() self.dequant = DeQuantStub(...
InformedSender
# AOT ID: ['0_forward'] from ctypes import c_void_p, c_long, c_int import torch import math import random import os import tempfile from math import inf, nan from torch._inductor.hooks import run_intermediate_hooks from torch._inductor.utils import maybe_profile from torch._inductor.codegen.memory_planning import _alig...
import torch import torch.nn as nn import torch.nn.functional as F import torch.nn.parallel import torch.utils.data import torch.distributions class InformedSender(nn.Module): def __init__(self, game_size, feat_size, embedding_size, hidden_size, vocab_size=100, temp=1.0): super(InformedSender, se...
import torch from torch._inductor.select_algorithm import extern_kernels import triton import triton.language as tl from torch._inductor.runtime.triton_heuristics import grid from torch._C import _cuda_getCurrentRawStream as get_raw_stream from torch._inductor.runtime import triton_helpers from torch._inductor.runtime....
Slowika/GameBias-EmeCom2020
InformedSender
false
17,968
[ "MIT" ]
5
5b94c47559f8202bca99c26fc1bcb078dd0509a6
https://github.com/Slowika/GameBias-EmeCom2020/tree/5b94c47559f8202bca99c26fc1bcb078dd0509a6
import torch import torch.nn as nn import torch.nn.functional as F import torch.nn.parallel import torch.utils.data import torch.distributions class Model(nn.Module): def __init__(self, game_size, feat_size, embedding_size, hidden_size, vocab_size=100, temp=1.0): super().__init__() self.g...
UpsamplingBilinear
# 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 torch.nn as nn from torch.quantization import QuantStub from torch.quantization import DeQuantStub class UpsamplingBilinear(nn.Module): def __init__(self): super().__init__() self.quant = QuantStub() self.dequant = DeQuantStub() def forward(self, x): x = s...
import torch import triton import triton.language as tl from torch._inductor.runtime.triton_heuristics import grid from torch._C import _cuda_getCurrentRawStream as get_raw_stream from torch._inductor.runtime import triton_helpers import torch.nn as nn from torch.quantization import QuantStub from torch.quantization im...
T-head-Semi/tvm
UpsamplingBilinear
false
17,969
[ "Apache-2.0" ]
4
c1b8e06685c92fb7cacbe989e147b0622aee4503
https://github.com/T-head-Semi/tvm/tree/c1b8e06685c92fb7cacbe989e147b0622aee4503
import torch import torch.nn as nn from torch.quantization import QuantStub from torch.quantization import DeQuantStub class Model(nn.Module): def __init__(self): super().__init__() self.quant = QuantStub() self.dequant = DeQuantStub() def forward(self, x): x = self.quant(x) ...
SmallMnistNoDropoutWithPassThrough
# 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 torch.nn as nn import torch.nn import torch.utils.data import torch.utils.tensorboard._pytorch_graph import torch.onnx.symbolic_caffe2 class PassThroughOp(torch.nn.Module): """ This is a pass-through op, used for purpose of making an op a no-op """ def forward(self, inputx): ...
import torch from torch._inductor.select_algorithm import extern_kernels import triton import triton.language as tl from 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....
Rohan-Chaudhury/aimet
SmallMnistNoDropoutWithPassThrough
false
17,970
[ "BSD-3-Clause" ]
3
1c38cac8cc0fd32dca40ce5e39940805d29f7a4a
https://github.com/Rohan-Chaudhury/aimet/tree/1c38cac8cc0fd32dca40ce5e39940805d29f7a4a
import torch import torch.nn as nn import torch.nn import torch.utils.data import torch.utils.tensorboard._pytorch_graph import torch.onnx.symbolic_caffe2 class PassThroughOp(torch.nn.Module): """ This is a pass-through op, used for purpose of making an op a no-op """ def forward(self, inputx): ...
CovSepBlock
# 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 torch.nn as M def DepthwiseConv(in_channels, kernel_size, stride, padding): return M.Conv2d(in_channels=in_channels, out_channels=in_channels, kernel_size=kernel_size, stride=stride, padding=padding, groups= in_channels, bias=False) def PointwiseConv(in_channels, out_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 import torch.nn as M assert_size_stride = torch._C._dynamo.guards.assert_size_st...
SuperbTUM/RAW-image-denoising
CovSepBlock
false
17,971
[ "MIT" ]
4
9f81be8da6a576f641022707d98b8c37f5c599ab
https://github.com/SuperbTUM/RAW-image-denoising/tree/9f81be8da6a576f641022707d98b8c37f5c599ab
import torch import torch.nn as M def DepthwiseConv(in_channels, kernel_size, stride, padding): return M.Conv2d(in_channels=in_channels, out_channels=in_channels, kernel_size=kernel_size, stride=stride, padding=padding, groups= in_channels, bias=False) def PointwiseConv(in_channels, out_channels...
Upsample
# 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 torch.nn as M class Upsample(M.Module): def __init__(self, in_channels, out_channels): super(Upsample, self).__init__() self.upsample = M.Upsample(scale_factor=2, mode='bilinear', align_corners=True) self.ordinaryConv = M.Conv2d(in_channels=in_channels, 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 import torch.nn as M assert_s...
SuperbTUM/RAW-image-denoising
Upsample
false
17,972
[ "MIT" ]
4
9f81be8da6a576f641022707d98b8c37f5c599ab
https://github.com/SuperbTUM/RAW-image-denoising/tree/9f81be8da6a576f641022707d98b8c37f5c599ab
import torch import torch.nn as M class Model(M.Module): def __init__(self, in_channels, out_channels): super().__init__() self.upsample = M.Upsample(scale_factor=2, mode='bilinear', align_corners=True) self.ordinaryConv = M.Conv2d(in_channels=in_channels, out_channels= ...
DownSample
# 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 torch.nn as M def DepthwiseConv(in_channels, kernel_size, stride, padding): return M.Conv2d(in_channels=in_channels, out_channels=in_channels, kernel_size=kernel_size, stride=stride, padding=padding, groups= in_channels, bias=False) def PointwiseConv(in_channels, out_channels...
import torch from torch._inductor.select_algorithm import extern_kernels import triton import triton.language as tl from torch._inductor.runtime.triton_heuristics import grid from torch._C import _cuda_getCurrentRawStream as get_raw_stream from torch._inductor.runtime import triton_helpers import torch.nn as M assert_s...
SuperbTUM/RAW-image-denoising
DownSample
false
17,973
[ "MIT" ]
4
9f81be8da6a576f641022707d98b8c37f5c599ab
https://github.com/SuperbTUM/RAW-image-denoising/tree/9f81be8da6a576f641022707d98b8c37f5c599ab
import torch import torch.nn as M def DepthwiseConv(in_channels, kernel_size, stride, padding): return M.Conv2d(in_channels=in_channels, out_channels=in_channels, kernel_size=kernel_size, stride=stride, padding=padding, groups= in_channels, bias=False) def PointwiseConv(in_channels, out_channels...
Net_1
# 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 nn import torch.nn.functional as F class Net_1(nn.Module): def __init__(self): super(Net_1, self).__init__() self.conv1 = nn.Conv1d(1, 25, 9, padding=4) self.conv2 = nn.Conv1d(25, 16, 7, padding=3) self.conv3 = nn.Conv1d(16, 10, 7, padding=3) ...
import torch from torch._inductor.select_algorithm import extern_kernels import triton import triton.language as tl from 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...
TakaraResearch/Signal-Detection-with-Wasserstein-Loss
Net_1
false
17,974
[ "BSD-3-Clause" ]
9
f210bd0da7492a72bc204a5517e74ba515b5ad12
https://github.com/TakaraResearch/Signal-Detection-with-Wasserstein-Loss/tree/f210bd0da7492a72bc204a5517e74ba515b5ad12
import torch from torch import nn import torch.nn.functional as F class Model(nn.Module): def __init__(self): super().__init__() self.conv1 = nn.Conv1d(1, 25, 9, padding=4) self.conv2 = nn.Conv1d(25, 16, 7, padding=3) self.conv3 = nn.Conv1d(16, 10, 7, padding=3) self.conv4...
GCN
# AOT ID: ['0_forward'] from ctypes import c_void_p, c_long, c_int import torch import math import random import os import tempfile from math import inf, nan from torch._inductor.hooks import run_intermediate_hooks from torch._inductor.utils import maybe_profile from torch._inductor.codegen.memory_planning import _alig...
import torch import torch.nn.functional as F import torch.autograd import torch.nn as nn class GraphConv(nn.Module): def __init__(self, in_features, out_features, bias=False): super(GraphConv, self).__init__() self.in_features = in_features self.out_features = out_features self.W ...
import torch from torch._inductor.select_algorithm import extern_kernels import triton import triton.language as tl from 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....
SsGood/MMGL
GCN
false
17,975
[ "MIT" ]
6
ea769e46fffb42559e764e2912c5b1dc17c10af2
https://github.com/SsGood/MMGL/tree/ea769e46fffb42559e764e2912c5b1dc17c10af2
import torch import torch.nn.functional as F import torch.autograd import torch.nn as nn class GraphConv(nn.Module): def __init__(self, in_features, out_features, bias=False): super().__init__() self.in_features = in_features self.out_features = out_features self.W = nn.Parameter(...
PositionwiseFeedForward
# 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 torch.nn as nn import torch.nn.functional as F class PositionwiseFeedForward(nn.Module): def __init__(self, individual_featured): super(PositionwiseFeedForward, self).__init__() self.w_1 = nn.Linear(individual_featured, 2 * individual_featured) self.w_2 = nn.Linear(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 from torch._inductor.runtime import triton_helpers import torch.nn as nn assert_...
Sunner4nwpu/RA-UWML-AU-Pytorch
PositionwiseFeedForward
false
17,976
[ "Apache-2.0" ]
5
7d20b2f1ffa8a00595d1e75e0d1c15518a37a920
https://github.com/Sunner4nwpu/RA-UWML-AU-Pytorch/tree/7d20b2f1ffa8a00595d1e75e0d1c15518a37a920
import torch import torch.nn as nn import torch.nn.functional as F class Model(nn.Module): def __init__(self, individual_featured): super().__init__() self.w_1 = nn.Linear(individual_featured, 2 * individual_featured) self.w_2 = nn.Linear(2 * individual_featured, individual_featured) ...
FeedForwardLayer
# 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 torch.nn.functional as F import torch.autograd import torch.nn as nn class FeedForwardLayer(nn.Module): def __init__(self, d_in, d_hid, dropout=0.1): super().__init__() self.w_1 = nn.Linear(d_in, d_hid) self.w_2 = nn.Linear(d_hid, d_in) self.layer_norm = nn.Lay...
import torch from torch._inductor.select_algorithm import extern_kernels import triton import triton.language 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.autogr...
SsGood/MMGL
FeedForwardLayer
false
17,977
[ "MIT" ]
6
ea769e46fffb42559e764e2912c5b1dc17c10af2
https://github.com/SsGood/MMGL/tree/ea769e46fffb42559e764e2912c5b1dc17c10af2
import torch import torch.nn.functional as F import torch.autograd import torch.nn as nn class Model(nn.Module): def __init__(self, d_in, d_hid, dropout=0.1): super().__init__() self.w_1 = nn.Linear(d_in, d_hid) self.w_2 = nn.Linear(d_hid, d_in) self.layer_norm = nn.LayerNorm(d_in...
Upsampling
# 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 torch.nn as M class Upsampling(M.Module): def __init__(self, in_channels, out_channels, kernel_size=2): super().__init__() self.upsample = M.ConvTranspose2d(in_channels, out_channels, kernel_size=kernel_size, stride=2) def forward(self, x): return 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 M assert_size_stride = torch._C._dynamo.guards.assert_size_st...
SuperbTUM/RAW-image-denoising
Upsampling
false
17,978
[ "MIT" ]
4
9f81be8da6a576f641022707d98b8c37f5c599ab
https://github.com/SuperbTUM/RAW-image-denoising/tree/9f81be8da6a576f641022707d98b8c37f5c599ab
import torch import torch.nn as M class Model(M.Module): def __init__(self, in_channels, out_channels, kernel_size=2): super().__init__() self.upsample = M.ConvTranspose2d(in_channels, out_channels, kernel_size=kernel_size, stride=2) def forward(self, x): return self.upsa...
Signal2SH
# 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 numpy as np import torch.nn as nn from scipy import special as sci def cart2sph(x, y, z): """ cart2sph(x, y, z) -> theta, phi, r Computes the corresponding spherical coordinate of the given input parameters :attr:`x`, :attr:`y` and :attr:`x`. Args: x (Number): x position ...
import torch from torch._inductor.select_algorithm import extern_kernels import 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 from scipy import special as sci assert...
SimonKoppers/DELIMIT
Signal2SH
false
17,979
[ "MIT" ]
7
d778a567bbec1beef2395ead60aa1e30086bb07c
https://github.com/SimonKoppers/DELIMIT/tree/d778a567bbec1beef2395ead60aa1e30086bb07c
import torch import numpy as np import torch.nn as nn from scipy import special as sci def cart2sph(x, y, z): """ cart2sph(x, y, z) -> theta, phi, r Computes the corresponding spherical coordinate of the given input parameters :attr:`x`, :attr:`y` and :attr:`x`. Args: x (Number): x position ...
TransformerEncoderLayer
# AOT ID: ['0_forward'] from ctypes import c_void_p, c_long, c_int import torch import math import random import os import tempfile from math import inf, nan from torch._inductor.hooks import run_intermediate_hooks from torch._inductor.utils import maybe_profile from torch._inductor.codegen.memory_planning import _alig...
import torch import torch.nn as nn import torch.nn.functional as F import torch.nn.parallel import torch.utils.data import torch.distributions class TransformerEncoderLayer(nn.Module): def __init__(self, embed_dim, num_heads, hidden_size, dropout=0.0, attention_dropout=0.0, activation_dropout=0.0): ...
import torch from torch._inductor.select_algorithm import extern_kernels import triton import triton.language as tl from 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....
Slowika/GameBias-EmeCom2020
TransformerEncoderLayer
false
17,980
[ "MIT" ]
5
5b94c47559f8202bca99c26fc1bcb078dd0509a6
https://github.com/Slowika/GameBias-EmeCom2020/tree/5b94c47559f8202bca99c26fc1bcb078dd0509a6
import torch import torch.nn as nn import torch.nn.functional as F import torch.nn.parallel import torch.utils.data import torch.distributions class Model(nn.Module): def __init__(self, embed_dim, num_heads, hidden_size, dropout=0.0, attention_dropout=0.0, activation_dropout=0.0): super().__init_...
PartialConv
# 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 math import torch from itertools import product as product import torch.nn as nn def weights_init(init_type='gaussian'): def init_fun(m): classname = m.__class__.__name__ if (classname.find('Conv') == 0 or classname.find('Linear') == 0 ) and hasattr(m, 'weight'): if...
import torch from torch._inductor.select_algorithm import extern_kernels import 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 itertools import product as product import torch.nn as nn asser...
TaroNakasendo/MaskEraser
PartialConv
false
17,981
[ "MIT" ]
3
373af686194aff716f53785e40252beae7b26cff
https://github.com/TaroNakasendo/MaskEraser/tree/373af686194aff716f53785e40252beae7b26cff
import math import torch from itertools import product as product import torch.nn as nn def weights_init(init_type='gaussian'): def init_fun(m): classname = m.__class__.__name__ if (classname.find('Conv') == 0 or classname.find('Linear') == 0 ) and hasattr(m, 'weight'): if...
NaiveGroupNorm
# 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...
from torch.nn import Module import torch from torch.nn import Parameter from torch.nn import init import torch.nn.parallel class NaiveGroupNorm(Module): """NaiveGroupNorm implements Group Normalization with the high-level matrix operations in PyTorch. It is a temporary solution to export GN by ONNX before the...
import torch import triton import triton.language as tl from torch._inductor.runtime.triton_heuristics import grid from torch._C import _cuda_getCurrentRawStream as get_raw_stream from torch._inductor.runtime.triton_helpers import libdevice from torch.nn import Module from torch.nn import Parameter from torch.nn import...
Tanveer81/BoxVOS
NaiveGroupNorm
false
17,982
[ "BSD-2-Clause" ]
4
c30aa319f18f3fbee2a25e0ed25cb006a4598300
https://github.com/Tanveer81/BoxVOS/tree/c30aa319f18f3fbee2a25e0ed25cb006a4598300
from torch.nn import Module import torch from torch.nn import Parameter from torch.nn import init import torch.nn.parallel class Model(Module): """NaiveGroupNorm implements Group Normalization with the high-level matrix operations in PyTorch. It is a temporary solution to export GN by ONNX before the official...
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 import nn import torch.nn.functional as F import torch.nn.parallel class Hsigmoid(nn.Module): def __init__(self, inplace=True): super(Hsigmoid, self).__init__() self.inplace = inplace def forward(self, x): return F.relu6(x + 3.0, inplace=self.inplace) / 6.0 ...
import torch from torch._inductor.select_algorithm import extern_kernels import triton import triton.language as tl from 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...
Tanveer81/BoxVOS
eSEModule
false
17,983
[ "BSD-2-Clause" ]
4
c30aa319f18f3fbee2a25e0ed25cb006a4598300
https://github.com/Tanveer81/BoxVOS/tree/c30aa319f18f3fbee2a25e0ed25cb006a4598300
import torch from torch import nn import torch.nn.functional as F import torch.nn.parallel class Hsigmoid(nn.Module): def __init__(self, inplace=True): super().__init__() self.inplace = inplace def forward(self, x): return F.relu6(x + 3.0, inplace=self.inplace) / 6.0 class Model(nn...
GCN
# AOT ID: ['0_forward'] from ctypes import c_void_p, c_long, c_int import torch import math import random import os import tempfile from math import inf, nan from torch._inductor.hooks import run_intermediate_hooks from torch._inductor.utils import maybe_profile from torch._inductor.codegen.memory_planning import _alig...
import torch from torch import nn import torch.nn.functional as F import torch.nn.parallel class Conv2D(nn.Module): def __init__(self, in_channels, out_channels, kernel_size, padding= 'same', stride=1, dilation=1, groups=1): super(Conv2D, self).__init__() assert type(kernel_size) in [int,...
import torch from torch._inductor.select_algorithm import extern_kernels import triton import triton.language as tl from torch._inductor.runtime.triton_heuristics import grid from torch._C import _cuda_getCurrentRawStream as get_raw_stream from torch import nn import torch.nn.functional as F import torch.nn.parallel as...
Tanveer81/BoxVOS
GCN
false
17,984
[ "BSD-2-Clause" ]
4
c30aa319f18f3fbee2a25e0ed25cb006a4598300
https://github.com/Tanveer81/BoxVOS/tree/c30aa319f18f3fbee2a25e0ed25cb006a4598300
import torch from torch import nn import torch.nn.functional as F import torch.nn.parallel class Conv2D(nn.Module): def __init__(self, in_channels, out_channels, kernel_size, padding= 'same', stride=1, dilation=1, groups=1): super().__init__() assert type(kernel_size) in [int, tuple ...