diff --git a/python/paddle/hapi/model.py b/python/paddle/hapi/model.py index 31a430789d636b35edbf833ac105236834c47e43..16b3646a4a81a485868ffd8406752f8115a62607 100644 --- a/python/paddle/hapi/model.py +++ b/python/paddle/hapi/model.py @@ -465,7 +465,7 @@ class StaticGraphAdapter(object): idx] == core.VarDesc.VarType.FP16: if isinstance(feed[n], core.LoDTensor): feed[n] = feed[n]._as_type(core.VarDesc.VarType.FP16) - elif isinstance(feed[n], numpy.array): + elif isinstance(feed[n], np.array): feed[n] = feed[n].astype('float16') if labels is not None: