'Tensor flow directory syntax
I try to execute the code in google collab to quantize my tensor flow model in my PC
In the code:
import tensorflow as tf
converter = tf.lite.TFLiteConverter.from_saved_model(D:\FYP\tflite floating point model converted_tflite\converted_tflite)
converter.optimizations = [tf.lite.Optimize.DEFAULT]
converter.representative_dataset = representative_dataset
converter.target_spec.supported_ops = [tf.lite.OpsSet.TFLITE_BUILTINS_INT8]
converter.inference_input_type = tf.int8 # or tf.uint8
converter.inference_output_type = tf.int8 # or tf.uint8
tflite_quant_model = converter.convert()
The error said it is syntax problem in
converter = tf.lite.TFLiteConverter.from_saved_model(D:\FYP\tflite floating point model converted_tflite\converted_tflite)
Is it syntax problem? Or is google colab cannot execute my local file and I must do this by downloading python?
How should I write directory syntax correctly in tensorflow?
Solution 1:[1]
Seems like you forgot to pass the path as a string (notice the use of "):
converter = tf.lite.TFLiteConverter.from_saved_model("D:\FYP\tflite floating point model converted_tflite\converted_tflite")
Sources
This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.
Source: Stack Overflow
| Solution | Source |
|---|---|
| Solution 1 | aaossa |
