2020-08-20 02:05:34 +02:00
|
|
|
"use strict";
|
|
|
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
|
exports.leaky = void 0;
|
|
|
|
const tf = require("@tensorflow/tfjs-core");
|
|
|
|
function leaky(x) {
|
2020-08-18 14:04:33 +02:00
|
|
|
return tf.tidy(() => {
|
|
|
|
const min = tf.mul(x, tf.scalar(0.10000000149011612));
|
|
|
|
return tf.add(tf.relu(tf.sub(x, min)), min);
|
|
|
|
//return tf.maximum(x, min)
|
|
|
|
});
|
|
|
|
}
|
2020-08-20 02:05:34 +02:00
|
|
|
exports.leaky = leaky;
|
2020-08-18 14:04:33 +02:00
|
|
|
//# sourceMappingURL=leaky.js.map
|