[Enhance] Support reading class_weight from file in loss functions to help MMDet3D#513
Merged
xvjiarui merged 4 commits intoopen-mmlab:masterfrom Apr 29, 2021
Wuziyi616:class_weight_file
Merged
[Enhance] Support reading class_weight from file in loss functions to help MMDet3D#513xvjiarui merged 4 commits intoopen-mmlab:masterfrom Wuziyi616:class_weight_file
xvjiarui merged 4 commits intoopen-mmlab:masterfrom
Wuziyi616:class_weight_file
Conversation
Codecov Report
@@ Coverage Diff @@
## master #513 +/- ##
==========================================
+ Coverage 86.56% 86.58% +0.02%
==========================================
Files 99 99
Lines 5164 5172 +8
Branches 836 838 +2
==========================================
+ Hits 4470 4478 +8
Misses 535 535
Partials 159 159
Flags with carried forward coverage won't be shown. Click here to find out more.
Continue to review full report at Codecov.
|
xvjiarui
reviewed
Apr 26, 2021
xvjiarui
reviewed
Apr 26, 2021
Contributor
Author
|
This PR is ready for review @xvjiarui. Thanks! |
xvjiarui
approved these changes
Apr 29, 2021
bowenroom
pushed a commit
to bowenroom/mmsegmentation
that referenced
this pull request
Feb 25, 2022
… help MMDet3D (open-mmlab#513) * support reading class_weight from file in loss function * add unit test of loss with class_weight from file * minor fix * move get_class_weight to utils
aravind-h-v
pushed a commit
to aravind-h-v/mmsegmentation
that referenced
this pull request
Mar 27, 2023
* Add `init_weights` method to `FlaxMixin` * Rn `random_state` -> `shape_state` * `PRNGKey(0)` for `jax.eval_shape` * No allow mismatched sizes * Update src/diffusers/modeling_flax_utils.py Co-authored-by: Suraj Patil <surajp815@gmail.com> * Update src/diffusers/modeling_flax_utils.py Co-authored-by: Suraj Patil <surajp815@gmail.com> * docstring diffusers Co-authored-by: Suraj Patil <surajp815@gmail.com>
aravind-h-v
pushed a commit
to aravind-h-v/mmsegmentation
that referenced
this pull request
Mar 27, 2023
* First UNet Flax modeling blocks. Mimic the structure of the PyTorch files. The model classes themselves need work, depending on what we do about configuration and initialization. * Remove FlaxUNet2DConfig class. * ignore_for_config non-config args. * Implement `FlaxModelMixin` * Use new mixins for Flax UNet. For some reason the configuration is not correctly applied; the signature of the `__init__` method does not contain all the parameters by the time it's inspected in `extract_init_dict`. * Import `FlaxUNet2DConditionModel` if flax is available. * Rm unused method `framework` * Update src/diffusers/modeling_flax_utils.py Co-authored-by: Suraj Patil <surajp815@gmail.com> * Indicate types in flax.struct.dataclass as pointed out by @mishig25 Co-authored-by: Mishig Davaadorj <mishig.davaadorj@coloradocollege.edu> * Fix typo in transformer block. * make style * some more changes * make style * Add comment * Update src/diffusers/modeling_flax_utils.py Co-authored-by: Patrick von Platen <patrick.v.platen@gmail.com> * Rm unneeded comment * Update docstrings * correct ignore kwargs * make style * Update docstring examples * Make style * Style: remove empty line. * Apply style (after upgrading black from pinned version) * Remove some commented code and unused imports. * Add init_weights (not yet in use until open-mmlab#513). * Trickle down deterministic to blocks. * Rename q, k, v according to the latest PyTorch version. Note that weights were exported with the old names, so we need to be careful. * Flax UNet docstrings, default props as in PyTorch. * Fix minor typos in PyTorch docstrings. * Use FlaxUNet2DConditionOutput as output from UNet. * make style Co-authored-by: Mishig Davaadorj <dmishig@gmail.com> Co-authored-by: Mishig Davaadorj <mishig.davaadorj@coloradocollege.edu> Co-authored-by: Suraj Patil <surajp815@gmail.com> Co-authored-by: Patrick von Platen <patrick.v.platen@gmail.com>
michaelzhang-ai
pushed a commit
to michaelzhang-ai/mmsegmentation
that referenced
this pull request
Mar 22, 2024
* resolve comments * update changelog * update changelog * add master * fix changelog * remove FAQ
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Hi, I am Ziyi, a developer from MMDet3D. Currently we are implementing 3D segmentation models, which require using loss functions from MMSeg (e.g. CrossEntropy). It's very common to use class_weight in 3D Seg, and in some scenarios we need to load class_weight from files. So I modify the code and support this feature. Hope you can approve it. Thanks.