Example #1
0
 def __init__(self, params):
     self.params = params
     self.variables = ForestTrainingVariables(self.params)
     self.trees = [
         RandomTreeGraphs(self.variables[i], self.params,
                          training_ops.Load(), inference_ops.Load())
         for i in range(self.params.num_trees)
     ]
Example #2
0
 def __init__(self, params, device_assigner=None, variables=None):
     self.params = params
     self.device_assigner = device_assigner or RandomForestDeviceAssigner()
     tf.logging.info('Constructing forest with params = ')
     tf.logging.info(self.params.__dict__)
     self.variables = variables or ForestTrainingVariables(
         self.params, device_assigner=self.device_assigner)
     self.trees = [
         RandomTreeGraphs(self.variables[i], self.params,
                          training_ops.Load(), inference_ops.Load())
         for i in range(self.params.num_trees)
     ]
 def setUp(self):
     self.ops = inference_ops.Load()
 def setUp(self):
   self.ops = inference_ops.Load()
   self.data_spec = [constants.DATA_FLOAT] * 2