nussl/ml/train/closures.py
def combine_by_multitask(self, loss_output):
        """
        Implements a multitask learning objective [1] where each loss
        is weighted by a learned parameter with the following
        function:

        combined_loss = \sum_i exp(-weight_i) * loss_i + weight_i

        where i indexes each loss. The weights come from the loss 
        dictionary and can point to nn.Parameter teensors that get 
        learned jointly with the model.

        References:

        [1] Kendall, Alex, Yarin Gal, and Roberto Cipolla. 
            "Multi-task learning using uncertainty to weigh losses 
            for scene geometry and semantics." Proceedings of the 
            IEEE conference on computer vision and pattern recognition. 2018.
        """
        combined_loss = 0
        for _, weight, _, name in self.losses:
            sigma = torch.exp(-weight)
            combined_loss += sigma * loss_output[name] + weight
        return combined_loss

        Implements a multitask learning objective [1] where each loss
        is weighted by a learned parameter with the following
        function:

        combined_loss = \sum_i exp(-weight_i) * loss_i + weight_i

        where i indexes each loss. The weights come from the loss 
        dictionary and can point to nn.Parameter teensors that get 
        learned jointly with the model.

        References:

        [1] Kendall, Alex, Yarin Gal, and Roberto Cipolla. 
            "Multi-task learning using uncertainty to weigh losses 
            for scene geometry and semantics." Proceedings of the 
            IEEE conference on computer vision and pattern recognition. 2018.
        
Implements a multitask learning objective [1] where each loss
is weighted by a learned parameter with the following
function.







[1] Kendall, Alex, Yarin Gal, and Roberto Cipolla.
"Multi-task learning using uncertainty to weigh losses
for scene geometry and semantics." Proceedings of the
IEEE conference on computer vision and pattern recognition. 2018.
Implements a multitask learning objective [ 1 ] where each loss is weighted by a learned parameter with the following function . [ 1 ] Kendall Alex Yarin Gal and Roberto Cipolla . " Multi - task learning using uncertainty to weigh losses for scene geometry and semantics . " Proceedings of the IEEE conference on computer vision and pattern recognition . 2018 .
def combine_by_multitask(self, loss_output):
        combined_loss = 0
        for _, weight, _, name in self.losses:
            sigma = torch.exp(-weight)
            combined_loss += sigma * loss_output[name] + weight
        return combined_loss
def combine_by_multitask ( self , loss_output ) : combined_loss = 0 for _ , weight , _ , name in self . losses : sigma = torch . exp ( - weight ) combined_loss += sigma * loss_output [ name ] + weight return combined_loss
Implements a multitask learning objective [1] where each loss
is weighted by a learned parameter with the following
function:
Implements a multitask learning objective [ 1 ] where each loss is weighted by a learned parameter with the following function :
"""
        Implements a multitask learning objective [1] where each loss
        is weighted by a learned parameter with the following
        function:

        combined_loss = \sum_i exp(-weight_i) * loss_i + weight_i

        where i indexes each loss. The weights come from the loss 
        dictionary and can point to nn.Parameter teensors that get 
        learned jointly with the model.

        References:

        [1] Kendall, Alex, Yarin Gal, and Roberto Cipolla. 
            "Multi-task learning using uncertainty to weigh losses 
            for scene geometry and semantics." Proceedings of the 
            IEEE conference on computer vision and pattern recognition. 2018.
        """
self
loss_output