code: def test_activation_function(reset):
      # creating a deep image embedder with relu
      is_training = tf.Variable(
          False,
          trainable=False,
          collections=[tf.GraphKeys.LOCAL_VARIABLES],
      )
      embedder = ImageEmbedder(
          np.array([100, 100, 10]),
          name="relu",
          scheme=EmbedderScheme.Deep,
          activation_function=tf.nn.relu,
          is_training=is_training,
      )
  
      # call the embedder
      embedder()
  
      # try feeding a batch of one example
      input = np.random.rand(1, 100, 100, 10)
      sess = tf.Session()
      sess.run(tf.global_variables_initializer())
      output = sess.run(embedder.output, {embedder.input: input})
      assert np.all(output >= 0)  # should have flattened the input
  
      # creating a deep image embedder with tanh
      embedder_tanh = ImageEmbedder(
          np.array([100, 100, 10]),
          name="tanh",
          scheme=EmbedderScheme.Deep,
          activation_function=tf.nn.tanh,
          is_training=is_training,
      )
  
      # call the embedder
      embedder_tanh()
  
      # try feeding a batch of one example
      input = np.random.rand(1, 100, 100, 10)
      sess = tf.Session()
      sess.run(tf.global_variables_initializer())
      output = sess.run(
          embedder_tanh.output, {embedder_tanh.input: input}
      )
      assert np.all(output >= -1) and np.all(output <= 1)
  
file_path: coach/rl_coach/tests/architectures/tensorflow_components/embedders/test_image_embedder.py
imports: import os
  import sys
  import pytest
  import numpy
  from rl_coach.architectures.tensorflow_components.embedders.image_embedder import ImageEmbedder, EmbedderScheme
  import tensorflow
  from tensorflow import logging
label_desc: Use image node_id 4 for calling a global function with example usage: test_activation_function(reset) without return types