Notice
Recent Posts
Recent Comments
Link
«   2025/02   »
1
2 3 4 5 6 7 8
9 10 11 12 13 14 15
16 17 18 19 20 21 22
23 24 25 26 27 28
Tags
more
Archives
Today
Total
관리 메뉴

Zorba blog

[Error] NotImplementedError: Cannot convert a symbolic Tensor 해결 방법 본문

카테고리 없음

[Error] NotImplementedError: Cannot convert a symbolic Tensor 해결 방법

Zorba blog 2022. 5. 13. 18:39
# 띄어쓰기 처리
sent = '김철수는 극중 두 인격의 사나이 이광수 역을 맡았다. 철수는 한국 유일의 태권도 전승자를 가리는 결전의 날을 앞두고 10년간 함께 훈련한 사형인 유연재(김광수 분)를 찾으러 속세로 내려온 인물이다.'
from pykospacing import Spacing
spacing = Spacing()
kospacing_sent = spacing(new_sent) 

print(sent)
print(kospacing_sent)

자연어 처리중 띄어쓰기 처리를 하기위해 위 코드를 실행하는데 오류가 발생.

 

1. 에러 원인


numpy와 tensorflow의 버전이 맞지 않아서 생기는 문제.

numpy의 버전이 높아 tensorflow에서 아직 구현을 못한 것이라고 한다.

 

2. 해결 방법


pip uninstall numpy

conda install numpy=1.19.5 -c conda-forge

 

3. 참고링크


 

https://riverside13.tistory.com/entry/NotImplementedError-Cannot-convert-a-symbolic-Tensor%EC%9D%98-%ED%95%B4%EA%B2%B0-%EB%B0%A9%EB%B2%95

Comments