Path: blob/master/site/ko/xla/tutorials/autoclustering_xla.ipynb
25118 views
Kernel: Python 3
Copyright 2019 The TensorFlow Authors.
In [ ]:
Classifying CIFAR-10 with XLA
This tutorial trains a TensorFlow model to classify the CIFAR-10 dataset, and we compile it using XLA.
TensorFlow 데이터세트(TFDS) API를 사용하여 데이터세트를 로드하고 정규화합니다. 먼저 TensorFlow 및 TFDS를 설치/업그레이드합니다.
In [ ]:
In [ ]:
In [ ]:
Keras CIFAR-10 예제를 기초로 모델을 정의합니다.
In [ ]:
RMSprop 옵티마이저를 사용하여 모델을 훈련합니다.
In [ ]:
이제 XLA 컴파일러를 사용하여 모델을 다시 훈련하겠습니다. 애플리케이션 중간에 컴파일러를 활성화하려면 Keras 세션을 재설정해야 합니다.
In [ ]:
Titan V GPU 및 Intel Xeon E5-2690 CPU를 탑재한 시스템에서 속도 향상은 약 1.17배입니다.