code: def __init__(
      self,
      model,
      input_record,
      name="dropout",
      ratio=0.5,
      dropout_for_eval=False,
      **kwargs,
  ):
      super().__init__(model, name, input_record, **kwargs)
      assert isinstance(
          input_record, schema.Scalar
      ), "Incorrect input type"
      assert ratio >= 0 and ratio < 1.0, (
          "Expected 0 <= ratio < 1, but got ratio of %s" % ratio
      )
  
      self.output_schema = input_record.clone_schema()
      self.output_schema.set_value(
          self.get_next_blob_reference("output")
      )
      self.dropout_for_eval = dropout_for_eval
  
      self.ratio = ratio
  
file_path: pytorch/caffe2/python/layers/dropout.py
imports: from caffe2.python import schema
  from caffe2.python.layers.layers import ModelLayer
label_desc: Use image node_id 1 to create a new Dropout object from inherited base classes: ModelLayer with example: obj = Dropout(model, input_record, name, ratio, dropout_for_eval)