Слияние кода завершено, страница обновится автоматически
Добрый день! После загрузки данных при обучении PNet возникает следующая ошибка. Судя по всему, проблема в несоответствии типов, но я не могу понять, где именно. Можете помочь?
Вот сообщение об ошибке:
Traceback (most recent call last):
File "dface/train_net/train_p_net.py", line 50, in <module>
end_epoch=args.end_epoch, frequent=args.frequent, lr=args.lr, batch_size=args.batch_size, use_cuda=args.use_cuda)
File "dface/train_net/train_p_net.py", line 18, in train_net
train_pnet(model_store_path=model_store_path, end_epoch=end_epoch, imdb=gt_imdb, batch_size=batch_size, frequent=frequent, base_lr=lr, use_cuda=use_cuda)
File "/home/eric/dface/dface/train_net/train.py", line 73, in train_pnet
box_offset_loss = lossfn.box_loss(gt_label,gt_bbox,box_offset_pred)
File "/home/eric/dface/dface/core/models.py", line 46, in box_loss
valid_gt_offset = gt_offset[chose_index,:]
File "/usr/local/lib/python2.7/dist-packages/torch/autograd/variable.py", line 69, in __getitem__
return Index(key)(self)
File "/usr/local/lib/python2.7/dist-packages/torch/autograd/_functions/tensor.py", line 16, in forward
result = i.index(self.index)
TypeError: indexing a tensor with an object of type LongTensor. The only supported types are integers, slices, numpy scalars and torch.cuda.LongTensor or torch.cuda.ByteTensor as the only argument.