depthwiseSeparableConv.js 593 B

1234567891011121314
  1. "use strict";
  2. Object.defineProperty(exports, "__esModule", { value: true });
  3. var tf = require("@tensorflow/tfjs-core");
  4. var leaky_1 = require("./leaky");
  5. function depthwiseSeparableConv(x, params) {
  6. return tf.tidy(function () {
  7. var out = tf.pad(x, [[0, 0], [1, 1], [1, 1], [0, 0]]);
  8. out = tf.separableConv2d(out, params.depthwise_filter, params.pointwise_filter, [1, 1], 'valid');
  9. out = tf.add(out, params.bias);
  10. return leaky_1.leaky(out);
  11. });
  12. }
  13. exports.depthwiseSeparableConv = depthwiseSeparableConv;
  14. //# sourceMappingURL=depthwiseSeparableConv.js.map