Last active
December 27, 2017 20:52
-
-
Save hereismari/58d7dd0f75bd6e8602ed22120e560b38 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| import tensorflow as tf | |
| def model_fn(features, labels, mode): | |
| # Deve conter os seguintes passos: | |
| # 1. Definir o modelo via TF | |
| # 2. Definir como gerar predições | |
| # 3. Definir a loss function para treino e avaliação | |
| # 4. Definir como otimizar o modelo (optimizer) | |
| # 5. Definir métricas para avaliação | |
| # 6. Retornar um EstimatorSpec definindo os passos acima | |
| return tf.estimator.EstimatorSpec(mode, predictions, loss, train_op, eval_metric_ops) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment