T
- data type for image()
output@Operator(group="image") public final class DecodePng<T extends Number> extends PrimitiveOp implements Operand<T>
The attr `channels` indicates the desired number of color channels for the decoded image.
Accepted values are:
This op also supports decoding JPEGs and non-animated GIFs since the interface is the same, though it is cleaner to use `tf.image.decode_image`.
Modifier and Type | Class and Description |
---|---|
static class |
DecodePng.Options
Optional attributes for
DecodePng |
operation
Modifier and Type | Method and Description |
---|---|
Output<T> |
asOutput()
Returns the symbolic handle of a tensor.
|
static DecodePng.Options |
channels(Long channels) |
static <T extends Number> |
create(Scope scope,
Operand<String> contents,
Class<T> dtype,
DecodePng.Options... options)
Factory method to create a class wrapping a new DecodePng operation.
|
static DecodePng<UInt8> |
create(Scope scope,
Operand<String> contents,
DecodePng.Options... options)
Factory method to create a class wrapping a new DecodePng operation using default output types.
|
Output<T> |
image()
3-D with shape `[height, width, channels]`.
|
equals, hashCode, op, toString
public static <T extends Number> DecodePng<T> create(Scope scope, Operand<String> contents, Class<T> dtype, DecodePng.Options... options)
scope
- current scopecontents
- 0-D. The PNG-encoded image.dtype
- options
- carries optional attributes valuespublic static DecodePng<UInt8> create(Scope scope, Operand<String> contents, DecodePng.Options... options)
scope
- current scopecontents
- 0-D. The PNG-encoded image.options
- carries optional attributes valuespublic static DecodePng.Options channels(Long channels)
channels
- Number of color channels for the decoded image.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.