tf.raw_ops.While
    
    
      
    
    
      
      Stay organized with collections
    
    
      
      Save and categorize content based on your preferences.
    
  
  
      
    
  
  
  
  
  
    
  
  
    
    
output = input; While (Cond(output)) { output = Body(output) }
tf.raw_ops.While(
    input, cond, body, output_shapes=[], parallel_iterations=10, name=None
)
| Args | 
|---|
| input | A list of Tensorobjects.
A list of input tensors whose types are T. | 
| cond | A function decorated with @Defun.
A function takes 'input' and returns a tensor.  If the tensor is
a scalar of non-boolean, the scalar is converted to a boolean
according to the following rule: if the scalar is a numerical
value, non-zero means True and zero means False; if the scalar is
a string, non-empty means True and empty means False. If the
tensor is not a scalar, non-emptiness means True and False
otherwise. | 
| body | A function decorated with @Defun.
A function that takes a list of tensors and returns another
list of tensors. Both lists have the same types as specified
by T. | 
| output_shapes | An optional list of shapes (each a tf.TensorShapeor list ofints). Defaults to[]. | 
| parallel_iterations | An optional int. Defaults to10. | 
| name | A name for the operation (optional). | 
| Returns | 
|---|
| A list of Tensorobjects. Has the same type asinput. | 
  
  
 
  
    
    
      
       
    
    
  
  
  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. Some content is licensed under the numpy license.
  Last updated 2024-04-26 UTC.
  
  
  
    
      [null,null,["Last updated 2024-04-26 UTC."],[],[]]