// note: this also works with MultitaskMultivariateNormal, where this
// will return a batched DiagLazyTensors of size n x num_tasks x num_tasks
noise_diag = output.mean.exp() if self.log_scale else output.mean
return DiagLazyTensor(noise_diag)
After Change
// note: this also works with MultitaskMultivariateNormal, where this
// will return a batched DiagLazyTensors of size n x num_tasks x num_tasks
noise_diag = output.mean if self.noise_indices is None else output.mean[..., self.noise_indices]
return DiagLazyTensor(noise_diag.exp() if self.log_scale else noise_diag)