abhuse / polyloss-pytorch Goto Github PK
View Code? Open in Web Editor NEWPolyloss Pytorch Implementation
License: MIT License
Polyloss Pytorch Implementation
License: MIT License
Could you please tell me how to change poly Loss if I use it in the object detection?
When I directly added poly loss to object detection, there was a error:
RuntimeError: Class values must be non-negatives
thanks in advance !
Hi,
Thanks a lot for providing a PyTorch implementation of PolyLoss.
I have a binary classification problem in which the class weights are as below:
class 0: 86.2% of 462 data points
class 1: 13.8% of 462 data points
When I use your loss with the same default parameters, all my validation predictions turn out to be 0, which is the majority class. Could you please show me how I should exactly set my criterion weight?
criterion = Poly1CrossEntropyLoss(num_classes=num_classes, reduction='mean')
I'm using torch==1.11.0+cu113 and the example for Poly1 Cross-Entropy Loss throws an error RuntimeError: element 0 of tensors does not require grad and does not have a grad_fn
.
I just have to change line 7 to logits = torch.rand([batch_size, num_classes], requires_grad=True)
for it to work.
logit is [4,19,1024,1024] and label is [4,1024,1024]
Thank you very much
Hello, my tensor size for the label is (batch, channel, H, W), how do I apply polyloss-focal
Hi.
First of all, thanks for your great repo.
When I'm passing weights like this:
Poly1FocalLoss(num_classes=num_classes,
reduction='mean',
weight=torch.tensor([0.1, 0.9]))
I get this error:
RuntimeError: The size of tensor a (256) must match the size of tensor b (2) at non-singleton dimension 3
B, C, H, W = 32, 2, 256, 256
Label is not one_hoted.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.