diff --git a/python/paddle/hapi/progressbar.py b/python/paddle/hapi/progressbar.py index 6ed33f4f960b402fc97f32342a54c1c9ffd6e889..8020029be2a4e454af8834a09b87b5c4ba681bea 100644 --- a/python/paddle/hapi/progressbar.py +++ b/python/paddle/hapi/progressbar.py @@ -20,6 +20,7 @@ import os import sys import time import numpy as np +import struct from collections import namedtuple __all__ = [] @@ -79,6 +80,20 @@ class ProgressBar(object): def update(self, current_num, values={}): now = time.time() + def convert_uint16_to_float(in_list): + in_list = np.asarray(in_list) + out = np.vectorize( + lambda x: struct.unpack('