기본 콘텐츠로 건너뛰기

10월, 2024의 게시물 표시

Python 객체 저장 - pickle, pickletools

Python 객체 저장 - pickle, pickletools pickle, pickletools 모듈 문서 pickle - Python object serialization Protocol version 0 is the original “human-readable” protocol and is backwards compatible with earlier versions of Python. Protocol version 1 is an old binary format which is also compatible with earlier versions of Python. Protocol version 2 was introduced in Python 2.3. It provides much more efficient pickling of new-style classes . Refer to PEP 307 for information about improvements brought by protocol 2. Protocol version 3 was added in Python 3.0. It has explicit support for bytes objects and cannot be unpickled by Python 2.x. This was the default protocol in Python 3.0–3.7. Protocol version 4 was added in Python 3.4. It adds support for very large objects, pickling more kinds of objects, and some data format optimizations. It is the default protocol starting with Python 3.8. Refer to PEP 3154 for information about improvements brought by protocol 4. Prot...

TensorFlow 버전과 Keras 2 또는 3 버전

TensorFlow 버전과 Keras 2 또는 3 버전 개요 실습 목적 Python 버전에 따라 설치할 수 있는 TensorFlow 버전이 어떻게 달라지는지 파악합니다. TensorFlow를 설치하면 Keras도 설치됩니다. 어느 버전의 TensorFlow부터 Keras 3가 설치되는지 파악합니다. Keras 2.15.0에서 발생하는 TextVectorization 객체 직렬화 문제가 Keras 3에서는 발생하지 않는지 파악합니다. 실습 환경 Windows 10 환경에서 실습하고 문서를 작성하였습니다. 가상 환경 도구로는 Python 기본 라이브러리에 포함되어 있는 venv 를 사용하였습니다. SW 버전 Python 3.9.3 3.12.4 pip 22.0.4 24.0 TensorFlow 2.15.1 2.16.2 Keras 2.15.0 3.4.1 Python 3.9.13 + TensorFlow Python 설치 파일 다운로드 위치 Python Releases for Windows Python 3.9.13 - May 17, 2022 Download Windows installer (64-bit) 설치된 Python과 pip 버전 확인 >python --version Python 3.9.13 >pip --version pip 22.0.4 from C:\Users\user1\AppData\Local\Programs\Python\Python39\lib\site-packages\pip (python 3.9) 설치 가능한 TensorFlow 버전 출력 >pip index versions tensorflow WARNING: pip index is currently an experimental command. It may be removed/changed in a future release without pri...