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
4b5560cd
Commit
4b5560cd
authored
Nov 11, 2021
by
Hongkun Yu
Committed by
A. Unique TensorFlower
Nov 11, 2021
Browse files
Internal change
PiperOrigin-RevId: 409275976
parent
4f8426b1
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
3 additions
and
2 deletions
+3
-2
official/core/export_base.py
official/core/export_base.py
+3
-2
No files found.
official/core/export_base.py
View file @
4b5560cd
...
@@ -28,8 +28,9 @@ class ExportModule(tf.Module, metaclass=abc.ABCMeta):
...
@@ -28,8 +28,9 @@ class ExportModule(tf.Module, metaclass=abc.ABCMeta):
def
__init__
(
self
,
def
__init__
(
self
,
params
,
params
,
model
:
Union
[
tf
.
Module
,
tf
.
keras
.
Model
],
model
:
Union
[
tf
.
Module
,
tf
.
keras
.
Model
],
preprocessor
:
Optional
[
Callable
[...,
Any
]]
=
None
,
inference_step
:
Optional
[
Callable
[...,
Any
]]
=
None
,
inference_step
:
Optional
[
Callable
[...,
Any
]]
=
None
,
*
,
preprocessor
:
Optional
[
Callable
[...,
Any
]]
=
None
,
postprocessor
:
Optional
[
Callable
[...,
Any
]]
=
None
):
postprocessor
:
Optional
[
Callable
[...,
Any
]]
=
None
):
"""Instantiates an ExportModel.
"""Instantiates an ExportModel.
...
@@ -51,10 +52,10 @@ class ExportModule(tf.Module, metaclass=abc.ABCMeta):
...
@@ -51,10 +52,10 @@ class ExportModule(tf.Module, metaclass=abc.ABCMeta):
Args:
Args:
params: A dataclass for parameters to the module.
params: A dataclass for parameters to the module.
model: A model instance which contains weights and forward computation.
model: A model instance which contains weights and forward computation.
preprocessor: An optional callable to preprocess the inputs.
inference_step: An optional callable to forward-pass the model. If not
inference_step: An optional callable to forward-pass the model. If not
specified, it creates a parital function with `model` as an required
specified, it creates a parital function with `model` as an required
kwarg.
kwarg.
preprocessor: An optional callable to preprocess the inputs.
postprocessor: An optional callable to postprocess the model outputs.
postprocessor: An optional callable to postprocess the model outputs.
"""
"""
super
().
__init__
(
name
=
None
)
super
().
__init__
(
name
=
None
)
...
...
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