Tensorflow Serving 分组卷积

May*_*ank 5 python keras tensorflow tensorflow-serving

我正在使用 keras 和 tensorflow 进行笔迹检测。我已经准备好模型并使用 hdf5 文件。当我尝试使用tensorflow 提供服务时,出现以下错误:

grpc.framework.interfaces.face.face.LocalError: LocalError(code=StatusCode.UNIMPLEMENTED, details="Generic conv implementation does not support grouped convolutions for now.
 [[{{node conv2d_1/convolution}} = Conv2D[T=DT_FLOAT, _output_shapes=[[?,40,40,20]], data_format="NHWC", dilations=[1, 1, 1, 1], padding="SAME", strides=[1, 1, 1, 1], use_cudnn_on_gpu=true, _device="/job:localhost/replica:0/task:0/device:CPU:0"](_arg_conv2d_1_input_0_0, conv2d_1/kernel/read)]]")
Run Code Online (Sandbox Code Playgroud)

我以前所提到的两个文件这个文章来从我的HDF5文件中的模型(这是工作)。请提供任何可以帮助我解决此问题的输入?

小智 1

我遇到了类似的错误,但错误消息是“融合的转换实现不支持...”而不是“通用转换实现不支持...”。事实证明,这对我来说也是 TensorFlow 版本问题——我需要的是 1.13.2 版本。为了解决这个问题,我在执行“import tensorflow as tf”之前执行了此操作:

 !pip install tensorflow==1.13.2
Run Code Online (Sandbox Code Playgroud)

这为我解决了这个问题。