Reikriam

torchvision

Aug 12th, 2019
524
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 51.21 KB | None | 0 0
  1. ========================================================================================== FAILURES ===========================================================================================
  2. _____________________________________________________________________________ Tester.test_fasterrcnn_resnet50_fpn _____________________________________________________________________________
  3.  
  4. self = <test_models.Tester testMethod=test_fasterrcnn_resnet50_fpn>, model_name = 'fasterrcnn_resnet50_fpn'
  5.  
  6. def do_test(self, model_name=model_name):
  7. > self._test_detection_model(model_name)
  8.  
  9. test/test_models.py:144:
  10. _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
  11. test/test_models.py:54: in _test_detection_model
  12. out = model(model_input)
  13. /usr/lib/python3.7/site-packages/torch/nn/modules/module.py:493: in __call__
  14. result = self.forward(*input, **kwargs)
  15. build/lib.linux-x86_64-3.7/torchvision/models/detection/generalized_rcnn.py:51: in forward
  16. proposals, proposal_losses = self.rpn(images, features, targets)
  17. /usr/lib/python3.7/site-packages/torch/nn/modules/module.py:493: in __call__
  18. result = self.forward(*input, **kwargs)
  19. build/lib.linux-x86_64-3.7/torchvision/models/detection/rpn.py:411: in forward
  20. boxes, scores = self.filter_proposals(proposals, objectness, images.image_sizes, num_anchors_per_level)
  21. build/lib.linux-x86_64-3.7/torchvision/models/detection/rpn.py:336: in filter_proposals
  22. keep = box_ops.batched_nms(boxes, scores, lvl, self.nms_thresh)
  23. build/lib.linux-x86_64-3.7/torchvision/ops/boxes.py:72: in batched_nms
  24. keep = nms(boxes_for_nms, scores, iou_threshold)
  25. build/lib.linux-x86_64-3.7/torchvision/ops/boxes.py:32: in nms
  26. _C = _lazy_import()
  27. _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
  28.  
  29. def _lazy_import():
  30. """
  31. Make sure that CUDA versions match between the pytorch install and torchvision install
  32. """
  33. global _C
  34. if _C is not None:
  35. return _C
  36. import torch
  37. > from torchvision import _C as C
  38. E ImportError: dynamic module does not define module export function (PyInit__C)
  39.  
  40. build/lib.linux-x86_64-3.7/torchvision/extension.py:12: ImportError
  41. ____________________________________________________________________________ Tester.test_keypointrcnn_resnet50_fpn ____________________________________________________________________________
  42.  
  43. self = <test_models.Tester testMethod=test_keypointrcnn_resnet50_fpn>, model_name = 'keypointrcnn_resnet50_fpn'
  44.  
  45. def do_test(self, model_name=model_name):
  46. > self._test_detection_model(model_name)
  47.  
  48. test/test_models.py:144:
  49. _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
  50. test/test_models.py:54: in _test_detection_model
  51. out = model(model_input)
  52. /usr/lib/python3.7/site-packages/torch/nn/modules/module.py:493: in __call__
  53. result = self.forward(*input, **kwargs)
  54. build/lib.linux-x86_64-3.7/torchvision/models/detection/generalized_rcnn.py:51: in forward
  55. proposals, proposal_losses = self.rpn(images, features, targets)
  56. /usr/lib/python3.7/site-packages/torch/nn/modules/module.py:493: in __call__
  57. result = self.forward(*input, **kwargs)
  58. build/lib.linux-x86_64-3.7/torchvision/models/detection/rpn.py:411: in forward
  59. boxes, scores = self.filter_proposals(proposals, objectness, images.image_sizes, num_anchors_per_level)
  60. build/lib.linux-x86_64-3.7/torchvision/models/detection/rpn.py:336: in filter_proposals
  61. keep = box_ops.batched_nms(boxes, scores, lvl, self.nms_thresh)
  62. build/lib.linux-x86_64-3.7/torchvision/ops/boxes.py:72: in batched_nms
  63. keep = nms(boxes_for_nms, scores, iou_threshold)
  64. build/lib.linux-x86_64-3.7/torchvision/ops/boxes.py:32: in nms
  65. _C = _lazy_import()
  66. _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
  67.  
  68. def _lazy_import():
  69. """
  70. Make sure that CUDA versions match between the pytorch install and torchvision install
  71. """
  72. global _C
  73. if _C is not None:
  74. return _C
  75. import torch
  76. > from torchvision import _C as C
  77. E ImportError: dynamic module does not define module export function (PyInit__C)
  78.  
  79. build/lib.linux-x86_64-3.7/torchvision/extension.py:12: ImportError
  80. ______________________________________________________________________________ Tester.test_maskrcnn_resnet50_fpn ______________________________________________________________________________
  81.  
  82. self = <test_models.Tester testMethod=test_maskrcnn_resnet50_fpn>, model_name = 'maskrcnn_resnet50_fpn'
  83.  
  84. def do_test(self, model_name=model_name):
  85. > self._test_detection_model(model_name)
  86.  
  87. test/test_models.py:144:
  88. _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
  89. test/test_models.py:54: in _test_detection_model
  90. out = model(model_input)
  91. /usr/lib/python3.7/site-packages/torch/nn/modules/module.py:493: in __call__
  92. result = self.forward(*input, **kwargs)
  93. build/lib.linux-x86_64-3.7/torchvision/models/detection/generalized_rcnn.py:51: in forward
  94. proposals, proposal_losses = self.rpn(images, features, targets)
  95. /usr/lib/python3.7/site-packages/torch/nn/modules/module.py:493: in __call__
  96. result = self.forward(*input, **kwargs)
  97. build/lib.linux-x86_64-3.7/torchvision/models/detection/rpn.py:411: in forward
  98. boxes, scores = self.filter_proposals(proposals, objectness, images.image_sizes, num_anchors_per_level)
  99. build/lib.linux-x86_64-3.7/torchvision/models/detection/rpn.py:336: in filter_proposals
  100. keep = box_ops.batched_nms(boxes, scores, lvl, self.nms_thresh)
  101. build/lib.linux-x86_64-3.7/torchvision/ops/boxes.py:72: in batched_nms
  102. keep = nms(boxes_for_nms, scores, iou_threshold)
  103. build/lib.linux-x86_64-3.7/torchvision/ops/boxes.py:32: in nms
  104. _C = _lazy_import()
  105. _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
  106.  
  107. def _lazy_import():
  108. """
  109. Make sure that CUDA versions match between the pytorch install and torchvision install
  110. """
  111. global _C
  112. if _C is not None:
  113. return _C
  114. import torch
  115. > from torchvision import _C as C
  116. E ImportError: dynamic module does not define module export function (PyInit__C)
  117.  
  118. build/lib.linux-x86_64-3.7/torchvision/extension.py:12: ImportError
  119. _____________________________________________________________________ RoIPoolTester.test_roi_pool_align_non_cont_grad_cpu _____________________________________________________________________
  120.  
  121. self = <test_ops.RoIPoolTester testMethod=test_roi_pool_align_non_cont_grad_cpu>
  122.  
  123. def test_roi_pool_align_non_cont_grad_cpu(self):
  124. devices = ['cpu']
  125. if torch.cuda.is_available():
  126. devices.append('cuda')
  127.  
  128. for d in devices:
  129. device = torch.device(d)
  130. rois = torch.tensor([
  131. [0, 0, 0, 9, 9],
  132. [0, 0, 5, 5, 9],
  133. [0, 5, 5, 9, 9]], dtype=self.dtype, device=device)
  134.  
  135. grad_cont = torch.rand(3, 1, 5, 5, dtype=self.dtype, device=device)
  136. grad = grad_cont.permute(2, 1, 3, 0).contiguous().permute(3, 1, 0, 2)
  137.  
  138. for op in ['RoIPool', 'RoIAlign']:
  139. x = torch.rand(1, 1, 10, 10, dtype=self.dtype, device=device, requires_grad=True)
  140. kwargs = {}
  141. if op == 'RoIAlign':
  142. kwargs['sampling_ratio'] = 1
  143. m = getattr(ops, op)((5, 5), 1, **kwargs)
  144.  
  145. > y = m(x, rois)
  146.  
  147. test/test_ops.py:162:
  148. _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
  149. /usr/lib/python3.7/site-packages/torch/nn/modules/module.py:493: in __call__
  150. result = self.forward(*input, **kwargs)
  151. build/lib.linux-x86_64-3.7/torchvision/ops/roi_pool.py:75: in forward
  152. return roi_pool(input, rois, self.output_size, self.spatial_scale)
  153. build/lib.linux-x86_64-3.7/torchvision/ops/roi_pool.py:62: in roi_pool
  154. return _RoIPoolFunction.apply(input, rois, output_size, spatial_scale)
  155. build/lib.linux-x86_64-3.7/torchvision/ops/roi_pool.py:19: in forward
  156. _C = _lazy_import()
  157. _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
  158.  
  159. def _lazy_import():
  160. """
  161. Make sure that CUDA versions match between the pytorch install and torchvision install
  162. """
  163. global _C
  164. if _C is not None:
  165. return _C
  166. import torch
  167. > from torchvision import _C as C
  168. E ImportError: dynamic module does not define module export function (PyInit__C)
  169.  
  170. build/lib.linux-x86_64-3.7/torchvision/extension.py:12: ImportError
  171. ____________________________________________________________________________ RoIPoolTester.test_roi_pool_basic_cpu ____________________________________________________________________________
  172.  
  173. self = <test_ops.RoIPoolTester testMethod=test_roi_pool_basic_cpu>
  174.  
  175. def test_roi_pool_basic_cpu(self):
  176. device = torch.device('cpu')
  177. x = torch.rand(1, 1, 10, 10, dtype=self.dtype, device=device)
  178. rois = torch.tensor([[0, 0, 0, 4, 4]], # format is (xyxy)
  179. dtype=self.dtype, device=device)
  180.  
  181. pool_h, pool_w = (5, 5)
  182. roi_pool = ops.RoIPool((pool_h, pool_w), 1)
  183. > y = roi_pool(x, rois)
  184.  
  185. test/test_ops.py:50:
  186. _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
  187. /usr/lib/python3.7/site-packages/torch/nn/modules/module.py:493: in __call__
  188. result = self.forward(*input, **kwargs)
  189. build/lib.linux-x86_64-3.7/torchvision/ops/roi_pool.py:75: in forward
  190. return roi_pool(input, rois, self.output_size, self.spatial_scale)
  191. build/lib.linux-x86_64-3.7/torchvision/ops/roi_pool.py:62: in roi_pool
  192. return _RoIPoolFunction.apply(input, rois, output_size, spatial_scale)
  193. build/lib.linux-x86_64-3.7/torchvision/ops/roi_pool.py:19: in forward
  194. _C = _lazy_import()
  195. _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
  196.  
  197. def _lazy_import():
  198. """
  199. Make sure that CUDA versions match between the pytorch install and torchvision install
  200. """
  201. global _C
  202. if _C is not None:
  203. return _C
  204. import torch
  205. > from torchvision import _C as C
  206. E ImportError: dynamic module does not define module export function (PyInit__C)
  207.  
  208. build/lib.linux-x86_64-3.7/torchvision/extension.py:12: ImportError
  209. ___________________________________________________________________________ RoIPoolTester.test_roi_pool_basic_cuda ____________________________________________________________________________
  210.  
  211. self = <test_ops.RoIPoolTester testMethod=test_roi_pool_basic_cuda>
  212.  
  213. @unittest.skipIf(not torch.cuda.is_available(), "CUDA unavailable")
  214. def test_roi_pool_basic_cuda(self):
  215. device = torch.device('cuda')
  216. x = torch.rand(1, 1, 10, 10, dtype=self.dtype, device=device)
  217. rois = torch.tensor([[0, 0, 0, 4, 4]], # format is (xyxy)
  218. dtype=self.dtype, device=device)
  219.  
  220. pool_h, pool_w = (5, 5)
  221. roi_pool = ops.RoIPool((pool_h, pool_w), 1)
  222. > y = roi_pool(x, rois)
  223.  
  224. test/test_ops.py:200:
  225. _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
  226. /usr/lib/python3.7/site-packages/torch/nn/modules/module.py:493: in __call__
  227. result = self.forward(*input, **kwargs)
  228. build/lib.linux-x86_64-3.7/torchvision/ops/roi_pool.py:75: in forward
  229. return roi_pool(input, rois, self.output_size, self.spatial_scale)
  230. build/lib.linux-x86_64-3.7/torchvision/ops/roi_pool.py:62: in roi_pool
  231. return _RoIPoolFunction.apply(input, rois, output_size, spatial_scale)
  232. build/lib.linux-x86_64-3.7/torchvision/ops/roi_pool.py:19: in forward
  233. _C = _lazy_import()
  234. _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
  235.  
  236. def _lazy_import():
  237. """
  238. Make sure that CUDA versions match between the pytorch install and torchvision install
  239. """
  240. global _C
  241. if _C is not None:
  242. return _C
  243. import torch
  244. > from torchvision import _C as C
  245. E ImportError: dynamic module does not define module export function (PyInit__C)
  246.  
  247. build/lib.linux-x86_64-3.7/torchvision/extension.py:12: ImportError
  248. _______________________________________________________________________________ RoIPoolTester.test_roi_pool_cpu _______________________________________________________________________________
  249.  
  250. self = <test_ops.RoIPoolTester testMethod=test_roi_pool_cpu>
  251.  
  252. def test_roi_pool_cpu(self):
  253. device = torch.device('cpu')
  254. x = torch.rand(2, 1, 10, 10, dtype=self.dtype, device=device)
  255. rois = torch.tensor([[0, 0, 0, 9, 9], # format is (xyxy)
  256. [0, 0, 5, 4, 9],
  257. [0, 5, 5, 9, 9],
  258. [1, 0, 0, 9, 9]],
  259. dtype=self.dtype, device=device)
  260.  
  261. pool_h, pool_w = (5, 5)
  262. roi_pool = ops.RoIPool((pool_h, pool_w), 1)
  263. > y = roi_pool(x, rois)
  264.  
  265. test/test_ops.py:72:
  266. _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
  267. /usr/lib/python3.7/site-packages/torch/nn/modules/module.py:493: in __call__
  268. result = self.forward(*input, **kwargs)
  269. build/lib.linux-x86_64-3.7/torchvision/ops/roi_pool.py:75: in forward
  270. return roi_pool(input, rois, self.output_size, self.spatial_scale)
  271. build/lib.linux-x86_64-3.7/torchvision/ops/roi_pool.py:62: in roi_pool
  272. return _RoIPoolFunction.apply(input, rois, output_size, spatial_scale)
  273. build/lib.linux-x86_64-3.7/torchvision/ops/roi_pool.py:19: in forward
  274. _C = _lazy_import()
  275. _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
  276.  
  277. def _lazy_import():
  278. """
  279. Make sure that CUDA versions match between the pytorch install and torchvision install
  280. """
  281. global _C
  282. if _C is not None:
  283. return _C
  284. import torch
  285. > from torchvision import _C as C
  286. E ImportError: dynamic module does not define module export function (PyInit__C)
  287.  
  288. build/lib.linux-x86_64-3.7/torchvision/extension.py:12: ImportError
  289. _________________________________________________________________________ RoIPoolTester.test_roi_pool_cpu_empty_rois __________________________________________________________________________
  290.  
  291. self = <test_ops.RoIPoolTester testMethod=test_roi_pool_cpu_empty_rois>
  292.  
  293. def test_roi_pool_cpu_empty_rois(self):
  294. device = torch.device('cpu')
  295. x = torch.tensor(
  296. [[[[0.1767, 1.2851, 4.2325, 4.8645, 7.1496]],
  297. [[2.5916, 4.3361, 3.8143, 6.1329, 2.0230]],
  298. [[1.4492, 3.3384, 4.0816, 6.3116, 5.1068]]]],
  299. dtype=self.dtype, device=device)
  300. rois = torch.tensor(
  301. [[0., 1., 0., 4., 0.],
  302. [0., 2., 0., 3., 0.],
  303. [0., 0., 0., 0., 0.],
  304. [0., 0., 0., 0., 0.],
  305. [0., 2., 0., 2., 0.]],
  306. dtype=self.dtype, device=device)
  307.  
  308. pool_h, pool_w = (1, 2)
  309. roi_pool = ops.RoIPool((pool_h, pool_w), 1)
  310. > y = roi_pool(x, rois)
  311.  
  312. test/test_ops.py:100:
  313. _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
  314. /usr/lib/python3.7/site-packages/torch/nn/modules/module.py:493: in __call__
  315. result = self.forward(*input, **kwargs)
  316. build/lib.linux-x86_64-3.7/torchvision/ops/roi_pool.py:75: in forward
  317. return roi_pool(input, rois, self.output_size, self.spatial_scale)
  318. build/lib.linux-x86_64-3.7/torchvision/ops/roi_pool.py:62: in roi_pool
  319. return _RoIPoolFunction.apply(input, rois, output_size, spatial_scale)
  320. build/lib.linux-x86_64-3.7/torchvision/ops/roi_pool.py:19: in forward
  321. _C = _lazy_import()
  322. _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
  323.  
  324. def _lazy_import():
  325. """
  326. Make sure that CUDA versions match between the pytorch install and torchvision install
  327. """
  328. global _C
  329. if _C is not None:
  330. return _C
  331. import torch
  332. > from torchvision import _C as C
  333. E ImportError: dynamic module does not define module export function (PyInit__C)
  334.  
  335. build/lib.linux-x86_64-3.7/torchvision/extension.py:12: ImportError
  336. ______________________________________________________________________________ RoIPoolTester.test_roi_pool_cuda _______________________________________________________________________________
  337.  
  338. self = <test_ops.RoIPoolTester testMethod=test_roi_pool_cuda>
  339.  
  340. @unittest.skipIf(not torch.cuda.is_available(), "CUDA unavailable")
  341. def test_roi_pool_cuda(self):
  342. device = torch.device('cuda') if torch.cuda.is_available() else torch.device('cpu')
  343. x = torch.rand(2, 1, 10, 10, dtype=self.dtype, device=device)
  344. rois = torch.tensor([[0, 0, 0, 9, 9], # format is (xyxy)
  345. [0, 0, 5, 4, 9],
  346. [0, 5, 5, 9, 9],
  347. [1, 0, 0, 9, 9]],
  348. dtype=self.dtype, device=device)
  349.  
  350. pool_h, pool_w = (5, 5)
  351. roi_pool = ops.RoIPool((pool_h, pool_w), 1)
  352. > y = roi_pool(x, rois)
  353.  
  354. test/test_ops.py:222:
  355. _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
  356. /usr/lib/python3.7/site-packages/torch/nn/modules/module.py:493: in __call__
  357. result = self.forward(*input, **kwargs)
  358. build/lib.linux-x86_64-3.7/torchvision/ops/roi_pool.py:75: in forward
  359. return roi_pool(input, rois, self.output_size, self.spatial_scale)
  360. build/lib.linux-x86_64-3.7/torchvision/ops/roi_pool.py:62: in roi_pool
  361. return _RoIPoolFunction.apply(input, rois, output_size, spatial_scale)
  362. build/lib.linux-x86_64-3.7/torchvision/ops/roi_pool.py:19: in forward
  363. _C = _lazy_import()
  364. _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
  365.  
  366. def _lazy_import():
  367. """
  368. Make sure that CUDA versions match between the pytorch install and torchvision install
  369. """
  370. global _C
  371. if _C is not None:
  372. return _C
  373. import torch
  374. > from torchvision import _C as C
  375. E ImportError: dynamic module does not define module export function (PyInit__C)
  376.  
  377. build/lib.linux-x86_64-3.7/torchvision/extension.py:12: ImportError
  378. __________________________________________________________________________ RoIPoolTester.test_roi_pool_gradcheck_cpu __________________________________________________________________________
  379.  
  380. self = <test_ops.RoIPoolTester testMethod=test_roi_pool_gradcheck_cpu>
  381.  
  382. def test_roi_pool_gradcheck_cpu(self):
  383. device = torch.device('cpu')
  384. x = torch.rand(1, 1, 10, 10, dtype=self.dtype, device=device, requires_grad=True)
  385. rois = torch.tensor([
  386. [0, 0, 0, 9, 9],
  387. [0, 0, 5, 5, 9],
  388. [0, 5, 5, 9, 9]], dtype=self.dtype, device=device)
  389.  
  390. m = ops.RoIPool((5, 5), 1).to(dtype=self.dtype, device=device)
  391.  
  392. def func(input):
  393. return m(input, rois)
  394.  
  395. > assert gradcheck(func, (x,)), 'gradcheck failed for roi_pool CPU'
  396.  
  397. test/test_ops.py:188:
  398. _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
  399. /usr/lib/python3.7/site-packages/torch/autograd/gradcheck.py:256: in gradcheck
  400. func_out = func(*tupled_inputs)
  401. test/test_ops.py:186: in func
  402. return m(input, rois)
  403. /usr/lib/python3.7/site-packages/torch/nn/modules/module.py:493: in __call__
  404. result = self.forward(*input, **kwargs)
  405. build/lib.linux-x86_64-3.7/torchvision/ops/roi_pool.py:75: in forward
  406. return roi_pool(input, rois, self.output_size, self.spatial_scale)
  407. build/lib.linux-x86_64-3.7/torchvision/ops/roi_pool.py:62: in roi_pool
  408. return _RoIPoolFunction.apply(input, rois, output_size, spatial_scale)
  409. build/lib.linux-x86_64-3.7/torchvision/ops/roi_pool.py:19: in forward
  410. _C = _lazy_import()
  411. _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
  412.  
  413. def _lazy_import():
  414. """
  415. Make sure that CUDA versions match between the pytorch install and torchvision install
  416. """
  417. global _C
  418. if _C is not None:
  419. return _C
  420. import torch
  421. > from torchvision import _C as C
  422. E ImportError: dynamic module does not define module export function (PyInit__C)
  423.  
  424. build/lib.linux-x86_64-3.7/torchvision/extension.py:12: ImportError
  425. _________________________________________________________________________ RoIPoolTester.test_roi_pool_gradcheck_cuda __________________________________________________________________________
  426.  
  427. self = <test_ops.RoIPoolTester testMethod=test_roi_pool_gradcheck_cuda>
  428.  
  429. @unittest.skipIf(not torch.cuda.is_available(), "CUDA unavailable")
  430. def test_roi_pool_gradcheck_cuda(self):
  431. device = torch.device('cuda')
  432. x = torch.rand(1, 1, 10, 10, dtype=self.dtype, device=device, requires_grad=True)
  433. rois = torch.tensor([
  434. [0, 0, 0, 9, 9],
  435. [0, 0, 5, 5, 9],
  436. [0, 5, 5, 9, 9]], dtype=self.dtype, device=device)
  437.  
  438. m = ops.RoIPool((5, 5), 1).to(dtype=self.dtype, device=device)
  439.  
  440. def func(input):
  441. return m(input, rois)
  442.  
  443. > assert gradcheck(func, (x,)), 'gradcheck failed for roi_pool CUDA'
  444.  
  445. test/test_ops.py:274:
  446. _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
  447. /usr/lib/python3.7/site-packages/torch/autograd/gradcheck.py:256: in gradcheck
  448. func_out = func(*tupled_inputs)
  449. test/test_ops.py:272: in func
  450. return m(input, rois)
  451. /usr/lib/python3.7/site-packages/torch/nn/modules/module.py:493: in __call__
  452. result = self.forward(*input, **kwargs)
  453. build/lib.linux-x86_64-3.7/torchvision/ops/roi_pool.py:75: in forward
  454. return roi_pool(input, rois, self.output_size, self.spatial_scale)
  455. build/lib.linux-x86_64-3.7/torchvision/ops/roi_pool.py:62: in roi_pool
  456. return _RoIPoolFunction.apply(input, rois, output_size, spatial_scale)
  457. build/lib.linux-x86_64-3.7/torchvision/ops/roi_pool.py:19: in forward
  458. _C = _lazy_import()
  459. _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
  460.  
  461. def _lazy_import():
  462. """
  463. Make sure that CUDA versions match between the pytorch install and torchvision install
  464. """
  465. global _C
  466. if _C is not None:
  467. return _C
  468. import torch
  469. > from torchvision import _C as C
  470. E ImportError: dynamic module does not define module export function (PyInit__C)
  471.  
  472. build/lib.linux-x86_64-3.7/torchvision/extension.py:12: ImportError
  473. __________________________________________________________________________ RoIPoolTester.test_roi_pool_gradient_cpu ___________________________________________________________________________
  474.  
  475. self = <test_ops.RoIPoolTester testMethod=test_roi_pool_gradient_cpu>
  476.  
  477. def test_roi_pool_gradient_cpu(self):
  478. device = torch.device('cpu')
  479. x = torch.ones(1, 1, 10, 10, dtype=self.dtype, device=device, requires_grad=True)
  480. rois = torch.tensor([
  481. [0, 0, 0, 9, 9],
  482. [0, 0, 5, 4, 9],
  483. [0, 0, 0, 4, 4]],
  484. dtype=self.dtype, device=device)
  485.  
  486. layer = ops.RoIPool((5, 5), 1).to(dtype=self.dtype, device=device)
  487.  
  488. > y = layer(x, rois)
  489.  
  490. test/test_ops.py:122:
  491. _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
  492. /usr/lib/python3.7/site-packages/torch/nn/modules/module.py:493: in __call__
  493. result = self.forward(*input, **kwargs)
  494. build/lib.linux-x86_64-3.7/torchvision/ops/roi_pool.py:75: in forward
  495. return roi_pool(input, rois, self.output_size, self.spatial_scale)
  496. build/lib.linux-x86_64-3.7/torchvision/ops/roi_pool.py:62: in roi_pool
  497. return _RoIPoolFunction.apply(input, rois, output_size, spatial_scale)
  498. build/lib.linux-x86_64-3.7/torchvision/ops/roi_pool.py:19: in forward
  499. _C = _lazy_import()
  500. _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
  501.  
  502. def _lazy_import():
  503. """
  504. Make sure that CUDA versions match between the pytorch install and torchvision install
  505. """
  506. global _C
  507. if _C is not None:
  508. return _C
  509. import torch
  510. > from torchvision import _C as C
  511. E ImportError: dynamic module does not define module export function (PyInit__C)
  512.  
  513. build/lib.linux-x86_64-3.7/torchvision/extension.py:12: ImportError
  514. __________________________________________________________________________ RoIPoolTester.test_roi_pool_gradient_cuda __________________________________________________________________________
  515.  
  516. self = <test_ops.RoIPoolTester testMethod=test_roi_pool_gradient_cuda>
  517.  
  518. @unittest.skipIf(not torch.cuda.is_available(), "CUDA unavailable")
  519. def test_roi_pool_gradient_cuda(self):
  520. device = torch.device('cuda')
  521. layer = ops.RoIPool((5, 5), 1).to(dtype=self.dtype, device=device)
  522. x = torch.ones(1, 1, 10, 10, dtype=self.dtype, device=device, requires_grad=True)
  523. rois = torch.tensor([
  524. [0, 0, 0, 9, 9],
  525. [0, 0, 5, 4, 9],
  526. [0, 0, 0, 4, 4]],
  527. dtype=self.dtype, device=device)
  528.  
  529. > y = layer(x, rois)
  530.  
  531. test/test_ops.py:243:
  532. _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
  533. /usr/lib/python3.7/site-packages/torch/nn/modules/module.py:493: in __call__
  534. result = self.forward(*input, **kwargs)
  535. build/lib.linux-x86_64-3.7/torchvision/ops/roi_pool.py:75: in forward
  536. return roi_pool(input, rois, self.output_size, self.spatial_scale)
  537. build/lib.linux-x86_64-3.7/torchvision/ops/roi_pool.py:62: in roi_pool
  538. return _RoIPoolFunction.apply(input, rois, output_size, spatial_scale)
  539. build/lib.linux-x86_64-3.7/torchvision/ops/roi_pool.py:19: in forward
  540. _C = _lazy_import()
  541. _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
  542.  
  543. def _lazy_import():
  544. """
  545. Make sure that CUDA versions match between the pytorch install and torchvision install
  546. """
  547. global _C
  548. if _C is not None:
  549. return _C
  550. import torch
  551. > from torchvision import _C as C
  552. E ImportError: dynamic module does not define module export function (PyInit__C)
  553.  
  554. build/lib.linux-x86_64-3.7/torchvision/extension.py:12: ImportError
  555. ___________________________________________________________________________ RoIAlignTester.test_roi_align_basic_cpu ___________________________________________________________________________
  556.  
  557. self = <test_ops.RoIAlignTester testMethod=test_roi_align_basic_cpu>
  558.  
  559. def test_roi_align_basic_cpu(self):
  560. device = torch.device('cpu')
  561. x = self.x.to(device)
  562. single_roi = self.single_roi.to(device)
  563. gt_y_single = self.gt_y_single.to(device)
  564.  
  565. pool_h, pool_w = (5, 5)
  566. roi_align = ops.RoIAlign((pool_h, pool_w), spatial_scale=1, sampling_ratio=2).to(device=device)
  567. > y = roi_align(x, single_roi)
  568.  
  569. test/test_ops.py:345:
  570. _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
  571. /usr/lib/python3.7/site-packages/torch/nn/modules/module.py:493: in __call__
  572. result = self.forward(*input, **kwargs)
  573. build/lib.linux-x86_64-3.7/torchvision/ops/roi_align.py:83: in forward
  574. return roi_align(input, rois, self.output_size, self.spatial_scale, self.sampling_ratio)
  575. build/lib.linux-x86_64-3.7/torchvision/ops/roi_align.py:69: in roi_align
  576. return _RoIAlignFunction.apply(input, rois, output_size, spatial_scale, sampling_ratio)
  577. build/lib.linux-x86_64-3.7/torchvision/ops/roi_align.py:21: in forward
  578. _C = _lazy_import()
  579. _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
  580.  
  581. def _lazy_import():
  582. """
  583. Make sure that CUDA versions match between the pytorch install and torchvision install
  584. """
  585. global _C
  586. if _C is not None:
  587. return _C
  588. import torch
  589. > from torchvision import _C as C
  590. E ImportError: dynamic module does not define module export function (PyInit__C)
  591.  
  592. build/lib.linux-x86_64-3.7/torchvision/extension.py:12: ImportError
  593. __________________________________________________________________________ RoIAlignTester.test_roi_align_basic_cuda ___________________________________________________________________________
  594.  
  595. self = <test_ops.RoIAlignTester testMethod=test_roi_align_basic_cuda>
  596.  
  597. @unittest.skipIf(not torch.cuda.is_available(), "CUDA unavailable")
  598. def test_roi_align_basic_cuda(self):
  599. device = torch.device('cuda')
  600. x = self.x.to(device)
  601. single_roi = self.single_roi.to(device)
  602. gt_y_single = self.gt_y_single.to(device)
  603.  
  604. pool_h, pool_w = (5, 5)
  605. roi_align = ops.RoIAlign((pool_h, pool_w), spatial_scale=1, sampling_ratio=2).to(device=device)
  606. > y = roi_align(x, single_roi)
  607.  
  608. test/test_ops.py:376:
  609. _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
  610. /usr/lib/python3.7/site-packages/torch/nn/modules/module.py:493: in __call__
  611. result = self.forward(*input, **kwargs)
  612. build/lib.linux-x86_64-3.7/torchvision/ops/roi_align.py:83: in forward
  613. return roi_align(input, rois, self.output_size, self.spatial_scale, self.sampling_ratio)
  614. build/lib.linux-x86_64-3.7/torchvision/ops/roi_align.py:69: in roi_align
  615. return _RoIAlignFunction.apply(input, rois, output_size, spatial_scale, sampling_ratio)
  616. build/lib.linux-x86_64-3.7/torchvision/ops/roi_align.py:21: in forward
  617. _C = _lazy_import()
  618. _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
  619.  
  620. def _lazy_import():
  621. """
  622. Make sure that CUDA versions match between the pytorch install and torchvision install
  623. """
  624. global _C
  625. if _C is not None:
  626. return _C
  627. import torch
  628. > from torchvision import _C as C
  629. E ImportError: dynamic module does not define module export function (PyInit__C)
  630.  
  631. build/lib.linux-x86_64-3.7/torchvision/extension.py:12: ImportError
  632. ______________________________________________________________________________ RoIAlignTester.test_roi_align_cpu ______________________________________________________________________________
  633.  
  634. self = <test_ops.RoIAlignTester testMethod=test_roi_align_cpu>
  635.  
  636. def test_roi_align_cpu(self):
  637. device = torch.device('cpu')
  638. x = self.x.to(device)
  639. rois = self.rois.to(device)
  640. gt_y_multiple = self.gt_y_multiple.to(device)
  641.  
  642. pool_h, pool_w = (5, 5)
  643. roi_align = ops.RoIAlign((pool_h, pool_w), spatial_scale=1, sampling_ratio=2).to(device=device)
  644. > y = roi_align(x, rois)
  645.  
  646. test/test_ops.py:360:
  647. _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
  648. /usr/lib/python3.7/site-packages/torch/nn/modules/module.py:493: in __call__
  649. result = self.forward(*input, **kwargs)
  650. build/lib.linux-x86_64-3.7/torchvision/ops/roi_align.py:83: in forward
  651. return roi_align(input, rois, self.output_size, self.spatial_scale, self.sampling_ratio)
  652. build/lib.linux-x86_64-3.7/torchvision/ops/roi_align.py:69: in roi_align
  653. return _RoIAlignFunction.apply(input, rois, output_size, spatial_scale, sampling_ratio)
  654. build/lib.linux-x86_64-3.7/torchvision/ops/roi_align.py:21: in forward
  655. _C = _lazy_import()
  656. _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
  657.  
  658. def _lazy_import():
  659. """
  660. Make sure that CUDA versions match between the pytorch install and torchvision install
  661. """
  662. global _C
  663. if _C is not None:
  664. return _C
  665. import torch
  666. > from torchvision import _C as C
  667. E ImportError: dynamic module does not define module export function (PyInit__C)
  668.  
  669. build/lib.linux-x86_64-3.7/torchvision/extension.py:12: ImportError
  670. _____________________________________________________________________________ RoIAlignTester.test_roi_align_cuda ______________________________________________________________________________
  671.  
  672. self = <test_ops.RoIAlignTester testMethod=test_roi_align_cuda>
  673.  
  674. @unittest.skipIf(not torch.cuda.is_available(), "CUDA unavailable")
  675. def test_roi_align_cuda(self):
  676. device = torch.device('cuda')
  677. x = self.x.to(device)
  678. rois = self.rois.to(device)
  679. gt_y_multiple = self.gt_y_multiple.to(device)
  680.  
  681. pool_h, pool_w = (5, 5)
  682. roi_align = ops.RoIAlign((pool_h, pool_w), spatial_scale=1, sampling_ratio=2).to(device=device)
  683. > y = roi_align(x, rois)
  684.  
  685. test/test_ops.py:392:
  686. _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
  687. /usr/lib/python3.7/site-packages/torch/nn/modules/module.py:493: in __call__
  688. result = self.forward(*input, **kwargs)
  689. build/lib.linux-x86_64-3.7/torchvision/ops/roi_align.py:83: in forward
  690. return roi_align(input, rois, self.output_size, self.spatial_scale, self.sampling_ratio)
  691. build/lib.linux-x86_64-3.7/torchvision/ops/roi_align.py:69: in roi_align
  692. return _RoIAlignFunction.apply(input, rois, output_size, spatial_scale, sampling_ratio)
  693. build/lib.linux-x86_64-3.7/torchvision/ops/roi_align.py:21: in forward
  694. _C = _lazy_import()
  695. _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
  696.  
  697. def _lazy_import():
  698. """
  699. Make sure that CUDA versions match between the pytorch install and torchvision install
  700. """
  701. global _C
  702. if _C is not None:
  703. return _C
  704. import torch
  705. > from torchvision import _C as C
  706. E ImportError: dynamic module does not define module export function (PyInit__C)
  707.  
  708. build/lib.linux-x86_64-3.7/torchvision/extension.py:12: ImportError
  709. _________________________________________________________________________ RoIAlignTester.test_roi_align_gradcheck_cpu _________________________________________________________________________
  710.  
  711. self = <test_ops.RoIAlignTester testMethod=test_roi_align_gradcheck_cpu>
  712.  
  713. def test_roi_align_gradcheck_cpu(self):
  714. dtype = torch.float64
  715. device = torch.device('cpu')
  716. m = ops.RoIAlign((5, 5), 0.5, 1).to(dtype=dtype, device=device)
  717. x = torch.rand(1, 1, 10, 10, dtype=dtype, device=device, requires_grad=True)
  718. rois = self.rois.to(device=device, dtype=dtype)
  719.  
  720. def func(input):
  721. return m(input, rois)
  722.  
  723. > assert gradcheck(func, (x,)), 'gradcheck failed for RoIAlign CPU'
  724.  
  725. test/test_ops.py:428:
  726. _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
  727. /usr/lib/python3.7/site-packages/torch/autograd/gradcheck.py:256: in gradcheck
  728. func_out = func(*tupled_inputs)
  729. test/test_ops.py:426: in func
  730. return m(input, rois)
  731. /usr/lib/python3.7/site-packages/torch/nn/modules/module.py:493: in __call__
  732. result = self.forward(*input, **kwargs)
  733. build/lib.linux-x86_64-3.7/torchvision/ops/roi_align.py:83: in forward
  734. return roi_align(input, rois, self.output_size, self.spatial_scale, self.sampling_ratio)
  735. build/lib.linux-x86_64-3.7/torchvision/ops/roi_align.py:69: in roi_align
  736. return _RoIAlignFunction.apply(input, rois, output_size, spatial_scale, sampling_ratio)
  737. build/lib.linux-x86_64-3.7/torchvision/ops/roi_align.py:21: in forward
  738. _C = _lazy_import()
  739. _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
  740.  
  741. def _lazy_import():
  742. """
  743. Make sure that CUDA versions match between the pytorch install and torchvision install
  744. """
  745. global _C
  746. if _C is not None:
  747. return _C
  748. import torch
  749. > from torchvision import _C as C
  750. E ImportError: dynamic module does not define module export function (PyInit__C)
  751.  
  752. build/lib.linux-x86_64-3.7/torchvision/extension.py:12: ImportError
  753. ________________________________________________________________________ RoIAlignTester.test_roi_align_gradcheck_cuda _________________________________________________________________________
  754.  
  755. self = <test_ops.RoIAlignTester testMethod=test_roi_align_gradcheck_cuda>
  756.  
  757. @unittest.skipIf(not torch.cuda.is_available(), "CUDA unavailable")
  758. def test_roi_align_gradcheck_cuda(self):
  759. dtype = torch.float64
  760. device = torch.device('cuda')
  761. m = ops.RoIAlign((5, 5), 0.5, 1).to(dtype=dtype, device=device)
  762. x = torch.rand(1, 1, 10, 10, dtype=dtype, device=device, requires_grad=True)
  763. rois = self.rois.to(device=device, dtype=dtype)
  764.  
  765. def func(input):
  766. return m(input, rois)
  767.  
  768. > assert gradcheck(func, (x,)), 'gradcheck failed for RoIAlign CUDA'
  769.  
  770. test/test_ops.py:462:
  771. _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
  772. /usr/lib/python3.7/site-packages/torch/autograd/gradcheck.py:256: in gradcheck
  773. func_out = func(*tupled_inputs)
  774. test/test_ops.py:460: in func
  775. return m(input, rois)
  776. /usr/lib/python3.7/site-packages/torch/nn/modules/module.py:493: in __call__
  777. result = self.forward(*input, **kwargs)
  778. build/lib.linux-x86_64-3.7/torchvision/ops/roi_align.py:83: in forward
  779. return roi_align(input, rois, self.output_size, self.spatial_scale, self.sampling_ratio)
  780. build/lib.linux-x86_64-3.7/torchvision/ops/roi_align.py:69: in roi_align
  781. return _RoIAlignFunction.apply(input, rois, output_size, spatial_scale, sampling_ratio)
  782. build/lib.linux-x86_64-3.7/torchvision/ops/roi_align.py:21: in forward
  783. _C = _lazy_import()
  784. _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
  785.  
  786. def _lazy_import():
  787. """
  788. Make sure that CUDA versions match between the pytorch install and torchvision install
  789. """
  790. global _C
  791. if _C is not None:
  792. return _C
  793. import torch
  794. > from torchvision import _C as C
  795. E ImportError: dynamic module does not define module export function (PyInit__C)
  796.  
  797. build/lib.linux-x86_64-3.7/torchvision/extension.py:12: ImportError
  798. _________________________________________________________________________ RoIAlignTester.test_roi_align_gradient_cpu __________________________________________________________________________
  799.  
  800. self = <test_ops.RoIAlignTester testMethod=test_roi_align_gradient_cpu>
  801.  
  802. def test_roi_align_gradient_cpu(self):
  803. """
  804. Compute gradients for RoIAlign with multiple bounding boxes on CPU
  805. """
  806. device = torch.device('cpu')
  807. pool_h, pool_w = (5, 5)
  808. roi_align = ops.RoIAlign((pool_h, pool_w), spatial_scale=1, sampling_ratio=2).to(device=device)
  809.  
  810. x = self.x.to(device).clone()
  811. rois = self.rois.to(device)
  812. gt_grad = self.x_grad.to(device)
  813.  
  814. x.requires_grad = True
  815. > y = roi_align(x, rois)
  816.  
  817. test/test_ops.py:412:
  818. _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
  819. /usr/lib/python3.7/site-packages/torch/nn/modules/module.py:493: in __call__
  820. result = self.forward(*input, **kwargs)
  821. build/lib.linux-x86_64-3.7/torchvision/ops/roi_align.py:83: in forward
  822. return roi_align(input, rois, self.output_size, self.spatial_scale, self.sampling_ratio)
  823. build/lib.linux-x86_64-3.7/torchvision/ops/roi_align.py:69: in roi_align
  824. return _RoIAlignFunction.apply(input, rois, output_size, spatial_scale, sampling_ratio)
  825. build/lib.linux-x86_64-3.7/torchvision/ops/roi_align.py:21: in forward
  826. _C = _lazy_import()
  827. _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
  828.  
  829. def _lazy_import():
  830. """
  831. Make sure that CUDA versions match between the pytorch install and torchvision install
  832. """
  833. global _C
  834. if _C is not None:
  835. return _C
  836. import torch
  837. > from torchvision import _C as C
  838. E ImportError: dynamic module does not define module export function (PyInit__C)
  839.  
  840. build/lib.linux-x86_64-3.7/torchvision/extension.py:12: ImportError
  841. _________________________________________________________________________ RoIAlignTester.test_roi_align_gradient_cuda _________________________________________________________________________
  842.  
  843. self = <test_ops.RoIAlignTester testMethod=test_roi_align_gradient_cuda>
  844.  
  845. @unittest.skipIf(not torch.cuda.is_available(), "CUDA unavailable")
  846. def test_roi_align_gradient_cuda(self):
  847. """
  848. Compute gradients for RoIAlign with multiple bounding boxes on the GPU
  849. """
  850. device = torch.device('cuda')
  851. pool_h, pool_w = (5, 5)
  852. roi_align = ops.RoIAlign((pool_h, pool_w), spatial_scale=1, sampling_ratio=2).to(device=device)
  853.  
  854. x = self.x.to(device).clone()
  855. rois = self.rois.to(device)
  856. gt_grad = self.x_grad.to(device)
  857.  
  858. x.requires_grad = True
  859. > y = roi_align(x, rois)
  860.  
  861. test/test_ops.py:445:
  862. _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
  863. /usr/lib/python3.7/site-packages/torch/nn/modules/module.py:493: in __call__
  864. result = self.forward(*input, **kwargs)
  865. build/lib.linux-x86_64-3.7/torchvision/ops/roi_align.py:83: in forward
  866. return roi_align(input, rois, self.output_size, self.spatial_scale, self.sampling_ratio)
  867. build/lib.linux-x86_64-3.7/torchvision/ops/roi_align.py:69: in roi_align
  868. return _RoIAlignFunction.apply(input, rois, output_size, spatial_scale, sampling_ratio)
  869. build/lib.linux-x86_64-3.7/torchvision/ops/roi_align.py:21: in forward
  870. _C = _lazy_import()
  871. _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
  872.  
  873. def _lazy_import():
  874. """
  875. Make sure that CUDA versions match between the pytorch install and torchvision install
  876. """
  877. global _C
  878. if _C is not None:
  879. return _C
  880. import torch
  881. > from torchvision import _C as C
  882. E ImportError: dynamic module does not define module export function (PyInit__C)
  883.  
  884. build/lib.linux-x86_64-3.7/torchvision/extension.py:12: ImportError
  885. _____________________________________________________________________________________ NMSTester.test_nms ______________________________________________________________________________________
  886.  
  887. self = <test_ops.NMSTester testMethod=test_nms>
  888.  
  889. def test_nms(self):
  890. boxes, scores = self._create_tensors(1000)
  891. err_msg = 'NMS incompatible between CPU and reference implementation for IoU={}'
  892. for iou in [0.2, 0.5, 0.8]:
  893. keep_ref = self.reference_nms(boxes, scores, iou)
  894. > keep = ops.nms(boxes, scores, iou)
  895.  
  896. test/test_ops.py:501:
  897. _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
  898. build/lib.linux-x86_64-3.7/torchvision/ops/boxes.py:32: in nms
  899. _C = _lazy_import()
  900. _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
  901.  
  902. def _lazy_import():
  903. """
  904. Make sure that CUDA versions match between the pytorch install and torchvision install
  905. """
  906. global _C
  907. if _C is not None:
  908. return _C
  909. import torch
  910. > from torchvision import _C as C
  911. E ImportError: dynamic module does not define module export function (PyInit__C)
  912.  
  913. build/lib.linux-x86_64-3.7/torchvision/extension.py:12: ImportError
  914. ___________________________________________________________________________________ NMSTester.test_nms_cuda ___________________________________________________________________________________
  915.  
  916. self = <test_ops.NMSTester testMethod=test_nms_cuda>
  917.  
  918. @unittest.skipIf(not torch.cuda.is_available(), "CUDA unavailable")
  919. def test_nms_cuda(self):
  920. boxes, scores = self._create_tensors(1000)
  921. err_msg = 'NMS incompatible between CPU and CUDA for IoU={}'
  922.  
  923. for iou in [0.2, 0.5, 0.8]:
  924. > r_cpu = ops.nms(boxes, scores, iou)
  925.  
  926. test/test_ops.py:510:
  927. _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
  928. build/lib.linux-x86_64-3.7/torchvision/ops/boxes.py:32: in nms
  929. _C = _lazy_import()
  930. _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
  931.  
  932. def _lazy_import():
  933. """
  934. Make sure that CUDA versions match between the pytorch install and torchvision install
  935. """
  936. global _C
  937. if _C is not None:
  938. return _C
  939. import torch
  940. > from torchvision import _C as C
  941. E ImportError: dynamic module does not define module export function (PyInit__C)
  942.  
  943. build/lib.linux-x86_64-3.7/torchvision/extension.py:12: ImportError
  944. ====================================================================================== warnings summary =======================================================================================
  945. build/lib.linux-x86_64-3.7/torchvision/datasets/lsun.py:8
  946. /home/reik/.cache/yay/python-torchvision/src/vision-0.4.0/build/lib.linux-x86_64-3.7/torchvision/datasets/lsun.py:8: DeprecationWarning: Using or importing the ABCs from 'collections' instead of from 'collections.abc' is deprecated, and in 3.8 it will stop working
  947. from collections import Iterable
  948.  
  949. /usr/lib/python3.7/site-packages/av/container/__init__.py:1
  950. /usr/lib/python3.7/site-packages/av/container/__init__.py:1: DeprecationWarning: Using or importing the ABCs from 'collections' instead of from 'collections.abc' is deprecated, and in 3.8 it will stop working
  951. from .core import Container, open
  952.  
  953. test/test_cpp_models.py::Tester::test_resnet101
  954. /usr/lib/python3.7/site-packages/torch/jit/__init__.py:702: TracerWarning: Output nr 1. of the traced function does not match the corresponding output of the Python function. Detailed error:
  955. Not within tolerance rtol=1e-05 atol=1e-05 at input[0, 929] (-2.8711626529693604 vs. -2.87127685546875) and 1 other locations (0.00%)
  956. _check_trace([example_inputs], func, executor_options, traced, check_tolerance, _force_outplace)
  957.  
  958. test/test_cpp_models.py::Tester::test_wide_resnet101_2
  959. /usr/lib/python3.7/site-packages/torch/jit/__init__.py:702: TracerWarning: Output nr 1. of the traced function does not match the corresponding output of the Python function. Detailed error:
  960. Not within tolerance rtol=1e-05 atol=1e-05 at input[0, 402] (-1.1914129257202148 vs. -1.1916732788085938) and 1 other locations (0.00%)
  961. _check_trace([example_inputs], func, executor_options, traced, check_tolerance, _force_outplace)
  962.  
  963. -- Docs: https://docs.pytest.org/en/latest/warnings.html
  964. =============================================================== 23 failed, 159 passed, 5 skipped, 4 warnings in 1421.04 seconds ===============================================================
  965. ==> ERROR: A failure occurred in check().
  966. Aborting...
  967. Error making: python-torchvision
Advertisement
Add Comment
Please, Sign In to add comment