Skip to content

test.py ERROR:I trained the net with my own data,got the error below when run test.py #24

@DetectionIIT

Description

@DetectionIIT

(py27) guowei@iitlab-cat:~/gg/DetNet_Pytorch$ CUDA_VISIBLE_DEVICES=1 python test_dota.py exp_name --dataset pascal_voc --net detnet59 --checksession 1 --checkepoch 11 --checkpoint 315 --cuda --load_dir weights --soft_nms

load checkpoint weights-dota/detnet59/pascal_voc/exp_name/fpn_1_11_315.pth
load model successfully!
/home/disk2/gg/DetNet_Pytorch/lib/model/rpn/rpn_fpn.py:79: 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/disk2/gg/DetNet_Pytorch/lib/model/fpn/fpn.py:259: 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 "test_aiia.py", line 232, in
data = data_iter.next()
File "/home/disk2/anaconda3/envs/py27/lib/python2.7/site-packages/torch/utils/data/dataloader.py", line 210, in next
return self._process_next_batch(batch)
File "/home/disk2/anaconda3/envs/py27/lib/python2.7/site-packages/torch/utils/data/dataloader.py", line 230, in _process_next_batch
raise batch.exc_type(batch.exc_msg)
ValueError: Traceback (most recent call last):
File "/home/disk2/anaconda3/envs/py27/lib/python2.7/site-packages/torch/utils/data/dataloader.py", line 42, in _worker_loop
samples = collate_fn([dataset[i] for i in batch_indices])
File "/home/disk2/gg/DetNet_Pytorch/lib/roi_data_layer/roibatchLoader.py", line 67, in getitem
blobs = get_minibatch(minibatch_db, self._num_classes)
File "/home/disk2/gg/DetNet_Pytorch/lib/roi_data_layer/minibatch.py", line 30, in get_minibatch
im_blob, im_scales = _get_image_blob(roidb, random_scale_inds)
File "/home/disk2/gg/DetNet_Pytorch/lib/roi_data_layer/minibatch.py", line 79, in _get_image_blob
cfg.TRAIN.MAX_SIZE)
File "/home/disk2/gg/DetNet_Pytorch/lib/model/utils/blob.py", line 39, in prep_im_for_blob
im -= pixel_means
ValueError: operands could not be broadcast together with shapes (3593,6335,4) (1,1,3) (3593,6335,4)

I have no idea of this error,please help me. Is the data error??

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions