[solved] AttributeError: module 'tensorflow._api.v2.lite' has no attribute 'interpreter'
코드
import tensorflow as tf interpreter = tf.lite.interpreter("model.tflite") interpreter.allocate_tensors()
오류 메세지
AttributeError Traceback (most recent call last) <ipython-input-3-66e8971eb13c> in <module>() 1 import tensorflow as tf 2 interpreter = tf.lite.interpreter("model.tflite") 3 interpreter.allocate_tensors() AttributeError: module 'tensorflow._api.v2.lite' has no attribute 'interpreter' |
+) attribute 확인하는 방법
'lite' in dir(tf) #True 'interpreter' in dir(tf.lite) #False
결론
interpreter 맨 앞에 소문자 아니고 대문자로 Interpreter 였음 아악
Class라서 대문자였던 것이다... 아...
'🔨삽질' 카테고리의 다른 글
안드로이드 스튜디오 assets 폴더 추가하는 방법 (0) | 2020.07.08 |
---|---|
[solved] 작업관리자에서 크롬 옆에 있는 숫자는 뭘까? (0) | 2020.06.09 |
[solved] SyntaxError: (unicode error) 'unicodeescape' codec can't decode bytes in position 2-3: truncated \UXXXXXXXX escape (0) | 2020.06.08 |
[solved] 깃허브에 잔디가 안 심어진다! (0) | 2020.05.31 |
[solved] build.gradle (Module: app) 이 없다! (0) | 2020.05.30 |
댓글
이 글 공유하기
다른 글
-
안드로이드 스튜디오 assets 폴더 추가하는 방법
안드로이드 스튜디오 assets 폴더 추가하는 방법
2020.07.08# 왜 매번 안드 다시 잡을 때마다 까먹는걸까 🤔 -
[solved] 작업관리자에서 크롬 옆에 있는 숫자는 뭘까?
[solved] 작업관리자에서 크롬 옆에 있는 숫자는 뭘까?
2020.06.09캡쳐를 보면 알 수 있듯이, 내 노트북은 죽어가는 중이다. 노트북 뜨끈해져서 팬이 미친듯이 돌아가고 손에서는 땀이 나길래, CPU 점유율을 낮춰보고자 작업관리자를 켰다. 상태가 심각할거라는건 알고 있었다. 안드로이드 스튜디오와 비주얼 스튜디오와 유니티를 동시에 돌려놓는 미친 짓도 자주 했다. (당연히 크롬이나 카톡 같은건 기본으로 켜놨다.) 방금 가상현실 수업의 10번째 과제를 제출했기에, 좀 살려보고자 한다. (교수님 저도 살려주세요) 우선 여기있는 18은 '프로세스'의 숫자이다. 프로세스란? 얼마전에 운영체제 수업에서 배웠다. 프로세스란, 실행 중인 프로그램을 뜻한다. 우리는 멀티 프로세스를 사용한다. 즉, 메모리 위에 프로그램 여러개가 동시에 올라갈 수 있다는 뜻이다. 아무튼, 프로세스에게 메모리를… -
[solved] SyntaxError: (unicode error) 'unicodeescape' codec can't decode bytes in position 2-3: truncated \UXXXXXXXX escape
[solved] SyntaxError: (unicode error) 'unicodeescape' codec can't decode bytes in position 2-3: truncated \UXXXXXXXX escape
2020.06.08코드 import tensorflow as tf tf.__version__ interpreter = tf.lite.interpreter("C:/Users/user/model.tflite") interpreter.allocate_tensors() 오류 메세지 SyntaxError: (unicode error) 'unicodeescape' codec can't decode bytes in position 2-3: truncated \UXXXXXXXX escape 해결 방법 "C:\Users\user\model.tflite" 를 "C:/Users/user/model.tflite" 로 바꿔주면 된다. \ 대신 /를 사용하면 해결된다. -
[solved] 깃허브에 잔디가 안 심어진다!
[solved] 깃허브에 잔디가 안 심어진다!
2020.05.31간단한 해결 방법을 공유하고자 한다. 이 방법을 사용하면 앞으로 잔디가 잘 심어질 뿐만 아니라, 여태 안 심어졌던 잔디들도 다시 심을 수 있다!! 단, 자신의 이메일을 사용하였을 경우에만 해당한다. 요약 '.gitconfig' 파일이 있는 폴더로 이동 'git config --list' 로 이메일 확인 Github - settings - Emails - 'Add email address'에 이메일 넣기 verification email accept 하기 이 순서대로 차근차근히 설명하도록 하겠다. 0. 소스트리 이용자일 경우? 만약에 소스트리를 사용하고 있다면, 도구-옵션-기본 사용자 정보 에서 이메일을 확인하고 3번으로 넘어가도 된다! 아니라면 1번부터 차근차근 진행하도록 하자. 1. '.gitconfi…
댓글을 사용할 수 없습니다.