INNER CODE UNIT · Python

acc

pprp/awesome-attention-mechanism-in-cv · Experiment/main.py:143

    acc = 100.*correct/total
    if acc > best_acc:
        print('Saving..')
        state = {
            'net': net.state_dict(),
            'acc': acc,
            'epoch': epoch,
        }
        if not os.path.isdir('checkpoint'):
            os.mkdir('checkpoint')
        torch.save(state, './checkpoint/ckpt.pth')
        best_acc = acc


# 开始
start_time = datetime.now()

for epoch in range(start_epoch, start_epoch+200):

View source record →

📰 Research Paper
Loading…
⏳ Fetching content…