face-api/build/tinyYolov2/leaky.js

13 lines
411 B
JavaScript
Raw Normal View History

"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)
});
}
exports.leaky = leaky;
2020-08-18 14:04:33 +02:00
//# sourceMappingURL=leaky.js.map