Skip to content

Estimator from Keras by model_to_estimator cannot export #14284

Closed

Description

@yjmade

System information

  • Have I written custom code (as opposed to using a stock example script provided in TensorFlow): No
  • OS Platform and Distribution (e.g., Linux Ubuntu 16.04): macOS 10.12
  • TensorFlow installed from (source or binary): Source
  • TensorFlow version (use command below): 1.4 or Master

Describe the problem

when calling model_to_estimator, the model_fn create by _create_keras_model_fn didn't set export_outputs in the returned EstimatorSpec, see this. That make it unable to export to SavedModel, the following error raised when call estimator.export_savedmodel()

packages/tensorflow/python/estimator/export/export.py", line 193, in build_all_signature_defs
    raise ValueError('export_outputs must be a dict.')
ValueError: export_outputs must be a dict.

I would like contrib a PR for fixing this if is OK

Activity

  1. added
    stat:awaiting tensorflower
    on Nov 6, 2017
  2. bignamehyp commented on Nov 6, 2017

    @bignamehyp

    @yifeif , can you please take a look at this issue? Thanks,

  3. yifeif commented on Nov 6, 2017

    @yifeif
    Contributor

    Thanks @yjmade. A PR is more than welcomed! Feel free to request a review from me whenever you have it ready. cc: @fchollet.

  4. added a commit that references this issue on Nov 30, 2017
  5. yjmade commented on Dec 1, 2017

    @yjmade
    ContributorAuthor

    PR Merged, close now

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    stat:awaiting tensorflower

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions