std
Functions:
Name | Description |
---|---|
log_ratio |
Compute the log of the ratio of max scale to the standard deviations. |
masked_negative_log_mean |
Compute the mean of the elements which remain after masking, instead of including the zeroed out elements. |
negative_log_mean |
Compute the negative log mean loss. Useful as a regularization function for noise layer parameters. |
log_ratio
¶
Compute the log of the ratio of max scale to the standard deviations.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
|
Tensor
|
The standard deviation tensor. |
required |
|
Tensor
|
The maximum scale tensor. This is the maximum value that the standard deviation can take. See
|
required |
Returns:
Type | Description |
---|---|
torch.Tensor
|
The log of the ratio of the maximum scale to the standard deviation. |
Added in version 0.82.0.
masked_negative_log_mean
¶
Compute the mean of the elements which remain after masking, instead of including the zeroed out elements.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
|
Tensor
|
The input tensor. |
required |
|
Tensor
|
The mask tensor. |
required |
Returns:
Type | Description |
---|---|
torch.Tensor
|
The negative log mean of unmasked elements. |