Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

# About loss function

See original GitHub issue

Hi, I found that the loss used in this repo is a cross-entropy loss between prediction and mask.

loss = F.binary_cross_entropy_with_logits(pred, mask)

But the loss mentioned in the paper is a contrastive loss between visual and textual features.

### Issue Analytics

• State:
• Created a year ago
• Reactions:11
• Comments:8 (1 by maintainers)

#### Top GitHub Comments

1reaction
tiger990111commented, Oct 25, 2022

I have the same query. Can the authors please clarify?

1reaction
Deepayan137commented, Jul 9, 2022

Hello Derrick,

I had seen this implementation. In your paper, you have mentioned equations 9 and 10 as the contrastive loss between pixel embeddings and the text features. I am not able to understand, how it is taken care of in your above code snippet?

Read more comments on GitHub >

#### Top Results From Across the Web

What are Loss Functions? - Towards Data Science
The loss function is the function that computes the distance between the current output of the algorithm and the expected output.
Read more >
Loss function - Wikipedia
In mathematical optimization and decision theory, a loss function or cost function is a function that maps an event or values of one...
Read more >
The 7 Most Common Machine Learning Loss Functions - Built In
The loss function is a method of evaluating how well your machine learning algorithm models your featured data set. In other words, loss ......
Read more >
Loss Function Definition | DeepAI
Loss functions are used in regression when finding a line of best fit by minimizing the overall loss of all the points with...
Read more >
Loss Functions: An Explainer - KDnuggets
Loss function is a method that evaluates how well the algorithm learns the data and produces correct outputs. It computes the distance ...
Read more >

No results found

No results found

#### Troubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

No results found

No results found

No results found

No results found

No results found