Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ValueError: could not broadcast input array from shape (4) into shape (0) #121

Open
MuhammadAli1214 opened this issue Jan 9, 2020 · 1 comment

Comments

@MuhammadAli1214
Copy link

Hi there,
I am getting this error when I try to run the training script. Full error message is given below.

Traceback (most recent call last):
File "upsnet/upsnet_end2end_train.py", line 403, in
upsnet_train()
File "upsnet/upsnet_end2end_train.py", line 269, in upsnet_train
output = train_model(*batch)
File "/home/kvml/anaconda3/envs/upsnet/lib/python3.6/site-packages/torch/nn/modules/module.py", line 489, in call
result = self.forward(*input, **kwargs)
File "upsnet/../lib/utils/data_parallel.py", line 110, in forward
return self.module(*inputs[0], **kwargs[0])
File "/home/kvml/anaconda3/envs/upsnet/lib/python3.6/site-packages/torch/nn/modules/module.py", line 489, in call
result = self.forward(*input, **kwargs)
File "upsnet/../upsnet/models/resnet_upsnet.py", line 110, in forward
rois, cls_label, bbox_target, bbox_inside_weight, bbox_outside_weight, mask_rois, mask_target, roi_has_mask, nongt_inds = self.proposal_target(rois, label['roidb'], data['im_info'])
File "/home/kvml/anaconda3/envs/upsnet/lib/python3.6/site-packages/torch/nn/modules/module.py", line 489, in call
result = self.forward(*input, **kwargs)
File "upsnet/../upsnet/operators/modules/proposal_mask_target.py", line 49, in forward
frcn_blobs = sample_rois(entry, im_info[im_i, 2], im_i)
File "upsnet/../upsnet/bbox/sample_rois.py", line 105, in sample_rois
bbox_targets, bbox_inside_weights = _expand_bbox_targets(bbox_targets)
File "upsnet/../upsnet/bbox/sample_rois.py", line 180, in _expand_bbox_targets
bbox_targets[ind, start:end] = bbox_target_data[ind, 1:]
ValueError: could not broadcast input array from shape (4) into shape (0)

Could anyone please help me with this issue?

@rlangefe
Copy link

Were you able to solve this? I have the same issue when I run mine.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants