def update_orthant_coverage(input_data, shortened_model, model_layer_dict, mean_vector, covariance_matrix, group_size=1, sd_threshold=1):
    layer_outputs = shortened_model.predict(input_data)
    for neuron_group in combinations(range(layer_outputs.shape[(- 1)]), group_size):
        group_output = np.asarray([layer_outputs[0][i] for i in neuron_group])
        orthant = 0
        add = int(1)
        for neuron_index in neuron_group:
            if (layer_outputs[0][neuron_index] > mean_vector[neuron_index]):
                orthant += add
            add *= 2
        if (model_layer_dict[(neuron_group, orthant)] == True):
            continue
        group_mean = np.asarray([mean_vector[i] for i in neuron_group])
        group_cov_matrix = np.asarray([[covariance_matrix[j][i] for i in neuron_group] for j in neuron_group])
        if (distance(group_output, group_mean, group_cov_matrix) > sd_threshold):
            model_layer_dict[(neuron_group, orthant)] = True
def update_orthant_coverage(input_data, shortened_model, model_layer_dict, mean_vector, covariance_matrix, group_size=1, sd_threshold=1):
    layer_outputs = shortened_model.predict(input_data)
    for neuron_group in combinations(range(layer_outputs.shape[(- 1)]), group_size):
        group_output = np.asarray([layer_outputs[0][i] for i in neuron_group])
        orthant = 0
        add = int(1)
        for neuron_index in neuron_group:
            if (layer_outputs[0][neuron_index] > mean_vector[neuron_index]):
                orthant += add
            add *= 2
        if (model_layer_dict[(neuron_group, orthant)] == True):
            continue
        group_mean = np.asarray([mean_vector[i] for i in neuron_group])
        group_cov_matrix = np.asarray([[covariance_matrix[j][i] for i in neuron_group] for j in neuron_group])
        if (distance(group_output, group_mean, group_cov_matrix) > sd_threshold):
            model_layer_dict[(neuron_group, orthant)] = True