Skip to main content
Using Deno in production at your company? Earn free Deno merch.
Give us feedback
Module

x/netsaur/backends/cpu/activation.ts>Tanh

Powerful machine learning, accelerated by WebGPU
Go to Latest
class Tanh
implements CPUActivationFn
import { Tanh } from "https://deno.land/x/netsaur@0.1.5/backends/cpu/activation.ts";

Tanh activation function f(x) = (ex - e-x) / (ex + e-x) This is the same as the sigmoid function, but is more robust to outliers

Properties

name: string

Methods

activate(val: number): number
prime(val: number, error?): number