Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
ModelZoo
ResNet50_tensorflow
Commits
3d1f1135
Commit
3d1f1135
authored
May 03, 2021
by
Hongkun Yu
Committed by
A. Unique TensorFlower
May 03, 2021
Browse files
Add comments to explain why we use model.call.
PiperOrigin-RevId: 371837967
parent
f8ab042a
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
3 additions
and
0 deletions
+3
-0
official/vision/beta/serving/detection.py
official/vision/beta/serving/detection.py
+3
-0
No files found.
official/vision/beta/serving/detection.py
View file @
3d1f1135
...
@@ -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
,
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment