WongKinYiu / PyTorch_YOLOv4

PyTorch implementation of YOLOv4

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Training Error: TypeError: No loop matching the specified signature and casting was found for ufunc greater

EngrNaeemRaza opened this issue · comments

Traceback (most recent call last):
File "train.py", line 537, in
train(hyp, opt, device, tb_writer, wandb)
File "train.py", line 203, in train
tb_writer.add_histogram('classes', c, 0)
File "C:\Users\xxx\AppData\Local\Programs\Python\Python38\lib\site-packages\torch\utils\tensorboard\writer.py", line 485, in add_histogram
histogram(tag, values, bins, max_bins=max_bins), global_step, walltime
File "C:\Users\xxx\AppData\Local\Programs\Python\Python38\lib\site-packages\torch\utils\tensorboard\summary.py", line 358, in histogram
hist = make_histogram(values.astype(float), bins, max_bins)
File "C:\Users\xxx\AppData\Local\Programs\Python\Python38\lib\site-packages\torch\utils\tensorboard\summary.py", line 386, in make_histogram
cum_counts = np.cumsum(np.greater(counts, 0, dtype=np.int32)
TypeError: No loop matching the specified signature and casting was found for ufunc greater

commented

yolov5 also has this error

commented

i have solve this problem by down-grade numpy version to 1.23.4

i have solve this problem by down-grade numpy version to 1.23.4

I have also downgraded the version , now it is running fine(yolov7).