Commit 3d1f1135 authored by Hongkun Yu's avatar Hongkun Yu Committed by A. Unique TensorFlower
Browse files

Add comments to explain why we use model.call.

PiperOrigin-RevId: 371837967
parent f8ab042a
...@@ -120,6 +120,9 @@ class DetectionModule(export_base.ExportModule): ...@@ -120,6 +120,9 @@ class DetectionModule(export_base.ExportModule):
input_image_shape = image_info[:, 1, :] input_image_shape = image_info[:, 1, :]
# To overcome keras.Model extra limitation to save a model with layers that
# have multiple inputs, we use `model.call` here to trigger the forward
# path. Note that, this disables some keras magics happens in `__call__`.
detections = self.model.call( detections = self.model.call(
images=images, images=images,
image_shape=input_image_shape, image_shape=input_image_shape,
......
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