def __init__(self, params, tree_num, training):
    self.tree = variable_scope.get_variable(name=self.get_tree_name('tree', tree_num), dtype=dtypes.int32, shape=[params.max_nodes, 2], initializer=init_ops.constant_initializer((- 2)))
    self.tree_thresholds = variable_scope.get_variable(name=self.get_tree_name('tree_thresholds', tree_num), shape=[params.max_nodes], initializer=init_ops.constant_initializer((- 1.0)))
    self.tree_depths = variable_scope.get_variable(name=self.get_tree_name('tree_depths', tree_num), shape=[params.max_nodes], dtype=dtypes.int32, initializer=init_ops.constant_initializer(1))
    self.end_of_tree = variable_scope.get_variable(name=self.get_tree_name('end_of_tree', tree_num), dtype=dtypes.int32, initializer=constant_op.constant([1]))
    self.start_epoch = tf_variables.Variable(([0] * params.max_nodes), name='start_epoch')
    if training:
        self.node_to_accumulator_map = variable_scope.get_variable(name=self.get_tree_name('node_to_accumulator_map', tree_num), shape=[params.max_nodes], dtype=dtypes.int32, initializer=init_ops.constant_initializer((- 1)))
        self.candidate_split_features = variable_scope.get_variable(name=self.get_tree_name('candidate_split_features', tree_num), shape=[params.max_fertile_nodes, params.num_splits_to_consider], dtype=dtypes.int32, initializer=init_ops.constant_initializer((- 1)))
        self.candidate_split_thresholds = variable_scope.get_variable(name=self.get_tree_name('candidate_split_thresholds', tree_num), shape=[params.max_fertile_nodes, params.num_splits_to_consider], initializer=init_ops.constant_initializer(0.0))
    self.node_sums = variable_scope.get_variable(name=self.get_tree_name('node_sums', tree_num), shape=[params.max_nodes, params.num_output_columns], initializer=init_ops.constant_initializer(0.0))
    if training:
        self.candidate_split_sums = variable_scope.get_variable(name=self.get_tree_name('candidate_split_sums', tree_num), shape=[params.max_fertile_nodes, params.num_splits_to_consider, params.num_output_columns], initializer=init_ops.constant_initializer(0.0))
        self.accumulator_sums = variable_scope.get_variable(name=self.get_tree_name('accumulator_sums', tree_num), shape=[params.max_fertile_nodes, params.num_output_columns], initializer=init_ops.constant_initializer((- 1.0)))
        if params.regression:
            self.node_squares = variable_scope.get_variable(name=self.get_tree_name('node_squares', tree_num), shape=[params.max_nodes, params.num_output_columns], initializer=init_ops.constant_initializer(0.0))
            self.candidate_split_squares = variable_scope.get_variable(name=self.get_tree_name('candidate_split_squares', tree_num), shape=[params.max_fertile_nodes, params.num_splits_to_consider, params.num_output_columns], initializer=init_ops.constant_initializer(0.0))
            self.accumulator_squares = variable_scope.get_variable(name=self.get_tree_name('accumulator_squares', tree_num), shape=[params.max_fertile_nodes, params.num_output_columns], initializer=init_ops.constant_initializer((- 1.0)))
        else:
            self.node_squares = constant_op.constant(0.0, name=self.get_tree_name('node_squares', tree_num))
            self.candidate_split_squares = constant_op.constant(0.0, name=self.get_tree_name('candidate_split_squares', tree_num))
            self.accumulator_squares = constant_op.constant(0.0, name=self.get_tree_name('accumulator_squares', tree_num))
def __init__(self, params, tree_num, training):
    self.tree = variable_scope.get_variable(name=self.get_tree_name('tree', tree_num), dtype=dtypes.int32, shape=[params.max_nodes, 2], initializer=init_ops.constant_initializer((- 2)))
    self.tree_thresholds = variable_scope.get_variable(name=self.get_tree_name('tree_thresholds', tree_num), shape=[params.max_nodes], initializer=init_ops.constant_initializer((- 1.0)))
    self.tree_depths = variable_scope.get_variable(name=self.get_tree_name('tree_depths', tree_num), shape=[params.max_nodes], dtype=dtypes.int32, initializer=init_ops.constant_initializer(1))
    self.end_of_tree = variable_scope.get_variable(name=self.get_tree_name('end_of_tree', tree_num), dtype=dtypes.int32, initializer=constant_op.constant([1]))
    self.start_epoch = tf_variables.Variable(([0] * params.max_nodes), name='start_epoch')
    if training:
        self.node_to_accumulator_map = variable_scope.get_variable(name=self.get_tree_name('node_to_accumulator_map', tree_num), shape=[params.max_nodes], dtype=dtypes.int32, initializer=init_ops.constant_initializer((- 1)))
        self.candidate_split_features = variable_scope.get_variable(name=self.get_tree_name('candidate_split_features', tree_num), shape=[params.max_fertile_nodes, params.num_splits_to_consider], dtype=dtypes.int32, initializer=init_ops.constant_initializer((- 1)))
        self.candidate_split_thresholds = variable_scope.get_variable(name=self.get_tree_name('candidate_split_thresholds', tree_num), shape=[params.max_fertile_nodes, params.num_splits_to_consider], initializer=init_ops.constant_initializer(0.0))
    self.node_sums = variable_scope.get_variable(name=self.get_tree_name('node_sums', tree_num), shape=[params.max_nodes, params.num_output_columns], initializer=init_ops.constant_initializer(0.0))
    if training:
        self.candidate_split_sums = variable_scope.get_variable(name=self.get_tree_name('candidate_split_sums', tree_num), shape=[params.max_fertile_nodes, params.num_splits_to_consider, params.num_output_columns], initializer=init_ops.constant_initializer(0.0))
        self.accumulator_sums = variable_scope.get_variable(name=self.get_tree_name('accumulator_sums', tree_num), shape=[params.max_fertile_nodes, params.num_output_columns], initializer=init_ops.constant_initializer((- 1.0)))
        if params.regression:
            self.node_squares = variable_scope.get_variable(name=self.get_tree_name('node_squares', tree_num), shape=[params.max_nodes, params.num_output_columns], initializer=init_ops.constant_initializer(0.0))
            self.candidate_split_squares = variable_scope.get_variable(name=self.get_tree_name('candidate_split_squares', tree_num), shape=[params.max_fertile_nodes, params.num_splits_to_consider, params.num_output_columns], initializer=init_ops.constant_initializer(0.0))
            self.accumulator_squares = variable_scope.get_variable(name=self.get_tree_name('accumulator_squares', tree_num), shape=[params.max_fertile_nodes, params.num_output_columns], initializer=init_ops.constant_initializer((- 1.0)))
        else:
            self.node_squares = constant_op.constant(0.0, name=self.get_tree_name('node_squares', tree_num))
            self.candidate_split_squares = constant_op.constant(0.0, name=self.get_tree_name('candidate_split_squares', tree_num))
            self.accumulator_squares = constant_op.constant(0.0, name=self.get_tree_name('accumulator_squares', tree_num))