@hoff97/tensor-js
Version:
PyTorch like deep learning inferrence library
12 lines • 499 B
JavaScript
import { UnaryNode } from './unaryNode';
export class HardSigmoidNode extends UnaryNode {
constructor(attributes, inputs, outputs, constants, onnxVersion, mode) {
super(attributes, inputs, outputs, constants, onnxVersion, 'HardSigmoid', mode);
this.alpha = this.getAttributeFloat('alpha') || 0.2;
this.beta = this.getAttributeFloat('beta') || 0.5;
}
compute(x) {
return x.hardSigmoid(this.alpha, this.beta);
}
}
//# sourceMappingURL=hardSigmoid.js.map