code: def test_textual_representation_contains_activations(self):
      params = Params(
          {
              "input_dim": 2,
              "hidden_dims": 3,
              "activations": ["linear", "relu", "swish"],
              "num_layers": 3,
          }
      )
      feedforward = FeedForward.from_params(params)
      expected_text_representation = inspect.cleandoc(
          """
              FeedForward(
                (_activations): ModuleList(
                  (0): LinearActivation()
                  (1): ReLU()
                  (2): SwishActivation()
                )
                (_linear_layers): ModuleList(
                  (0): Linear(in_features=2, out_features=3, bias=True)
                  (1): Linear(in_features=3, out_features=3, bias=True)
                  (2): Linear(in_features=3, out_features=3, bias=True)
                )
                (_dropout): ModuleList(
                  (0): Dropout(p=0.0, inplace=False)
                  (1): Dropout(p=0.0, inplace=False)
                  (2): Dropout(p=0.0, inplace=False)
                )
              )
              """
      )
      actual_text_representation = str(feedforward)
  
      assert actual_text_representation == expected_text_representation
  
file_path: allennlp/tests/modules/feedforward_test.py
imports: from numpy.testing import assert_almost_equal
  import inspect
  import pytest
  import torch
  from allennlp.common import Params
  from allennlp.common.checks import ConfigurationError
  from allennlp.modules import FeedForward
  from allennlp.nn import InitializerApplicator, Initializer, Activation
  from allennlp.common.testing import AllenNlpTestCase
label_desc: Use image node_id 5 for calling the TestFeedForward obj's underlying member method code with example usage: obj.test_textual_representation_contains_activations() without return types