T - data type for image() output@Operator 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 to wrap a new DecodePng operation to the graph.
|
static DecodePng<UInt8> |
create(Scope scope,
Operand<String> contents,
DecodePng.Options... options)
Factory method to create a class to wrap a new DecodePng operation to the graph, using default output types.
|
Output<T> |
image()
3-D with shape `[height, width, channels]`.
|
equals, hashCode, toStringpublic static <T extends Number> DecodePng<T> create(Scope scope, Operand<String> contents, Class<T> dtype, DecodePng.Options... options)
scope - current graph 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 graph 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()
OperandInputs 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 © 2015–2019. All rights reserved.