Code Monkey home page Code Monkey logo

Comments (5)

ZZHHogan avatar ZZHHogan commented on June 23, 2024 2

1.应该是版本问题,将P4 = torch.cat([P4,P5_upsample],axis=1) 改为 P4 = torch.cat([P4,P5_upsample],1 应该可以解决)
2. 首先定义一个equla_flag = torch.Tensor(0).cuda() ,然后再 ciou = (1 - box_ciou( pred_boxes_for_ciou[torch.equal(mask,equla_flag)],这个估计是版本问题,tensor中没有bool这个属性了。

不知道上述解决方法是否存在bug,如果有,请告知,谢谢!

from yolov4-pytorch.

EddieEduardo avatar EddieEduardo commented on June 23, 2024 2

你好博主,非常感谢解答,问题已按照上述语句解决,即添加了:
equla_flag = torch.Tensor(0).cuda()
ciou = (1 - box_ciou( pred_boxes_for_ciou[torch.equal(mask,equla_flag)],
t_box[torch.equal(mask,equla_flag)]))*box_loss_scale[torch.equal(mask,equla_flag)]

同时还有2处:
1. ”nets\yolo_training.py", line 79, in box_ciou
center_distance = torch.sum(torch.pow((b1_xy - b2_xy), 2), axis=-1) #需要将axis去掉
2. “\nets\yolo_training.py", line 86, in box_ciou
enclose_diagonal = torch.sum(torch.pow(enclose_wh,2), axis=-1) #需要将axis去掉
请问博主,直接去掉会影响原代码意义吗?

from yolov4-pytorch.

bubbliiiing avatar bubbliiiing commented on June 23, 2024

这应该是版本问题吧,我忘了是高还是低的情况下是dim

from yolov4-pytorch.

scau-gqw1993 avatar scau-gqw1993 commented on June 23, 2024

1.应该是版本问题,将P4 = torch.cat([P4,P5_upsample],axis=1) 改为 P4 = torch.cat([P4,P5_upsample],1 应该可以解决)
2. 首先定义一个equla_flag = torch.Tensor(0).cuda() ,然后再 ciou = (1 - box_ciou( pred_boxes_for_ciou[torch.equal(mask,equla_flag)],这个估计是版本问题,tensor中没有bool这个属性了。

不知道上述解决方法是否存在bug,如果有,请告知,谢谢!

equal_flag = torch.Tensor(0).cuda()会不会写错了?我查了PyTorch文档,self.bool() is equivalent to self.to(torch.bool),改成mask.to(torch.bool)会不会更合适?链接:https://pytorch.org/docs/stable/tensors.html

from yolov4-pytorch.

scau-gqw1993 avatar scau-gqw1993 commented on June 23, 2024

你好博主,非常感谢解答,问题已按照上述语句解决,即添加了:
equla_flag = torch.Tensor(0).cuda() ciou = (1 - box_ciou( pred_boxes_for_ciou[torch.equal(mask,equla_flag)], t_box[torch.equal(mask,equla_flag)]))*box_loss_scale[torch.equal(mask,equla_flag)]

同时还有2处:
1. ”nets\yolo_training.py", line 79, in box_ciou
center_distance = torch.sum(torch.pow((b1_xy - b2_xy), 2), axis=-1) #需要将axis去掉
2. “\nets\yolo_training.py", line 86, in box_ciou
enclose_diagonal = torch.sum(torch.pow(enclose_wh,2), axis=-1) #需要将axis去掉
请问博主,直接去掉会影响原代码意义吗?

equla_flag写错了吧,应该得是1,否则的话loss_loc不会被启用。

from yolov4-pytorch.

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.