TensorFlow Lite

你好,我在使用 TFLiteConverter.from_saved_model 时遇到一个奇怪的问题

tensorflow.lite.python.convert.ConverterError: :0: error: loc (“gru/gru_cell/bias”): is not immutable, try running tf-saved-model-optimize-global-tensors to prove tensors are immutable

:0: note: loc (“gru/gru_cell/bias”): see current operation: “tf_saved_model.global_tensor”() {is_mutable, sym_name = “gru/gru_cell/bias”, type = tensor<2x384xf32>, value = dense<“很长,就删掉了”> : tensor<2x384xf32>} : () -> ()

模型有调用 GRU 单元,但是之前的训练和测试都没有问题,是和 TFlite 有关吗?版本是 tensorflow2.2,python3.7