question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

/usr/bin/python2.7 /home/e/R-CNN/faster-rcnn.pytorch-master/test_net.py Called with args: Namespace(batch_size=1, cfg_file=‘cfgs/res101.yml’, checkepoch=1, checkpoint=10021, checksession=1, class_agnostic=False, cuda=‘cuda’, dataset=‘pascal_voc’, large_scale=False, load_dir=‘/home/e/R-CNN/faster-rcnn.pytorch-master/data/pretrained_model’, mGPUs=False, net=‘res101’, parallel_type=0, set_cfgs=None, vis=False) Using config: {‘ANCHOR_RATIOS’: [0.5, 1, 2], ‘ANCHOR_SCALES’: [8, 16, 32], ‘CROP_RESIZE_WITH_MAX_POOL’: False, ‘CUDA’: False, ‘DATA_DIR’: ‘/home/e/R-CNN/faster-rcnn.pytorch-master/data’, ‘DEDUP_BOXES’: 0.0625, ‘EPS’: 1e-14, ‘EXP_DIR’: ‘res101’, ‘FEAT_STRIDE’: [16], ‘GPU_ID’: 0, ‘MATLAB’: ‘matlab’, ‘MAX_NUM_GT_BOXES’: 20, ‘MOBILENET’: {‘DEPTH_MULTIPLIER’: 1.0, ‘FIXED_LAYERS’: 5, ‘REGU_DEPTH’: False, ‘WEIGHT_DECAY’: 4e-05}, ‘PIXEL_MEANS’: array([[[102.9801, 115.9465, 122.7717]]]), ‘POOLING_MODE’: ‘align’, ‘POOLING_SIZE’: 7, ‘RESNET’: {‘FIXED_BLOCKS’: 1, ‘MAX_POOL’: False}, ‘RNG_SEED’: 3, ‘ROOT_DIR’: ‘/home/e/R-CNN/faster-rcnn.pytorch-master’, ‘TEST’: {‘BBOX_REG’: True, ‘HAS_RPN’: True, ‘MAX_SIZE’: 1000, ‘MODE’: ‘nms’, ‘NMS’: 0.3, ‘PROPOSAL_METHOD’: ‘gt’, ‘RPN_MIN_SIZE’: 16, ‘RPN_NMS_THRESH’: 0.7, ‘RPN_POST_NMS_TOP_N’: 300, ‘RPN_PRE_NMS_TOP_N’: 6000, ‘RPN_TOP_N’: 5000, ‘SCALES’: [600], ‘SVM’: False}, ‘TRAIN’: {‘ASPECT_GROUPING’: False, ‘BATCH_SIZE’: 128, ‘BBOX_INSIDE_WEIGHTS’: [1.0, 1.0, 1.0, 1.0], ‘BBOX_NORMALIZE_MEANS’: [0.0, 0.0, 0.0, 0.0], ‘BBOX_NORMALIZE_STDS’: [0.1, 0.1, 0.2, 0.2], ‘BBOX_NORMALIZE_TARGETS’: True, ‘BBOX_NORMALIZE_TARGETS_PRECOMPUTED’: True, ‘BBOX_REG’: True, ‘BBOX_THRESH’: 0.5, ‘BG_THRESH_HI’: 0.5, ‘BG_THRESH_LO’: 0.0, ‘BIAS_DECAY’: False, ‘BN_TRAIN’: False, ‘DISPLAY’: 20, ‘DOUBLE_BIAS’: False, ‘FG_FRACTION’: 0.25, ‘FG_THRESH’: 0.5, ‘GAMMA’: 0.1, ‘HAS_RPN’: True, ‘IMS_PER_BATCH’: 1, ‘LEARNING_RATE’: 0.001, ‘MAX_SIZE’: 1000, ‘MOMENTUM’: 0.9, ‘PROPOSAL_METHOD’: ‘gt’, ‘RPN_BATCHSIZE’: 256, ‘RPN_BBOX_INSIDE_WEIGHTS’: [1.0, 1.0, 1.0, 1.0], ‘RPN_CLOBBER_POSITIVES’: False, ‘RPN_FG_FRACTION’: 0.5, ‘RPN_MIN_SIZE’: 8, ‘RPN_NEGATIVE_OVERLAP’: 0.3, ‘RPN_NMS_THRESH’: 0.7, ‘RPN_POSITIVE_OVERLAP’: 0.7, ‘RPN_POSITIVE_WEIGHT’: -1.0, ‘RPN_POST_NMS_TOP_N’: 2000, ‘RPN_PRE_NMS_TOP_N’: 12000, ‘SCALES’: [600], ‘SNAPSHOT_ITERS’: 5000, ‘SNAPSHOT_KEPT’: 3, ‘SNAPSHOT_PREFIX’: ‘res101_faster_rcnn’, ‘STEPSIZE’: [30000], ‘SUMMARY_INTERVAL’: 180, ‘TRIM_HEIGHT’: 600, ‘TRIM_WIDTH’: 600, ‘TRUNCATED’: False, ‘USE_ALL_GT’: True, ‘USE_FLIPPED’: True, ‘USE_GT’: False, ‘WEIGHT_DECAY’: 0.0001}, ‘USE_GPU_NMS’: True} Loaded dataset voc_2007_test for training Set proposal method: gt Preparing training data… voc_2007_test gt roidb loaded from /home/e/R-CNN/faster-rcnn.pytorch-master/data/cache/voc_2007_test_gt_roidb.pkl done 4952 roidb entries load checkpoint /home/e/R-CNN/faster-rcnn.pytorch-master/data/pretrained_model/res101/pascal_voc/faster_rcnn_1_1_10021.pth load model successfully! /home/e/R-CNN/faster-rcnn.pytorch-master/test_net.py:190: UserWarning: volatile was removed and now has no effect. Use with torch.no_grad(): instead. im_data = Variable(im_data, volatile=True) /home/e/R-CNN/faster-rcnn.pytorch-master/test_net.py:191: UserWarning: volatile was removed and now has no effect. Use with torch.no_grad(): instead. im_info = Variable(im_info, volatile=True) /home/e/R-CNN/faster-rcnn.pytorch-master/test_net.py:192: UserWarning: volatile was removed and now has no effect. Use with torch.no_grad(): instead. num_boxes = Variable(num_boxes, volatile=True) /home/e/R-CNN/faster-rcnn.pytorch-master/test_net.py:193: UserWarning: volatile was removed and now has no effect. Use with torch.no_grad(): instead. gt_boxes = Variable(gt_boxes, volatile=True) /home/e/R-CNN/faster-rcnn.pytorch-master/lib/model/rpn/rpn.py:68: UserWarning: Implicit dimension choice for softmax has been deprecated. Change the call to include dim=X as an argument. rpn_cls_prob_reshape = F.softmax(rpn_cls_score_reshape) /home/e/R-CNN/faster-rcnn.pytorch-master/lib/model/faster_rcnn/faster_rcnn.py:98: UserWarning: Implicit dimension choice for softmax has been deprecated. Change the call to include dim=X as an argument. cls_prob = F.softmax(cls_score) Traceback (most recent call last): File “/home/e/R-CNN/faster-rcnn.pytorch-master/test_net.py”, line 267, in <module> pred_boxes /= data[1][0][2] RuntimeError: Expected object of type torch.cuda.FloatTensor but found type torch.FloatTensor for argument #3 ‘other’

Issue Analytics

  • State:closed
  • Created 5 years ago
  • Comments:6

github_iconTop GitHub Comments

4reactions
ljtruongcommented, Jun 28, 2018

@EldorIbragimov change pred_boxes /= data[1][0][2] to pred_boxes /= data[1][0][2].cuda()

this was my quick fix. I’m not sure if it’s correct, but it runs. Can anyone confirm if this is the correct way to patch this error?

2reactions
ljtruongcommented, Jul 1, 2018

@wjx2 change lines in train and test files

loss_temp += loss.data[0] to loss_temp += loss.item() replacing data[0] with “item()”

do the same to these lines loss_rpn_cls = rpn_loss_cls.mean().data[0] loss_rpn_box = rpn_loss_box.mean().data[0] loss_rcnn_cls = RCNN_loss_cls.mean().data[0] loss_rcnn_box = RCNN_loss_bbox.mean().data[0]

Read more comments on GitHub >

github_iconTop Results From Across the Web

Training and Testing Errors - CMU Statistics
Estimating test error. Often, we want an accurate estimate of the test error of our method (e.g., linear regression). Why? Two main purposes:....
Read more >
Software Testing Errors to look out for (with examples)
In this article, we discuss some common software testing errors that a tester should be aware of. These errors are explained with examples...
Read more >
Training & Test Error: Validating Models in Machine Learning
There are two important concepts used in machine learning: the training error and the test error. Learn how to prevent mistakes in model ......
Read more >
Managing 5 Common Types of Errors in Software Testing
Also common in testers' daily experience are testing errors, or cases where a test fails but the tested software isn't at fault. Specialists ......
Read more >
Common Causes and Solutions of Testing Errors
Need to trouble shoot possible reasons why a cable has failed? Cirris Systems provides articles on diagnosing failures. Visit them here to learn...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found