@EnableBinding(value=org.springframework.cloud.stream.messaging.Processor.class) @EnableConfigurationProperties(value=org.springframework.cloud.stream.app.tensorflow.processor.TensorflowCommonProcessorProperties.class) @Import(value=org.springframework.cloud.stream.app.tensorflow.processor.TensorflowCommonProcessorConfiguration.class) public class TensorflowProcessorConfiguration extends Object
TensorflowInputConverter
to convert the input data into TensorFlow model input format (called
feeds). The input converter converts the input Message
into key/value Map
,
where the Key corresponds to a model input placeholder (feed) and the content is DataType
compliant value. The default converter implementation expects either Map payload.
The TensorflowInputConverter
can be extended and customized.
Processor's output uses the TensorflowOutputConverter
to convert the computed Tensor
result into a
serializable message. The default implementation converts the Tensor result into JSON (see:
TensorflowOutputConverter
).
The TensorflowOutputConverter
can be extended and customized to provide a convenient data representations,
accustomed for a particular model (see TwitterSentimentTensorflowOutputConverter.java)
By default the inference result is returned in the outbound Message payload. If the saveResultInHeader property is
set to true then the inference result would be stored in the outbound Message header by name as set by
the getResultHeader property. In this case the message payload is the same like the inbound message payload.Modifier and Type | Field and Description |
---|---|
static String |
ORIGINAL_INPUT_DATA |
Constructor and Description |
---|
TensorflowProcessorConfiguration() |
Modifier and Type | Method and Description |
---|---|
org.springframework.cloud.stream.app.tensorflow.processor.TensorflowInputConverter |
tensorflowInputConverter() |
org.springframework.cloud.stream.app.tensorflow.processor.TensorflowOutputConverter |
tensorflowOutputConverter() |
org.springframework.cloud.stream.app.tensorflow.processor.OutputMessageBuilder |
tensorflowOutputMessageBuilder() |
public static final String ORIGINAL_INPUT_DATA
@Bean @ConditionalOnMissingBean public org.springframework.cloud.stream.app.tensorflow.processor.OutputMessageBuilder tensorflowOutputMessageBuilder()
@Bean public org.springframework.cloud.stream.app.tensorflow.processor.TensorflowOutputConverter tensorflowOutputConverter()
@Bean public org.springframework.cloud.stream.app.tensorflow.processor.TensorflowInputConverter tensorflowInputConverter()
Copyright © 2020 Pivotal Software, Inc.. All rights reserved.