brainmass.bounded_input

Contents

brainmass.bounded_input#

brainmass.bounded_input(x, bound=500.0)[source]#

Apply tanh bounding to input signal.

Prevents numerical instability by limiting the magnitude of inputs to the second-order system.

Parameters:
  • x (Array | ndarray | bool | number | bool | int | float | complex | Quantity) – Input signal.

  • bound (float) – Maximum absolute value.

Returns:

bound * tanh(u / bound)

Return type:

Array | ndarray | bool | number | bool | int | float | complex | Quantity