Unverified Commit 18f6ba77 authored by Glenn Jocher's avatar Glenn Jocher Committed by GitHub
Browse files

Suppress torch 1.9.0 max_pool2d() warning (#4227)

parent c2c958c3
# YOLOv5 common modules
import logging
import warnings
from copy import copy
from pathlib import Path
......@@ -158,7 +159,9 @@ class SPP(nn.Module):
def forward(self, x):
x = self.cv1(x)
return self.cv2(torch.cat([x] + [m(x) for m in self.m], 1))
with warnings.catch_warnings():
warnings.simplefilter('ignore') # suppress torch 1.9.0 max_pool2d() warning
return self.cv2(torch.cat([x] + [m(x) for m in self.m], 1))
class Focus(nn.Module):
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment