Python layers.optimize() Examples

The following are 27 code examples of layers.optimize(). You can vote up the ones you like or vote down the ones you don't like, and go to the original project or source file by following the links above each example. You may also want to check out all available functions/classes of the module layers , or try the search function .
Example #1
Source File: graphs.py    From object_detection_kitti with Apache License 2.0 5 votes vote down vote up
def language_model_training(self):
    loss = self.language_model_graph()
    train_op = optimize(loss, self.global_step)
    return train_op, loss, self.global_step 
Example #2
Source File: graphs.py    From multilabel-image-classification-tensorflow with MIT License 5 votes vote down vote up
def optimize(loss, global_step):
  return layers_lib.optimize(
      loss, global_step, FLAGS.max_grad_norm, FLAGS.learning_rate,
      FLAGS.learning_rate_decay_factor, FLAGS.sync_replicas,
      FLAGS.replicas_to_aggregate, FLAGS.task) 
Example #3
Source File: graphs.py    From multilabel-image-classification-tensorflow with MIT License 5 votes vote down vote up
def language_model_training(self):
    loss = self.language_model_graph()
    train_op = optimize(loss, self.global_step)
    return train_op, loss, self.global_step 
Example #4
Source File: graphs.py    From multilabel-image-classification-tensorflow with MIT License 5 votes vote down vote up
def classifier_training(self):
    loss = self.classifier_graph()
    train_op = optimize(loss, self.global_step)
    return train_op, loss, self.global_step 
Example #5
Source File: graphs.py    From models with Apache License 2.0 5 votes vote down vote up
def optimize(loss, global_step):
  return layers_lib.optimize(
      loss, global_step, FLAGS.max_grad_norm, FLAGS.learning_rate,
      FLAGS.learning_rate_decay_factor, FLAGS.sync_replicas,
      FLAGS.replicas_to_aggregate, FLAGS.task) 
Example #6
Source File: graphs.py    From models with Apache License 2.0 5 votes vote down vote up
def language_model_training(self):
    loss = self.language_model_graph()
    train_op = optimize(loss, self.global_step)
    return train_op, loss, self.global_step 
Example #7
Source File: graphs.py    From models with Apache License 2.0 5 votes vote down vote up
def classifier_training(self):
    loss = self.classifier_graph()
    train_op = optimize(loss, self.global_step)
    return train_op, loss, self.global_step 
Example #8
Source File: graphs.py    From g-tensorflow-models with Apache License 2.0 5 votes vote down vote up
def optimize(loss, global_step):
  return layers_lib.optimize(
      loss, global_step, FLAGS.max_grad_norm, FLAGS.learning_rate,
      FLAGS.learning_rate_decay_factor, FLAGS.sync_replicas,
      FLAGS.replicas_to_aggregate, FLAGS.task) 
Example #9
Source File: graphs.py    From g-tensorflow-models with Apache License 2.0 5 votes vote down vote up
def language_model_training(self):
    loss = self.language_model_graph()
    train_op = optimize(loss, self.global_step)
    return train_op, loss, self.global_step 
Example #10
Source File: graphs.py    From g-tensorflow-models with Apache License 2.0 5 votes vote down vote up
def classifier_training(self):
    loss = self.classifier_graph()
    train_op = optimize(loss, self.global_step)
    return train_op, loss, self.global_step 
Example #11
Source File: graphs.py    From object_detection_with_tensorflow with MIT License 5 votes vote down vote up
def optimize(loss, global_step):
  return layers_lib.optimize(
      loss, global_step, FLAGS.max_grad_norm, FLAGS.learning_rate,
      FLAGS.learning_rate_decay_factor, FLAGS.sync_replicas,
      FLAGS.replicas_to_aggregate, FLAGS.task) 
Example #12
Source File: graphs.py    From object_detection_with_tensorflow with MIT License 5 votes vote down vote up
def language_model_training(self):
    loss = self.language_model_graph()
    train_op = optimize(loss, self.global_step)
    return train_op, loss, self.global_step 
Example #13
Source File: graphs.py    From object_detection_with_tensorflow with MIT License 5 votes vote down vote up
def classifier_training(self):
    loss = self.classifier_graph()
    train_op = optimize(loss, self.global_step)
    return train_op, loss, self.global_step 
Example #14
Source File: graphs.py    From object_detection_kitti with Apache License 2.0 5 votes vote down vote up
def optimize(loss, global_step):
  return layers_lib.optimize(
      loss, global_step, FLAGS.max_grad_norm, FLAGS.learning_rate,
      FLAGS.learning_rate_decay_factor, FLAGS.sync_replicas,
      FLAGS.replicas_to_aggregate, FLAGS.task) 
Example #15
Source File: graphs.py    From DOTA_models with Apache License 2.0 5 votes vote down vote up
def classifier_training(self):
    loss = self.classifier_graph()
    train_op = optimize(loss, self.global_step)
    return train_op, loss, self.global_step 
Example #16
Source File: graphs.py    From object_detection_kitti with Apache License 2.0 5 votes vote down vote up
def classifier_training(self):
    loss = self.classifier_graph()
    train_op = optimize(loss, self.global_step)
    return train_op, loss, self.global_step 
Example #17
Source File: graphs.py    From hands-detection with MIT License 5 votes vote down vote up
def optimize(loss, global_step):
  return layers_lib.optimize(
      loss, global_step, FLAGS.max_grad_norm, FLAGS.learning_rate,
      FLAGS.learning_rate_decay_factor, FLAGS.sync_replicas,
      FLAGS.replicas_to_aggregate, FLAGS.task) 
Example #18
Source File: graphs.py    From hands-detection with MIT License 5 votes vote down vote up
def language_model_training(self):
    loss = self.language_model_graph()
    train_op = optimize(loss, self.global_step)
    return train_op, loss, self.global_step 
Example #19
Source File: graphs.py    From hands-detection with MIT License 5 votes vote down vote up
def classifier_training(self):
    loss = self.classifier_graph()
    train_op = optimize(loss, self.global_step)
    return train_op, loss, self.global_step 
Example #20
Source File: graphs.py    From Gun-Detector with Apache License 2.0 5 votes vote down vote up
def optimize(loss, global_step):
  return layers_lib.optimize(
      loss, global_step, FLAGS.max_grad_norm, FLAGS.learning_rate,
      FLAGS.learning_rate_decay_factor, FLAGS.sync_replicas,
      FLAGS.replicas_to_aggregate, FLAGS.task) 
Example #21
Source File: graphs.py    From Gun-Detector with Apache License 2.0 5 votes vote down vote up
def language_model_training(self):
    loss = self.language_model_graph()
    train_op = optimize(loss, self.global_step)
    return train_op, loss, self.global_step 
Example #22
Source File: graphs.py    From Gun-Detector with Apache License 2.0 5 votes vote down vote up
def classifier_training(self):
    loss = self.classifier_graph()
    train_op = optimize(loss, self.global_step)
    return train_op, loss, self.global_step 
Example #23
Source File: graphs.py    From yolo_v2 with Apache License 2.0 5 votes vote down vote up
def optimize(loss, global_step):
  return layers_lib.optimize(
      loss, global_step, FLAGS.max_grad_norm, FLAGS.learning_rate,
      FLAGS.learning_rate_decay_factor, FLAGS.sync_replicas,
      FLAGS.replicas_to_aggregate, FLAGS.task) 
Example #24
Source File: graphs.py    From yolo_v2 with Apache License 2.0 5 votes vote down vote up
def language_model_training(self):
    loss = self.language_model_graph()
    train_op = optimize(loss, self.global_step)
    return train_op, loss, self.global_step 
Example #25
Source File: graphs.py    From yolo_v2 with Apache License 2.0 5 votes vote down vote up
def classifier_training(self):
    loss = self.classifier_graph()
    train_op = optimize(loss, self.global_step)
    return train_op, loss, self.global_step 
Example #26
Source File: graphs.py    From DOTA_models with Apache License 2.0 5 votes vote down vote up
def optimize(loss, global_step):
  return layers_lib.optimize(
      loss, global_step, FLAGS.max_grad_norm, FLAGS.learning_rate,
      FLAGS.learning_rate_decay_factor, FLAGS.sync_replicas,
      FLAGS.replicas_to_aggregate, FLAGS.task) 
Example #27
Source File: graphs.py    From DOTA_models with Apache License 2.0 5 votes vote down vote up
def language_model_training(self):
    loss = self.language_model_graph()
    train_op = optimize(loss, self.global_step)
    return train_op, loss, self.global_step