Skip to content

use caffe2_converter.py change the model to caffe2  #18

@XUDINGYI312

Description

@XUDINGYI312

the error is :

File "F:\BMaskR-CNN\projects\BMaskR-CNN\bmaskrcnn\mask_head.py", line 278, in forward
mask_rcnn_inference(mask_logits, instances)
File "f:\bmaskr-cnn\detectron2\modeling\roi_heads\mask_head.py", line 146, in mask_rcnn_inference
mask_probs_pred = pred_mask_logits[indices, class_pred][:, None].sigmoid()
IndexError: tensors used as indices must be long, byte or bool tensors

than change the mask_head.py ;
def mask_rcnn_inference(pred_mask_logits, pred_instances):
class_pred = cat([i.pred_classes for i in pred_instances]).type(torch.long)

the error is :
return cm_exit(cm, *exc_details)
File "D:\Anaconda3\envs\NBMASK\lib\contextlib.py", line 88, in exit
next(self.gen)
File "f:\bmaskr-cnn\detectron2\export\patcher.py", line 101, in mock_mask_rcnn_inference
assert mocked_func.call_count > 0
AssertionError

I want to know how to change myself model to caffe2 model.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions