diff --git a/python/paddle/v2/fluid/executor.py b/python/paddle/v2/fluid/executor.py index 1bc3423f10cf0955334b7bea8e1e6ae1a22ae0bf..0eddcc3a5ab6f71aa5500c3b98b63c0937c7ddfc 100644 --- a/python/paddle/v2/fluid/executor.py +++ b/python/paddle/v2/fluid/executor.py @@ -51,8 +51,7 @@ def as_numpy(tensor): if len(lod) == 0: ans = tensor_data else: - #raise RuntimeError("LoD Calculate lacks unit tests and buggy") - ans = tensor_data + raise RuntimeError("LoD Calculate lacks unit tests and buggy") # elif len(lod) == 1: # ans = [] # idx = 0 diff --git a/python/paddle/v2/fluid/tests/test_cpp_reader.py b/python/paddle/v2/fluid/tests/test_cpp_reader.py index cd5fff9425cb34cda931cec9ce2e2c9938f986f3..7efcb0c46d2a7e378d7963ce55b929624e2143c0 100644 --- a/python/paddle/v2/fluid/tests/test_cpp_reader.py +++ b/python/paddle/v2/fluid/tests/test_cpp_reader.py @@ -33,16 +33,6 @@ create_random_reader_op = block.append_op( "max": 1.0 }) -batch_reader = block.create_var( - type=fluid.core.VarDesc.VarType.READER, name=("BatchReader")) -batch_reader.desc.set_lod_levels([0, 0]) - -create_batch_reader_op = block.append_op( - type="create_batch_reader", - inputs={"UnderlyingReader": random_reader}, - outputs={"Out": batch_reader}, - attrs={"batch_size": 10}) - out1 = block.create_var( type=fluid.core.VarDesc.VarType.LOD_TENSOR, name="Out1", @@ -57,7 +47,8 @@ out2 = block.create_var( lod_level=1) read_op = block.append_op( - type="read", inputs={"Reader": batch_reader}, + type="read", + inputs={"Reader": random_reader}, outputs={"Out": [out1, out2]}) place = fluid.CPUPlace()