assertrt_val.dtype!=np.dtype('O'),"yielded data is not a valid tensor(number of elements on some dimension may differ)."
ifrt_val.dtype==np.dtype('float64'):
rt_val=rt_val.astype('float32')
shape,dtype=attr
# rt_val = np.array(rt_val, dtype=dtype)
assertrt_val.dtype==np.dtype(dtype),message+"yielded data type not consistent with attr settings. Expect: {}, receive: {}.".format(rt_val.dtype,np.dtype(dtype))
assertlen(shape)==rt_val.ndim,message+"yielded data rank(ndim) not consistent with attr settings. Expect: {}, receive: {}.".format(len(shape),rt_val.ndim)