상세 컨텐츠

본문 제목

AttributeError: module 'tensorflow._api.v2.lite' has no attribute 'constants'

개발 환경/Python

by cepiloth 2021. 5. 6. 14:35

본문

728x90
반응형

tensorflow2 에서 tf.lite.constants.QUANTIZED_UINT8와 같은 DEPRECATED 된 값을 사용시 발생한다. tensorflow2 에서 사용하는 것으로 변경하면 된다.

tf.lite.constants.FLOAT -> tf.float32

tf.lite.constants.INT8 -> tf.int8

tf.lite.constants.INT32 -> tf.int32

tf.lite.constants.INT64 -> tf.int64

tf.lite.constants.STRING -> tf.string

tf.lite.constants.QUANTIZED_UINT8 -> tf.uint8

728x90
반응형

관련글 더보기

댓글 영역