CenterNet icon indicating copy to clipboard operation
CenterNet copied to clipboard

test batchsize=1 RuntimeError: CUDA out of memory.

Open pageedward opened this issue 4 years ago • 3 comments

image image image

pageedward avatar Mar 11 '20 16:03 pageedward

same... warnings.warn("nn.Upsampling is deprecated. Use nn.functional.interpolate instead.") locating kps: 6%|█▌ | 167/2708 [01:30<22:49, 1.86it/s]Traceback (most recent call last): File "test.py", line 99, in test(testing_db, args.split, args.testiter, args.debug, args.suffix) File "test.py", line 61, in test testing(db, nnet, result_dir, debug=debug) File "/dmhome/shu/CenterNet/test/openlogo.py", line 321, in testing return globals()[system_configs.sampling_function](db, nnet, result_dir, debug=debug) File "/dmhome/shu/CenterNet/test/openlogo.py", line 129, in kp_detection dets, center = decode_func(nnet, images, K, ae_threshold=ae_threshold, kernel=nms_kernel) File "/dmhome/shu/CenterNet/test/openlogo.py", line 54, in kp_decode detections, center = nnet.test([images], ae_threshold=ae_threshold, K=K, kernel=kernel) File "/dmhome/shu/CenterNet/nnet/py_factory.py", line 116, in test return self.model(*xs, **kwargs) File "/home/shu/miniconda3/envs/center9/lib/python3.6/site-packages/torch/nn/modules/module.py", line 477, in call result = self.forward(*input, **kwargs) File "/dmhome/shu/CenterNet/nnet/py_factory.py", line 32, in forward return self.module(*xs, **kwargs) File "/home/shu/miniconda3/envs/center9/lib/python3.6/site-packages/torch/nn/modules/module.py", line 477, in call result = self.forward(*input, **kwargs) File "/dmhome/shu/CenterNet/models/py_utils/kp.py", line 290, in forward return self._test(*xs, **kwargs) File "/dmhome/shu/CenterNet/models/py_utils/kp.py", line 243, in _test inter = self.pre(image) File "/home/shu/miniconda3/envs/center9/lib/python3.6/site-packages/torch/nn/modules/module.py", line 477, in call result = self.forward(*input, **kwargs) File "/home/shu/miniconda3/envs/center9/lib/python3.6/site-packages/torch/nn/modules/container.py", line 91, in forward input = module(input) File "/home/shu/miniconda3/envs/center9/lib/python3.6/site-packages/torch/nn/modules/module.py", line 477, in call result = self.forward(*input, **kwargs) File "/dmhome/shu/CenterNet/models/py_utils/utils.py", line 60, in forward skip = self.skip(x) File "/home/shu/miniconda3/envs/center9/lib/python3.6/site-packages/torch/nn/modules/module.py", line 477, in call result = self.forward(*input, **kwargs) File "/home/shu/miniconda3/envs/center9/lib/python3.6/site-packages/torch/nn/modules/container.py", line 91, in forward input = module(input) File "/home/shu/miniconda3/envs/center9/lib/python3.6/site-packages/torch/nn/modules/module.py", line 477, in call result = self.forward(*input, **kwargs) File "/home/shu/miniconda3/envs/center9/lib/python3.6/site-packages/torch/nn/modules/batchnorm.py", line 66, in forward exponential_average_factor, self.eps) File "/home/shu/miniconda3/envs/center9/lib/python3.6/site-packages/torch/nn/functional.py", line 1254, in batch_norm training, momentum, eps, torch.backends.cudnn.enabled RuntimeError: CUDA error: out of memory

shenglih avatar Mar 17 '20 16:03 shenglih

I have also encountered the same error. CUDA out of memory when test.py. Have you solved the problem?

LehiChiang avatar Mar 25 '20 14:03 LehiChiang

same... warnings.warn("nn.Upsampling is deprecated. Use nn.functional.interpolate instead.") locating kps: 6%|█▌ | 167/2708 [01:30<22:49, 1.86it/s]Traceback (most recent call last): File "test.py", line 99, in test(testing_db, args.split, args.testiter, args.debug, args.suffix) File "test.py", line 61, in test testing(db, nnet, result_dir, debug=debug) File "/dmhome/shu/CenterNet/test/openlogo.py", line 321, in testing return globals()[system_configs.sampling_function](db, nnet, result_dir, debug=debug) File "/dmhome/shu/CenterNet/test/openlogo.py", line 129, in kp_detection dets, center = decode_func(nnet, images, K, ae_threshold=ae_threshold, kernel=nms_kernel) File "/dmhome/shu/CenterNet/test/openlogo.py", line 54, in kp_decode detections, center = nnet.test([images], ae_threshold=ae_threshold, K=K, kernel=kernel) File "/dmhome/shu/CenterNet/nnet/py_factory.py", line 116, in test return self.model(*xs, **kwargs) File "/home/shu/miniconda3/envs/center9/lib/python3.6/site-packages/torch/nn/modules/module.py", line 477, in call result = self.forward(*input, **kwargs) File "/dmhome/shu/CenterNet/nnet/py_factory.py", line 32, in forward return self.module(*xs, **kwargs) File "/home/shu/miniconda3/envs/center9/lib/python3.6/site-packages/torch/nn/modules/module.py", line 477, in call result = self.forward(*input, **kwargs) File "/dmhome/shu/CenterNet/models/py_utils/kp.py", line 290, in forward return self._test(*xs, **kwargs) File "/dmhome/shu/CenterNet/models/py_utils/kp.py", line 243, in _test inter = self.pre(image) File "/home/shu/miniconda3/envs/center9/lib/python3.6/site-packages/torch/nn/modules/module.py", line 477, in call result = self.forward(*input, **kwargs) File "/home/shu/miniconda3/envs/center9/lib/python3.6/site-packages/torch/nn/modules/container.py", line 91, in forward input = module(input) File "/home/shu/miniconda3/envs/center9/lib/python3.6/site-packages/torch/nn/modules/module.py", line 477, in call result = self.forward(*input, **kwargs) File "/dmhome/shu/CenterNet/models/py_utils/utils.py", line 60, in forward skip = self.skip(x) File "/home/shu/miniconda3/envs/center9/lib/python3.6/site-packages/torch/nn/modules/module.py", line 477, in call result = self.forward(*input, **kwargs) File "/home/shu/miniconda3/envs/center9/lib/python3.6/site-packages/torch/nn/modules/container.py", line 91, in forward input = module(input) File "/home/shu/miniconda3/envs/center9/lib/python3.6/site-packages/torch/nn/modules/module.py", line 477, in call result = self.forward(*input, **kwargs) File "/home/shu/miniconda3/envs/center9/lib/python3.6/site-packages/torch/nn/modules/batchnorm.py", line 66, in forward exponential_average_factor, self.eps) File "/home/shu/miniconda3/envs/center9/lib/python3.6/site-packages/torch/nn/functional.py", line 1254, in batch_norm training, momentum, eps, torch.backends.cudnn.enabled RuntimeError: CUDA error: out of memory

test_scales 改小点,图片太大了

lzw0515 avatar Jul 18 '20 04:07 lzw0515