EffectiveDimension.get_fisher_information¶
- EffectiveDimension.get_fisher_information(gradients, model_outputs)[source]¶
This method computes the average Jacobian for every set of gradients and model output as shown in Abbas et al.
- Parameters:
gradients (
ndarray
) -- A numpy array, result of the neural network's backward pass, of shape(num_input_samples * num_weight_samples, output_size, num_weights)
.model_outputs (
ndarray
) -- A numpy array, result of the neural networks' forward pass, of shape(num_input_samples * num_weight_samples, output_size)
.
- Returns:
- A numpy array of shape
(num_input_samples * num_weight_samples, num_weights, num_weights)
with the average Jacobian for every set of gradients and model output given.
- Return type:
fisher