Beispiel #1
0
def main():
    device = torch.device('cuda' if torch.cuda.is_available() else 'cpu')
    net1 = Nets.Net1().to(device)
    net1.load_state_dict(torch.load('./model/Net1.pth'))
    net3 = Nets.Net3().to(device)
    net3.load_state_dict(torch.load('./model/Net3.pth'))
    net = [net1]
    train(net, lr=0.001, num_epochs=200, batch_size=512, s=2.0, w=0.06)
def main():
    net = Nets.Net3()
    PATH = './model/Net3.pth'
    train(net, PATH, lr=0.001, num_epochs=30, batch_size=512)