Comments (4)
Hello,
thank you for this issue.
As I understand you are referring to this lines of code:
loss_conf_obj = F.binary_cross_entropy(pred_conf[obj_mask], tconf[obj_mask])
loss_conf_noobj = F.binary_cross_entropy(pred_conf[noobj_mask], tconf[noobj_mask])
I haven't tried to use autocast on this model yet, because my colegue had disappointing results using half precision with OD tasks. As I understand, to make these changes we should replace pred_conf with prediction[..., 4] and also replace 1 with e and 0 with 1. I do not think that this operation would be so time-consuming to not do it.
I would be happy if you would do a pull request with an example of autocasting to this repository.
If you are referring to the iou_all_to_all function. This function calculates Intersection over union for two tensors of boxes. It is used to calculate iou for the nearest bboxes, which are its neighboring ground-truth objects, which are not its target, to make repulsion, and also for prediction bboxes to repulse prediction bbox from others with the different target. As it is described in https://arxiv.org/pdf/1711.07752.pdf.
I haven't tried to autocast this function and I do not understand how it can be replaced with binary_cross_entropy_with_logits.
Best regards,
Vadims.
from yet-another-yolov4-pytorch.
Yes, those are the code lines.
As I understand you are referring to this lines of code:
loss_conf_obj = F.binary_cross_entropy(pred_conf[obj_mask], tconf[obj_mask]) loss_conf_noobj = F.binary_cross_entropy(pred_conf[noobj_mask], tconf[noobj_mask])
pytorch autocasting works very well on codes I've used and developed, and yields a significant increase in speed and memory usage. I'm tinkering with using your code with autocasting and will try the different cross-entropy method and let you know if I find anything promising.
from yet-another-yolov4-pytorch.
Hope you will find something good. If you will have anything to pool request, I would be really happy.
from yet-another-yolov4-pytorch.
Maybe You had same as this #11 problem
from yet-another-yolov4-pytorch.
Related Issues (20)
- Add support for torch.hub HOT 1
- What version of pl are you using and what dataset are you using to train? HOT 5
- Training samples with no bboxes HOT 1
- How to run the code? HOT 2
- qt.qpa.xcb: could not connect to display HOT 2
- How many objects the model can predict at maximum? HOT 1
- How to get these values? HOT 1
- NaNs when training HOT 21
- It is not possible to run the app with the latest pl version. HOT 6
- t.lr_find(m, min_lr=1e-10, max_lr=1, early_stop_threshold=None) HOT 1
- For Y(target),what does "Num of img to which this anchor belongs" mean? HOT 3
- PL version HOT 2
- IoU ignore thresh only applied to noobj HOT 1
- can this train yolov4-tiny and yolov4-tiny-3l model?
- Maybe the dropblock is not right?
- Convert weights between darknet repo( AlexeyAB's repo ) and this repo HOT 5
- AP ? HOT 3
- best_ious, best_n = ious.max(0) RuntimeError: cannot perform reduction function max on tensor with no elements because the operation does not have an identity HOT 3
- nan value predicted sometimes for pred_conf HOT 5
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from yet-another-yolov4-pytorch.