def __init__(self, h, numClasses): super(CNNFeats, self).__init__() self.conv1 = utils.Conv2d(h, h, 3) self.conv2 = utils.Conv2d(h, h, 3) self.conv3 = utils.Conv2d(h, int(h/2), 3, padding='valid') self.fc1 = nn.Linear(int(h/2) * 5 * 5, 1024) self.pool = nn.MaxPool2d(2) self.fc2 = nn.Linear(1024, numClasses)
def __init__(self, h, numClasses): super(EngineClassifier, self).__init__() self.conv1 = utils.Conv2d(h, 4 * h, 1) self.fc1 = nn.Linear(4 * h * 7 * 7, 1024) self.pool = nn.MaxPool2d(2) self.fc2 = nn.Linear(1024, numClasses)
def __init__(self, h): super(BinaryModule, self).__init__() self.conv1 = utils.Conv2d(2 * h, h, 1) self.conv2 = utils.Conv2d(h, h, 3) self.conv3 = utils.Conv2d(h, h, 3)
def __init__(self, h): super(CNN, self).__init__() self.conv1 = utils.Conv2d(1024, h, 3) self.conv2 = utils.Conv2d(h, h, 3)
def __init__(self): super(CNN, self).__init__() self.conv1 = utils.Conv2d(1024, 128, 3) self.conv2 = utils.Conv2d(128, 128, 3)
def __init__(self): super(BinaryModule, self).__init__() self.conv1 = utils.Conv2d(256, 128, 1) self.conv2 = utils.Conv2d(128, 128, 3) self.conv3 = utils.Conv2d(128, 128, 3)
def __init__(self, h, k): super(ConvReluNorm, self).__init__() self.conv = utils.Conv2d(h, h, k) self.norm = nn.InstanceNorm2d(h)
def __init__(self, h): super(UnaryModule, self).__init__() self.conv1 = utils.Conv2d(h, h, 3) self.conv2 = utils.Conv2d(h, h, 3) self.norm2 = nn.InstanceNorm2d(h)
def __init__(self, h): super(ForkModule, self).__init__() self.conv1 = utils.Conv2d(2*h, 6*h, 1) self.conv2 = utils.Conv2d(6*h, 6*h, 3) self.conv3 = utils.Conv2d(6*h, 6*h, 3) self.conv4 = utils.Conv2d(6*h, h, 1)
def __init__(self, h): super(BinForkLarge, self).__init__() self.conv1 = utils.Conv2d(2*h, 4*h, 1) self.conv2 = utils.Conv2d(4*h, 4*h, 3) self.conv3 = utils.Conv2d(4*h, 4*h, 3) self.conv4 = utils.Conv2d(4*h, h, 1)