class_docstr: Tests for the Dropout class
class_docstr_tok: ["Tests","for","the","Dropout","class"]
docstr: test_override: Make sure dropout_dict changes dropout probabilities
  successfully.
docstr_tok: ["test_override",":","Make","sure","dropout_dict","changes","dropout","probabilities","successfully","."]
code: def test_override(self):
      """test_override: Make sure dropout_dict changes dropout probabilities
      successfully."""
  
      # We would like to configure the test to deterministically drop,
      # so that the test does not need to use multiple runs.
      # However, tf.nn.dropout divides by include_prob, so zero or
      # infinitesimal include_prob causes NaNs.
      # For this test, random failure to drop will not cause the test to fail.
      # The stochastic version should not even run if everything is working
      # right.
      model = MLP(
          input_shape=[1, 1],
          layers=[Dropout(name="output", include_prob=1e-8)],
      )
      x = tf.constant([[1]], dtype=tf.float32)
      dropout_dict = {"output": 1.0}
      y = model.get_layer(
          x, "output", dropout=True, dropout_dict=dropout_dict
      )
      sess = tf.Session()
      y_value = sess.run(y)
      self.assertClose(y_value, 1.0)
  
file_path: cleverhans/cleverhans_v3.1.0/tests_tf/test_picklable_model.py
imports: import numpy
  import tensorflow
  from cleverhans.devtools.checks import CleverHansTest
  from cleverhans.picklable_model import Dropout
  from cleverhans.picklable_model import MLP
  from cleverhans.picklable_model import PerImageStandardize
label_desc: Use image node_id 3 for calling the TestDropout obj's underlying member method code with example usage: obj.test_override() without return types