tensorflow_template_application icon indicating copy to clipboard operation
tensorflow_template_application copied to clipboard

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

Open shanghai-Jerry opened this issue 6 years ago • 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.

shanghai-Jerry avatar Jul 24 '19 06:07 shanghai-Jerry

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.

tobegit3hub avatar Jul 25 '19 11:07 tobegit3hub

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

shanghai-Jerry avatar Jul 30 '19 06:07 shanghai-Jerry