Exemplo n.º 1
0
 def __init__(self):
     super(QuantLeNetDoReFa, self).__init__()
     self.conv1 = quant_conv_dorefa(1, 10, kernel_size=5)
     self.conv2 = quant_conv_dorefa(10, 20, kernel_size=5)
     self.fc1 = quant_linear_dorefa(320, 50)
     self.fc2 = quant_linear_dorefa(50, 10)
     self.max_pool = nn.MaxPool2d(kernel_size=2)
     self.relu = nn.ReLU(inplace=True)
Exemplo n.º 2
0
 def __init__(self):
     super(QuantLeNetDoReFa, self).__init__()
     self.conv1 = quant_conv_dorefa(1, 10, kernel_size=5)
     self.conv2 = quant_conv_dorefa(10, 20, kernel_size=5)
     self.fc1 = quant_linear_dorefa(320, 50)
     self.fc2 = quant_linear_dorefa(50, 10)