From f37789a52a5b83d83848f880dde05a5f953cc05e Mon Sep 17 00:00:00 2001 From: wangxiao1021 Date: Wed, 27 Nov 2019 14:24:45 +0800 Subject: [PATCH] update reader_helper.py --- paddlepalm/utils/reader_helper.py | 2 -- 1 file changed, 2 deletions(-) diff --git a/paddlepalm/utils/reader_helper.py b/paddlepalm/utils/reader_helper.py index 75bd484..544d488 100644 --- a/paddlepalm/utils/reader_helper.py +++ b/paddlepalm/utils/reader_helper.py @@ -25,13 +25,11 @@ from paddle.fluid import layers def _check_and_adapt_shape_dtype(rt_val, attr, message=""): if not isinstance(rt_val, np.ndarray): rt_val = np.array(rt_val) - print(message + 'int first if block.') assert rt_val.dtype != np.dtype('O'), "yielded data is not a valid tensor(number of elements on some dimension may differ)." if rt_val.dtype == np.dtype('float64'): rt_val = rt_val.astype('float32') shape, dtype = attr - # rt_val = np.array(rt_val, dtype=dtype) assert rt_val.dtype == np.dtype(dtype), message+"yielded data type not consistent with attr settings. Expect: {}, receive: {}.".format(rt_val.dtype, np.dtype(dtype)) assert len(shape) == rt_val.ndim, message+"yielded data rank(ndim) not consistent with attr settings. Expect: {}, receive: {}.".format(len(shape), rt_val.ndim) for rt, exp in zip(rt_val.shape, shape): -- GitLab