Thanks to visit codestin.com
Credit goes to github.com

Skip to content

RuntimeError: invalid argument 2: non-empty 4D input tensor expected but got: [0 x 256 x 14 x 14]  #23

@Pranav-Goyal

Description

@Pranav-Goyal

On executing tools/test_net.py, I am getting a runtime error. I am using the default configurations with the pretrained model. When I increase the value of IMS_PER_BATCH, the error vanishes, however, the predictions that I obtain after this are highly incomplete, with most of the words not being detected.

File "tools/test_net.py", line 131, in
main()
File "tools/test_net.py", line 116, in main
output_folder=output_folder,
File "/home/pranav/PMTD/maskrcnn_benchmark/engine/inference.py", line 82, in inference
predictions = compute_on_dataset(model, data_loader, device, inference_timer)
File "/home/pranav/PMTD/maskrcnn_benchmark/engine/inference.py", line 28, in compute_on_dataset
output = model(images)
File "/tmp/yes/envs/maskrcnn_benchmark/lib/python3.7/site-packages/torch/nn/modules/module.py", line 491, in call
result = self.forward(*input, **kwargs)
File "/home/pranav/PMTD/maskrcnn_benchmark/modeling/detector/generalized_rcnn.py", line 52, in forward
x, result, detector_losses = self.roi_heads(features, proposals, targets)
File "/tmp/yes/envs/maskrcnn_benchmark/lib/python3.7/site-packages/torch/nn/modules/module.py", line 491, in call
result = self.forward(*input, **kwargs)
File "/home/pranav/PMTD/maskrcnn_benchmark/modeling/roi_heads/roi_heads.py", line 39, in forward
x, detections, loss_mask = self.mask(mask_features, detections, targets)
File "/tmp/yes/envs/maskrcnn_benchmark/lib/python3.7/site-packages/torch/nn/modules/module.py", line 491, in call
result = self.forward(*input, **kwargs)
File "/home/pranav/PMTD/maskrcnn_benchmark/modeling/roi_heads/mask_head/mask_head.py", line 71, in forward
mask_logits = self.predictor(x)
File "/tmp/yes/envs/maskrcnn_benchmark/lib/python3.7/site-packages/torch/nn/modules/module.py", line 491, in call
result = self.forward(*input, **kwargs)
File "/home/pranav/PMTD/maskrcnn_benchmark/modeling/roi_heads/mask_head/roi_mask_predictors.py", line 33, in forward
x = F.relu(self.conv5_mask(x))
File "/tmp/yes/envs/maskrcnn_benchmark/lib/python3.7/site-packages/torch/nn/modules/module.py", line 491, in call
result = self.forward(*input, **kwargs)
File "/tmp/yes/envs/maskrcnn_benchmark/lib/python3.7/site-packages/torch/nn/modules/container.py", line 97, in forward
input = module(input)
File "/tmp/yes/envs/maskrcnn_benchmark/lib/python3.7/site-packages/torch/nn/modules/module.py", line 491, in call
result = self.forward(*input, **kwargs)
File "/tmp/yes/envs/maskrcnn_benchmark/lib/python3.7/site-packages/torch/nn/modules/upsampling.py", line 134, in forward
return F.interpolate(input, self.size, self.scale_factor, self.mode, self.align_corners)
File "/tmp/yes/envs/maskrcnn_benchmark/lib/python3.7/site-packages/torch/nn/functional.py", line 2523, in interpolate
return torch._C._nn.upsample_bilinear2d(input, _output_size(2), align_corners)
RuntimeError: invalid argument 2: non-empty 4D input tensor expected but got: [0 x 256 x 14 x 14] at /opt/conda/conda-bld/pytorch-nightly_1553749764730/work/aten/src/THCUNN/generic/SpatialUpSamplingBilinear.cu:21

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions