tf.raw_ops.RandomCrop
    
    
      
    
    
      
      Stay organized with collections
    
    
      
      Save and categorize content based on your preferences.
    
  
  
      
    
  
  
  
  
  
    
  
  
    
    
Randomly crop image.
tf.raw_ops.RandomCrop(
    image, size, seed=0, seed2=0, name=None
)
size is a 1-D int64 tensor with 2 elements representing the crop height and
width.  The values must be non negative.
This Op picks a random location in image and crops a height by width
rectangle from that location.  The random location is picked so the cropped
area will fit inside the original image.
| Args | 
|---|
| image | A Tensor. Must be one of the following types:uint8,int8,int16,int32,int64,float32,float64.
3-D of shape[height, width, channels]. | 
| size | A Tensorof typeint64.
1-D of length 2 containing:crop_height,crop_width.. | 
| seed | An optional int. Defaults to0.
If either seed or seed2 are set to be non-zero, the random number
generator is seeded by the given seed.  Otherwise, it is seeded by a
random seed. | 
| seed2 | An optional int. Defaults to0.
An second seed to avoid seed collision. | 
| name | A name for the operation (optional). | 
| Returns | 
|---|
| A Tensor. Has the same type asimage. | 
  
  
 
  
    
    
      
       
    
    
  
  
  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 2023-10-06 UTC.
  
  
  
    
      [null,null,["Last updated 2023-10-06 UTC."],[],[]]