Skip to content

Commit

Permalink
small updates
Browse files Browse the repository at this point in the history
  • Loading branch information
ppwwyyxx committed Jul 19, 2018
1 parent 12c8aa6 commit 8f4a27f
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 7 deletions.
4 changes: 2 additions & 2 deletions examples/A3C-Gym/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -38,9 +38,9 @@ Watch the agent play:
Dump some videos:
`./train-atari.py --task dump_video --load Breakout-v0.npz --env Breakout-v0 --output output_dir --episode 3`

This table lists available pretrained models and scores (average over 100 episodes),
This table lists available pretrained models and __scores__ (average over 100 episodes),
with their submission links.
The site is not maintained any more so the links might become invalid any time.
The old submission site is not maintained any more so the links might become invalid any time.

| | | | |
| - | - | - | - |
Expand Down
6 changes: 3 additions & 3 deletions examples/FasterRCNN/eval.py
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,7 @@ def detect_one_image(img, model_func):
orig_shape = img.shape[:2]
resizer = CustomResize(cfg.PREPROC.SHORT_EDGE_SIZE, cfg.PREPROC.MAX_SIZE)
resized_img = resizer.augment(img)
scale = (resized_img.shape[0] * 1.0 / img.shape[0] + resized_img.shape[1] * 1.0 / img.shape[1]) / 2
scale = np.sqrt(resized_img.shape[0] * 1.0 / img.shape[0] * resized_img.shape[1] / img.shape[1])
boxes, probs, labels, *masks = model_func(resized_img)
boxes = boxes / scale
# boxes are already clipped inside the graph, but after the floating point scaling, this may not be true any more.
Expand Down Expand Up @@ -113,8 +113,8 @@ def eval_coco(df, detect_func):
res = {
'image_id': img_id,
'category_id': cat_id,
'bbox': list(map(lambda x: float(round(x, 1)), box)),
'score': float(round(r.score, 2)),
'bbox': list(map(lambda x: round(float(x), 2), box)),
'score': round(r.score, 3),
}

# also append segmentation to results
Expand Down
3 changes: 1 addition & 2 deletions examples/FasterRCNN/train.py
Original file line number Diff line number Diff line change
Expand Up @@ -240,8 +240,7 @@ def build_graph(self, *inputs):
total_cost = tf.add_n([
rpn_label_loss, rpn_box_loss,
fastrcnn_label_loss, fastrcnn_box_loss,
mrcnn_loss,
wd_cost], 'total_cost')
mrcnn_loss, wd_cost], 'total_cost')

add_moving_summary(total_cost, wd_cost)
return total_cost * (1. / cfg.TRAIN.NUM_GPUS)
Expand Down

0 comments on commit 8f4a27f

Please sign in to comment.