tfp.math.bracket_root
    
    
      
    
    
      
      Stay organized with collections
    
    
      
      Save and categorize content based on your preferences.
    
  
  
      
    
  
  
  
  
  
    
  
  
    
    
Finds bounds that bracket a root of the objective function.
tfp.math.bracket_root(
    objective_fn,
    dtype=tf.float32,
    num_points=512,
    name='bracket_root'
)
This method attempts to return an interval bracketing a root of the objective
function. It evaluates the objective in parallel at num_points
locations, at exponentially increasing distance from the origin, and returns
the first pair of adjacent points [low, high] such that the objective is
finite and has a different sign at the two points. If no such pair was
observed, it returns the trivial interval
[np.finfo(dtype).min, np.finfo(dtype).max] containing all float values of
the specified dtype. If the objective has multiple
roots, the returned interval will contain at least one (but perhaps not all)
of the roots.
| Args | 
|---|
| objective_fn | Python callable for which roots are searched. It must be a
continuous function that accepts a scalar Tensorof typedtypeand
returns aTensorof shapebatch_shape. | 
| dtype | Optional float dtypeof inputs toobjective_fn.
Default value:tf.float32. | 
| num_points | Optional Python intnumber of points at which to evaluate
the objective.
Default value:512. | 
| name | Python strname given to ops created by this method. | 
| Returns | 
|---|
| low | Float Tensorof shapebatch_shapeand dtypedtype. Lower bound
on a root ofobjective_fn. | 
| high | Float Tensorof shapebatch_shapeand dtypedtype. Upper bound
on a root ofobjective_fn. | 
  
  
 
  
    
    
      
       
    
    
  
  
  Except as otherwise noted, the content of this page is licensed under the Creative Commons Attribution 4.0 License, and code samples are licensed under the Apache 2.0 License. For details, see the Google Developers Site Policies. Java is a registered trademark of Oracle and/or its affiliates.
  Last updated 2023-11-21 UTC.
  
  
  
    
      [null,null,["Last updated 2023-11-21 UTC."],[],[]]