Skip to content

Unsupported data type in ConcatItemsD #4741

@KumoLiu

Description

@KumoLiu

Is your feature request related to a problem? Please describe.
ConcatItemsD only support numpy.ndarray and torch.Tensor now, which is incompatible with MetaTensor data type.

if data_type is np.ndarray:
d[self.name] = np.concatenate(output, axis=self.dim)
elif data_type is torch.Tensor:
d[self.name] = torch.cat(output, dim=self.dim) # type: ignore
else:
raise TypeError(f"Unsupported data type: {data_type}, available options are (numpy.ndarray, torch.Tensor).")
return d

Describe the solution you'd like
Support MetaTensor data type

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions