Tensor.replace_variance
- Tensor.replace_variance(variance, inplace=False)[source]
Replace variance of tensor without corresponding transformation of the representation.
- Parameters
variance (Sequence[int, ...]) – Sequence of new variances for tensor along each axis, -1 for contravariance and 1 for covariance.
inplace (bool) – If True, the tensor will be modified in-place, otherwise a new Tensor instance will be created. Default: False.
- Returns
Tensor with replaced variance.
- Return type
Self