code: def test_intra_batch_is_stochastic():
      dummy_input = torch.randn(10)
      dummy_input = torch.stack([dummy_input, dummy_input])
      assert dummy_input.shape == (2, 10)
      test_module = torch.nn.Sequential(
          torch.nn.Linear(10, 5),
          torch.nn.ReLU(),
          baal.bayesian.consistent_dropout.ConsistentDropout(p=0.5),
          torch.nn.Linear(5, 2),
      )
      test_module.eval()
      # NOTE: This is quite a stochastic test...
      torch.manual_seed(2019)
      pred = test_module(dummy_input)
      assert (pred[0] - pred[1]).abs().sum() > 0
  
      assert torch.eq(pred, test_module(dummy_input)).all()
  
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 7 for calling a global function with example usage: test_intra_batch_is_stochastic() without return types