diff --git a/paddle/fluid/operators/controlflow/compare_op.cc b/paddle/fluid/operators/controlflow/compare_op.cc index 579ff7148044fb23c7169f12753e6fa95d4f8a06..6579a2898b9d8d66c33e895de8e96d4b8aa48a63 100644 --- a/paddle/fluid/operators/controlflow/compare_op.cc +++ b/paddle/fluid/operators/controlflow/compare_op.cc @@ -88,7 +88,7 @@ class CompareOp : public framework::OperatorWithKernel { PADDLE_ENFORCE_GE(dim_x.size(), dim_y.size(), platform::errors::InvalidArgument( "The size of dim_y should not be greater than " - "dim_x's, but received dim_y: %d > dim_x: %d", + "dim_x's, but received dim_y: %d > dim_x: %d.\n", dim_y.size(), dim_x.size())); context->SetOutputDim("Out", context->GetInputDim("X")); diff --git a/python/paddle/fluid/executor.py b/python/paddle/fluid/executor.py index ace58854d71d2f4ffbdaf5ae7281920d54ffd766..8ceba92dd0742ccc915a6c2e3a18e655caa105d5 100644 --- a/python/paddle/fluid/executor.py +++ b/python/paddle/fluid/executor.py @@ -516,7 +516,7 @@ class Executor(object): # os.environ['CPU_NUM'] = str(2) # If you don't set place and PaddlePaddle is CPU version - # os.environ['CPU_NUM'] = str(2) + os.environ['CPU_NUM'] = str(2) compiled_prog = compiler.CompiledProgram( train_program).with_data_parallel( diff --git a/python/paddle/tensor/random.py b/python/paddle/tensor/random.py index 6a1cd6cc01bd01c2a3d0fcd1b83ff9d8b0505947..3f73ce186ec7716d457f99898eadcffeab910e17 100644 --- a/python/paddle/tensor/random.py +++ b/python/paddle/tensor/random.py @@ -31,7 +31,7 @@ from ..fluid.data_feeder import convert_dtype, check_variable_and_dtype, check_t from ..fluid.layers import utils from ..fluid.layers.tensor import fill_constant -__all__ = ['randperm', 'randint'] +__all__ = ['randperm', 'randn', 'randint'] def randint(low, @@ -208,7 +208,7 @@ def randn(shape, shape(list|tuple): Shape of the generated random tensor. out(Variable, optional): Optional output which can be any created Variable that meets the requirements to store the result of operation. If the - out is `None`, a new Variable wiil be returned to store the result. + out is `None`, a new Variable will be returned to store the result. Default is None. dtype(np.dtype|core.VarDesc.VarType|str, optional): Data type of the output tensor, which can be float32, float64. if dtype is `None` , the data @@ -225,7 +225,7 @@ def randn(shape, Default is None. Returns: - Random tensor whose data is drawn from a Gaussian distribution, + Random tensor whose data is drawn from a standard normal distribution, dtype: flaot32 or float64 as specified. Return type: