tobegit3hub/tensorflow_template_application

DropOut PlaceHolder should be a scalar, how to construct it with tensorProto

shanghai-Jerry opened this issue · 2 comments

I construct it using BoolVal : []bool{fasle}, with shape dim size = 1, but it has errors like behind:

The second input must be a scalar, but it has shape [1]

I don't know how to solve it.

Since the model signature is the map of tensor, I don't think we can pass the scalar data in the request or describe it in the model signature.

I'm afraid that this convention requires users to set all the request parameters as list or tensor.

all the request parameters as list or tensor

that's quite right. I am afraid causing that error is because of using a wrong model. But with a list like BoolVal : []bool{fasle} is a right way to construct request with tensorProto. I've tried different ways to load tensorflow models in golang, Here are some examples. TFMODEL