class_docstr: Test functionality of SkorchDoctor using a simple model
class_docstr_tok: ["Test","functionality","of","SkorchDoctor","using","a","simple","model"]
code: def test_activation_recs_values(self, doctor, data):
      recs_module = doctor.activation_recs_["module"]
  
      for key in ("lin0", "lin1", "softmax"):
          # 80% of 50 samples is 40, batch size 32 => 32 + 8 samples per batch
          batch_sizes = [len(batch[key]) for batch in recs_module]
          assert batch_sizes == [32, 8, 32, 8, 32, 8]
  
      X, _ = data
      # for the very first batch, before any update, we actually know the values
      batch0 = recs_module[0]
      lin0_0 = batch0["lin0"]
      # since it is the identity function, batches should equal the data
      np.testing.assert_array_almost_equal(lin0_0, X[:32])
  
      lin1_0 = batch0["lin1"]
      # since weights are 0 and bias is 1, all values should be 1
      np.testing.assert_array_almost_equal(lin1_0, 1.0)
  
      softmax_0 = batch0["softmax"]
      # since all inputs are equal, probabilities should be uniform
      np.testing.assert_array_almost_equal(softmax_0, 0.5)
  
imports: import itertools
  from unittest import mock
  import numpy
  import pytest
  import torch
  from torch import nn
label_desc: Use image node_id 8 for calling the TestSkorchDoctorSimple obj's underlying member method code with example usage: obj.test_activation_recs_values(doctor, data) without return types