服务RNN:LSTMCell无法正常工作(tensorflow python)

时间:2019-04-04 22:54:07

标签: python tensorflow tensorflow-serving

我正在尝试使用1个LSTMCELL创建一个基本的RNN。创建模型后,它将正确训练。训练后,从文件('modelData.csv')中读取测试数据,并针对该file_input运行NN。模型工作正常,并提供预期的输出(预测)。

保存模型以供食用时,事情会变得有趣。当tensorflow_model_server加载模型并要求使用同一文件('modelData.csv')进行预测时,会产生预测错误。我检查了导出的模型的签名(使用saved_model_cli),看起来不错(尺寸就是应该的尺寸)。

完整的代码和文件一起上传到this GitHub link

grpc._channel._Rendezvous: <_Rendezvous of RPC that terminated with: status = StatusCode.INVALID_ARGUMENT details = "transpose expects a vector of size 2. But input(1) is a vector of size 3 [[{{node rnn/transpose}}]]" debug_error_string = "{"created":"@1554414774.995726952","description":"Error received from peer","file":"src/core/lib/surface/call.cc","file_line":1017,"grpc_message":"transpose expects a vector of size 2. But input(1) is a vector of size 3\n\t [[{{node rnn/transpose}}]]","grpc_status":3}

此项目的RNN中的Tensorboard屏幕快照在存储库中(如果有帮助)。错误消息屏幕截图也位于存储库中。这两个数据文件都在存储库中。如果我导出TF_CPP_MIN_VLOG_LEVEL=1,然后运行tensorflow_model_server,则会出现以下错误:

Input 68: Tensor<type: float shape: [0], bytes: 0> 2019-04-05 07:09:57.334370: W external/org_tensorflow/tensorflow/core/common_runtime/executor.cc:2369] Total bytes 420 2019-04-05 07:09:57.334373: W external/org_tensorflow/tensorflow/core/common_runtime/executor.cc:2381] Iteration: Segmentation fault (core dumped)  
  

Python版本:Python 3.6.8 :: Anaconda,Inc.张量流版本:   1.12.0 TensorFlow模型服务器:1.13.0-rc1 + dev.sha.f16e777 TensorFlow库:1.13.1 saved_model_cli版本:0.1.0操作系统:   从以下位置安装的Ubuntu 18.04.02 tensorflow,tensorflow_model_server   pip和apt-get。

0 个答案:

没有答案