module tensorflow_apiv2lite has no attribute constants
The error message suggests that the constants module is not available in the tensorflow._api.v2.lite module.
To solve this issue, you can try using the lite_constants module instead. Here's an example of how you can import and use it:
from tensorflow.lite import lite_constants
# Now you can use the constants from the lite_constants module
print(lite_constants.FLOAT32)
print(lite_constants.FLOAT16)
Make sure you have the correct version of TensorFlow installed. If you're using TensorFlow 2.x, you should be able to import and use the lite_constants module without any issues
原文地址: https://www.cveoy.top/t/topic/h8fk 著作权归作者所有。请勿转载和采集!