class_docstr: The layer that calculates the "hard sigmoid" activation function
  for each element of the single input:
  
  - :math:`f(x) = 0`                    if :math:`x \le -bias / slope`
  - :math:`f(x) = slope * x + bias`     if :math:`-bias / slope < x < (1 - bias) / slope`
  - :math:`f(x) = 1`                    if :math:`x \ge (1 - bias) / slope`
  
  :param input_layer: The input layer and the number of its output. If no number
      is specified, the first output will be connected.
  :type input_layer: object, tuple(object, int)
  :param slope: The slope of the linear component.   
  :type slope: float, > 0
  :param bias: The shift of the linear component from 0.
  :type bias: float
  :param name: The layer name.
  :type name: str, default=None
  
  .. rubric:: Layer inputs:
  
  (1) a data blob of any size
  
  .. rubric:: Layer outputs:
  
  (1) a data blob of the same size as the input,
      with activation function values on each of the input elements
class_docstr_tok: ["The","layer","that","calculates","the","``","hard","sigmoid","''","activation","function","for","each","element","of","the","single","input",":","-",":","math",":","`","f","(","x",")","=","0","`","if",":","math",":","`","x","\\le","-bias","\/","slope","`","-",":","math",":","`","f","(","x",")","=","slope","*","x","+","bias","`","if",":","math",":","`","-bias","\/","slope","<","x","<","(","1","-","bias",")","\/","slope","`","-",":","math",":","`","f","(","x",")","=","1","`","if",":","math",":","`","x","\\ge","(","1","-","bias",")","\/","slope","`",":","param","input_layer",":","The","input","layer","and","the","number","of","its","output",".","If","no","number","is","specified",",","the","first","output","will","be","connected",".",":","type","input_layer",":","object",",","tuple","(","object",",","int",")",":","param","slope",":","The","slope","of","the","linear","component",".",":","type","slope",":","float",",",">","0",":","param","bias",":","The","shift","of","the","linear","component","from","0.",":","type","bias",":","float",":","param","name",":","The","layer","name",".",":","type","name",":","str",",","default=None","..","rubric",":",":","Layer","inputs",":","(","1",")","a","data","blob","of","any","size","..","rubric",":",":","Layer","outputs",":","(","1",")","a","data","blob","of","the","same","size","as","the","input",",","with","activation","function","values","on","each","of","the","input","elements"]
code: def __init__(self, input_layer, slope, bias, name=None):
      if type(input_layer) is PythonWrapper.HardSigmoid:
          super().__init__(input_layer)
          return
  
      layers, outputs = check_input_layers(input_layer, 1)
  
      internal = PythonWrapper.HardSigmoid(
          str(name),
          layers[0],
          int(outputs[0]),
          float(slope),
          float(bias),
      )
      super().__init__(internal)
  
imports: import neoml.PythonWrapper
  from .Dnn import Layer
  from neoml.Utils import check_input_layers
  import typing
label_desc: Use image node_id 1 to create a new HardSigmoid object from inherited base classes: Layer with example: obj = HardSigmoid(input_layer, slope, bias, name)