5bed3f48f0e37d9731b28a6d2505215419d670c8,test_net.py,,,#,77

Before Change


  if args.ngpu > 0:
    cfg.CUDA = True

  fasterRCNN = torch.load(load_name)
  print("load model successfully!")

  if args.ngpu > 0:
    fasterRCNN.cuda()

After Change


          box_deltas = bbox_pred.data
          if cfg.TRAIN.BBOX_NORMALIZE_TARGETS_PRECOMPUTED:
          // Optionally normalize targets by a precomputed mean and stdev
                box_deltas = box_deltas.view(-1, 4) * torch.FloatTensor(cfg.TRAIN.BBOX_NORMALIZE_STDS).cuda() \
                           + torch.FloatTensor(cfg.TRAIN.BBOX_NORMALIZE_MEANS).cuda()
                box_deltas = box_deltas.view(1, -1, 84)
          pred_boxes = bbox_transform_inv(boxes, box_deltas, 1)
          pred_boxes = clip_boxes(pred_boxes, im_info.data, 1)
      else:
Italian Trulli
In pattern: SUPERPATTERN

Frequency: 3

Non-data size: 5

Instances


Project Name: jwyang/faster-rcnn.pytorch
Commit Name: 5bed3f48f0e37d9731b28a6d2505215419d670c8
Time: 2017-08-24
Author: jyang375@vicki.cc.gatech.edu
File Name: test_net.py
Class Name:
Method Name:


Project Name: PacktPublishing/Deep-Reinforcement-Learning-Hands-On
Commit Name: 155e770cb912f0ac89f862d29ae14b720ceef589
Time: 2018-02-28
Author: max.lapan@gmail.com
File Name: ch17/02_imag.py
Class Name:
Method Name:


Project Name: facebookresearch/pytext
Commit Name: ec54a0b75d93cab5ad407920f2bbfd2f33251cc9
Time: 2019-01-18
Author: zsc@fb.com
File Name: pytext/trainers/trainer.py
Class Name: Trainer
Method Name: train