decollate_batch will return an empty list, if input is a dict, and one of its value is an empty list.
For example:
data = {
"class": ['ToTensord', 'ToTensord'],
"id": torch.tensor([1, 2]),
"orig_size": [],
}
decollate_batch(data) will return []
This case comes from a classification task, where I used SupervisedTrainer, and labels are achieved from ToNumpyd. The data in the above example belongs to label_transforms which is in engine.state.batch
decollate_batchwill return an empty list, if input is a dict, and one of its value is an empty list.For example:
decollate_batch(data)will return[]This case comes from a classification task, where I used
SupervisedTrainer, and labels are achieved fromToNumpyd. Thedatain the above example belongs tolabel_transformswhich is inengine.state.batch