Пример #1
0
 def __init__(self, hidden_units, n_classes=0, tf_master="", batch_size=32, 
              steps=50, optimizer="SGD", learning_rate=0.1, tf_random_seed=42):
     model_fn = models.get_dnn_model(hidden_units,
                                     models.linear_regression)
     super(TensorFlowDNNRegressor, self).__init__(
         model_fn=model_fn, 
         n_classes=n_classes, tf_master=tf_master,
         batch_size=batch_size, steps=steps, optimizer=optimizer,
         learning_rate=learning_rate, tf_random_seed=tf_random_seed)
Пример #2
0
 def __init__(self, hidden_units, n_classes, tf_master="", batch_size=32, 
              steps=50, optimizer="SGD", learning_rate=0.1,
              tf_random_seed=42, continue_training=False):
     model_fn = models.get_dnn_model(hidden_units,
                                     models.logistic_regression)
     super(TensorFlowDNNClassifier, self).__init__(
         model_fn=model_fn, 
         n_classes=n_classes, tf_master=tf_master,
         batch_size=batch_size, steps=steps, optimizer=optimizer,
         learning_rate=learning_rate, tf_random_seed=tf_random_seed,
         continue_training=continue_training)
Пример #3
0
 def __init__(self,
              hidden_units,
              n_classes=0,
              tf_master="",
              batch_size=32,
              steps=50,
              optimizer="SGD",
              learning_rate=0.1,
              tf_random_seed=42):
     model_fn = models.get_dnn_model(hidden_units, models.linear_regression)
     super(TensorFlowDNNRegressor,
           self).__init__(model_fn=model_fn,
                          n_classes=n_classes,
                          tf_master=tf_master,
                          batch_size=batch_size,
                          steps=steps,
                          optimizer=optimizer,
                          learning_rate=learning_rate,
                          tf_random_seed=tf_random_seed)
Пример #4
0
 def __init__(self,
              hidden_units,
              n_classes,
              tf_master="",
              batch_size=32,
              steps=50,
              optimizer="SGD",
              learning_rate=0.1,
              tf_random_seed=42,
              continue_training=False):
     model_fn = models.get_dnn_model(hidden_units,
                                     models.logistic_regression)
     super(TensorFlowDNNClassifier,
           self).__init__(model_fn=model_fn,
                          n_classes=n_classes,
                          tf_master=tf_master,
                          batch_size=batch_size,
                          steps=steps,
                          optimizer=optimizer,
                          learning_rate=learning_rate,
                          tf_random_seed=tf_random_seed,
                          continue_training=continue_training)
Пример #5
0
 def _model_fn(self, X, y):
     return models.get_dnn_model(self.hidden_units,
                                 models.logistic_regression)(X, y)