Skip to content

Commit 149c44c

Browse files
committed
Add support for Keras resnet50 pretrained model testing.
1 parent f720b64 commit 149c44c

File tree

2 files changed

+2
-1
lines changed

2 files changed

+2
-1
lines changed

ci_build/azure_pipelines/pretrained_model_test.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ jobs:
2020
- template: 'templates/job_generator.yml'
2121
parameters:
2222
platforms: ['windows']
23-
tf_versions: ['1.14.0', '2.1.0']
23+
tf_versions: ['1.14.0']
2424
job:
2525
steps:
2626
- template: 'pretrained_model_test.yml'

tf2onnx/tf_loader.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -260,6 +260,7 @@ def from_keras(model_path, input_names, output_names):
260260
# Handles Keras when Eager mode is enabled.
261261
custom_objects = None
262262
if context.executing_eagerly():
263+
_keras.backend.clear_session()
263264
_keras.backend.set_learning_phase(False)
264265
keras_model = _keras.models.load_model(model_path, custom_objects)
265266

0 commit comments

Comments
 (0)