code: def test_attention(self):
      self.start_tests(name="attention")
  
      states = dict(
          type="float", shape=(2, 3), min_value=1.0, max_value=2.0
      )
      network = [
          dict(type="self_attention", size=8),
          dict(type="pooling", reduction="max"),
      ]
      self.unittest(states=states, policy=network)
  
      states = dict(
          type="float", shape=(2, 2, 3), min_value=1.0, max_value=2.0
      )
      network = [
          dict(type="self_attention", size=8, attention_size=7),
          dict(type="pooling", reduction="max"),
      ]
      self.unittest(states=states, policy=network)
  
file_path: tensorforce/test/test_layers.py
imports: import unittest
  from test.unittest_base import UnittestBase
label_desc: Use image node_id 2 for calling the TestLayers obj's underlying member method code with example usage: obj.test_attention() without return types