GithubHelp home page GithubHelp logo

runtimeError: cannot perform reduction function min on tensor with no elements because the operation does not have an identity about fcos HOT 3 CLOSED

tianzhi0549 avatar tianzhi0549 commented on July 18, 2024
runtimeError: cannot perform reduction function min on tensor with no elements because the operation does not have an identity

from fcos.

Comments (3)

caffelearn avatar caffelearn commented on July 18, 2024 8

@tianzhi0549 ,it is solved,thanks

from fcos.

tianzhi0549 avatar tianzhi0549 commented on July 18, 2024

@caffelearn It seems that reg_targets_per_im has no elements.

from fcos.

ZhengMengbin avatar ZhengMengbin commented on July 18, 2024

How did you solve it? I trained on other datasets and I also encountered this problem:
Traceback (most recent call last):
File "tools/train_net.py", line 198, in
main()
File "tools/train_net.py", line 190, in main
model = train(cfg, args.local_rank, args.distributed)
File "tools/train_net.py", line 77, in train
arguments,
File "/home/zhengchenbin/FcosNet/FCOS/maskrcnn_benchmark/engine/trainer.py", line 66, in do_train
loss_dict = model(images, targets)
File "/home/zhengchenbin/anaconda3/envs/FCOS/lib/python3.7/site-packages/torch/nn/modules/module.py", line 489, in call
result = self.forward(*input, **kwargs)
File "/home/zhengchenbin/anaconda3/envs/FCOS/lib/python3.7/site-packages/torch/nn/parallel/distributed.py", line 357, in forward
return self.module(*inputs[0], **kwargs[0])
File "/home/zhengchenbin/anaconda3/envs/FCOS/lib/python3.7/site-packages/torch/nn/modules/module.py", line 489, in call
result = self.forward(*input, **kwargs)
File "/home/zhengchenbin/FcosNet/FCOS/maskrcnn_benchmark/modeling/detector/generalized_rcnn.py", line 50, in forward
proposals, proposal_losses = self.rpn(images, features, targets)
File "/home/zhengchenbin/anaconda3/envs/FCOS/lib/python3.7/site-packages/torch/nn/modules/module.py", line 489, in call
result = self.forward(*input, **kwargs)
File "/home/zhengchenbin/FcosNet/FCOS/maskrcnn_benchmark/modeling/rpn/fcos/fcos.py", line 134, in forward
centerness, targets
File "/home/zhengchenbin/FcosNet/FCOS/maskrcnn_benchmark/modeling/rpn/fcos/fcos.py", line 144, in _forward_train
locations, box_cls, box_regression, centerness, targets
File "/home/zhengchenbin/FcosNet/FCOS/maskrcnn_benchmark/modeling/rpn/fcos/loss.py", line 146, in call
labels, reg_targets = self.prepare_targets(locations, targets)
File "/home/zhengchenbin/FcosNet/FCOS/maskrcnn_benchmark/modeling/rpn/fcos/loss.py", line 57, in prepare_targets
points_all_level, targets, expanded_object_sizes_of_interest
File "/home/zhengchenbin/FcosNet/FCOS/maskrcnn_benchmark/modeling/rpn/fcos/loss.py", line 98, in compute_targets_for_locations
is_in_boxes = reg_targets_per_im.min(dim=2)[0] > 0
RuntimeError: cannot perform reduction function min on tensor with no elements because the operation does not have an identity

from fcos.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.