Transformers1 [issue] tensorflow, keras, transformer 버전 문제 TypeError: Exception encountered when calling layer 'embeddings' (type TFEmbeddings). colab, kaggle 에서 돌아가는 코드들이 로컬에서 돌리면 안돌아가는 경우가 있다. 대부분 버전문제로 아래 2줄의 코드로 해결했다. import os os.environ["TF_USE_LEGACY_KERAS"] = "1" 아래는 MacOS 에서 설치한 각버전 pip install tf-keras==2.16.0 pip install tensorflow-macos==2.15.0 pip install tensorflow-metal==1.1.0 # macos==2.15.0과 호환 pip install transformers==4.39.1 2024. 3. 29. 이전 1 다음