Skip to content

Make the RandCropByLabelClassesd Warnings optional #6094

@wyli

Description

@wyli

Can we please make these warnings optional "..no available indices of class..."

for i, array in enumerate(indices):
if len(array) == 0:
warnings.warn(f"no available indices of class {i} to crop, set the crop ratio of this class to zero.")
ratios_[i] = 0

there are too many of them printed during training using "RandCropByLabelClassesd" transform.

Cc @myron

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions