---
title: mix_precision實做
tags: 實做練習
---
## Refer to [tensorflow 教材](https://colab.research.google.com/github/tensorflow/docs/blob/master/site/en/guide/keras/mixed_precision.ipynb)
Overflow & Underflow testing of Float 16

首先設定的部份,先引入tensorflow(2.1版)
我指定給一號GPU

參考 tensorflow2 的[文檔](https://www.tensorflow.org/guide/gpu)限制我的 GPU
**用多少開多少**
```
gpus = tf.config.experimental.list_physical_devices('GPU')
if gp