Registers a new custom loss function which can be used as an objective function during model training.
| REQUIRED | KEY | TYPE | DESCRIPTION |
|---|---|---|---|
| Yes | name | str | A name for the loss, unique per organization. Must be 50 characters or fewer, and can contain only underscores, numbers, and uppercase alphabets. |
| Yes | lossFunctionType | str | The category of problems that this loss would be applicable to, e.g. REGRESSION_DL_TF, CLASSIFICATION_DL_TF, etc. |
| Yes | lossFunctionName | str | The name of the function whose full source code is passed in loss_function_source_code. |
| Yes | lossFunctionSourceCode | str | Python source code string of the function. |
| KEY | TYPE | DESCRIPTION | |||||||||||||||||||||||||||||||||||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| success | Boolean | true if the call succeeded, false if there was an error | |||||||||||||||||||||||||||||||||||||||||||||||||||
| result | CustomLossFunction |
|
| TYPE | WHEN |
|---|---|
| InvalidEnumParameterError | An invalid value is passed for |
| InvalidParameterError | If either loss function name or type or the passed function is invalid/incompatible. |
| AlreadyExistsError | If the loss function with the same name already exists in the organization. |