Skip to content

Getting an error while evaluating pretrained models #1195

@mehulshankhapal2000

Description

@mehulshankhapal2000

DLL 2022-09-01 18:12:47.545736 - PARAMETER dataset path : ./coco epochs : 65 batch size : 32 eval batch size : 32 no cuda : False seed : None checkpoint path : ./models/epoch_*.pt mode : evaluation eval on epochs : [21, 31, 37, 42, 48, 53, 59, 64] lr decay epochs : [43, 54] learning rate : 0.0026 momentum : 0.9 weight decay : 0.0005 lr warmup : None backbone : resnet50 backbone path : None num workers : 4 AMP : False precision : fp32
Using seed = 5073
loading annotations into memory...
Done (t=0.46s)
creating index...
index created!
/data4/home/mehuls/Project/DeepLearningExamples/PyTorch/Detection/SSD/ssd/coco_pipeline.py:248: Warning: Calling '.dtype()' is deprecated, please use '.dtype' instead
images_torch_type = to_torch_type[np.dtype(images[0].dtype())]
/data4/home/mehuls/Project/DeepLearningExamples/PyTorch/Detection/SSD/ssd/coco_pipeline.py:249: Warning: Calling '.dtype()' is deprecated, please use '.dtype' instead
bboxes_torch_type = to_torch_type[np.dtype(bboxes[0][0].dtype())]
/data4/home/mehuls/Project/DeepLearningExamples/PyTorch/Detection/SSD/ssd/coco_pipeline.py:250: Warning: Calling '.dtype()' is deprecated, please use '.dtype' instead
labels_torch_type = to_torch_type[np.dtype(labels[0][0].dtype())]
Provided checkpoint is not path to a file

### This was the output when I tried evaluating. Also I replace .dtype() with .dtype and it showed me following error.

DLL 2022-09-01 18:16:30.168690 - PARAMETER dataset path : ./coco epochs : 65 batch size : 32 eval batch size : 32 no cuda : False seed : None checkpoint path : ./models/epoch_*.pt mode : evaluation eval on epochs : [21, 31, 37, 42, 48, 53, 59, 64] lr decay epochs : [43, 54] learning rate : 0.0026 momentum : 0.9 weight decay : 0.0005 lr warmup : None backbone : resnet50 backbone path : None num workers : 4 AMP : False precision : fp32
Using seed = 396
loading annotations into memory...
Done (t=0.43s)
creating index...
index created!
Traceback (most recent call last):
File "./main.py", line 286, in
train(train_loop_func, logger, args)
File "./main.py", line 148, in train
train_loader = get_train_loader(args, args.seed - 2**31)
File "/data4/home/mehuls/Project/DeepLearningExamples/PyTorch/Detection/SSD/ssd/data.py", line 42, in get_train_loader
train_loader = DALICOCOIterator(train_pipe, 118287 / args.N_gpu)
File "/data4/home/mehuls/Project/DeepLearningExamples/PyTorch/Detection/SSD/ssd/coco_pipeline.py", line 190, in init
self._first_batch = self.next()
File "/data4/home/mehuls/Project/DeepLearningExamples/PyTorch/Detection/SSD/ssd/coco_pipeline.py", line 297, in next
return self.next();
File "/data4/home/mehuls/Project/DeepLearningExamples/PyTorch/Detection/SSD/ssd/coco_pipeline.py", line 245, in next
images_torch_type = to_torch_type[np.dtype(images[0].dtype)]
TypeError: Cannot interpret '<DALIDataType.FLOAT: 9>' as a data type

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions