Exemple #1
0
    def __init__(self):
        super(ReNPN, self).__init__()
        self.dropout = args.dropout

        self.fc1 = NPNLinear(13, 50, False)
        self.relu1 = NPNRelu()
        self.fc2 = NPNLinear(50, 1)
Exemple #2
0
 def __init__(self):
     super(NPNCNN, self).__init__()
     self.dropout = args.dropout
     self.conv1 = nn.Conv2d(1, 10, kernel_size=5)
     self.conv2 = nn.Conv2d(10, 20, kernel_size=5)
     self.conv2_drop = nn.Dropout2d()
     self.fc1 = NPNLinear(320, 50, dual_input=False)
     self.relu1 = NPNRelu()
     self.drop1 = NPNDropout(self.dropout)
     self.fc2 = NPNLinear(50, 10)
     self.sigmoid1 = NPNSigmoid()
Exemple #3
0
    def __init__(self):
        super(NPNNet, self).__init__()
        self.dropout = args.dropout

        self.fc1 = NPNLinear(784, 800, False)
        self.sigmoid1 = NPNSigmoid()
        #self.sigmoid1 = NPNRelu()
        self.fc2 = NPNLinear(800, 800)
        self.sigmoid2 = NPNSigmoid()
        #self.sigmoid2 = NPNRelu()
        self.fc3 = NPNLinear(800, 10)
        self.sigmoid3 = NPNSigmoid()

        self.drop1 = NPNDropout(self.dropout)
        self.drop2 = NPNDropout(self.dropout)
        self.drop3 = NPNDropout(self.dropout)