Commit 757d77c2 authored by Peizhao Zhang's avatar Peizhao Zhang Committed by Facebook Github Bot

Added a script to convert pkl model to pb.

Summary:
Added a script to convert pkl model to pb.
- Supported Faster R-CNN detection model.
- Supported converting to CPU and GPU model.
- Fused AffineChannel to Conv.
- Verified model after conversion.

Reviewed By: rbgirshick

Differential Revision: D6783633

fbshipit-source-id: 19706d3074a4a784a2161a695d7c534e014ebb3f
parent dd6c6615
......@@ -128,9 +128,10 @@ class DetectionModelHelper(cnn.CNNModelHelper):
(extracted from rpn_cls_probs; see above).
"""
name = 'GenerateProposalsOp:' + ','.join([str(b) for b in blobs_in])
# spatial_scale passed to the Python op is only used in convert_pkl_to_pb
self.net.Python(
GenerateProposalsOp(anchors, spatial_scale, self.train).forward
)(blobs_in, blobs_out, name=name)
)(blobs_in, blobs_out, name=name, spatial_scale=spatial_scale)
return blobs_out
def GenerateProposalLabels(self, blobs_in):
......
This diff is collapsed.
This diff is collapsed.
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment