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

Transition model creation to tf.estimator.Estimator #3

Open
yweweler opened this issue Nov 16, 2018 · 1 comment
Open

Transition model creation to tf.estimator.Estimator #3

yweweler opened this issue Nov 16, 2018 · 1 comment
Labels
enhancement New feature or request

Comments

@yweweler
Copy link
Owner

Instead of relying on the manual creation and implementation of training, evaluation and prediction we should rewrite the code to build the model using an Estimator.
This should substantially reduce the effort necessary to export, serve, optimize, train, evaluate and predict using the architecture. As a side effect the codebase required can also be minimized.

@yweweler yweweler added the enhancement New feature or request label Nov 16, 2018
@yweweler yweweler changed the title Transition model creating to tf.estimator.Estimator Transition model creation to tf.estimator.Estimator Nov 16, 2018
yweweler added a commit that referenced this issue Nov 17, 2018
WIP (#3)

* The model_fn is not finished yet.
* The model_fn is still stateful, as it saves the input placeholders and all intermediate tensors and summaries in the Model object. This state should be removed to enable reuse of a created model. Otherwise multiple calls to the model_fn will corrupt the internal state.
* Both the inference and the evaluate code are broken in the current state.
* The model_fn does not return EstimatorSpecs right now. Before this is possible, I have to move the gradient clipping and the batch normalization code from `train.py` into the model_fn.
yweweler added a commit that referenced this issue Nov 17, 2018
yweweler added a commit that referenced this issue Nov 30, 2018
WIP (#3)

* The NanTensorHook is still missing.
yweweler added a commit that referenced this issue Nov 30, 2018
yweweler added a commit that referenced this issue Nov 30, 2018
WIP (#3)
* Add todos.
* Remove unused code.
* Writing of the summaries does not work currently.
* Evaluation is extremely slow for some reason.
yweweler added a commit that referenced this issue Nov 30, 2018
WIP (#3)

* Training summaries are now written during training.
* Removed training_summary from the Model constructor.
yweweler added a commit that referenced this issue Nov 30, 2018
WIP (#3)

* Remove the unnecessary write summary flag from the model constructor.
* NanTensorHook is now attached in the model fn via the EstimatorSpec object (only for training)
yweweler added a commit that referenced this issue Nov 30, 2018
yweweler added a commit that referenced this issue Nov 30, 2018
WIP (#3)

* The correct checkpoints are now loaded for evaluation.
* Evaluation summaries are now written.
* For some reason the mean loss is wrong however.
* The evaluation metrics still pollute tensorboard.
yweweler added a commit that referenced this issue Nov 30, 2018
WIP (#3)

* The wrong summary was used in the eval metrics.
yweweler added a commit that referenced this issue Nov 30, 2018
WIP (#3)

* The estimator adds a NanTensorHook itself.
yweweler added a commit that referenced this issue Nov 30, 2018
WIP (#3)

* The estimator has an hardcoded 'loss' summary. In case the is no loss summary with exactly this name, or there is a scope with this name, the estimator will create a new duplicate summary or will alter the scope name.
yweweler added a commit that referenced this issue Nov 30, 2018
yweweler added a commit that referenced this issue Nov 30, 2018
yweweler added a commit that referenced this issue Nov 30, 2018
WIP (#3)

* Implement dataset loading for the inference/predict code.
* Rewrite the model for prediction using the estimator.
* Rewrite the inference code to use the estimator.
yweweler added a commit that referenced this issue Nov 30, 2018
WIP (#3)

* Inference does now wotk with the estimator API.
* Pre-processing and multi-threading are currently a bit hacky.
yweweler added a commit that referenced this issue Nov 30, 2018
yweweler added a commit that referenced this issue Nov 30, 2018
yweweler added a commit that referenced this issue Nov 30, 2018
yweweler added a commit that referenced this issue Nov 30, 2018
yweweler added a commit that referenced this issue Nov 30, 2018
@yweweler
Copy link
Owner Author

yweweler commented Dec 8, 2018

Fixed by #6

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

No branches or pull requests

1 participant