Skip to content

Commit

Permalink
fix reload.
Browse files Browse the repository at this point in the history
  • Loading branch information
Xinlei Chen committed Aug 11, 2017
1 parent c0b3913 commit ba55647
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 6 deletions.
3 changes: 0 additions & 3 deletions lib/model/config.py
Original file line number Diff line number Diff line change
Expand Up @@ -269,9 +269,6 @@
# Use GPU implementation of non-maximum suppression
__C.USE_GPU_NMS = True

# Default GPU device id
__C.GPU_ID = 0

# Default pooling mode, only 'crop' is available
__C.POOLING_MODE = 'crop'

Expand Down
2 changes: 1 addition & 1 deletion lib/model/nms_wrapper.py
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,6 @@ def nms(dets, thresh, force_cpu=False):
if dets.shape[0] == 0:
return []
if cfg.USE_GPU_NMS and not force_cpu:
return gpu_nms(dets, thresh, device_id=cfg.GPU_ID)
return gpu_nms(dets, thresh, device_id=0)
else:
return cpu_nms(dets, thresh)
4 changes: 2 additions & 2 deletions lib/model/train_val.py
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,7 @@ def snapshot(self, sess, iter):
return filename, nfilename

def from_snapshot(self, sess, sfile, nfile):
print('Restoring model snapshots from {:s}'.format(sfiles[-1]))
print('Restoring model snapshots from {:s}'.format(sfile))
self.saver.restore(sess, sfile)
print('Restored.')
# Needs to restore the other hyper-parameters/states for training, (TODO xinlei) I have
Expand Down Expand Up @@ -363,7 +363,7 @@ def is_valid(entry):
def train_net(network, imdb, roidb, valroidb, output_dir, tb_dir,
pretrained_model=None,
max_iters=40000):
"""Train a Fast R-CNN network."""
"""Train a Faster R-CNN network."""
roidb = filter_roidb(roidb)
valroidb = filter_roidb(valroidb)

Expand Down

0 comments on commit ba55647

Please sign in to comment.