logo
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
Readme
Files and versions

23 lines
555 B

import torch.nn as nn
import numpy as np
class Model(nn.Module):
def __init__(self):
super(Model, self).__init__()
def initialize(self, m):
if isinstance(m, (nn.Conv1d)):
# nn.init.xavier_uniform_(m.weight)
# if m.bias is not None:
# nn.init.xavier_uniform_(m.bias)
nn.init.kaiming_uniform_(m.weight, mode="fan_in", nonlinearity="relu")
class Identity(nn.Module):
def __init__(self):
super(Identity, self).__init__()
def forward(self, x):
return x