docstr: Gradient through paths wrt volatility can be computed.
docstr_tok: ["Gradient","through","paths","wrt","volatility","can","be","computed","."]
code: def test_gbm_normal_draws_gradient(self):
      """Gradient through paths wrt volatility can be computed."""
      dtype = tf.float64
      volatility = tf.constant(0.1, dtype=dtype)
      with tf.GradientTape() as tape:
          tape.watch(volatility)
          process = tff.models.GeometricBrownianMotion(
              mean=0.05, volatility=volatility, dtype=dtype
          )
          samples = process.sample_paths(
              times=[0.0, 0.1, 0.5, 1.0],
              num_samples=10_000,
              seed=[4, 2],
              random_type=tff.math.random.RandomType.STATELESS_ANTITHETIC,
          )
          grad = tape.gradient(tf.reduce_mean(samples), volatility)
  
      grad = self.evaluate(grad)
      # The mean should stay close to 1.0 regardless of `volatility` value
      self.assertAlmostEqual(grad, 0.0, delta=1e-3)
  
imports: from absl.testing import parameterized
  import numpy
  import tensorflow.compat.v2
  import tf_quant_finance
  from tensorflow.python.framework import test_util
  from tf_quant_finance.models.geometric_brownian_motion import geometric_brownian_motion_test_utils
  from tf_quant_finance.models.geometric_brownian_motion import univariate_geometric_brownian_motion
label_desc: Use image node_id 25 for calling the GeometricBrownianMotionTest obj's underlying member method code with example usage: obj.test_gbm_normal_draws_gradient() without return types