Skip to content
This repository has been archived by the owner on Nov 21, 2023. It is now read-only.

Commit

Permalink
Extract anchor_sizes to imporve readability
Browse files Browse the repository at this point in the history
  • Loading branch information
daquexian committed Aug 3, 2018
1 parent 23234e4 commit abaa4b9
Showing 1 changed file with 2 additions and 6 deletions.
8 changes: 2 additions & 6 deletions tools/convert_pkl_to_pb.py
Original file line number Diff line number Diff line change
Expand Up @@ -178,12 +178,8 @@ def convert_gen_proposals(
inputs = [x for x in op.input]
anchor_name = 'anchor{}'.format(lvl) if lvl else 'anchor'
inputs.append(anchor_name)
blobs[anchor_name] = \
get_anchors(
spatial_scale,
(cfg.FPN.RPN_ANCHOR_START_SIZE * 2.**(lvl - cfg.FPN.RPN_MIN_LEVEL),)
) \
if lvl else get_anchors(spatial_scale, cfg.RPN.SIZES)
anchor_sizes = (cfg.FPN.RPN_ANCHOR_START_SIZE * 2.**(lvl - cfg.FPN.RPN_MIN_LEVEL),) if lvl else cfg.RPN.SIZES
blobs[anchor_name] = get_anchors(spatial_scale, anchor_sizes)
print('anchors {}'.format(blobs[anchor_name]))

ret = core.CreateOperator(
Expand Down

0 comments on commit abaa4b9

Please sign in to comment.