diff --git a/train.py b/train.py index ca6090c5..27074389 100644 --- a/train.py +++ b/train.py @@ -65,7 +65,7 @@ def main(opt): # p.requires_grad = False # Set optimizer - # optimizer = torch.optim.SGD(model.parameters(), lr=.001, momentum=.9, weight_decay=0.0005 * 0, nesterov=True) + # optimizer = torch.optim.SGD(model.parameters(), lr=.001, momentum=.9, weight_decay=5e-4, nesterov=True) # optimizer = torch.optim.Adam(filter(lambda p: p.requires_grad, model.parameters())) optimizer = torch.optim.Adam(model.parameters()) optimizer.load_state_dict(checkpoint['optimizer']) diff --git a/utils/utils.py b/utils/utils.py index 249a855f..17b8f9bd 100755 --- a/utils/utils.py +++ b/utils/utils.py @@ -368,10 +368,10 @@ def plotResults(): plt.figure(figsize=(16, 8)) s = ['X', 'Y', 'Width', 'Height', 'Objectness', 'Classification', 'Total Loss', 'Precision', 'Recall'] for f in ('/Users/glennjocher/Downloads/results.txt', - '/Users/glennjocher/Downloads/resultsBCE2.txt'): + '/Users/glennjocher/Downloads/resultsBCE.txt'): results = np.loadtxt(f, usecols=[2, 3, 4, 5, 6, 7, 8, 9, 10]).T for i in range(9): plt.subplot(2, 5, i + 1) plt.plot(results[i, :], marker='.', label=f) plt.title(s[i]) - plt.legend(cocococosadfc) + plt.legend()