Modeling Guide

TF Evaluate MNIST

This operator is an extension of the python27 operator. It runs tensorflow code that applies a previously trained model (loaded from disk) to an image message stream.

The resulting program infers the numbers from each handwriting picture, which is based on the MNIST example https://www.tensorflow.org/tutorials/layersInformation published on non-SAP site

Prerequisites

  • MNIST model (type binary, default: None): A pretrained MNIST model (including metadata) that was created with the experimental.ml.tensorflow.trainMnist operator (that is, artifacts prefixed with "model.ckpt" that were created with a tf.train.Saver in the repository under modeldir).

  • MNIST image (type binary, default: None): An input stream of MNIST png- or jpg- images in the correct pixel size (28x28).

Configuration Parameters

Parameter

Type

Description

demo bool Introduces additional time between each evaluation step.

Default: true

logging bool Activate log output.

Default: true

tmpdir

string

Contains the tmpdir parameter.

Default: "/tmp/tensorflow"

Input

Input

Type

Description

inModelBlob

blob

It takes the model from a blob type, which will be internally translated into a python.str type.

inFilename

string

The filename is only used for the json output.

inFile

message

The input images are stored in a python message type.

Output

Output

Type

Description

jsonResult

string

Classification results separated by the newline command in a json format (image_path,result). #*

stderr

stream.base64.*

The output frames in base64-encoded image format.