From 9752e5bcbd1fd577a3e01c9c6b8a92d16f7ad818 Mon Sep 17 00:00:00 2001 From: fengjiayi Date: Mon, 28 May 2018 18:52:44 +0800 Subject: [PATCH] Add uint8 support in data_feeder.py --- python/paddle/fluid/data_feeder.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/python/paddle/fluid/data_feeder.py b/python/paddle/fluid/data_feeder.py index a44e078d0c1..7940dabcfb0 100644 --- a/python/paddle/fluid/data_feeder.py +++ b/python/paddle/fluid/data_feeder.py @@ -36,9 +36,11 @@ class DataToLoDTensorConverter(object): self.dtype = 'float64' elif dtype == core.VarDesc.VarType.INT32: self.dtype = 'int32' + elif dtype == core.VarDesc.VarType.UINT8: + self.dtype = 'uint8' else: raise ValueError("dtype must be any of [int32, float32, int64, " - "float64]") + "float64, uint8]") self.data = [] self.lod = [] -- GitLab