Closed fightseed closed 3 years ago
作者你好,请问怎样做模型转换 我使用如下代码 with CustomObjectScope({'relu6': keras.layers.ReLU(6.)}): converter = tf.lite.TFLiteConverter.from_keras_model_file('linear.h5') tflite_model = converter.convert() open("converted_model.tflite", "wb").write(tflite_model) 对模型转换成tflite,但是一致报错“ValueError: Unknown activation function:relu6”
这个。。你可以试试relu激活函数。
训练和预测
作者你好,请问怎样做模型转换 我使用如下代码 with CustomObjectScope({'relu6': keras.layers.ReLU(6.)}): converter = tf.lite.TFLiteConverter.from_keras_model_file('linear.h5') tflite_model = converter.convert() open("converted_model.tflite", "wb").write(tflite_model) 对模型转换成tflite,但是一致报错“ValueError: Unknown activation function:relu6”