Unverified Commit e2b8e1dd authored by vedanshu's avatar vedanshu Committed by GitHub
Browse files

Update export_saved_model.py

export_module is passed directly to export_inference_graph.
parent 10dbe408
...@@ -39,7 +39,8 @@ from absl import flags ...@@ -39,7 +39,8 @@ from absl import flags
from official.vision.beta.projects.deepmac_maskrcnn.tasks import deep_mask_head_rcnn from official.vision.beta.projects.deepmac_maskrcnn.tasks import deep_mask_head_rcnn
from official.core import exp_factory from official.core import exp_factory
from official.modeling import hyperparams from official.modeling import hyperparams
from official.vision.beta.projects.deepmac_maskrcnn.serving import export_saved_model_lib from official.vision.beta.serving import export_saved_model_lib
from official.vision.beta.projects.deepmac_maskrcnn.serving import detection
FLAGS = flags.FLAGS FLAGS = flags.FLAGS
...@@ -84,6 +85,12 @@ def main(_): ...@@ -84,6 +85,12 @@ def main(_):
params.validate() params.validate()
params.lock() params.lock()
export_module = detection.DetectionModule(
params=params,
batch_size=FLAGS.batch_size,
input_image_size=[int(x) for x in FLAGS.input_image_size.split(',')],
num_channels=3)
export_saved_model_lib.export_inference_graph( export_saved_model_lib.export_inference_graph(
input_type=FLAGS.input_type, input_type=FLAGS.input_type,
...@@ -92,9 +99,10 @@ def main(_): ...@@ -92,9 +99,10 @@ def main(_):
params=params, params=params,
checkpoint_path=FLAGS.checkpoint_path, checkpoint_path=FLAGS.checkpoint_path,
export_dir=FLAGS.export_dir, export_dir=FLAGS.export_dir,
export_module=export_module,
export_checkpoint_subdir='checkpoint', export_checkpoint_subdir='checkpoint',
export_saved_model_subdir='saved_model') export_saved_model_subdir='saved_model')
if __name__ == '__main__': if __name__ == '__main__':
app.run(main) app.run(main)
\ No newline at end of file
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