code: def testDropoutFCLayersWithConv(self, training):
      observation_spec = tensor_spec.BoundedTensorSpec(
          (8, 8, 3), tf.float32, 0, 1
      )
      time_step_spec = ts.time_step_spec(observation_spec)
      time_step = tensor_spec.sample_spec_nest(
          time_step_spec, outer_dims=(1,)
      )
      action_spec = tensor_spec.BoundedTensorSpec(
          (2,), tf.float32, 2, 3
      )
  
      net = actor_distribution_network.ActorDistributionNetwork(
          observation_spec,
          action_spec,
          conv_layer_params=[(4, 2, 2)],
          fc_layer_params=[5],
          dropout_layer_params=[0.5],
      )
  
      modes = []
      num_modes = 10
      for _ in range(num_modes):
          action_distributions, _ = net(
              time_step.observation,
              time_step.step_type,
              (),
              training=training,
          )
          modes.append(action_distributions.mode())
  
      self.evaluate(tf.compat.v1.global_variables_initializer())
      modes = self.evaluate(modes)
  
      # Verify that the modes from action_distributions are not all the same.
      any_modes_differ = False
      for i in range(num_modes):
          for j in range(i + 1, num_modes):
              any_modes_differ = (
                  np.linalg.norm(modes[i] - modes[j]) > 1e-6
              )
              if any_modes_differ:
                  self.assertEqual(training, any_modes_differ)
                  return
  
      self.assertEqual(training, any_modes_differ)
  
file_path: agents/tf_agents/networks/actor_distribution_network_test.py
imports: from __future__ import absolute_import
  from __future__ import division
  from __future__ import print_function
  from absl.testing import parameterized
  import numpy
  import tensorflow
  from tf_agents.networks import actor_distribution_network
  from tf_agents.specs import tensor_spec
  from tf_agents.trajectories import time_step
  from tensorflow.python.framework import test_util
label_desc: Use image node_id 5 for calling the ActorDistributionNetworkTest obj's underlying member method code with example usage: obj.testDropoutFCLayersWithConv(training) without return types