@@ -46,9 +46,10 @@ def test_generate(art_warning):
46
46
torch .serialization .add_safe_globals ([ultralytics .nn .tasks .C3 ])
47
47
torch .serialization .add_safe_globals ([ultralytics .nn .tasks .Bottleneck ])
48
48
torch .serialization .add_safe_globals ([ultralytics .nn .tasks .Detect ])
49
- torch .serialization .add_safe_globals ([ultralytics .nn .modules .Conv ])
50
- torch .serialization .add_safe_globals ([ultralytics .nn .modules .Concat ])
51
- torch .serialization .add_safe_globals ([ultralytics .nn .modules .DFL ])
49
+ # from ultralytics.nn.modules import Conv
50
+ # torch.serialization.add_safe_globals([ultralytics.nn.modules.Conv])
51
+ # torch.serialization.add_safe_globals([ultralytics.nn.modules.Concat])
52
+ # torch.serialization.add_safe_globals([ultralytics.nn.modules.DFL])
52
53
53
54
model = YOLO ("yolov5su.pt" )
54
55
py_model = PyTorchYolo (model = model , input_shape = (3 , 640 , 640 ), channels_first = True )
@@ -98,9 +99,9 @@ def test_check_params(art_warning):
98
99
torch .serialization .add_safe_globals ([ultralytics .nn .tasks .C3 ])
99
100
torch .serialization .add_safe_globals ([ultralytics .nn .tasks .Bottleneck ])
100
101
torch .serialization .add_safe_globals ([ultralytics .nn .tasks .Detect ])
101
- torch .serialization .add_safe_globals ([ultralytics .nn .modules .Conv ])
102
- torch .serialization .add_safe_globals ([ultralytics .nn .modules .Concat ])
103
- torch .serialization .add_safe_globals ([ultralytics .nn .modules .DFL ])
102
+ # torch.serialization.add_safe_globals([ultralytics.nn.modules.Conv])
103
+ # torch.serialization.add_safe_globals([ultralytics.nn.modules.Concat])
104
+ # torch.serialization.add_safe_globals([ultralytics.nn.modules.DFL])
104
105
105
106
model = YOLO ("yolov5su.pt" )
106
107
py_model = PyTorchYolo (model = model , input_shape = (3 , 640 , 640 ), channels_first = True )
0 commit comments