标签: c++ c tensorflow protocol-buffers tensorflow-serving
我想为tensorflow服务编写c ++客户端。为此,我需要将矩阵转换为tensorflow :: TensorProto
Prism.Forms
然后通过gRPC发送到tensorflow服务。
// 2x3 matrix std::vector<std::vector<float>> example = {{0.53, 0.52, 0.24},{0.5,0.4,0.8}}
如何转换并指定矩阵形状?