attr ‘explicit_paddings’,tensorflow迁移到安卓报错不能载入模型

Android Stdio中报错:
Caused by: java.io.IOException: Not a valid TensorFlow Graph serialization: NodeDef mentions attr ‘explicit_paddings’ not in Op<name=Conv2D; signature=input:T, filter:T -> output:T; attr=T:type,allowed=[DT_HALF, DT_BFLOAT16, DT_FLOAT, DT_DOUBLE]; attr=strides:list(int); attr=use_cudnn_on_gpu:bool,default=true; attr=padding:string,allowed=[“SAME”, “VALID”]; attr=data_format:string,default=“NHWC”,allowed=[“NHWC”, “NCHW”]; attr=dilations:list(int),default=[1, 1, 1, 1]>; NodeDef: {{node conv2d_1/convolution}}. (Check whether your GraphDef-interpreting binary is up to date with your GraphDef-generating binary.).

attr 'explicit_paddings',tensorflow迁移到安卓报错不能载入模型解决办法ruo:将tensorflow降级到1.13.1或以下。因为安卓端目前只能
在gradle中:
implementation ‘org.tensorflow:tensorflow-android:1.13.1’
也就是安卓最高智能识别1.13.1版本tensorflow生成的模型,若tensorflow版本大于此则,无法载入模型!

降级方法:在pycharm中打开setting->选择project interpreter点击右边的“+”号,输入tensorflow,在specical version中选择版本号即可。

attr 'explicit_paddings',tensorflow迁移到安卓报错不能载入模型attr 'explicit_paddings',tensorflow迁移到安卓报错不能载入模型OK!大功告成

相关文章:

  • 2021-09-21
  • 2021-09-04
  • 2021-04-15
  • 2022-02-25
  • 2022-12-23
  • 2021-08-23
  • 2022-01-20
  • 2021-08-08
猜你喜欢
  • 2021-10-26
  • 2021-10-02
  • 2022-01-15
  • 2022-02-14
  • 2021-05-20
  • 2021-10-26
  • 2021-07-01
相关资源
相似解决方案