T
- data type for output()
output@Operator(group="image") public final class RandomCrop<T extends Number> extends PrimitiveOp implements Operand<T>
`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.
Modifier and Type | Class and Description |
---|---|
static class |
RandomCrop.Options
Optional attributes for
RandomCrop |
operation
Modifier and Type | Method and Description |
---|---|
Output<T> |
asOutput()
Returns the symbolic handle of a tensor.
|
static <T extends Number> |
create(Scope scope,
Operand<T> image,
Operand<Long> size,
RandomCrop.Options... options)
Factory method to create a class wrapping a new RandomCrop operation.
|
Output<T> |
output()
3-D of shape `[crop_height, crop_width, channels].`
|
static RandomCrop.Options |
seed(Long seed) |
static RandomCrop.Options |
seed2(Long seed2) |
equals, hashCode, op, toString
public static <T extends Number> RandomCrop<T> create(Scope scope, Operand<T> image, Operand<Long> size, RandomCrop.Options... options)
scope
- current scopeimage
- 3-D of shape `[height, width, channels]`.size
- 1-D of length 2 containing: `crop_height`, `crop_width`..options
- carries optional attributes valuespublic static RandomCrop.Options seed(Long seed)
seed
- 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.public static RandomCrop.Options seed2(Long seed2)
seed2
- An second seed to avoid seed collision.public Output<T> asOutput()
Operand
Inputs to TensorFlow operations are outputs of another TensorFlow operation. This method is used to obtain a symbolic handle that represents the computation of the input.
asOutput
in interface Operand<T extends Number>
OperationBuilder.addInput(Output)
Copyright © 2022. All rights reserved.