-
Notifications
You must be signed in to change notification settings - Fork 7.8k
Closed
Description
I used Detectron2 to train a custom object detection model using faster_rcnn_R_50_C4_3x
. While I am trying to save the trained model using torch.save
or dump in using pickle
, I am getting the following error:
AttributeError Traceback (most recent call last)
<ipython-input-17-e3c685b650c8> in <module>()
2
3 filehandler = open("hand_detection_faster_rcnn_R_50_C4_3x.pb.pkl", "wb")
----> 4 pickle.dump(predictor, filehandler)
5 filehandler.close()
AttributeError: Can't pickle local object 'GeneralizedRCNN.__init__.<locals>.<lambda>'
How should I save the detectron2 predictor as a pytorch model for inference?
Metadata
Metadata
Assignees
Labels
No labels