Fix np, uda dev issue (#1272)

Limit numpy version to avoid issue with tensorboard, conv np.int to just int, fix  mismatched device issuecuda dev issue
pull/1317/head
Sam_S 2022-12-28 07:39:34 +04:00 committed by GitHub
parent 8e9f0b731d
commit 557e3837af
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 4 additions and 4 deletions

View File

@ -2,7 +2,7 @@
# Base ----------------------------------------
matplotlib>=3.2.2
numpy>=1.18.5
numpy>=1.18.5,<1.24.0
opencv-python>=4.1.1
Pillow>=7.1.2
PyYAML>=5.3.1

View File

@ -415,7 +415,7 @@ class LoadImagesAndLabels(Dataset): # for training/testing
x[:, 0] = 0
n = len(shapes) # number of images
bi = np.floor(np.arange(n) / batch_size).astype(np.int) # batch index
bi = np.floor(np.arange(n) / batch_size).astype(int) # batch index
nb = bi[-1] + 1 # number of batches
self.batch = bi # batch index of image
self.n = n
@ -443,7 +443,7 @@ class LoadImagesAndLabels(Dataset): # for training/testing
elif mini > 1:
shapes[i] = [1, 1 / mini]
self.batch_shapes = np.ceil(np.array(shapes) * img_size / stride + pad).astype(np.int) * stride
self.batch_shapes = np.ceil(np.array(shapes) * img_size / stride + pad).astype(int) * stride
# Cache images into memory for faster training (WARNING: large datasets may exceed system RAM)
self.imgs = [None] * n

View File

@ -739,7 +739,7 @@ class ComputeLossOTA:
+ 3.0 * pair_wise_iou_loss
)
matching_matrix = torch.zeros_like(cost)
matching_matrix = torch.zeros_like(cost, device="cpu")
for gt_idx in range(num_gt):
_, pos_idx = torch.topk(