Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Saving model fails #28

Open
DrewParallel opened this issue Nov 15, 2018 · 3 comments
Open

Saving model fails #28

DrewParallel opened this issue Nov 15, 2018 · 3 comments

Comments

@DrewParallel
Copy link

Since the example code did not actually save the model, I added the code below to do so. However, it fails with "TypeError: Value passed to parameter 'dense_defaults' has DataType float64 not in list of allowed values: float32, int64, string". The available "allowed values" for x_in fail with various other issues. How does one actually save the model to SavedModel format?

x_in = tf.feature_column.numeric_column(FEATURES_KEY, dtype=tf.float64)
feature_columns = [x_in]
feature_spec = tf.feature_column.make_parse_example_spec(feature_columns)
export_input_fn = tf.estimator.export.build_parsing_serving_input_receiver_fn(feature_spec)

print("Exporting model")
estimator.export_saved_model(export_dir, export_input_fn)
@cweill
Copy link
Contributor

cweill commented Nov 15, 2018

looks like the problem is your numeric_column has dtype tf.float64. Does it work if you change it to tf.float32?

@DrewParallel
Copy link
Author

DrewParallel commented Nov 15, 2018

I tried all the listed types. Using tf.float32 gives the error:
ValueError: Input 0 of node wrapped_x_4 was passed float from wrapped_x:0 incompatible with expected double.

@cweill
Copy link
Contributor

cweill commented Dec 21, 2018

Try upgrading to adanet=0.5.0 and training from scratch with a new model_dir. Let me know if that works.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants