텐서플로우 환경에서 EfficientNetB1 모델을 사용해 학습을 진행하는데 아래와 같은 오류가 발생했다.
오류메세지:
Error occurred during the 1 iteration: Unable to serialize [2.0896919 2.1128857 2.1081853] to JSON. Unrecognized type <class 'tensorflow.python.framework.ops.EagerTensor'>
pip install tensorflow-gpu==2.10.0으로 설치하였고 tensorflow-gpu의 버전이 2.10.* 일 경우에 이런 오류가 난다.
따라서 pip uninstall tensorflow-gpu를 통해 제거해주고 2.9.0 버전으로 다시 설치하면 해결이 가능하다.
해결방법:
pip install tensorflow-gpu==2.9.0