class_docstr: An activation function.
  
  Each activation function is represented by a class and implements two methods. The first method
  is `apply`, which evaluates the activation on an array. The second method is `gradient`, which
  computes the gradient with respect to the input array. Both methods are intended to be pure
  with no side-effects. In other words they do not modify their inputs.
class_docstr_tok: ["An","activation","function",".","Each","activation","function","is","represented","by","a","class","and","implements","two","methods",".","The","first","method","is","`","apply","`",",","which","evaluates","the","activation","on","an","array",".","The","second","method","is","`","gradient","`",",","which","computes","the","gradient","with","respect","to","the","input","array",".","Both","methods","are","intended","to","be","pure","with","no","side-effects",".","In","other","words","they","do","not","modify","their","inputs","."]
docstr: Return the gradient with respect to a layer output z.
docstr_tok: ["Return","the","gradient","with","respect","to","a","layer","output","z","."]
code: def gradient(self, z):
      """Return the gradient with respect to a layer output z."""
  
file_path: river/river/neural_net/activations.py
imports: from __future__ import annotations
  import abc
  import numpy
label_desc: Use image node_id 2 for calling the Activation obj's underlying member method code with example usage: obj.gradient(z) without return types