  Integrated optical devices that can realize a threshold filtration of signals
are in demand in photonics. In particular, they play a key role in neuromorphic
chips, acting as optical neurons. A list of requirements exist for thresholders
to be practically applicable in this context. A value of the threshold, in
general, should be independently tunable for each neuron. A sharpness of the
corresponding step function should be also dynamically variable, to allow
switching between deterministic and stochastic algorithms, for example, in
optical Ising machines. Nonlinear ring resonators draw the attention of
researchers in this field since they potentially can provide the required type
of threshold behavior. Here we suggest the switching mechanism that implements
the property of resonators to provide extremely sharp (with respect to the
wavelength) $\pi$ phase shifts near the critical coupling regime. Adding a
variable source of losses into the resonator, a well controlled broadening of
the threshold can be achieved. Sharpness of the step in this case is
independent on the quality factor of resonators and corresponding width of
resonances. The nonlinear switching mechanism allows to use this feature to
construct efficient optical neurons, that operate at small intensities. It also
allows to use conventional materials like silicon with a relatively weak Kerr
nonlinearity. The obtained results potentially lead the way to fast nonlinear
Kerr effect based activation functions that can operate in continuous wave
regime.
