npu.utils.dl_utils
Classes
|
- class npu.utils.dl_utils.DLUtils
- Author:
Alberto M. Esmoris Pena
Class with utils static methods to work with deep learning.
- static is_using_binary_crossentropy(comp_args, default=False)
Check whether the compilation arguments dictionary uses a binary cross-entropy loss function (True) or not (False).
- Parameters:
comp_args (dict) – The compilation arguments.
default (bool) – Default value to be assummed when the loss function cannot be explicitly checked.
- Returns:
True if a binary cross-entropy is used, False otherwise.
- Return type:
bool
- static activation_layer_from_name(act_name, **kwargs)
Return the corresponding keras activation layer from the given name and arguments.
- Parameters:
act_name (str) – The name of the activation function to be instantiated as a layer.
kwargs (dict) – The key-word arguments for the activation layer.
- Returns:
The activation layer.