텐서플로우 1.0 알파 버전이 릴리즈 되었습니다. 지난번에 포스팅된 API 변화 내용 외에도 추가된 변경사항이 많이 있습니다. 아래는 추가적인 변경 사항 중 대표적인 몇가지 입니다.
- 나눗셈과 나머지 계산이(/, //, %) 파이썬 2.x 스타일로 변경되었습니다. 즉 제수와 피제수 중 하나만 부동소수면 결과도 부동 소수 입니다(파이썬 3.x 은 제수, 피제수와 상관없이 부동 소수를 리턴합니다).
tf.mod
,tf.div
도 같은 맥락으로 변경되었으며 정수 결과를 얻기 위해서tf.truncatemod
,tf.truncatediv
를 사용할 수 있습니다. tf.divide
가 현재 사용하고 있는 파이썬에 맞는 나눗셈을 합니다. 만약 파이썬 2 스타일을 원할 경우tf.div
를, 파이썬 3 스타일로 나눗셈을 할 경우tf.truediv
를 사용할 수 있습니다.tf.multiply
,tf.subtract
,tf.negative
가 추가되고tf.mul
,tf.sub
,tf.neg
는 deprecated 됩니다.tf.scalar_summary
,tf.histogram_summary
같은 summary 연산자가 삭제되고tf.summary.scalar
,tf.summary.histogram
이 추가 되었습니다.
이외에도 많은 버그와 수정사항이 포함되었습니다. 추가 기능으로 눈에 띠는 것은 커맨드라인 디버거(tfdbg)와 자바 API 입니다. tgdbg 는 인터렉티브한 쉘 환경을 사용해 텐서플로우 코드를 살필 수 있는 기능을 제공하는 것 같습니다. 자세한 내용은 커맨드라인 디버거 하우투 문서를 참고하세요(이 페이지의 이미지가 보이질 않네요). 자바 API는 아직 experiment 수준이지만 자바를 즐겨 쓰는 분들에게는 반가운 소식이 될 것 같습니다!
텐서플로우 1.0.0-alpha 버전을 설치하려면 pip
명령에 패키지를 직접 지정해야 합니다.
##### 파이선 2.7 # Ubuntu/Linux 64-bit, CPU only, Python 2.7 $ export TF_BINARY_URL=https://storage.googleapis.com/tensorflow/linux/cpu/tensorflow-1.0.0a0-cp27-none-linux_x86_64.whl # Ubuntu/Linux 64-bit, GPU enabled, Python 2.7 # Requires CUDA toolkit 8.0 and CuDNN v5. $ export TF_BINARY_URL=https://storage.googleapis.com/tensorflow/linux/gpu/tensorflow_gpu-1.0.0a0-cp27-none-linux_x86_64.whl # Mac OS X, CPU only, Python 2.7: $ export TF_BINARY_URL=https://storage.googleapis.com/tensorflow/mac/cpu/tensorflow-1.0.0a0-py2-none-any.whl # Mac OS X, GPU enabled, Python 2.7: $ export TF_BINARY_URL=https://storage.googleapis.com/tensorflow/mac/gpu/tensorflow_gpu-1.0.0a0-py2-none-any.whl ##### 파이썬 3.x # Ubuntu/Linux 64-bit, CPU only, Python 3.4 $ export TF_BINARY_URL=https://storage.googleapis.com/tensorflow/linux/cpu/tensorflow-1.0.0a0-cp34-cp34m-linux_x86_64.whl # Ubuntu/Linux 64-bit, GPU enabled, Python 3.4 # Requires CUDA toolkit 8.0 and CuDNN v5. $ export TF_BINARY_URL=https://storage.googleapis.com/tensorflow/linux/gpu/tensorflow_gpu-1.0.0a0-cp34-cp34m-linux_x86_64.whl # Ubuntu/Linux 64-bit, CPU only, Python 3.5 $ export TF_BINARY_URL=https://storage.googleapis.com/tensorflow/linux/cpu/tensorflow-1.0.0a0-cp35-cp35m-linux_x86_64.whl # Ubuntu/Linux 64-bit, GPU enabled, Python 3.5 # Requires CUDA toolkit 8.0 and CuDNN v5. $ export TF_BINARY_URL=https://storage.googleapis.com/tensorflow/linux/gpu/tensorflow_gpu-1.0.0a0-cp35-cp35m-linux_x86_64.whl # Mac OS X, CPU only, Python 3.4 or 3.5: $ export TF_BINARY_URL=https://storage.googleapis.com/tensorflow/mac/cpu/tensorflow-1.0.0a0-py3-none-any.whl # Mac OS X, GPU enabled, Python 3.4 or 3.5: $ export TF_BINARY_URL=https://storage.googleapis.com/tensorflow/mac/gpu/tensorflow_gpu-1.0.0a0-py3-none-any.whl # 설치 $ sudo pip install --upgrade $TF_BINARY_URL
Windows CPU:
C:\> pip install --upgrade https://storage.googleapis.com/tensorflow/windows/cpu/tensorflow-1.0.0a0-cp35-cp35m-win_amd64.whl
Windows GPU:
C:\> pip install --upgrade https://storage.googleapis.com/tensorflow/windows/gpu/tensorflow_gpu-1.0.0a0-cp35-cp35m-win_amd64.whl