Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

AttributeError: 'NoneType' object has no attribute 'shape' #21

Closed
lufei92 opened this issue Sep 20, 2018 · 20 comments
Closed

AttributeError: 'NoneType' object has no attribute 'shape' #21

lufei92 opened this issue Sep 20, 2018 · 20 comments

Comments

@lufei92
Copy link

lufei92 commented Sep 20, 2018

hello, i train your code according to you provide steps, but occurs follow problem:
loading all datasets...
using 4 threads
loading from cache file: /home/gosuncn/detection/CornerNet-master/cache/coco_trainval2014.pkl
loading annotations into memory...
Done (t=14.30s)
creating index...
index created!
loading from cache file: /home/gosuncn/detection/CornerNet-master/cache/coco_trainval2014.pkl
loading annotations into memory...
Done (t=13.85s)
creating index...
index created!
loading from cache file: /home/gosuncn/detection/CornerNet-master/cache/coco_trainval2014.pkl
loading annotations into memory...
Done (t=13.05s)
creating index...
index created!
loading from cache file: /home/gosuncn/detection/CornerNet-master/cache/coco_trainval2014.pkl
loading annotations into memory...
Done (t=18.46s)
creating index...
index created!
loading from cache file: /home/gosuncn/detection/CornerNet-master/cache/coco_minival2014.pkl
loading annotations into memory...
Done (t=0.41s)
creating index...
index created!
system config...
{'batch_size': 49,
'cache_dir': '/home/gosuncn/detection/CornerNet-master/cache',
'chunk_sizes': [4, 5, 5, 5, 5, 5, 5, 5, 5, 5],
'config_dir': '/home/gosuncn/detection/CornerNet-master/config',
'data_dir': '/home/gosuncn/detection/CornerNet-master/data/',
'data_rng': <mtrand.RandomState object at 0x7f2c28ed32d0>,
'dataset': 'MSCOCO',
'decay_rate': 10,
'display': 5,
'learning_rate': 0.00025,
'max_iter': 500000,
'nnet_rng': <mtrand.RandomState object at 0x7f2c28ed3360>,
'opt_algo': 'adam',
'prefetch_size': 5,
'pretrain': None,
'result_dir': '/home/gosuncn/detection/CornerNet-master/data/coco/results',
'sampling_function': 'kp_detection',
'snapshot': 5000,
'snapshot_name': 'CornerNet',
'stepsize': 450000,
'test_split': 'testdev',
'train_split': 'trainval',
'val_iter': 100,
'val_split': 'minival',
'weight_decay': False,
'weight_decay_rate': 1e-05,
'weight_decay_type': 'l2'}
db config...
{'ae_threshold': 0.5,
'border': 128,
'categories': 80,
'data_aug': True,
'gaussian_bump': True,
'gaussian_iou': 0.7,
'gaussian_radius': -1,
'input_size': [511, 511],
'lighting': True,
'max_per_image': 100,
'merge_bbox': False,
'nms_algorithm': 'exp_soft_nms',
'nms_kernel': 3,
'nms_threshold': 0.5,
'output_sizes': [[128, 128]],
'rand_color': True,
'rand_crop': True,
'rand_pushes': False,
'rand_samples': False,
'rand_scale_max': 1.4,
'rand_scale_min': 0.6,
'rand_scale_step': 0.1,
'rand_scales': array([0.6, 0.7, 0.8, 0.9, 1. , 1.1, 1.2, 1.3]),
'special_crop': False,
'test_scales': [1],
'top_k': 100,
'weight_exp': 8}
len of db: 118287
start prefetching data...
start prefetching data...
shuffling indices...
shuffling indices...
start prefetching data...
Traceback (most recent call last):
File "train.py", line 42, in prefetch_data
data, ind = sample_data(db, ind, data_aug=data_aug)
File "/home/gosuncn/detection/CornerNet-master/sample/coco.py", line 182, in sample_data
return globals()[system_configs.sampling_function](db, k_ind, data_aug, debug)
File "/home/gosuncn/detection/CornerNet-master/sample/coco.py", line 96, in kp_detection
image, detections = random_crop(image, detections, rand_scales, input_size, border=border)
File "/home/gosuncn/detection/CornerNet-master/sample/utils.py", line 57, in random_crop
image_height, image_width = image.shape[0:2]
AttributeError: 'NoneType' object has no attribute 'shape'
Process Process-2:
Traceback (most recent call last):
File "/usr/lib/python3.6/multiprocessing/process.py", line 258, in _bootstrap
self.run()
File "/usr/lib/python3.6/multiprocessing/process.py", line 93, in run
self._target(*self._args, **self._kwargs)
File "train.py", line 46, in prefetch_data
raise e
File "train.py", line 42, in prefetch_data
data, ind = sample_data(db, ind, data_aug=data_aug)
File "/home/gosuncn/detection/CornerNet-master/sample/coco.py", line 182, in sample_data
return globals()[system_configs.sampling_function](db, k_ind, data_aug, debug)
File "/home/gosuncn/detection/CornerNet-master/sample/coco.py", line 96, in kp_detection
image, detections = random_crop(image, detections, rand_scales, input_size, border=border)
File "/home/gosuncn/detection/CornerNet-master/sample/utils.py", line 57, in random_crop
image_height, image_width = image.shape[0:2]
AttributeError: 'NoneType' object has no attribute 'shape'
shuffling indices...
start prefetching data...
Traceback (most recent call last):
File "train.py", line 42, in prefetch_data
data, ind = sample_data(db, ind, data_aug=data_aug)
File "/home/gosuncn/detection/CornerNet-master/sample/coco.py", line 182, in sample_data
return globals()[system_configs.sampling_function](db, k_ind, data_aug, debug)
File "/home/gosuncn/detection/CornerNet-master/sample/coco.py", line 96, in kp_detection
image, detections = random_crop(image, detections, rand_scales, input_size, border=border)
File "/home/gosuncn/detection/CornerNet-master/sample/utils.py", line 57, in random_crop
image_height, image_width = image.shape[0:2]
AttributeError: 'NoneType' object has no attribute 'shape'
Process Process-1:
Traceback (most recent call last):
File "/usr/lib/python3.6/multiprocessing/process.py", line 258, in _bootstrap
self.run()
File "/usr/lib/python3.6/multiprocessing/process.py", line 93, in run
self._target(*self._args, **self._kwargs)
File "train.py", line 46, in prefetch_data
raise e
File "train.py", line 42, in prefetch_data
data, ind = sample_data(db, ind, data_aug=data_aug)
File "/home/gosuncn/detection/CornerNet-master/sample/coco.py", line 182, in sample_data
return globals()[system_configs.sampling_function](db, k_ind, data_aug, debug)
File "/home/gosuncn/detection/CornerNet-master/sample/coco.py", line 96, in kp_detection
image, detections = random_crop(image, detections, rand_scales, input_size, border=border)
File "/home/gosuncn/detection/CornerNet-master/sample/utils.py", line 57, in random_crop
image_height, image_width = image.shape[0:2]
AttributeError: 'NoneType' object has no attribute 'shape'
shuffling indices...
Traceback (most recent call last):
File "train.py", line 42, in prefetch_data
data, ind = sample_data(db, ind, data_aug=data_aug)
File "/home/gosuncn/detection/CornerNet-master/sample/coco.py", line 182, in sample_data
return globals()[system_configs.sampling_function](db, k_ind, data_aug, debug)
File "/home/gosuncn/detection/CornerNet-master/sample/coco.py", line 96, in kp_detection
image, detections = random_crop(image, detections, rand_scales, input_size, border=border)
File "/home/gosuncn/detection/CornerNet-master/sample/utils.py", line 57, in random_crop
image_height, image_width = image.shape[0:2]
AttributeError: 'NoneType' object has no attribute 'shape'
Process Process-4:
Traceback (most recent call last):
File "/usr/lib/python3.6/multiprocessing/process.py", line 258, in _bootstrap
self.run()
File "/usr/lib/python3.6/multiprocessing/process.py", line 93, in run
self._target(*self._args, **self._kwargs)
File "train.py", line 46, in prefetch_data
raise e
File "train.py", line 42, in prefetch_data
data, ind = sample_data(db, ind, data_aug=data_aug)
File "/home/gosuncn/detection/CornerNet-master/sample/coco.py", line 182, in sample_data
return globals()[system_configs.sampling_function](db, k_ind, data_aug, debug)
File "/home/gosuncn/detection/CornerNet-master/sample/coco.py", line 96, in kp_detection
image, detections = random_crop(image, detections, rand_scales, input_size, border=border)
File "/home/gosuncn/detection/CornerNet-master/sample/utils.py", line 57, in random_crop
image_height, image_width = image.shape[0:2]
AttributeError: 'NoneType' object has no attribute 'shape'
building model...
module_file: models.CornerNet
start prefetching data...
Traceback (most recent call last):
File "train.py", line 42, in prefetch_data
data, ind = sample_data(db, ind, data_aug=data_aug)
File "/home/gosuncn/detection/CornerNet-master/sample/coco.py", line 182, in sample_data
return globals()[system_configs.sampling_function](db, k_ind, data_aug, debug)
File "/home/gosuncn/detection/CornerNet-master/sample/coco.py", line 96, in kp_detection
image, detections = random_crop(image, detections, rand_scales, input_size, border=border)
File "/home/gosuncn/detection/CornerNet-master/sample/utils.py", line 57, in random_crop
image_height, image_width = image.shape[0:2]
AttributeError: 'NoneType' object has no attribute 'shape'
Process Process-3:
Traceback (most recent call last):
File "/usr/lib/python3.6/multiprocessing/process.py", line 258, in _bootstrap
self.run()
File "/usr/lib/python3.6/multiprocessing/process.py", line 93, in run
self._target(*self._args, **self._kwargs)
File "train.py", line 46, in prefetch_data
raise e
File "train.py", line 42, in prefetch_data
data, ind = sample_data(db, ind, data_aug=data_aug)
File "/home/gosuncn/detection/CornerNet-master/sample/coco.py", line 182, in sample_data
return globals()[system_configs.sampling_function](db, k_ind, data_aug, debug)
File "/home/gosuncn/detection/CornerNet-master/sample/coco.py", line 96, in kp_detection
image, detections = random_crop(image, detections, rand_scales, input_size, border=border)
File "/home/gosuncn/detection/CornerNet-master/sample/utils.py", line 57, in random_crop
image_height, image_width = image.shape[0:2]
AttributeError: 'NoneType' object has no attribute 'shape'
shuffling indices...
total parameters: 201035212
setting learning rate to: 0.00025
training start...
0%| | 0/500000 [00:00<?, ?it/s]
the path i also changed as follow:
self._configs["data_dir"] = "/home/gosuncn/detection/CornerNet-master/data"
self._configs["cache_dir"] = "/home/detection/CornerNet-master/cache"
self._configs["config_dir"] = "/home/detection/CornerNet-master/config"
self._configs["result_dir"] = "/home/detection/CornerNet-master/data/coco/results"
so i don't know why it cannot read images according to my path

@scL18
Copy link

scL18 commented Sep 20, 2018

@lufei92 I met the same problem. Have you solved this problem?

@heilaw
Copy link
Collaborator

heilaw commented Sep 20, 2018

Can you try the suggestion here?

@scL18
Copy link

scL18 commented Sep 21, 2018

@heilaw
My environment is python 3.6.5. I also changed "batch_size : 4," , "chunk_size : [4], " . When I try to debug the code.

def random_crop(image, detections, random_scales, view_size, border=64):
    view_height, view_width   = view_size
    image_height, image_width = image.shape[0:2]

The shape of the image can be seen. But when I try to run the code the problem shows again.

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
Process Process-3:
Traceback (most recent call last):
File "/home/min/anaconda3/envs/CornerNet/lib/python3.6/multiprocessing/process.py", line 258, in _bootstrap
self.run()
File "/home/min/anaconda3/envs/CornerNet/lib/python3.6/multiprocessing/process.py", line 93, in run
self._target(*self._args, **self._kwargs)
File "/home/min/freeman/CornerNet/train.py", line 46, in prefetch_data
raise e
File "/home/min/freeman/CornerNet/train.py", line 42, in prefetch_data
data, ind = sample_data(db, ind, data_aug=data_aug)
File "/home/min/freeman/CornerNet/sample/coco.py", line 182, in sample_data
return globals()[system_configs.sampling_function](db, k_ind, data_aug, debug)
File "/home/min/freeman/CornerNet/sample/coco.py", line 96, in kp_detection
image, detections = random_crop(image, detections, rand_scales, input_size, border=border)
File "/home/min/freeman/CornerNet/sample/utils.py", line 58, in random_crop
image_height, image_width = image.shape[0:2]
AttributeError: 'NoneType' object has no attribute 'shape'

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

@lufei92
Have you solved this problem?

@lufei92
Copy link
Author

lufei92 commented Sep 21, 2018

sorry, i changed my batchsize and chunck size, but the prooblem is still appear. and i print image path, the images are read, so idon't know why occurs this problem

@heilaw
Copy link
Collaborator

heilaw commented Sep 21, 2018

Can you add print(image.shape) after line 89 in `sample/coco.py', rerun the training and paste the output here? Thanks!

@lufei92
Copy link
Author

lufei92 commented Sep 22, 2018

@heilaw the follow is my result after adding print(image.shape) under line 89 in `sample/coco.py':
loading all datasets...
using 4 threads
loading from cache file: /home/gosuncn/detection/CornerNet-master/cache/coco_trainval2014.pkl
loading annotations into memory...
Done (t=14.16s)
creating index...
index created!
loading from cache file: /home/gosuncn/detection/CornerNet-master/cache/coco_trainval2014.pkl
loading annotations into memory...
Done (t=13.84s)
creating index...
index created!
loading from cache file: /home/gosuncn/detection/CornerNet-master/cache/coco_trainval2014.pkl
loading annotations into memory...
Done (t=13.31s)
creating index...
index created!
loading from cache file: /home/gosuncn/detection/CornerNet-master/cache/coco_trainval2014.pkl
loading annotations into memory...
Done (t=18.50s)
creating index...
index created!
loading from cache file: /home/gosuncn/detection/CornerNet-master/cache/coco_minival2014.pkl
loading annotations into memory...
Done (t=0.41s)
creating index...
index created!
system config...
{'batch_size': 4,
'cache_dir': '/home/gosuncn/detection/CornerNet-master/cache',
'chunk_sizes': [2, 2],
'config_dir': '/home/gosuncn/detection/CornerNet-master/config',
'data_dir': '/home/gosuncn/detection/CornerNet-master/data/',
'data_rng': <mtrand.RandomState object at 0x7f4f2304c828>,
'dataset': 'MSCOCO',
'decay_rate': 10,
'display': 5,
'learning_rate': 0.00025,
'max_iter': 500000,
'nnet_rng': <mtrand.RandomState object at 0x7f4f2304c870>,
'opt_algo': 'adam',
'prefetch_size': 5,
'pretrain': None,
'result_dir': '/home/gosuncn/detection/CornerNet-master/data/coco/results',
'sampling_function': 'kp_detection',
'snapshot': 5000,
'snapshot_name': 'CornerNet',
'stepsize': 450000,
'test_split': 'testdev',
'train_split': 'trainval',
'val_iter': 100,
'val_split': 'minival',
'weight_decay': False,
'weight_decay_rate': 1e-05,
'weight_decay_type': 'l2'}
db config...
{'ae_threshold': 0.5,
'border': 128,
'categories': 80,
'data_aug': True,
'gaussian_bump': True,
'gaussian_iou': 0.7,
'gaussian_radius': -1,
'input_size': [511, 511],
'lighting': True,
'max_per_image': 100,
'merge_bbox': False,
'nms_algorithm': 'exp_soft_nms',
'nms_kernel': 3,
'nms_threshold': 0.5,
'output_sizes': [[128, 128]],
'rand_color': True,
'rand_crop': True,
'rand_pushes': False,
'rand_samples': False,
'rand_scale_max': 1.4,
'rand_scale_min': 0.6,
'rand_scale_step': 0.1,
'rand_scales': array([0.6, 0.7, 0.8, 0.9, 1. , 1.1, 1.2, 1.3]),
'special_crop': False,
'test_scales': [1],
'top_k': 100,
'weight_exp': 8}
len of db: 118287
start prefetching data...
shuffling indices...
(426, 640, 3)
start prefetching data...
(524, 640, 3)
shuffling indices...
(427, 640, 3)
(640, 427, 3)
Traceback (most recent call last):
File "train.py", line 42, in prefetch_data
data, ind = sample_data(db, ind, data_aug=data_aug)
File "/home/gosuncn/detection/CornerNet-master/sample/coco.py", line 183, in sample_data
return globals()[system_configs.sampling_function](db, k_ind, data_aug, debug)
File "/home/gosuncn/detection/CornerNet-master/sample/coco.py", line 90, in kp_detection
print(image.shape)
AttributeError: 'NoneType' object has no attribute 'shape'
Process Process-1:
Traceback (most recent call last):
File "/usr/lib/python3.6/multiprocessing/process.py", line 258, in _bootstrap
self.run()
File "/usr/lib/python3.6/multiprocessing/process.py", line 93, in run
self._target(*self._args, **self._kwargs)
File "train.py", line 46, in prefetch_data
raise e
File "train.py", line 42, in prefetch_data
data, ind = sample_data(db, ind, data_aug=data_aug)
File "/home/gosuncn/detection/CornerNet-master/sample/coco.py", line 183, in sample_data
return globals()[system_configs.sampling_function](db, k_ind, data_aug, debug)
File "/home/gosuncn/detection/CornerNet-master/sample/coco.py", line 90, in kp_detection
print(image.shape)
AttributeError: 'NoneType' object has no attribute 'shape'
start prefetching data...
(480, 640, 3)
shuffling indices...
(581, 640, 3)
(425, 640, 3)
(357, 500, 3)
(413, 620, 3)
Traceback (most recent call last):
File "train.py", line 42, in prefetch_data
data, ind = sample_data(db, ind, data_aug=data_aug)
File "/home/gosuncn/detection/CornerNet-master/sample/coco.py", line 183, in sample_data
return globals()[system_configs.sampling_function](db, k_ind, data_aug, debug)
File "/home/gosuncn/detection/CornerNet-master/sample/coco.py", line 90, in kp_detection
print(image.shape)
AttributeError: 'NoneType' object has no attribute 'shape'
Process Process-3:
Traceback (most recent call last):
File "/usr/lib/python3.6/multiprocessing/process.py", line 258, in _bootstrap
self.run()
File "/usr/lib/python3.6/multiprocessing/process.py", line 93, in run
self._target(*self._args, **self._kwargs)
File "train.py", line 46, in prefetch_data
raise e
File "train.py", line 42, in prefetch_data
data, ind = sample_data(db, ind, data_aug=data_aug)
File "/home/gosuncn/detection/CornerNet-master/sample/coco.py", line 183, in sample_data
return globals()[system_configs.sampling_function](db, k_ind, data_aug, debug)
File "/home/gosuncn/detection/CornerNet-master/sample/coco.py", line 90, in kp_detection
print(image.shape)
AttributeError: 'NoneType' object has no attribute 'shape'
start prefetching data...
Traceback (most recent call last):
File "train.py", line 42, in prefetch_data
data, ind = sample_data(db, ind, data_aug=data_aug)
File "/home/gosuncn/detection/CornerNet-master/sample/coco.py", line 183, in sample_data
return globals()[system_configs.sampling_function](db, k_ind, data_aug, debug)
File "/home/gosuncn/detection/CornerNet-master/sample/coco.py", line 90, in kp_detection
print(image.shape)
AttributeError: 'NoneType' object has no attribute 'shape'
Process Process-2:
Traceback (most recent call last):
File "/usr/lib/python3.6/multiprocessing/process.py", line 258, in _bootstrap
self.run()
File "/usr/lib/python3.6/multiprocessing/process.py", line 93, in run
self._target(*self._args, **self._kwargs)
File "train.py", line 46, in prefetch_data
raise e
File "train.py", line 42, in prefetch_data
data, ind = sample_data(db, ind, data_aug=data_aug)
File "/home/gosuncn/detection/CornerNet-master/sample/coco.py", line 183, in sample_data
return globals()[system_configs.sampling_function](db, k_ind, data_aug, debug)
File "/home/gosuncn/detection/CornerNet-master/sample/coco.py", line 90, in kp_detection
print(image.shape)
AttributeError: 'NoneType' object has no attribute 'shape'
shuffling indices...
(428, 640, 3)
Traceback (most recent call last):
File "train.py", line 42, in prefetch_data
data, ind = sample_data(db, ind, data_aug=data_aug)
File "/home/gosuncn/detection/CornerNet-master/sample/coco.py", line 183, in sample_data
return globals()[system_configs.sampling_function](db, k_ind, data_aug, debug)
File "/home/gosuncn/detection/CornerNet-master/sample/coco.py", line 90, in kp_detection
print(image.shape)
AttributeError: 'NoneType' object has no attribute 'shape'
Process Process-4:
Traceback (most recent call last):
File "/usr/lib/python3.6/multiprocessing/process.py", line 258, in _bootstrap
self.run()
File "/usr/lib/python3.6/multiprocessing/process.py", line 93, in run
self._target(*self._args, **self._kwargs)
File "train.py", line 46, in prefetch_data
raise e
File "train.py", line 42, in prefetch_data
data, ind = sample_data(db, ind, data_aug=data_aug)
File "/home/gosuncn/detection/CornerNet-master/sample/coco.py", line 183, in sample_data
return globals()[system_configs.sampling_function](db, k_ind, data_aug, debug)
File "/home/gosuncn/detection/CornerNet-master/sample/coco.py", line 90, in kp_detection
print(image.shape)
AttributeError: 'NoneType' object has no attribute 'shape'
building model...
module_file: models.CornerNet
start prefetching data...
Exception in thread Thread-1:
Traceback (most recent call last):
File "/usr/lib/python3.6/threading.py", line 916, in _bootstrap_inner
self.run()
File "/usr/lib/python3.6/threading.py", line 864, in run
self._target(*self._args, **self._kwargs)
File "train.py", line 50, in pin_memory
data = data_queue.get()
File "/usr/lib/python3.6/multiprocessing/queues.py", line 113, in get
return _ForkingPickler.loads(res)
File "/usr/local/lib/python3.6/dist-packages/torch/multiprocessing/reductions.py", line 151, in rebuild_storage_fd
fd = df.detach()
File "/usr/lib/python3.6/multiprocessing/resource_sharer.py", line 57, in detach
with _resource_sharer.get_connection(self._id) as conn:
File "/usr/lib/python3.6/multiprocessing/resource_sharer.py", line 87, in get_connection
c = Client(address, authkey=process.current_process().authkey)
File "/usr/lib/python3.6/multiprocessing/connection.py", line 487, in Client
c = SocketClient(address)
File "/usr/lib/python3.6/multiprocessing/connection.py", line 614, in SocketClient
s.connect(address)
FileNotFoundError: [Errno 2] No such file or directory

shuffling indices...
(375, 500, 3)
(375, 500, 3)
(640, 640, 3)
(612, 612, 3)
(480, 640, 3)
(640, 427, 3)
(427, 640, 3)
(640, 480, 3)
(480, 640, 3)
(480, 640, 3)
(427, 640, 3)
(640, 427, 3)
(404, 640, 3)
(640, 426, 3)
(427, 640, 3)
(427, 640, 3)
(332, 500, 3)
(480, 640, 3)
(480, 640, 3)
(361, 640, 3)
(375, 500, 3)
(480, 640, 3)
(600, 450, 3)
(428, 640, 3)
(375, 500, 3)
(610, 640, 3)
(375, 500, 3)
(425, 640, 3)
total parameters: 201035212
setting learning rate to: 0.00025
training start...
(612, 612, 3)
(640, 359, 3)
(640, 427, 3)
(640, 425, 3)
(359, 640, 3)
(640, 425, 3)
(480, 640, 3)
(333, 500, 3)
0%| | 0/500000 [00:00<?, ?it/s](427, 640, 3)
(427, 640, 3)
(359, 640, 3)
(341, 500, 3)
(426, 640, 3)
(427, 640, 3)
(478, 640, 3)
(640, 287, 3)
(425, 640, 3)
(612, 612, 3)
(496, 640, 3)
(480, 640, 3)

@scL18
Copy link

scL18 commented Sep 22, 2018

The result is that.

/home/min/anaconda3/envs/CornerNet/bin/python /home/min/freeman/CornerNet/train.py CornerNet
loading all datasets...
using 4 threads
loading from cache file: ./cache/coco_trainval2014.pkl
loading annotations into memory...
Done (t=21.05s)
creating index...
index created!
loading from cache file: ./cache/coco_trainval2014.pkl
loading annotations into memory...
Done (t=20.20s)
creating index...
index created!
loading from cache file: ./cache/coco_trainval2014.pkl
loading annotations into memory...
Done (t=21.45s)
creating index...
index created!
loading from cache file: ./cache/coco_trainval2014.pkl
loading annotations into memory...
Done (t=19.26s)
creating index...
index created!
loading from cache file: ./cache/coco_minival2014.pkl
loading annotations into memory...
Done (t=0.58s)
creating index...
index created!
system config...
{'batch_size': 5,
'cache_dir': './cache',
'chunk_sizes': [2, 3],
'config_dir': './config',
'data_dir': './data',
'data_rng': <mtrand.RandomState object at 0x7fae02821fc0>,
'dataset': 'MSCOCO',
'decay_rate': 10,
'display': 5,
'learning_rate': 0.00025,
'max_iter': 50000,
'nnet_rng': <mtrand.RandomState object at 0x7fae02828048>,
'opt_algo': 'adam',
'prefetch_size': 5,
'pretrain': None,
'result_dir': './results',
'sampling_function': 'kp_detection',
'snapshot': 500,
'snapshot_name': 'CornerNet',
'stepsize': 45000,
'test_split': 'testdev',
'train_split': 'trainval',
'val_iter': 100,
'val_split': 'minival',
'weight_decay': False,
'weight_decay_rate': 1e-05,
'weight_decay_type': 'l2'}
db config...
{'ae_threshold': 0.5,
'border': 128,
'categories': 80,
'data_aug': True,
'gaussian_bump': True,
'gaussian_iou': 0.7,
'gaussian_radius': -1,
'input_size': [511, 511],
'lighting': True,
'max_per_image': 100,
'merge_bbox': False,
'nms_algorithm': 'exp_soft_nms',
'nms_kernel': 3,
'nms_threshold': 0.5,
'output_sizes': [[128, 128]],
'rand_color': True,
'rand_crop': True,
'rand_pushes': False,
'rand_samples': False,
'rand_scale_max': 1.4,
'rand_scale_min': 0.6,
'rand_scale_step': 0.1,
'rand_scales': array([0.6, 0.7, 0.8, 0.9, 1. , 1.1, 1.2, 1.3]),
'special_crop': False,
'test_scales': [1],
'top_k': 100,
'weight_exp': 8}
len of db: 118287
start prefetching data...
shuffling indices...
(409, 640, 3)
start prefetching data...
(334, 500, 3)
shuffling indices...
(427, 640, 3)
(480, 640, 3)
start prefetching data...
(428, 640, 3)
shuffling indices...
Traceback (most recent call last):
File "/home/min/freeman/CornerNet/train.py", line 42, in prefetch_data
data, ind = sample_data(db, ind, data_aug=data_aug)
File "/home/min/freeman/CornerNet/sample/coco.py", line 183, in sample_data
return globals()[system_configs.sampling_function](db, k_ind, data_aug, debug)
File "/home/min/freeman/CornerNet/sample/coco.py", line 90, in kp_detection
print(image.shape)
AttributeError: 'NoneType' object has no attribute 'shape'
Process Process-3:
Traceback (most recent call last):
File "/home/min/anaconda3/envs/CornerNet/lib/python3.6/multiprocessing/process.py", line 258, in _bootstrap
self.run()
File "/home/min/anaconda3/envs/CornerNet/lib/python3.6/multiprocessing/process.py", line 93, in run
self._target(*self._args, **self._kwargs)
File "/home/min/freeman/CornerNet/train.py", line 46, in prefetch_data
raise e
File "/home/min/freeman/CornerNet/train.py", line 42, in prefetch_data
data, ind = sample_data(db, ind, data_aug=data_aug)
File "/home/min/freeman/CornerNet/sample/coco.py", line 183, in sample_data
return globals()[system_configs.sampling_function](db, k_ind, data_aug, debug)
File "/home/min/freeman/CornerNet/sample/coco.py", line 90, in kp_detection
print(image.shape)
AttributeError: 'NoneType' object has no attribute 'shape'
start prefetching data...
(480, 640, 3)
shuffling indices...
(640, 425, 3)
(431, 640, 3)
start prefetching data...
building model...
module_file: models.CornerNet
shuffling indices...
(480, 640, 3)
(486, 640, 3)
(640, 480, 3)
(429, 640, 3)
(457, 640, 3)
(640, 427, 3)
Traceback (most recent call last):
File "/home/min/freeman/CornerNet/train.py", line 42, in prefetch_data
data, ind = sample_data(db, ind, data_aug=data_aug)
File "/home/min/freeman/CornerNet/sample/coco.py", line 183, in sample_data
return globals()[system_configs.sampling_function](db, k_ind, data_aug, debug)
File "/home/min/freeman/CornerNet/sample/coco.py", line 90, in kp_detection
print(image.shape)
AttributeError: 'NoneType' object has no attribute 'shape'
Process Process-2:
Traceback (most recent call last):
File "/home/min/anaconda3/envs/CornerNet/lib/python3.6/multiprocessing/process.py", line 258, in _bootstrap
self.run()
File "/home/min/anaconda3/envs/CornerNet/lib/python3.6/multiprocessing/process.py", line 93, in run
self._target(*self._args, **self._kwargs)
File "/home/min/freeman/CornerNet/train.py", line 46, in prefetch_data
raise e
File "/home/min/freeman/CornerNet/train.py", line 42, in prefetch_data
data, ind = sample_data(db, ind, data_aug=data_aug)
File "/home/min/freeman/CornerNet/sample/coco.py", line 183, in sample_data
return globals()[system_configs.sampling_function](db, k_ind, data_aug, debug)
File "/home/min/freeman/CornerNet/sample/coco.py", line 90, in kp_detection
print(image.shape)
AttributeError: 'NoneType' object has no attribute 'shape'
(429, 640, 3)
Traceback (most recent call last):
File "/home/min/freeman/CornerNet/train.py", line 42, in prefetch_data
data, ind = sample_data(db, ind, data_aug=data_aug)
File "/home/min/freeman/CornerNet/sample/coco.py", line 183, in sample_data
return globals()[system_configs.sampling_function](db, k_ind, data_aug, debug)
File "/home/min/freeman/CornerNet/sample/coco.py", line 90, in kp_detection
print(image.shape)
AttributeError: 'NoneType' object has no attribute 'shape'
Process Process-1:
Traceback (most recent call last):
File "/home/min/anaconda3/envs/CornerNet/lib/python3.6/multiprocessing/process.py", line 258, in _bootstrap
self.run()
File "/home/min/anaconda3/envs/CornerNet/lib/python3.6/multiprocessing/process.py", line 93, in run
self._target(*self._args, **self._kwargs)
File "/home/min/freeman/CornerNet/train.py", line 46, in prefetch_data
raise e
File "/home/min/freeman/CornerNet/train.py", line 42, in prefetch_data
data, ind = sample_data(db, ind, data_aug=data_aug)
File "/home/min/freeman/CornerNet/sample/coco.py", line 183, in sample_data
return globals()[system_configs.sampling_function](db, k_ind, data_aug, debug)
File "/home/min/freeman/CornerNet/sample/coco.py", line 90, in kp_detection
print(image.shape)
AttributeError: 'NoneType' object has no attribute 'shape'
(480, 640, 3)
(333, 500, 3)
(480, 640, 3)
(480, 640, 3)
(480, 640, 3)
(481, 640, 3)
(640, 478, 3)
(371, 640, 3)
(457, 640, 3)
(480, 640, 3)
(426, 640, 3)
(640, 384, 3)
(480, 640, 3)
(359, 640, 3)
(640, 436, 3)
(480, 272, 3)
(480, 640, 3)
Traceback (most recent call last):
File "/home/min/freeman/CornerNet/train.py", line 42, in prefetch_data
data, ind = sample_data(db, ind, data_aug=data_aug)
File "/home/min/freeman/CornerNet/sample/coco.py", line 183, in sample_data
return globals()[system_configs.sampling_function](db, k_ind, data_aug, debug)
File "/home/min/freeman/CornerNet/sample/coco.py", line 90, in kp_detection
print(image.shape)
AttributeError: 'NoneType' object has no attribute 'shape'
Process Process-4:
Traceback (most recent call last):
File "/home/min/anaconda3/envs/CornerNet/lib/python3.6/multiprocessing/process.py", line 258, in _bootstrap
self.run()
File "/home/min/anaconda3/envs/CornerNet/lib/python3.6/multiprocessing/process.py", line 93, in run
self._target(*self._args, **self._kwargs)
File "/home/min/freeman/CornerNet/train.py", line 46, in prefetch_data
raise e
File "/home/min/freeman/CornerNet/train.py", line 42, in prefetch_data
data, ind = sample_data(db, ind, data_aug=data_aug)
File "/home/min/freeman/CornerNet/sample/coco.py", line 183, in sample_data
return globals()[system_configs.sampling_function](db, k_ind, data_aug, debug)
File "/home/min/freeman/CornerNet/sample/coco.py", line 90, in kp_detection
print(image.shape)
AttributeError: 'NoneType' object has no attribute 'shape'
(480, 640, 3)
(375, 500, 3)
(423, 640, 3)
(364, 500, 3)
(640, 439, 3)
(640, 446, 3)
(640, 427, 3)
(375, 500, 3)
(480, 640, 3)
(428, 640, 3)
(480, 640, 3)
(480, 640, 3)
(480, 640, 3)
(480, 640, 3)
(640, 480, 3)
(426, 640, 3)
(480, 640, 3)
(500, 333, 3)
(640, 518, 3)
(453, 640, 3)
(425, 640, 3)
(500, 375, 3)
(640, 425, 3)
(612, 612, 3)
(480, 640, 3)
total parameters: 201035212
setting learning rate to: 0.00025
training start...
Exception in thread Thread-1:
Traceback (most recent call last):
File "/home/min/anaconda3/envs/CornerNet/lib/python3.6/threading.py", line 916, in _bootstrap_inner
self.run()
File "/home/min/anaconda3/envs/CornerNet/lib/python3.6/threading.py", line 864, in run
self._target(*self._args, **self._kwargs)
File "/home/min/freeman/CornerNet/train.py", line 50, in pin_memory
data = data_queue.get()
File "/home/min/anaconda3/envs/CornerNet/lib/python3.6/multiprocessing/queues.py", line 113, in get
return _ForkingPickler.loads(res)
File "/home/min/anaconda3/envs/CornerNet/lib/python3.6/site-packages/torch/multiprocessing/reductions.py", line 70, in rebuild_storage_fd
fd = df.detach()
File "/home/min/anaconda3/envs/CornerNet/lib/python3.6/multiprocessing/resource_sharer.py", line 57, in detach
with _resource_sharer.get_connection(self._id) as conn:
File "/home/min/anaconda3/envs/CornerNet/lib/python3.6/multiprocessing/resource_sharer.py", line 87, in get_connection
c = Client(address, authkey=process.current_process().authkey)
File "/home/min/anaconda3/envs/CornerNet/lib/python3.6/multiprocessing/connection.py", line 487, in Client
c = SocketClient(address)
File "/home/min/anaconda3/envs/CornerNet/lib/python3.6/multiprocessing/connection.py", line 614, in SocketClient
s.connect(address)
FileNotFoundError: [Errno 2] No such file or directory

(325, 500, 3)
(464, 640, 3)
(480, 640, 3)
(640, 480, 3)
(508, 640, 3)
(480, 640, 3)
(640, 480, 3)
(480, 640, 3)
(439, 640, 3)
(426, 640, 3)
(480, 640, 3)
(640, 427, 3)
(480, 640, 3)
0%| | 0/50000 [00:00<?, ?it/s](480, 640, 3)
(480, 640, 3)
(640, 424, 3)
(480, 640, 3)
(338, 450, 3)
(480, 640, 3)
(427, 640, 3)
(640, 426, 3)
(480, 640, 3)
(500, 375, 3)
(640, 480, 3)
(640, 483, 3)
0%| | 1/50000 [00:11<165:28:05, 11.91s/it]

@heilaw
Copy link
Collaborator

heilaw commented Sep 22, 2018

@scL18 @lufei92 Thanks for your info. From the output you provided, it seems that some of the images does not exist or cannot be read. Can you please check if all image paths are correct?

@scL18
Copy link

scL18 commented Sep 23, 2018

Thanks for your help. The problem has been solved.

@lufei92
Copy link
Author

lufei92 commented Sep 24, 2018

@scL18 which place you have changed?

@lufei92
Copy link
Author

lufei92 commented Sep 25, 2018

@heilaw my images are placed where you required as follow:
1
but the problem dose not solved.

@heilaw
Copy link
Collaborator

heilaw commented Sep 25, 2018

From the output you provided, some images do not exist. Can you check if trainval2014 contains images from both train2014.zip and val2014.zip as we use all images in train2014.zip and 35k images in val2014.zip for training? If this is the case, you can simply copy all images in val2014.zip to trainval2014 and see if the code can run correctly.

@scL18
Copy link

scL18 commented Sep 25, 2018

@lufei92 I changed the annotations of the images. The annotations should be [2014 Train/Val annotations [241MB]. (http://images.cocodataset.org/annotations/annotations_trainval2014.zip)

@lufei92
Copy link
Author

lufei92 commented Sep 25, 2018

@scL18 @heilaw thanks very much, the problem is solved. the image of trainval2014 is not contains images of val2014

@heilaw heilaw mentioned this issue Oct 10, 2018
@heilaw heilaw closed this as completed Oct 10, 2018
@fanzhaowei
Copy link

@heilaw
when i directly using your pretrained model to test some pictures,I run python test.py CornerNet --testiter 500000 --split testing,then got the error:AttributeError: 'NoneType' object has no attribute 'shape',do you know how to solve it?
@lufei92 @scL18 @ywchao @anewell

@heilaw
Copy link
Collaborator

heilaw commented Nov 13, 2018

It seems that the code cannot read your images. You should check if the image paths are correct. (line 74 in test/coco.py)

@jiachen0212
Copy link

i meet the bug:
training start...
0%| | 0/500000 [00:00<?, ?it/s]Segmentation fault

emm.... what's the meaning of Segmentation fault ???

@nuist-xinyu
Copy link

loading all datasets...
using 4 threads
loading from cache file: ./cache/coco_trainval2014.pkl
loading annotations into memory...
Done (t=21.07s)
creating index...
index created!
loading from cache file: ./cache/coco_trainval2014.pkl
loading annotations into memory...
Done (t=15.40s)
creating index...
index created!
loading from cache file: ./cache/coco_trainval2014.pkl
loading annotations into memory...
Done (t=14.72s)
creating index...
index created!
loading from cache file: ./cache/coco_trainval2014.pkl
loading annotations into memory...
Done (t=16.12s)
creating index...
index created!
loading from cache file: ./cache/coco_minival2014.pkl
loading annotations into memory...
Done (t=0.70s)
creating index...
index created!
system config...
{'batch_size': 49,
'cache_dir': './cache',
'chunk_sizes': [4, 5, 5, 5, 5, 5, 5, 5, 5, 5],
'config_dir': './config',
'data_dir': './data',
'data_rng': <mtrand.RandomState object at 0x7f362af22480>,
'dataset': 'MSCOCO',
'decay_rate': 10,
'display': 5,
'learning_rate': 0.00025,
'max_iter': 500000,
'nnet_rng': <mtrand.RandomState object at 0x7f362af224c8>,
'opt_algo': 'adam',
'prefetch_size': 5,
'pretrain': None,
'result_dir': './results',
'sampling_function': 'kp_detection',
'snapshot': 5000,
'snapshot_name': 'CornerNet',
'stepsize': 450000,
'test_split': 'testdev',
'train_split': 'trainval',
'val_iter': 100,
'val_split': 'minival',
'weight_decay': False,
'weight_decay_rate': 1e-05,
'weight_decay_type': 'l2'}
db config...
{'ae_threshold': 0.5,
'border': 128,
'categories': 80,
'data_aug': True,
'gaussian_bump': True,
'gaussian_iou': 0.3,
'gaussian_radius': -1,
'input_size': [511, 511],
'lighting': True,
'max_per_image': 100,
'merge_bbox': False,
'nms_algorithm': 'exp_soft_nms',
'nms_kernel': 3,
'nms_threshold': 0.5,
'output_sizes': [[128, 128]],
'rand_color': True,
'rand_crop': True,
'rand_pushes': False,
'rand_samples': False,
'rand_scale_max': 1.4,
'rand_scale_min': 0.6,
'rand_scale_step': 0.1,
'rand_scales': array([0.6, 0.7, 0.8, 0.9, 1. , 1.1, 1.2, 1.3]),
'special_crop': False,
'test_scales': [1],
'top_k': 100,
'weight_exp': 8}
len of db: 118287
start prefetching data...
shuffling indices...
start prefetching data...
shuffling indices...
start prefetching data...
shuffling indices...
start prefetching data...
shuffling indices...
start prefetching data...
building model...
module_file: models.CornerNet
shuffling indices...
total parameters: 201035212
setting learning rate to: 0.00025
training start...
0%| | 0/500000 [00:00<?, ?it/s]THCudaCheck FAIL file=/opt/conda/conda-bld/pytorch_1525909934016/work/aten/src/THC/generic/THCStorage.cu line=58 error=2 : out of memory
Traceback (most recent call last):
File "train.py", line 195, in
train(training_dbs, validation_db, args.start_iter)
File "train.py", line 137, in train
training_loss = nnet.train(**training)
File "/home/xinyu/CornerNet-master/nnet/py_factory.py", line 81, in train
loss = self.network(xs, ys)
File "/home/xinyu/anaconda3/lib/python3.6/site-packages/torch/nn/modules/module.py", line 491, in call
result = self.forward(*input, **kwargs)
File "/home/xinyu/CornerNet-master/models/py_utils/data_parallel.py", line 68, in forward
return self.module(*inputs[0], **kwargs[0])
File "/home/xinyu/anaconda3/lib/python3.6/site-packages/torch/nn/modules/module.py", line 491, in call
result = self.forward(*input, **kwargs)
File "/home/xinyu/CornerNet-master/nnet/py_factory.py", line 19, in forward
preds = self.model(*xs, **kwargs)
File "/home/xinyu/anaconda3/lib/python3.6/site-packages/torch/nn/modules/module.py", line 491, in call
result = self.forward(*input, **kwargs)
File "/home/xinyu/CornerNet-master/nnet/py_factory.py", line 31, in forward
return self.module(*xs, **kwargs)
File "/home/xinyu/anaconda3/lib/python3.6/site-packages/torch/nn/modules/module.py", line 491, in call
result = self.forward(*input, **kwargs)
File "/home/xinyu/CornerNet-master/models/py_utils/kp.py", line 253, in forward
return self._train(*xs, **kwargs)
File "/home/xinyu/CornerNet-master/models/py_utils/kp.py", line 191, in train
tl_cnv = tl_cnv
(cnv)
File "/home/xinyu/anaconda3/lib/python3.6/site-packages/torch/nn/modules/module.py", line 491, in call
result = self.forward(*input, **kwargs)
File "/home/xinyu/CornerNet-master/models/CornerNet.py", line 32, in forward
pool2 = self.pool2(p2_conv1)
File "/home/xinyu/anaconda3/lib/python3.6/site-packages/torch/nn/modules/module.py", line 491, in call
result = self.forward(*input, **kwargs)
File "/home/xinyu/CornerNet-master/models/py_utils/_cpools/init.py", line 70, in forward
return LeftPoolFunction.apply(x)
File "/home/xinyu/CornerNet-master/models/py_utils/_cpools/init.py", line 37, in forward
output = left_pool.forward(input)[0]
RuntimeError: cuda runtime error (2) : out of memory at /opt/conda/conda-bld/pytorch_1525909934016/work/aten/src/THC/generic/THCStorage.cu:58

hi,excuse me,could you please tell me how to solve it?

@f5556666
Copy link

f5556666 commented Jun 4, 2019

loading all datasets...
using 4 threads
loading from cache file: ./cache/coco_trainval2014.pkl
loading annotations into memory...
Done (t=21.07s)
creating index...
index created!
loading from cache file: ./cache/coco_trainval2014.pkl
loading annotations into memory...
Done (t=15.40s)
creating index...
index created!
loading from cache file: ./cache/coco_trainval2014.pkl
loading annotations into memory...
Done (t=14.72s)
creating index...
index created!
loading from cache file: ./cache/coco_trainval2014.pkl
loading annotations into memory...
Done (t=16.12s)
creating index...
index created!
loading from cache file: ./cache/coco_minival2014.pkl
loading annotations into memory...
Done (t=0.70s)
creating index...
index created!
system config...
{'batch_size': 49,
'cache_dir': './cache',
'chunk_sizes': [4, 5, 5, 5, 5, 5, 5, 5, 5, 5],
'config_dir': './config',
'data_dir': './data',
'data_rng': <mtrand.RandomState object at 0x7f362af22480>,
'dataset': 'MSCOCO',
'decay_rate': 10,
'display': 5,
'learning_rate': 0.00025,
'max_iter': 500000,
'nnet_rng': <mtrand.RandomState object at 0x7f362af224c8>,
'opt_algo': 'adam',
'prefetch_size': 5,
'pretrain': None,
'result_dir': './results',
'sampling_function': 'kp_detection',
'snapshot': 5000,
'snapshot_name': 'CornerNet',
'stepsize': 450000,
'test_split': 'testdev',
'train_split': 'trainval',
'val_iter': 100,
'val_split': 'minival',
'weight_decay': False,
'weight_decay_rate': 1e-05,
'weight_decay_type': 'l2'}
db config...
{'ae_threshold': 0.5,
'border': 128,
'categories': 80,
'data_aug': True,
'gaussian_bump': True,
'gaussian_iou': 0.3,
'gaussian_radius': -1,
'input_size': [511, 511],
'lighting': True,
'max_per_image': 100,
'merge_bbox': False,
'nms_algorithm': 'exp_soft_nms',
'nms_kernel': 3,
'nms_threshold': 0.5,
'output_sizes': [[128, 128]],
'rand_color': True,
'rand_crop': True,
'rand_pushes': False,
'rand_samples': False,
'rand_scale_max': 1.4,
'rand_scale_min': 0.6,
'rand_scale_step': 0.1,
'rand_scales': array([0.6, 0.7, 0.8, 0.9, 1. , 1.1, 1.2, 1.3]),
'special_crop': False,
'test_scales': [1],
'top_k': 100,
'weight_exp': 8}
len of db: 118287
start prefetching data...
shuffling indices...
start prefetching data...
shuffling indices...
start prefetching data...
shuffling indices...
start prefetching data...
shuffling indices...
start prefetching data...
building model...
module_file: models.CornerNet
shuffling indices...
total parameters: 201035212
setting learning rate to: 0.00025
training start...
0%| | 0/500000 [00:00<?, ?it/s]THCudaCheck FAIL file=/opt/conda/conda-bld/pytorch_1525909934016/work/aten/src/THC/generic/THCStorage.cu line=58 error=2 : out of memory
Traceback (most recent call last):
File "train.py", line 195, in
train(training_dbs, validation_db, args.start_iter)
File "train.py", line 137, in train
training_loss = nnet.train(**training)
File "/home/xinyu/CornerNet-master/nnet/py_factory.py", line 81, in train
loss = self.network(xs, ys)
File "/home/xinyu/anaconda3/lib/python3.6/site-packages/torch/nn/modules/module.py", line 491, in call
result = self.forward(*input, **kwargs)
File "/home/xinyu/CornerNet-master/models/py_utils/data_parallel.py", line 68, in forward
return self.module(*inputs[0], **kwargs[0])
File "/home/xinyu/anaconda3/lib/python3.6/site-packages/torch/nn/modules/module.py", line 491, in call
result = self.forward(*input, **kwargs)
File "/home/xinyu/CornerNet-master/nnet/py_factory.py", line 19, in forward
preds = self.model(*xs, **kwargs)
File "/home/xinyu/anaconda3/lib/python3.6/site-packages/torch/nn/modules/module.py", line 491, in call
result = self.forward(*input, **kwargs)
File "/home/xinyu/CornerNet-master/nnet/py_factory.py", line 31, in forward
return self.module(*xs, **kwargs)
File "/home/xinyu/anaconda3/lib/python3.6/site-packages/torch/nn/modules/module.py", line 491, in call
result = self.forward(*input, **kwargs)
File "/home/xinyu/CornerNet-master/models/py_utils/kp.py", line 253, in forward
return self._train(*xs, **kwargs)
File "/home/xinyu/CornerNet-master/models/py_utils/kp.py", line 191, in train tl_cnv = tl_cnv(cnv)
File "/home/xinyu/anaconda3/lib/python3.6/site-packages/torch/nn/modules/module.py", line 491, in call
result = self.forward(*input, **kwargs)
File "/home/xinyu/CornerNet-master/models/CornerNet.py", line 32, in forward
pool2 = self.pool2(p2_conv1)
File "/home/xinyu/anaconda3/lib/python3.6/site-packages/torch/nn/modules/module.py", line 491, in call
result = self.forward(*input, **kwargs)
File "/home/xinyu/CornerNet-master/models/py_utils/_cpools/init.py", line 70, in forward
return LeftPoolFunction.apply(x)
File "/home/xinyu/CornerNet-master/models/py_utils/_cpools/init.py", line 37, in forward
output = left_pool.forward(input)[0]
RuntimeError: cuda runtime error (2) : out of memory at /opt/conda/conda-bld/pytorch_1525909934016/work/aten/src/THC/generic/THCStorage.cu:58

hi,excuse me,could you please tell me how to solve it?

I know your problem, it's your GPU insufficient operating space,you can change the chunk_sizes and batch_size in /config/CornerNet.json

@Kangzf1996
Copy link

i meet the bug:
training start...
0%| | 0/500000 [00:00<?, ?it/s]Segmentation fault

emm.... what's the meaning of Segmentation fault ???

Hi, have you solved this error? Thank you!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

8 participants