Training on Own Datasets with 8 A100-80g GPUs, but the Process is Excessively Slow
dongfeicui opened this issue · comments
/home/xhu/RegionCLIP/detectron2/structures/boxes.py:158: UserWarning: Creating a tensor from a list of numpy.ndarrays is extremely slow. Please consider converting the list to a single numpy.ndarray with numpy.array() before converting to a tensor. (Triggered internally at ../torch/csrc/utils/tensor_new.cpp:201.)
tensor = torch.as_tensor(tensor, dtype=torch.float32, device=device)
I inserted the following code above it:
if isinstance(tensor, list):
tensor = np.array(tensor)
at line 158 in
RegionCLIP/detectron2/structures/boxes.py
Line 158 in 4b8513b