nussl/ml/__init__.py
def register_loss(custom_loss):
    """
    Your custom loss functions can be registered with nussl's Closure
    via this function. For example, if you have some loss `ExampleLoss`,
    you can register it as follows:

    .. code-block:: python

        class ExampleLoss(nn.Module):
            DEFAULT_KEYS = {'key1': 'arg1', 'key2': 'arg2'}
            def forward(self, arg1, arg2):
                # do something
                return 0

        ml.register_loss(ExampleLoss)

    You can now use the name `ExampleLoss` in a loss dictionary that is passed
    to a closure.

    
    Args:
        custom_loss ([type]): [description]
    """
    setattr(train.loss, custom_loss.__name__, custom_loss)

    Your custom loss functions can be registered with nussl's Closure
    via this function. For example, if you have some loss `ExampleLoss`,
    you can register it as follows:

    .. code-block:: python

        class ExampleLoss(nn.Module):
            DEFAULT_KEYS = {'key1': 'arg1', 'key2': 'arg2'}
            def forward(self, arg1, arg2):
                # do something
                return 0

        ml.register_loss(ExampleLoss)

    You can now use the name `ExampleLoss` in a loss dictionary that is passed
    to a closure.

    
    Args:
        custom_loss ([type]): [description]
    
Your custom loss functions can be registered with nussl's Closure
via this function. For example, if you have some loss `ExampleLoss`,
you can register it as follows.

code-block:: python





You can now use the name `ExampleLoss` in a loss dictionary that is passed
to a closure.
Your custom loss functions can be registered with nussl ' s Closure via this function . For example if you have some loss ` ExampleLoss ` you can register it as follows . code - block :: python You can now use the name ` ExampleLoss ` in a loss dictionary that is passed to a closure .
def register_loss(custom_loss):
    setattr(train.loss, custom_loss.__name__, custom_loss)
def register_loss ( custom_loss ) : setattr ( train . loss , custom_loss . __name__ , custom_loss )
Your custom loss functions can be registered with nussl's Closure
via this function.
Your custom loss functions can be registered with nussl ' s Closure via this function .
"""
    Your custom loss functions can be registered with nussl's Closure
    via this function. For example, if you have some loss `ExampleLoss`,
    you can register it as follows:

    .. code-block:: python

        class ExampleLoss(nn.Module):
            DEFAULT_KEYS = {'key1': 'arg1', 'key2': 'arg2'}
            def forward(self, arg1, arg2):
                # do something
                return 0

        ml.register_loss(ExampleLoss)

    You can now use the name `ExampleLoss` in a loss dictionary that is passed
    to a closure.

    
    Args:
        custom_loss ([type]): [description]
    """
custom_loss
None