"Quantize" Tensorflow Graph to float16 : <p>How do you convert a Tensorflow graph from using <code>float32</code> to <code>float16</code>? Currently there are graph optimizations for quantization and conversion to eight bit ints. </p>

<p>Trying to load <code>float32</code> weights into a <code>float16</code> graph fails with:</p>

<pre><code>DataLossError (see above for traceback): Invalid size in bundle entry: key model/conv5_1/biases; stored size 1536; expected size 768
     [[Node: save/RestoreV2_16 = RestoreV2[dtypes=[DT_HALF], _device="/job:localhost/replica:0/task:0/cpu:0"](_recv_save/Const_0, save/RestoreV2_16/tensor_names, save/RestoreV2_16/shape_and_slices)]]
     [[Node: save/RestoreV2_3/_39 = _Recv[client_terminated=false, recv_device="/job:localhost/replica:0/task:0/gpu:0", send_device="/job:localhost/replica:0/task:0/cpu:0", send_device_incarnation=1, tensor_name="edge_107_save/RestoreV2_3", tensor_type=DT_HALF, _device="/job:localhost/replica:0/task:0/gpu:0"]()]]
</code></pre>
