node_modules/@tensorflow/tfjs-layers/dist/base_callbacks.js
/**
 * Standardize callbacks or configurations of them to an Array of callbacks.
 */
Standardize callbacks or configurations of them to an Array of callbacks.
Standardize callbacks or configurations of them to an Array of callbacks .
function standardizeCallbacks(callbacks) {
    if (callbacks == null) {
        return null;
    }
    if (callbacks instanceof BaseCallback) {
        return [callbacks];
    }
    if (Array.isArray(callbacks) && callbacks[0] instanceof BaseCallback) {
        return callbacks;
    }
    var callbackConfigs = generic_utils.toList(callbacks);
    return callbackConfigs.map(function (callbackConfig) { return new CustomCallback(callbackConfig); });
}
function standardizeCallbacks ( callbacks ) { if ( callbacks == null ) { return null ; } if ( callbacks instanceof BaseCallback ) { return [ callbacks ] ; } if ( Array . isArray ( callbacks ) && callbacks [ 0 ] instanceof BaseCallback ) { return callbacks ; } var callbackConfigs = generic_utils . toList ( callbacks ) ; return callbackConfigs . map ( function ( callbackConfig ) { return new CustomCallback ( callbackConfig ) ; } ) ; }
Standardize callbacks or configurations of them to an Array of callbacks.
Standardize callbacks or configurations of them to an Array of callbacks .
// Convert custom callback configs to custom callback objects.