code: def test_precision(self):
      self.start_tests()
  
      try:
          util.np_dtype_mapping = dict(
              bool=np.bool_, int=np.int32, float=np.float16
          )
          tf_util.DTYPE_MAPPING = dict(
              bool=tf.bool, int=tf.int32, float=tf.float16
          )
  
          # TODO: TensorFlow optimizers seem incompatible with float16
          optimizer = dict(optimizer="evolutionary", learning_rate=1e-3)
          baseline_optimizer = dict(
              optimizer="evolutionary", learning_rate=1e-3
          )
          self.unittest(
              optimizer=optimizer,
              baseline_optimizer=baseline_optimizer,
              config=dict(
                  device="CPU",
                  eager_mode=True,
                  create_debug_assertions=True,
                  tf_log_level=20,
              ),
          )
  
          util.np_dtype_mapping = dict(
              bool=np.bool_, int=np.int64, float=np.float64
          )
          tf_util.DTYPE_MAPPING = dict(
              bool=tf.bool, int=tf.int64, float=tf.float64
          )
  
          self.unittest()
  
      except BaseException as exc:
          raise exc
          self.assertTrue(expr=False)
  
      finally:
          util.np_dtype_mapping = dict(
              bool=np.bool_, int=np.int64, float=np.float32
          )
          tf_util.DTYPE_MAPPING = dict(
              bool=tf.bool, int=tf.int64, float=tf.float32
          )
  
file_path: tensorforce/test/test_precision.py
imports: import unittest
  import numpy
  import tensorflow
  from tensorforce import util
  from tensorforce.core import tf_util
  from test.unittest_base import UnittestBase
label_desc: Use image node_id 1 for calling the TestPrecision obj's underlying member method code with example usage: obj.test_precision() without return types