Skip to content

Changes the implementation of accumulated predictions (prevents underflow in some cases)#9

Open
TimPaquaij wants to merge 1 commit into
wdika:mainfrom
TimPaquaij:weighted-loss
Open

Changes the implementation of accumulated predictions (prevents underflow in some cases)#9
TimPaquaij wants to merge 1 commit into
wdika:mainfrom
TimPaquaij:weighted-loss

Conversation

@TimPaquaij

Copy link
Copy Markdown

What does this PR do?

Fixes issues related to underflow by changing the accumulation approach. Also added an option to perform accumulate predictions on segmentation.

Collection: Multi-task

Changelog

Initial implementation

loss = sum(x * w for x, w in zip(rs_cascades_loss, rs_cascades_weights)) / len(prediction)

Advised implementation

loss = sum(x * w for x, w in zip(rs_cascades_loss, rs_cascades_weights)) / sum(rs_cascades_weights)

Weighted average

Since the individual weights are =< 1 dividing the weighted sum by the number of predictions results in a diminishing of the loss. Especially when performing the average weighted 3 times in the MTLRS.

Usage

  • You can potentially add a usage example below

Before your PR is "Ready for review"

Pre checks:

  • Make sure you read and followed Contributor guidelines
  • Did you write any new necessary tests?
  • Did you add or update any necessary documentation?
  • Does the PR affect components that are optional to install? (Ex: Numba, Pynini, Apex etc)
    • Reviewer: Does the PR have correct import guards for all optional libraries?

PR Type:

  • New Feature
  • Bugfix
  • Documentation

If you haven't finished some of the above items you can still open "Draft" PR.

Who can review?

Anyone in the community is free to review the PR once the checks have passed.
Contributor guidelines contains specific people who can review PRs to various areas.

Additional Information

  • Related to # (issue)

**.DS_Store

Changed test script for accumulate

test_script check and is working

Update base.py process_segmentation_loss

Update mtlrs

update test_mtlrs.py

update requirements.txt

Update base.py

fixes style base.py
@github-actions github-actions Bot added the MTL label Nov 26, 2024
@github-actions github-actions Bot added the Stale label Dec 11, 2024
@github-actions github-actions Bot closed this Dec 19, 2024
@wdika wdika reopened this Jan 9, 2025
@github-actions github-actions Bot removed the Stale label Jan 10, 2025
@github-actions github-actions Bot added the Stale label Jan 25, 2025
@github-actions github-actions Bot closed this Feb 1, 2025
@wdika wdika reopened this Feb 10, 2025
@github-actions github-actions Bot removed the Stale label Feb 11, 2025
@github-actions github-actions Bot added the Stale label Feb 25, 2025
@github-actions github-actions Bot closed this Mar 4, 2025
@wdika wdika reopened this Mar 6, 2025
@github-actions github-actions Bot removed the Stale label Mar 7, 2025
@github-actions github-actions Bot added the Stale label Mar 21, 2025
@github-actions github-actions Bot closed this Mar 28, 2025
@wdika wdika reopened this Mar 28, 2025
@github-actions github-actions Bot removed the Stale label Mar 29, 2025
@github-actions github-actions Bot added the Stale label Apr 12, 2025
@github-actions github-actions Bot closed this Apr 20, 2025
@wdika wdika reopened this Apr 22, 2025
@wdika wdika added help wanted Extra attention is needed and removed Stale labels Apr 22, 2025
@github-actions github-actions Bot added the Stale label May 7, 2025
@wdika wdika removed the Stale label May 7, 2025
@github-actions github-actions Bot added the Stale label May 22, 2025
@github-actions github-actions Bot closed this May 29, 2025
@wdika wdika removed the Stale label May 30, 2025
@wdika wdika reopened this Jun 17, 2025
@github-actions github-actions Bot added the Stale label Jul 2, 2025
@wdika wdika removed the Stale label Jul 2, 2025
@github-actions github-actions Bot added the Stale label Jul 17, 2025
@github-actions github-actions Bot closed this Jul 24, 2025
@wdika wdika reopened this Oct 7, 2025
Repository owner deleted a comment from github-actions Bot Dec 8, 2025
Repository owner deleted a comment from github-actions Bot Dec 8, 2025
Repository owner deleted a comment from github-actions Bot Dec 8, 2025
Repository owner deleted a comment from github-actions Bot Dec 8, 2025
Repository owner deleted a comment from github-actions Bot Dec 8, 2025
Repository owner deleted a comment from github-actions Bot Dec 8, 2025
Repository owner deleted a comment from github-actions Bot Dec 8, 2025
Repository owner deleted a comment from github-actions Bot Dec 8, 2025
Repository owner deleted a comment from github-actions Bot Dec 8, 2025
Repository owner deleted a comment from github-actions Bot Dec 8, 2025
Repository owner deleted a comment from github-actions Bot Dec 8, 2025
Repository owner deleted a comment from github-actions Bot Dec 8, 2025
Repository owner deleted a comment from github-actions Bot Dec 8, 2025
Repository owner deleted a comment from github-actions Bot Dec 8, 2025
Repository owner deleted a comment from github-actions Bot Dec 8, 2025
Repository owner deleted a comment from github-actions Bot Dec 8, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

help wanted Extra attention is needed MTL Stale

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants