运行train.py跑到
Finish Validation Epoch:50/50 Total Loss: 3.7779 || Val Loss: 9.1182 Saving state, iter: 50 Start Train Epoch 51/100: 0%| | 1/1612 [00:05<2:32:17, 5.67s/it, lr=0.0001, total_loss=34.1] Traceback (most recent call last): File "D:\yolov4-pytorch-master\train.py", line 335, in <module> fit_one_epoch(net,yolo_loss,epoch,epoch_size,epoch_size_val,gen,gen_val,Unfreeze_Epoch,Cuda) File "D:\yolov4-pytorch-master\train.py", line 69, in fit_one_epoch outputs = net(images) File "C:\Users\ASUS\AppData\Roaming\Python\Python38\site-packages\torch\nn\modules\module.py", line 727, in _call_impl result = self.forward(*input, **kwargs) File "C:\Users\ASUS\AppData\Roaming\Python\Python38\site-packages\torch\nn\parallel\data_parallel.py", line 159, in forward return self.module(*inputs[0], **kwargs[0]) File "C:\Users\ASUS\AppData\Roaming\Python\Python38\site-packages\torch\nn\modules\module.py", line 727, in _call_impl result = self.forward(*input, **kwargs) File "D:\yolov4-pytorch-master\yolo4.py", line 131, in forward x2, x1, x0 = self.backbone(x) File "C:\Users\ASUS\AppData\Roaming\Python\Python38\site-packages\torch\nn\modules\module.py", line 727, in _call_impl result = self.forward(*input, **kwargs) File "D:\yolov4-pytorch-master\CSPdarknet.py", line 163, in forward out3 = self.stages[2](x) File "C:\Users\ASUS\AppData\Roaming\Python\Python38\site-packages\torch\nn\modules\module.py", line 727, in _call_impl result = self.forward(*input, **kwargs) File "D:\yolov4-pytorch-master\CSPdarknet.py", line 109, in forward x1 = self.blocks_conv(x1) File "C:\Users\ASUS\AppData\Roaming\Python\Python38\site-packages\torch\nn\modules\module.py", line 727, in _call_impl result = self.forward(*input, **kwargs) File "C:\Users\ASUS\AppData\Roaming\Python\Python38\site-packages\torch\nn\modules\container.py", line 117, in forward input = module(input) File "C:\Users\ASUS\AppData\Roaming\Python\Python38\site-packages\torch\nn\modules\module.py", line 727, in _call_impl result = self.forward(*input, **kwargs) File "D:\yolov4-pytorch-master\CSPdarknet.py", line 53, in forward return x + self.block(x) File "C:\Users\ASUS\AppData\Roaming\Python\Python38\site-packages\torch\nn\modules\module.py", line 727, in _call_impl result = self.forward(*input, **kwargs) File "C:\Users\ASUS\AppData\Roaming\Python\Python38\site-packages\torch\nn\modules\container.py", line 117, in forward input = module(input) File "C:\Users\ASUS\AppData\Roaming\Python\Python38\site-packages\torch\nn\modules\module.py", line 727, in _call_impl result = self.forward(*input, **kwargs) File "D:\yolov4-pytorch-master\CSPdarknet.py", line 33, in forward x = self.activation(x) File "C:\Users\ASUS\AppData\Roaming\Python\Python38\site-packages\torch\nn\modules\module.py", line 727, in _call_impl result = self.forward(*input, **kwargs) File "D:\yolov4-pytorch-master\CSPdarknet.py", line 16, in forward return x * torch.tanh(F.softplus(x)) RuntimeError: CUDA out of memory. Tried to allocate 20.00 MiB (GPU 0; 4.00 GiB total capacity; 2.51 GiB already allocated; 19.14 MiB free; 2.55 GiB reserved in total by PyTorch)
的时候终止了,请问问要跑多久啊
运行train.py跑到
Finish Validation Epoch:50/50 Total Loss: 3.7779 || Val Loss: 9.1182 Saving state, iter: 50 Start Train Epoch 51/100: 0%| | 1/1612 [00:05<2:32:17, 5.67s/it, lr=0.0001, total_loss=34.1] Traceback (most recent call last): File "D:\yolov4-pytorch-master\train.py", line 335, in <module> fit_one_epoch(net,yolo_loss,epoch,epoch_size,epoch_size_val,gen,gen_val,Unfreeze_Epoch,Cuda) File "D:\yolov4-pytorch-master\train.py", line 69, in fit_one_epoch outputs = net(images) File "C:\Users\ASUS\AppData\Roaming\Python\Python38\site-packages\torch\nn\modules\module.py", line 727, in _call_impl result = self.forward(*input, **kwargs) File "C:\Users\ASUS\AppData\Roaming\Python\Python38\site-packages\torch\nn\parallel\data_parallel.py", line 159, in forward return self.module(*inputs[0], **kwargs[0]) File "C:\Users\ASUS\AppData\Roaming\Python\Python38\site-packages\torch\nn\modules\module.py", line 727, in _call_impl result = self.forward(*input, **kwargs) File "D:\yolov4-pytorch-master\yolo4.py", line 131, in forward x2, x1, x0 = self.backbone(x) File "C:\Users\ASUS\AppData\Roaming\Python\Python38\site-packages\torch\nn\modules\module.py", line 727, in _call_impl result = self.forward(*input, **kwargs) File "D:\yolov4-pytorch-master\CSPdarknet.py", line 163, in forward out3 = self.stages[2](x) File "C:\Users\ASUS\AppData\Roaming\Python\Python38\site-packages\torch\nn\modules\module.py", line 727, in _call_impl result = self.forward(*input, **kwargs) File "D:\yolov4-pytorch-master\CSPdarknet.py", line 109, in forward x1 = self.blocks_conv(x1) File "C:\Users\ASUS\AppData\Roaming\Python\Python38\site-packages\torch\nn\modules\module.py", line 727, in _call_impl result = self.forward(*input, **kwargs) File "C:\Users\ASUS\AppData\Roaming\Python\Python38\site-packages\torch\nn\modules\container.py", line 117, in forward input = module(input) File "C:\Users\ASUS\AppData\Roaming\Python\Python38\site-packages\torch\nn\modules\module.py", line 727, in _call_impl result = self.forward(*input, **kwargs) File "D:\yolov4-pytorch-master\CSPdarknet.py", line 53, in forward return x + self.block(x) File "C:\Users\ASUS\AppData\Roaming\Python\Python38\site-packages\torch\nn\modules\module.py", line 727, in _call_impl result = self.forward(*input, **kwargs) File "C:\Users\ASUS\AppData\Roaming\Python\Python38\site-packages\torch\nn\modules\container.py", line 117, in forward input = module(input) File "C:\Users\ASUS\AppData\Roaming\Python\Python38\site-packages\torch\nn\modules\module.py", line 727, in _call_impl result = self.forward(*input, **kwargs) File "D:\yolov4-pytorch-master\CSPdarknet.py", line 33, in forward x = self.activation(x) File "C:\Users\ASUS\AppData\Roaming\Python\Python38\site-packages\torch\nn\modules\module.py", line 727, in _call_impl result = self.forward(*input, **kwargs) File "D:\yolov4-pytorch-master\CSPdarknet.py", line 16, in forward return x * torch.tanh(F.softplus(x)) RuntimeError: CUDA out of memory. Tried to allocate 20.00 MiB (GPU 0; 4.00 GiB total capacity; 2.51 GiB already allocated; 19.14 MiB free; 2.55 GiB reserved in total by PyTorch)
的时候终止了,请问问要跑多久啊