asteroid.losses.mse module¶
-
asteroid.losses.mse.
MultiSrcMSE
¶ alias of
asteroid.losses.mse.SingleSrcMSE
-
class
asteroid.losses.mse.
NoSrcMSE
(*args, **kwargs)[source]¶ Bases:
asteroid.losses.mse.SingleSrcMSE
,asteroid.utils.deprecation_utils.DeprecationMixin
-
asteroid.losses.mse.
NonPitMSE
¶ alias of
asteroid.losses.mse.NoSrcMSE
-
class
asteroid.losses.mse.
PairwiseMSE
(*args, **kwargs)[source]¶ Bases:
sphinx.ext.autodoc.importer._MockObject
Measure pairwise mean square error on a batch.
- Shape:
- est_targets (
torch.Tensor
): Expected shape [batch, nsrc, *]. - The batch of target estimates.
- targets (
torch.Tensor
): Expected shape [batch, nsrc, *]. - The batch of training targets
- est_targets (
Returns: torch.Tensor
– with shape [batch, nsrc, nsrc]Examples
>>> import torch >>> from asteroid.losses import PITLossWrapper >>> targets = torch.randn(10, 2, 32000) >>> est_targets = torch.randn(10, 2, 32000) >>> loss_func = PITLossWrapper(PairwiseMSE(), pit_from='pairwise') >>> loss = loss_func(est_targets, targets)
-
class
asteroid.losses.mse.
SingleSrcMSE
(*args, **kwargs)[source]¶ Bases:
sphinx.ext.autodoc.importer._MockObject
Measure mean square error on a batch. Supports both tensors with and without source axis.
- Shape:
- est_targets (
torch.Tensor
): Expected shape [batch, *]. - The batch of target estimates.
- targets (
torch.Tensor
): Expected shape [batch, *]. - The batch of training targets.
- est_targets (
Returns: torch.Tensor
– with shape [batch]Examples
>>> import torch >>> from asteroid.losses import PITLossWrapper >>> targets = torch.randn(10, 2, 32000) >>> est_targets = torch.randn(10, 2, 32000) >>> # singlesrc_mse / multisrc_mse support both 'pw_pt' and 'perm_avg'. >>> loss_func = PITLossWrapper(singlesrc_mse, pit_from='pw_pt') >>> loss = loss_func(est_targets, targets)
-
asteroid.losses.mse.
multisrc_mse
¶ Measure mean square error on a batch. Supports both tensors with and without source axis.
- Shape:
- est_targets (
torch.Tensor
): Expected shape [batch, *]. - The batch of target estimates.
- targets (
torch.Tensor
): Expected shape [batch, *]. - The batch of training targets.
- est_targets (
Returns: torch.Tensor
– with shape [batch]Examples
>>> import torch >>> from asteroid.losses import PITLossWrapper >>> targets = torch.randn(10, 2, 32000) >>> est_targets = torch.randn(10, 2, 32000) >>> # singlesrc_mse / multisrc_mse support both 'pw_pt' and 'perm_avg'. >>> loss_func = PITLossWrapper(singlesrc_mse, pit_from='pw_pt') >>> loss = loss_func(est_targets, targets)
-
asteroid.losses.mse.
nonpit_mse
¶ Measure mean square error on a batch. Supports both tensors with and without source axis.
- Shape:
- est_targets (
torch.Tensor
): Expected shape [batch, *]. - The batch of target estimates.
- targets (
torch.Tensor
): Expected shape [batch, *]. - The batch of training targets.
- est_targets (
Returns: torch.Tensor
– with shape [batch]Examples
>>> import torch >>> from asteroid.losses import PITLossWrapper >>> targets = torch.randn(10, 2, 32000) >>> est_targets = torch.randn(10, 2, 32000) >>> # singlesrc_mse / multisrc_mse support both 'pw_pt' and 'perm_avg'. >>> loss_func = PITLossWrapper(singlesrc_mse, pit_from='pw_pt') >>> loss = loss_func(est_targets, targets)
-
asteroid.losses.mse.
nosrc_mse
¶ Measure mean square error on a batch. Supports both tensors with and without source axis.
- Shape:
- est_targets (
torch.Tensor
): Expected shape [batch, *]. - The batch of target estimates.
- targets (
torch.Tensor
): Expected shape [batch, *]. - The batch of training targets.
- est_targets (
Returns: torch.Tensor
– with shape [batch]Examples
>>> import torch >>> from asteroid.losses import PITLossWrapper >>> targets = torch.randn(10, 2, 32000) >>> est_targets = torch.randn(10, 2, 32000) >>> # singlesrc_mse / multisrc_mse support both 'pw_pt' and 'perm_avg'. >>> loss_func = PITLossWrapper(singlesrc_mse, pit_from='pw_pt') >>> loss = loss_func(est_targets, targets)
-
asteroid.losses.mse.
pairwise_mse
¶ Measure pairwise mean square error on a batch.
- Shape:
- est_targets (
torch.Tensor
): Expected shape [batch, nsrc, *]. - The batch of target estimates.
- targets (
torch.Tensor
): Expected shape [batch, nsrc, *]. - The batch of training targets
- est_targets (
Returns: torch.Tensor
– with shape [batch, nsrc, nsrc]Examples
>>> import torch >>> from asteroid.losses import PITLossWrapper >>> targets = torch.randn(10, 2, 32000) >>> est_targets = torch.randn(10, 2, 32000) >>> loss_func = PITLossWrapper(PairwiseMSE(), pit_from='pairwise') >>> loss = loss_func(est_targets, targets)
-
asteroid.losses.mse.
singlesrc_mse
¶ Measure mean square error on a batch. Supports both tensors with and without source axis.
- Shape:
- est_targets (
torch.Tensor
): Expected shape [batch, *]. - The batch of target estimates.
- targets (
torch.Tensor
): Expected shape [batch, *]. - The batch of training targets.
- est_targets (
Returns: torch.Tensor
– with shape [batch]Examples
>>> import torch >>> from asteroid.losses import PITLossWrapper >>> targets = torch.randn(10, 2, 32000) >>> est_targets = torch.randn(10, 2, 32000) >>> # singlesrc_mse / multisrc_mse support both 'pw_pt' and 'perm_avg'. >>> loss_func = PITLossWrapper(singlesrc_mse, pit_from='pw_pt') >>> loss = loss_func(est_targets, targets)