Skip to content

SegmentationTrainer crashes because "min_all" not implemented for 'UInt16' during preview generation#31

Merged
ATATC merged 1 commit intoProjectNeura:mainfrom
perctrix:bug/visualization2d_uint16_NotImplementedError
Sep 21, 2025
Merged

SegmentationTrainer crashes because "min_all" not implemented for 'UInt16' during preview generation#31
ATATC merged 1 commit intoProjectNeura:mainfrom
perctrix:bug/visualization2d_uint16_NotImplementedError

Conversation

@perctrix
Copy link
Collaborator

This pull request fixes an issue in the image preview saving logic of the SegmentationTrainer class.
Previously, the _save_preview method converted 2D image tensors to torch.uint16 before saving. However, PyTorch provides only limited support for uint16 tensors (see docs) — for example, reduction operations like .min() are not implemented, which caused errors in this workflow.

To resolve this, the conversion has been changed to torch.uint8. This data type is widely supported by image formats, avoids compatibility problems, and is more standard for visualization and preview purposes.

fix #30

@ATATC ATATC changed the title fixed visualization2d dtype error: uint16 -> uint8 SegmentationTrainer crashes because "min_all" not implemented for 'UInt16' during preview generation Sep 21, 2025
Copy link
Contributor

@ATATC ATATC left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull Request Status Update

Thank you for your contribution to Project Neura and its related projects. We sincerely appreciate your interest in our work and your passion to enhance the community. Your feedback is deeply valuable to us.

This update means one or more of our team members have carefully reviewed the issue you addressed and the corresponding pull request you proposed. The status of your pull request is now changed to:

  • The suggestion/problem you raised has been investigated and determined to be non-existent or negligible
  • The suggestion/problem you raised has been noticed and verified
  • The corresponding solution/fix you proposed has been carefully evaluated, yet we have to reject it regretfully
  • The corresponding solution/fix you proposed has been carefully evaluated, yet pending changes before acceptance
  • The corresponding solution/fix you proposed has been carefully evaluated and will be merged shortly

Reasons behind This Decision

Good.

What to Expect Next

It will be merged right now.

@ATATC ATATC added bug Something isn't working todo New task or assignment labels Sep 21, 2025
@ATATC ATATC added this to the 1.1.0 milestone Sep 21, 2025
@ATATC ATATC merged commit d6b0500 into ProjectNeura:main Sep 21, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Something isn't working todo New task or assignment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

SegmentationTrainer crashes because "min_all" not implemented for 'UInt16' during preview generation

2 participants