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
20cc2190
Unverified
Commit
20cc2190
authored
Aug 24, 2022
by
pyoung2778
Committed by
GitHub
Aug 24, 2022
Browse files
Check in seq_flow_lite (#10750)
parent
fdecf385
Changes
62
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
7 additions
and
4 deletions
+7
-4
research/seq_flow_lite/utils/misc_utils.py
research/seq_flow_lite/utils/misc_utils.py
+0
-1
research/seq_flow_lite/utils/tflite_utils.py
research/seq_flow_lite/utils/tflite_utils.py
+7
-3
No files found.
research/seq_flow_lite/utils/misc_utils.py
View file @
20cc2190
...
@@ -12,7 +12,6 @@
...
@@ -12,7 +12,6 @@
# See the License for the specific language governing permissions and
# See the License for the specific language governing permissions and
# limitations under the License.
# limitations under the License.
# ==============================================================================
# ==============================================================================
# Lint as: python3
"""A module for miscelaneous utils."""
"""A module for miscelaneous utils."""
import
tensorflow
as
tf
import
tensorflow
as
tf
...
...
research/seq_flow_lite/utils/tflite_utils.py
View file @
20cc2190
...
@@ -12,7 +12,6 @@
...
@@ -12,7 +12,6 @@
# See the License for the specific language governing permissions and
# See the License for the specific language governing permissions and
# limitations under the License.
# limitations under the License.
# ==============================================================================
# ==============================================================================
# Lint as: python3
"""Utils to convert to a TFLite model."""
"""Utils to convert to a TFLite model."""
import
tensorflow.compat.v1
as
tf
import
tensorflow.compat.v1
as
tf
...
@@ -65,9 +64,14 @@ def get_mean_stddev_values(min_value_of_features, max_value_of_features):
...
@@ -65,9 +64,14 @@ def get_mean_stddev_values(min_value_of_features, max_value_of_features):
class
InterpreterWithCustomOps
(
tf
.
lite
.
Interpreter
):
class
InterpreterWithCustomOps
(
tf
.
lite
.
Interpreter
):
"""Extended tf.lite.Interpreter."""
"""Extended tf.lite.Interpreter."""
def
__init__
(
self
,
model_content
,
custom_op_registerers
=
None
):
def
__init__
(
self
,
model_content
,
custom_op_registerers
=
None
,
experimental_preserve_all_tensors
=
False
):
self
.
_custom_op_registerers
=
custom_op_registerers
or
[]
self
.
_custom_op_registerers
=
custom_op_registerers
or
[]
super
(
InterpreterWithCustomOps
,
self
).
__init__
(
model_content
=
model_content
)
super
(
InterpreterWithCustomOps
,
self
).
__init__
(
model_content
=
model_content
,
experimental_preserve_all_tensors
=
experimental_preserve_all_tensors
)
def
op_details
(
self
):
def
op_details
(
self
):
op_details
=
{}
op_details
=
{}
...
...
Prev
1
2
3
4
Next
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