/external/tensorflow/tensorflow/examples/get_started/regression/ |
custom_regression.py | 59 if mode == tf.estimator.ModeKeys.TRAIN: 60 optimizer = params.get("optimizer", tf.train.AdamOptimizer) 63 loss=average_loss, global_step=tf.train.get_global_step()) 87 (train, test) = imports85.dataset() 93 train = train.map(normalize_price) 101 train.shuffle(1000).batch(128) 141 "optimizer": tf.train.AdamOptimizer, 145 # Train the model. 146 model.train(input_fn=input_train, steps=STEPS [all...] |
/external/tensorflow/tensorflow/examples/learn/ |
iris_custom_decay_dnn.py | 53 if mode == tf.estimator.ModeKeys.TRAIN: 54 global_step = tf.train.get_global_step() 55 learning_rate = tf.train.exponential_decay( 58 optimizer = tf.train.AdagradOptimizer(learning_rate=learning_rate) 78 # Train. 81 classifier.train(input_fn=train_input_fn, steps=1000)
|
iris_custom_model.py | 54 if mode == tf.estimator.ModeKeys.TRAIN: 55 optimizer = tf.train.AdagradOptimizer(learning_rate=0.1) 56 train_op = optimizer.minimize(loss, global_step=tf.train.get_global_step()) 75 # Train. 78 classifier.train(input_fn=train_input_fn, steps=1000)
|
/external/tensorflow/tensorflow/python/tpu/ |
tpu_context.py | 176 This immutable object holds TPUEstimator config, train/eval batch size, and 397 return (mode == model_fn_lib.ModeKeys.TRAIN and 411 (mode != model_fn_lib.ModeKeys.TRAIN and 459 if mode == model_fn_lib.ModeKeys.TRAIN: 634 if mode == model_fn_lib.ModeKeys.TRAIN: 638 'train batch size {} must be divisible by number of replicas {}'
|
/external/tensorflow/tensorflow/contrib/gan/python/estimator/python/ |
gan_estimator_impl.py | 26 from tensorflow.contrib.gan.python import train as tfgan_train 63 different train and evaluation behavior. 71 # See TF-GAN's `train.py` for a description of the generator and 88 generator_optimizer=tf.train.AdamOptimizer(0.1, 0.5), 89 discriminator_optimizer=tf.train.AdamOptimizer(0.1, 0.5)) 91 # Train estimator. 92 gan_estimator.train(train_input_fn, steps) 128 in (ex TRAIN, EVAL, PREDICT). This is useful for things like batch 147 train ops, and can be used to implement the GAN training scheme. 148 Defaults to `train.get_sequential_train_hooks()` [all...] |
stargan_estimator_impl.py | 26 from tensorflow.contrib.gan.python import train as tfgan_train 58 different train and evaluation behavior. 66 # See TFGAN's `train.py` for a description of the generator and 82 generator_optimizer=tf.train.AdamOptimizer(0.1, 0.5), 83 discriminator_optimizer=tf.train.AdamOptimizer(0.1, 0.5)) 85 # Train estimator. 86 stargan_estimator.train(train_input_fn, steps) 119 in (ex TRAIN, EVAL, PREDICT). This is useful for things like batch 136 train ops, and can be used to implement the GAN training scheme. 137 Defaults to `train.get_sequential_train_hooks()` [all...] |
/external/tensorflow/tensorflow/python/keras/ |
callbacks.py | 60 mode=ModeKeys.TRAIN): 68 epochs: Number of epoch to train. 73 mode: String. One of ModeKeys.TRAIN, ModeKeys.TEST, or ModeKeys.PREDICT. 87 if mode == ModeKeys.TRAIN: 121 mode=ModeKeys.TRAIN): 129 epochs: Number of epoch to train. 133 mode: String. One of ModeKeys.TRAIN, ModeKeys.TEST, or ModeKeys.PREDICT. 168 if mode in {ModeKeys.TRAIN, ModeKeys.TEST}: 239 """Helper function for on_{train|test|predict}_begin methods.""" 240 if mode == ModeKeys.TRAIN [all...] |
/external/tensorflow/tensorflow/contrib/timeseries/python/timeseries/state_space_models/ |
state_space_model_test.py | 97 mode=estimator_lib.ModeKeys.TRAIN) 115 mode=estimator_lib.ModeKeys.TRAIN) 187 estimator.train(combined_input_fn, steps=1) 319 mode=estimator_lib.ModeKeys.TRAIN) 573 mode=estimator_lib.ModeKeys.TRAIN) 645 estimator.train(input_fn=input_fn, max_steps=1) 669 estimator.train(input_fn=train_input_fn, max_steps=1) 732 estimator.train(input_fn=train_input_fn, steps=1) 748 mode=estimator_lib.ModeKeys.TRAIN)
|
/external/tensorflow/tensorflow/python/keras/engine/ |
training_distributed.py | 72 batch_size, mode=ModeKeys.TRAIN)) 205 mode: One of ModeKeys.TRAIN/ModeKeys.TEST/ModeKeys.PREDICT. 308 mode = ModeKeys.TRAIN 326 step_fn = _make_step_fn(model, ModeKeys.TRAIN, current_strategy, out_labels) 427 model, ModeKeys.TRAIN) 449 model, ModeKeys.TRAIN)
|
/external/tensorflow/tensorflow/contrib/learn/python/learn/estimators/ |
estimator_input_test.py | 111 assert mode in (model_fn.ModeKeys.TRAIN, model_fn.ModeKeys.EVAL, 125 assert mode in (model_fn.ModeKeys.TRAIN, model_fn.ModeKeys.EVAL, 140 assert mode in (model_fn.ModeKeys.TRAIN, model_fn.ModeKeys.EVAL,
|
state_saving_rnn_estimator_test.py | 244 mode = model_fn_lib.ModeKeys.TRAIN 326 """Helper for testGetRnnModelFn{Train,Eval,Infer}().""" 353 # testGetRnnModelFn{Train,Eval,Infer}() test which fields 356 model_fn_ops = self._getModelFnOpsForMode(model_fn_lib.ModeKeys.TRAIN) 427 # Train a bit to create an exportable checkpoint. 429 model_fn_lib.ModeKeys.TRAIN, seed=1234),
|
dynamic_rnn_estimator.py | 487 if mode == model_fn.ModeKeys.TRAIN 501 loss = None # Created below for modes TRAIN and EVAL. 525 if mode == model_fn.ModeKeys.TRAIN:
|
state_saving_rnn_estimator.py | 471 if mode == model_fn.ModeKeys.TRAIN 501 loss = None # Created below for modes TRAIN and EVAL. 518 if mode == model_fn.ModeKeys.TRAIN:
|
composable_model_test.py | 50 if mode == model_fn_lib.ModeKeys.TRAIN:
|
estimator_test.py | 130 assert mode in (model_fn.ModeKeys.TRAIN, model_fn.ModeKeys.EVAL, 144 assert mode in (model_fn.ModeKeys.TRAIN, model_fn.ModeKeys.EVAL, 159 assert mode in (model_fn.ModeKeys.TRAIN, model_fn.ModeKeys.EVAL, 245 assert mode in (model_fn.ModeKeys.TRAIN, model_fn.ModeKeys.EVAL, 252 if mode in (model_fn.ModeKeys.TRAIN, model_fn.ModeKeys.EVAL): 345 self.assertEqual(model_fn.ModeKeys.TRAIN, mode) 375 self.assertEqual(model_fn.ModeKeys.TRAIN, mode) 402 self.assertEqual(model_fn.ModeKeys.TRAIN, mode) [all...] |
/external/tensorflow/tensorflow/contrib/tensor_forest/client/ |
random_forest.py | 221 if labels is not None and mode == model_fn_lib.ModeKeys.TRAIN: 333 """An estimator that can train and evaluate a random forest. 522 mode == model_fn_lib.ModeKeys.TRAIN): 528 if mode == model_fn_lib.ModeKeys.TRAIN: 544 """An estimator that can train a forest for a multi-headed problems. 550 be used to train a single model that predicts all outputs. This class can 551 be used to train separate forests for each output. 604 """A CORE estimator that can train and evaluate a random forest. 625 estimator.train(input_fn=input_fn_train)
|
/external/tensorflow/tensorflow/contrib/eager/python/examples/revnet/ |
main_estimator.py | 15 """Estimator workflow with RevNet train on CIFAR-10.""" 36 mode: One of `ModeKeys.TRAIN`, `ModeKeys.EVAL` or 'ModeKeys.PREDICT' 50 if mode == tf.estimator.ModeKeys.TRAIN: 51 global_step = tf.train.get_or_create_global_step() 52 learning_rate = tf.train.piecewise_constant( 54 optimizer = tf.train.MomentumOptimizer( 98 split: One of `train`, `validation`, `train_all`, and `test` 106 if split == "train_all" or split == "train": 166 # Train and evaluate estimator 167 revnet_estimator.train(input_fn=train_input_fn [all...] |
main_estimator_tpu.py | 15 """Cloud TPU Estimator workflow with RevNet train on ImageNet.""" 107 mode: One of `ModeKeys.TRAIN`, `ModeKeys.EVAL` or 'ModeKeys.PREDICT' 131 if mode == tf.estimator.ModeKeys.TRAIN: 132 global_step = tf.train.get_or_create_global_step() 133 learning_rate = tf.train.piecewise_constant( 135 optimizer = tf.train.MomentumOptimizer(learning_rate, 262 else: # FLAGS.mode == 'train' or FLAGS.mode == 'train_and_eval' 274 if FLAGS.mode == "train": 275 revnet_classifier.train( 282 # Train for up to steps_per_eval number of steps [all...] |
/external/tensorflow/tensorflow/contrib/timeseries/python/timeseries/ |
state_management.py | 58 mode: The tf.estimator.ModeKeys mode to use (TRAIN or EVAL). 81 if mode == estimator_lib.ModeKeys.TRAIN:
|
/external/tensorflow/tensorflow/contrib/compiler/ |
xla.py | 580 if mode == model_fn_lib.ModeKeys.TRAIN: 609 raise NotImplementedError('%s is not implemented, only TRAIN and EVAL are' 619 model_fn_lib.ModeKeys.TRAIN, params) 765 est.train(...) 776 est.train(...)
|
/external/tensorflow/tensorflow/contrib/tpu/python/tpu/ |
keras_support.py | 33 model.compile(optimizer=tf.train.AdamOptimizer(), ...) [all...] |
/external/tensorflow/tensorflow/contrib/boosted_trees/python/training/functions/ |
gbdt_batch.py | 275 mode: Train/Eval/Infer 281 if mode == learn.ModeKeys.TRAIN: 328 output_leaf_index_modes: A list of modes from (TRAIN, EVAL, INFER) which 455 mode in (learn.ModeKeys.TRAIN, learn.ModeKeys.EVAL, 468 mode: learn.ModeKeys.TRAIN or EVAL or INFER. 505 apply_averaging=mode != learn.ModeKeys.TRAIN, 523 apply_averaging=mode != learn.ModeKeys.TRAIN, 545 mode: Mode the graph is running in (train|predict|eval). 1179 def train(self, loss, predictions_dict, labels, gradients=None, member in class:GradientBoostedDecisionTreeModel [all...] |
/external/tensorflow/tensorflow/python/saved_model/model_utils/ |
export_test.py | 216 "train": export_output.TrainOutput(loss=output_1), 233 "train": signature_def_utils.supervised_train_signature_def( 254 ret = _build_export_output(KerasModeKeys.TRAIN)
|
/external/tensorflow/tensorflow/contrib/boosted_trees/estimator_batch/ |
model.py | 48 labels: Labels used to train on. 49 mode: Mode we are in. (TRAIN/EVAL/INFER) 137 update_op = gbdt_model.train(loss, predictions_dict, labels) 206 labels: Labels used to train on. 207 mode: Mode we are in. (TRAIN/EVAL/INFER) 274 if mode == learn.ModeKeys.TRAIN or mode == learn.ModeKeys.EVAL: 336 # Logits for train and eval. 355 update_op = gbdt_model_main.train(loss, predictions_dict, labels)
|
/external/tensorflow/tensorflow/python/compiler/tensorrt/test/ |
quantization_mnist_test.py | 162 """Train or evaluate the model. 165 is_training: whether to train or evaluate the model. In training mode, 172 num_epochs: how many epochs to train. Ignored if is_training is False. 238 elif mode == ModeKeys.TRAIN: 251 estimator.train(_TrainInputFn)
|