Commit b0297e64 authored by Yuxin Wu's avatar Yuxin Wu

[FasterRCNN] update LR schedule

parent 98c3c7e1
......@@ -39,8 +39,8 @@ To predict on an image (and show output in a window):
## Results
+ trainval35k/minival, FASTRCNN_BATCH=256: 32.9
+ trainval35k/minival, FASTRCNN_BATCH=64: 31.6. Takes less than one day on 8 Maxwell TitanX.
+ trainval35k/minival, FASTRCNN_BATCH=256: 33.4. Takes 49h on 8 TitanX.
+ trainval35k/minival, FASTRCNN_BATCH=64: 32.2. Takes 31h on 8 TitanX.
The hyperparameters are not carefully tuned. You can probably get better performance by e.g. training longer.
......
......@@ -191,9 +191,9 @@ def get_rpn_anchor_input(im, boxes, klass, is_crowd):
def read_and_augment_images(ds):
def mapf(dp):
fname = dp[0]
im = cv2.imread(fname, cv2.IMREAD_COLOR).astype('float32')
assert im is not None, dp[0]
dp[0] = im
im = cv2.imread(fname, cv2.IMREAD_COLOR)
assert im is not None, fname
dp[0] = im.astype('float32')
# assume floatbox as input
assert dp[1].dtype == np.float32
......
......@@ -286,19 +286,19 @@ if __name__ == '__main__':
# linear warmup
ScheduledHyperParamSetter(
'learning_rate',
[(0, 0.003), (warmup_epoch * factor, 0.01)], interp='linear'),
[(0, 3e-3), (warmup_epoch * factor, 1e-2)], interp='linear'),
# step decay
ScheduledHyperParamSetter(
'learning_rate',
[(warmup_epoch * factor, 0.01),
(120000 * factor // stepnum, 1e-3),
(180000 * factor // stepnum, 1e-4)]),
[(warmup_epoch * factor, 1e-2),
(150000 * factor // stepnum, 1e-3),
(210000 * factor // stepnum, 1e-4)]),
HumanHyperParamSetter('learning_rate'),
EvalCallback(),
GPUUtilizationTracker(),
],
steps_per_epoch=stepnum,
max_epoch=205000 * factor // stepnum,
max_epoch=230000 * factor // stepnum,
session_init=get_model_loader(args.load) if args.load else None,
nr_tower=get_nr_gpu()
)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment