class_docstr: Base test class and used for CPU case.
docstr: Testing 2 flatten groups.
docstr_tok: ["Testing","2","flatten","groups","."]
code: def test_two_flattening_group(self):
      """Testing 2 flatten groups."""
      module = self._get_transformer()
      num_params = sum(p.numel() for p in module.parameters())
  
      params_to_flatten1 = list(
          module.encoder.layers[1].parameters()
      ) + list(module.decoder.layers[0].parameters())
      params_to_flatten2 = list(
          module.encoder.layers[0].parameters()
      ) + list(module.decoder.layers[1].parameters())
      num_params_to_flatten1 = sum(
          p.numel() for p in params_to_flatten1
      )
      num_params_to_flatten2 = sum(
          p.numel() for p in params_to_flatten2
      )
  
      module = FlattenParamsWrapper(
          module, param_list=[params_to_flatten1, params_to_flatten2]
      )
      assert module.flat_params[0].numel() == num_params_to_flatten1
      assert module.flat_params[1].numel() == num_params_to_flatten2
      assert sum(p.numel() for p in module.parameters()) == num_params
  
imports: from collections import OrderedDict
  import unittest
  import torch
  from fairscale.fair_dev.testing.testing import objects_are_equal
  from fairscale.nn import FlattenParamsWrapper
label_desc: Use image node_id 13 for calling the TestFlattenParams obj's underlying member method code with example usage: obj.test_two_flattening_group() without return types