repo_description: 🤖 GPU accelerated Neural networks in JavaScript for Browsers and Node.js
repo_topics: api brain browser convolutional-neural-networks easy-to-use hacktoberfest neural-network node nodejs recurrent-neural-networks stream web
code: /**
   * Hyperbolic tan
   */
  export function activate(weight: number): number {
    return Math.tanh(weight);
  }
  
  /**
   * @description grad for z = tanh(x) is (1 - z^2)
   */
  export function measure(weight: number, error: number): number {
    return (1 - weight * weight) * error;
  }
  