def process_microbatch(i, sample_state):
    'Process one microbatch (record) with privacy helper.'
    mean_loss = tf.reduce_mean(input_tensor=tf.gather(microbatch_losses, [i]))
    grads = tf.gradients(mean_loss, params)
    sample_state = self._dp_sum_query.accumulate_record(sample_params, sample_state, grads)
    return sample_state
Process one microbatch (record) with privacy helper.
def process_microbatch(i, sample_state):
    
    mean_loss = tf.reduce_mean(input_tensor=tf.gather(microbatch_losses, [i]))
    grads = tf.gradients(mean_loss, params)
    sample_state = self._dp_sum_query.accumulate_record(sample_params, sample_state, grads)
    return sample_state