Warning: file_get_contents(/data/phpspider/zhask/data//catemap/2/tensorflow/5.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181

Warning: file_get_contents(/data/phpspider/zhask/data//catemap/8/variables/2.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
将DeepLab转换为TensorFlow Lite_Tensorflow_Tensorflow Lite - Fatal编程技术网

将DeepLab转换为TensorFlow Lite

将DeepLab转换为TensorFlow Lite,tensorflow,tensorflow-lite,Tensorflow,Tensorflow Lite,我正在尝试将在Cityscapes数据集上训练的DeepLab从这里转换为TFLite。在Netron中查看冻结图时,输入和输出张量均为uint8类型。我能够使用为TFLite GPU委托提供的默认DeepLab模型,该模型具有float32输入和输出张量。我认为模型不应该被量化,所以当尝试以下没有注释行的代码时,我得到了这个错误: F tensorflow/lite/toco/tooling_util.cc:2241] Check failed: array.data_type == arra

我正在尝试将在Cityscapes数据集上训练的DeepLab从这里转换为TFLite。在Netron中查看冻结图时,输入和输出张量均为uint8类型。我能够使用为TFLite GPU委托提供的默认DeepLab模型,该模型具有float32输入和输出张量。我认为模型不应该被量化,所以当尝试以下没有注释行的代码时,我得到了这个错误:

F tensorflow/lite/toco/tooling_util.cc:2241] Check failed: array.data_type == array.final_data_type Array "ImageTensor" has mis-matching actual and final data types (data_type=uint8, final_data_type=float).
在这之后,我发现我应该尝试量化模型。我插入了注释行以使用uint8而不是float32,但是我得到了这个错误,这似乎是一个不受支持的操作

F ./tensorflow/lite/toco/toco_tooling.h:38] Check failed: s.ok() Unimplemented: this graph contains anoperator of type Cast for which the quantized form is not yet implemented. Sorry, and patches welcome (that's a relatively fun patch to write, mostly providing the actual quantized arithmetic code for this op).
使用量化脚本正确吗?提供的现成TFLite DeepLab模型使用float32。谢谢