@hoff97/tensor-js
Version:
PyTorch like deep learning inferrence library
26 lines • 804 B
JavaScript
import { UnaryOperation } from './unaryOperation';
export class TanOperation extends UnaryOperation {
constructor(tensorConstructor, dtype, allocator) {
super(tensorConstructor, dtype, allocator);
}
operation(input) {
return `tan(${input})`;
}
}
export class ATanOperation extends UnaryOperation {
constructor(tensorConstructor, dtype, allocator) {
super(tensorConstructor, dtype, allocator);
}
operation(input) {
return `atan(${input})`;
}
}
export class TanHOperation extends UnaryOperation {
constructor(tensorConstructor, dtype, allocator) {
super(tensorConstructor, dtype, allocator);
}
operation(input) {
return `(exp(2.0*${input}) - 1.0)/(exp(2.0*${input}) + 1.0)`;
}
}
//# sourceMappingURL=tan.js.map