code: def test_2d_eval_is_stochastic():
      dummy_input = torch.randn(8, 1, 5, 5)
      test_module = torch.nn.Sequential(
          torch.nn.Conv2d(1, 1, 1),
          torch.nn.ReLU(),
          baal.bayesian.consistent_dropout.ConsistentDropout2d(p=0.5),
          torch.nn.Conv2d(1, 1, 1),
      )
      test_module.eval()
      # NOTE: This is quite a stochastic test...
      torch.manual_seed(2019)
      with torch.no_grad():
          assert all(
              (
                  test_module(dummy_input) == test_module(dummy_input)
              ).all()
              for _ in range(10)
          )
  
file_path: baal/tests/bayesian/consistent_dropout_test.py
imports: import warnings
  from copy import deepcopy
  import pytest
  import torch
  import baal.bayesian.consistent_dropout
label_desc: Use image node_id 3 for calling a global function with example usage: test_2d_eval_is_stochastic() without return types