Skip to content

Commit 5027bb7

Browse files
committed
Hrnet lr
1 parent 98942d3 commit 5027bb7

File tree

1 file changed

+3
-3
lines changed
  • demo/vision/human_pose_estimation/hrnet

1 file changed

+3
-3
lines changed

demo/vision/human_pose_estimation/hrnet/train.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -75,10 +75,10 @@ def __init__(self, learning_rate, last_epoch=0, verbose=False):
7575

7676
def get_lr(self):
7777

78-
if int(self.last_epoch) >= 65:
78+
if int(self.last_epoch) >= 40:
7979
return self.base_lr * 0.01
8080

81-
if int(self.last_epoch) >= 40:
81+
if int(self.last_epoch) >= 30:
8282
return self.base_lr * 0.1
8383

8484
return self.base_lr
@@ -103,7 +103,7 @@ def get_lr(self):
103103
# optimizer = tlx.optimizers.SGD(lr=scheduler)
104104

105105
trainer = Trainer(network=model, loss_fn=model.loss_fn, optimizer=optimizer, metrics=None)
106-
trainer.train(n_epoch=80, train_dataset=datasets.train, test_dataset=datasets.test, print_freq=1,
106+
trainer.train(n_epoch=50, train_dataset=datasets.train, test_dataset=datasets.test, print_freq=1,
107107
print_train_batch=True)
108108

109109
model.save_weights("./demo/vision/human_pose_estimation/hrnet/model.npz")

0 commit comments

Comments
 (0)