The cmAP metric showed some very strange behavior during multi-GPU training. In particular, self.accumulated_predictions and self.accumulated_labels were not always passed to the torch.cat function as lists, but sometimes directly as tensors, which the torch.cat function could not handle. So I changed the code to make sure that self.accumulated_predictions and self.accumulated_labels are always lists before being passed to torch.cat.
The cmAP metric showed some very strange behavior during multi-GPU training. In particular, self.accumulated_predictions and self.accumulated_labels were not always passed to the torch.cat function as lists, but sometimes directly as tensors, which the torch.cat function could not handle. So I changed the code to make sure that self.accumulated_predictions and self.accumulated_labels are always lists before being passed to torch.cat.