Merge pull request #42718 from ongun-kanat:master

PiperOrigin-RevId: 329411358
Change-Id: Ieea39bf3aac5c9f29905063a2daba8b036fe5440
This commit is contained in:
TensorFlower Gardener 2020-08-31 17:48:07 -07:00
commit 26e7727914

View File

@ -534,7 +534,7 @@ class SavedModelBuilder(_SavedModelBuilder):
# legacy_init_op is deprecated, and going away in TF 2.0.
# Re-mapping to main_op, as treatment is identical regardless.
main_op = main_op or legacy_init_op
main_op = main_op if main_op is not None else legacy_init_op
# Add assets and ops
self._add_collections(assets_collection, main_op, None)