def inception_batch_inference():
    tensors = freeze.unfreeze_into_current_graph(
        paths.IMAGENET_GRAPH_DEF,
        tensor_names=[consts.INCEPTION_INPUT_ARRAY_TENSOR, "softmax:0"])

    def forward(sess, _img):
        label_vect = sess.run(
            tensors["softmax:0"],
            {tensors[consts.INCEPTION_INPUT_ARRAY_TENSOR]: _img})
        return label_vect

    return forward
def inception_inference():
    tensors = freeze.unfreeze_into_current_graph(
        paths.IMAGENET_GRAPH_DEF,
        tensor_names=[consts.INCEPTION_INPUT_STRING_TENSOR, "softmax:0"])

    def forward(sess, image_raw):
        label_vect = sess.run(
            tensors["softmax:0"],
            {tensors[consts.INCEPTION_INPUT_STRING_TENSOR]: image_raw})
        return label_vect

    return forward
def inception_model():
    tensors = freeze.unfreeze_into_current_graph(
        paths.IMAGENET_GRAPH_DEF,
        tensor_names=[
            consts.INCEPTION_INPUT_TENSOR, consts.INCEPTION_OUTPUT_TENSOR
        ])

    def forward(sess, image_raw):
        out = sess.run(tensors[consts.INCEPTION_OUTPUT_TENSOR],
                       {tensors[consts.INCEPTION_INPUT_TENSOR]: image_raw})
        return out

    return forward
def inception_image_model():
    tensors = freeze.unfreeze_into_current_graph(
        paths.IMAGENET_GRAPH_DEF,
        tensor_names=[
            consts.INCEPTION_INPUT_ARRAY_TENSOR, consts.INCEPTION_OUTPUT_TENSOR
        ])

    def forward(_sess, _image_array):
        _out = _sess.run(
            tensors[consts.INCEPTION_OUTPUT_TENSOR],
            {tensors[consts.INCEPTION_INPUT_ARRAY_TENSOR]: _image_array})
        return _out

    return forward