112 views

Skip to first unread message

Feb 9, 2021, 12:03:05 PM2/9/21

to TensorFlow Community Testing

System information

Have I written custom code (as opposed to using a stock example script provided in TensorFlow): yes

OS Platform and Distribution (e.g., Linux Ubuntu 16.04): Linux RHEL

Mobile device (e.g. iPhone 8, Pixel 2, Samsung Galaxy) if the issue happens on mobile device: no

TensorFlow installed from (source or binary): source

TensorFlow version (use command below): 2.4

Python version: 3.6

Bazel version (if compiling from source): 0.16.1

Exact command to reproduce: compile and execute my program

Problem description:

i have created a logistic regression model using tf.estimators.linearClassifier and exported the model to serve it using C API.

the saved_model cli command has the following output:

The given SavedModel SignatureDef contains the following input(s):

inputs['a'] tensor_info:

dtype: DT_INT64

shape: (-1, 1)

name: Placeholder:0

inputs['b'] tensor_info:

dtype: DT_INT64

shape: (-1, 1)

name: Placeholder_1:0

The given SavedModel SignatureDef contains the following output(s):

outputs['all_class_ids'] tensor_info:

dtype: DT_INT32

shape: (-1, 2)

name: head/predictions/Tile:0

outputs['all_classes'] tensor_info:

dtype: DT_STRING

shape: (-1, 2)

name: head/predictions/Tile_1:0

outputs['class_ids'] tensor_info:

dtype: DT_INT64

shape: (-1, 1)

name: head/predictions/ExpandDims:0

outputs['classes'] tensor_info:

dtype: DT_STRING

shape: (-1, 1)

name: head/predictions/str_classes:0

outputs['logistic'] tensor_info:

dtype: DT_FLOAT

shape: (-1, 1)

name: head/predictions/logistic:0

outputs['logits'] tensor_info:

dtype: DT_FLOAT

shape: (-1, 1)

name: linear/linear_model/linear/linear_model/linear/linear_model/weighted_sum:0

outputs['probabilities'] tensor_info:

dtype: DT_FLOAT

shape: (-1, 2)

name: head/predictions/probabilities:0

Method name is: tensorflow/serving/predict

it has two input tensors and 5 outputs, the c code used to run the model is attached.

But it is crashing at Session run step, it would be really helpful if someone could identify where the issue is.

output obtained:

TF_LoadSessionFromSavedModel OK

TF_GraphOperationByName placeholder is OK

TF_GraphOperationByName placeholder_1 is OK

TF_GraphOperationByName linear/head/predictions/ExpandDims is OK

TF_GraphOperationByName linear/head/predictions/str_classes is OK

TF_GraphOperationByName linear/head/predictions/logistic is OK

TF_GraphOperationByName linear/linear_model/weighted_sum is OK

TF_GraphOperationByName linear/head/predictions/probabilities is OK

TF_NewTensor is OK for int_tensor1

TF_NewTensor is OK for int_tensor2

Segmentation fault (core dumped)

Reply all

Reply to author

Forward

0 new messages

Search

Clear search

Close search

Google apps

Main menu