Skip to content
Discussion options

You must be logged in to vote

Thank you for your reply. I tried to remove ToTensor transform in the preprocessing while it produced the same error.
My call has meta_keys: [ 'labels_meta_dict' ] as input.
So I changed this line

meta_data = img.meta if isinstance(img, MetaTensor) else meta_data
to
meta_data = meta_data if meta_data else img.meta if isinstance(img, MetaTensor) else None.

Then it works for my situation. Not sure my change works for all situations.

Replies: 1 comment 1 reply

Comment options

You must be logged in to vote
1 reply
@moonforsun
Comment options

Answer selected by moonforsun
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants
Converted from issue

This discussion was converted from issue #5801 on January 04, 2023 14:11.