From c32040c3f2402b86580d3a5a8280175a276bd5aa Mon Sep 17 00:00:00 2001 From: typhoonzero Date: Thu, 1 Feb 2018 21:08:59 +0800 Subject: [PATCH 001/122] WIP: remove fan_in --- paddle/operators/listen_and_serv_op.cc | 50 +++----------- .../paddle/v2/fluid/distribute_transpiler.py | 65 ++++++++++++++----- python/paddle/v2/fluid/framework.py | 35 ++++++++++ .../notest_recognize_digits_conv_dist.py | 13 ++-- 4 files changed, 101 insertions(+), 62 deletions(-) diff --git a/paddle/operators/listen_and_serv_op.cc b/paddle/operators/listen_and_serv_op.cc index 099f6b23736..5814a7bee9c 100644 --- a/paddle/operators/listen_and_serv_op.cc +++ b/paddle/operators/listen_and_serv_op.cc @@ -75,13 +75,6 @@ class ListenAndServOp : public framework::OperatorBase { server_thread_->join(); } - std::string GetGradVarNameForTrainer(const std::string &varname) const { - if (grads_counter_.find(varname) == grads_counter_.end()) { - grads_counter_[varname] = 0; - } - return string::Sprintf("%s.trainer_%d", varname, grads_counter_[varname]++); - } - void Run(const framework::Scope &scope, const platform::Place &dev_place) const override { platform::DeviceContextPool &pool = platform::DeviceContextPool::Instance(); @@ -91,9 +84,8 @@ class ListenAndServOp : public framework::OperatorBase { // FIXME(Yancey1989): initialize rpc server with lazy mode. rpc_service_->SetScope(&recv_scope); rpc_service_->SetDevCtx(&dev_ctx); - auto param_list = Attr>("ParamList"); - auto grad_list = Attr>("GradList"); - auto fan_in = Attr("Fanin"); + auto ins = Inputs("X"); + auto fan_in = ins.size(); auto *block = Attr(kOptimizeBlock); auto *program = block->Program(); @@ -109,35 +101,21 @@ class ListenAndServOp : public framework::OperatorBase { int batch_barrier = 0; while (batch_barrier != fan_in) { const detail::MessageWithName &v = rpc_service_->Get(); - auto grad_var_name = v.first; - if (grad_var_name == LISTEN_TERMINATE_MESSAGE) { + auto recv_var_name = v.first; + if (recv_var_name == LISTEN_TERMINATE_MESSAGE) { LOG(INFO) << "received terminate message and exit"; exit_flag = true; break; - } else if (grad_var_name == BATCH_BARRIER_MESSAGE) { + } else if (recv_var_name == BATCH_BARRIER_MESSAGE) { VLOG(3) << "recv batch barrier message"; batch_barrier++; continue; } else { - // receive a variable + VLOG(3) << "received grad: " << recv_var_name; recv_var_cnt++; - auto it = - std::find(grad_list.begin(), grad_list.end(), grad_var_name); - std::string param_var_name; - if (it != grad_list.end()) { - param_var_name = param_list[it - grad_list.begin()]; - } else { - LOG(ERROR) << "grad has no paired param:" << grad_var_name; - } - VLOG(3) << "received grad: " << grad_var_name - << " updating param: " << param_var_name; - - if (fan_in > 1) { - grad_var_name = this->GetGradVarNameForTrainer(grad_var_name); - } - auto *var = recv_scope.FindVar(grad_var_name); + auto *var = recv_scope.FindVar(recv_var_name); if (var == nullptr) { - LOG(ERROR) << "Can not find server side var: " << grad_var_name; + LOG(ERROR) << "Can not find server side var: " << recv_var_name; PADDLE_THROW("Can not find server side var"); } detail::DeserializeFromMessage(v.second, dev_ctx, var); @@ -171,6 +149,7 @@ class ListenAndServOpMaker : public framework::OpProtoAndCheckerMaker { public: ListenAndServOpMaker(OpProto *proto, OpAttrChecker *op_checker) : OpProtoAndCheckerMaker(proto, op_checker) { + AddInput("X", "(Tensor) Variables that server recv.").AsDuplicable(); AddComment(R"DOC( ListenAndServ operator @@ -184,17 +163,6 @@ from send_op and send back variables to recv_op. .AddCustomChecker([](const std::string &ip) { return !ip.empty(); }); AddAttr(kOptimizeBlock, "BlockID to run on server side."); - AddAttr>( - "ParamList", "type list of string", - "grad->param name mapping to find which parameters to optimize.") - .SetDefault({}); - AddAttr>( - "GradList", "type list of string", - "grad->param name mapping to find which parameters to optimize.") - .SetDefault({}); - AddAttr("Fanin", "type int", - "Number of trainers in the current cluster job") - .SetDefault(1); } }; diff --git a/python/paddle/v2/fluid/distribute_transpiler.py b/python/paddle/v2/fluid/distribute_transpiler.py index 121b407cae4..4533405e461 100644 --- a/python/paddle/v2/fluid/distribute_transpiler.py +++ b/python/paddle/v2/fluid/distribute_transpiler.py @@ -82,6 +82,7 @@ class DistributeTranspiler: def transpile(self, optimize_ops, params_grads, + trainer_id, program=None, pservers="127.0.0.1:6174", trainers=1, @@ -98,10 +99,19 @@ class DistributeTranspiler: :param optimize_ops: op list of optimization, should be the return value of Optimizer.minimize :type optimize_ops: list + :param params_grads: list of tuple(weight, gradient) + :type params_grads: list + :param trainer_id: one unique id for each trainer in a job. + :type trainer_id: int :param program: program to optimize, default is default_main_program + :type program: Program :param pservers: parameter server endpoints like "m1:6174,m2:6174" :type pservers: string - :return: return a list of programs + :param trainers: total number of workers/trainers in the job + :type trainers: int + :param split_method: A function to determin how to split variables + to different servers equally. + :type split_method: function """ assert (callable(split_method)) if program is None: @@ -109,6 +119,11 @@ class DistributeTranspiler: self.program = program self.trainers = trainers self.optimize_ops = optimize_ops + # TODO(typhoonzero): currently trainer_id is fetched from cluster system + # like Kubernetes, we should port this to use etcd later when developing + # fluid distributed training with fault-tolerance. + self.trainer_id = trainer_id + # steps to transpile: # 1. split variable to multiple blocks, aligned by product(dim[1:]) (width). # 2. modify trainer program add split_op to each Grad. @@ -189,10 +204,17 @@ class DistributeTranspiler: block_map[varname].append((long(offset), long(size))) for varname, splited in block_map.iteritems(): orig_var = program.global_block().vars[varname] - var_mapping[varname] = [] + if len(splited) == 1: - var_mapping[varname] = [orig_var] + # rename var to the trainer_id var + new_var_name = "%s.trainer_%d" % \ + (orig_var.name, self.trainer_id) + program.global_block().rename_var(varname, new_var_name) + var_mapping[varname] = \ + [program.global_block().var(new_var_name)] continue + + var_mapping[varname] = [] orig_shape = orig_var.shape orig_dim1_flatten = 1 if len(orig_shape) >= 2: @@ -205,11 +227,13 @@ class DistributeTranspiler: if len(orig_shape) >= 2: splited_shape.extend(orig_shape[1:]) var = program.global_block().create_var( - name="%s.block%d" % (varname, i), + name="%s.block%d.trainer_%d" % + (varname, i, self.trainer_id), psersistable=False, dtype=orig_var.dtype, shape=splited_shape) # flattend splited var var_mapping[varname].append(var) + program.global_block().sync_with_cpp() return var_mapping def _clone_var(self, block, var): @@ -449,6 +473,7 @@ class DistributeTranspiler: """ # step5 pserver_program = Program() + recv_inputs = [] for v in self.param_grad_ep_mapping[endpoint]["params"]: self._clone_var(pserver_program.global_block(), v) for v in self.param_grad_ep_mapping[endpoint]["grads"]: @@ -457,13 +482,19 @@ class DistributeTranspiler: pserver_program.global_block().create_var( name=v.name, persistable=True, dtype=v.dtype, shape=v.shape) for trainer_id in xrange(self.trainers): + # change client side var name to origin name by + # removing ".trainer_%d" suffix + suff_idx = v.name.find(".trainer_") + if suff_idx >= 0: + orig_var_name = v.name[:suff_idx] print("create variable for program: %s.trainer_%d" % - (v.name, trainer_id)) - pserver_program.global_block().create_var( - name="%s.trainer_%d" % (v.name, trainer_id), + (orig_var_name, trainer_id)) + var = pserver_program.global_block().create_var( + name="%s.trainer_%d" % (orig_var_name, trainer_id), persistable=True, dtype=v.dtype, shape=v.shape) + recv_inputs.append(var) # step6 optimize_sub_program = Program() # Iterate through the ops and append ops as needed @@ -481,20 +512,20 @@ class DistributeTranspiler: # Append the listen_and_serv op pserver_program.global_block().append_op( type="listen_and_serv", - inputs={}, + inputs={'X': recv_inputs}, outputs={}, attrs={ "OptimizeBlock": optimize_sub_program.global_block(), "endpoint": endpoint, - "ParamList": [ - p.name - for p in self.param_grad_ep_mapping[endpoint]["params"] - ], - "GradList": [ - p.name - for p in self.param_grad_ep_mapping[endpoint]["grads"] - ], - "Fanin": self.trainers + # "ParamList": [ + # p.name + # for p in self.param_grad_ep_mapping[endpoint]["params"] + # ], + # "GradList": [ + # p.name + # for p in self.param_grad_ep_mapping[endpoint]["grads"] + # ], + # "Fanin": self.trainers }) pserver_program.sync_with_cpp() return pserver_program diff --git a/python/paddle/v2/fluid/framework.py b/python/paddle/v2/fluid/framework.py index ae98e299a48..415960f512f 100644 --- a/python/paddle/v2/fluid/framework.py +++ b/python/paddle/v2/fluid/framework.py @@ -282,6 +282,10 @@ class Variable(object): def name(self): return self.desc.name() + @name.setter + def name(self, new_name): + self.desc.set_name(new_name) + @property def shape(self): # convert to tuple, make it as same as numpy API. @@ -530,6 +534,12 @@ class Operator(object): """ return self.desc.input(name) + def rename_input(self, old_name, new_name): + self.desc.rename_input(old_name, new_name) + + def rename_output(self, old_name, new_name): + self.desc.rename_output(old_name, new_name) + @property def input_names(self): """ @@ -539,6 +549,14 @@ class Operator(object): """ return self.desc.input_names() + @property + def input_arg_names(self): + return self.desc.input_arg_names() + + @property + def output_arg_names(self): + return self.desc.output_arg_names() + def output(self, name): """ Get output arguments by the output parameter name @@ -716,6 +734,22 @@ class Block(object): def has_var(self, name): return name in self.vars + def rename_var(self, name, new_name): + """ + Rename variable in vars and ops' inputs and outputs + """ + if not self.has_var(name): + raise ValueError("var %s is not in current" % name) + orig_var = self.var(name) + del self.vars[name] + orig_var.name = new_name + self.vars[new_name] = orig_var + for op in self.ops: + if name in op.input_arg_names: + op.rename_input(name, new_name) + if name in op.output_arg_names: + op.rename_output(name, new_name) + def create_parameter(self, *args, **kwargs): global_block = self.program.global_block() param = Parameter(global_block, *args, **kwargs) @@ -803,6 +837,7 @@ class Block(object): for p in other.iter_parameters(): assert isinstance(p, Parameter) v = self.vars.get(p.name, None) + print("var shape to copy", v) if v is None: raise ValueError("copy_param_info_from should be invoked with " "same topology") diff --git a/python/paddle/v2/fluid/tests/book_distribute/notest_recognize_digits_conv_dist.py b/python/paddle/v2/fluid/tests/book_distribute/notest_recognize_digits_conv_dist.py index f18ca05c780..2461ebdf088 100644 --- a/python/paddle/v2/fluid/tests/book_distribute/notest_recognize_digits_conv_dist.py +++ b/python/paddle/v2/fluid/tests/book_distribute/notest_recognize_digits_conv_dist.py @@ -58,14 +58,19 @@ trainers = int(os.getenv("TRAINERS")) # total trainer count current_endpoint = os.getenv("SERVER_ENDPOINT") # current pserver endpoint training_role = os.getenv("TRAINING_ROLE", "TRAINER") # get the training role: trainer/pserver +if not current_endpoint: + print("need env SERVER_ENDPOINT") + exit(1) + t = fluid.DistributeTranspiler() t.transpile( - optimize_ops, params_grads, pservers=pserver_endpoints, trainers=trainers) + optimize_ops, + params_grads, + 0, + pservers=pserver_endpoints, + trainers=trainers) if training_role == "PSERVER": - if not current_endpoint: - print("need env SERVER_ENDPOINT") - exit(1) pserver_prog = t.get_pserver_program(current_endpoint) pserver_startup = t.get_startup_program(current_endpoint, pserver_prog) exe.run(pserver_startup) -- GitLab From f2e92c5d1371c49761fa10bbe430f939e8ceea10 Mon Sep 17 00:00:00 2001 From: qiao hai-jun Date: Sat, 3 Feb 2018 17:24:07 +0800 Subject: [PATCH 002/122] Update start_mpi_train.sh --- .../cluster_train_v2/openmpi/start_mpi_train.sh | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/paddle/scripts/cluster_train_v2/openmpi/start_mpi_train.sh b/paddle/scripts/cluster_train_v2/openmpi/start_mpi_train.sh index c645495448f..2a7f4636274 100644 --- a/paddle/scripts/cluster_train_v2/openmpi/start_mpi_train.sh +++ b/paddle/scripts/cluster_train_v2/openmpi/start_mpi_train.sh @@ -15,10 +15,14 @@ PADDLE_CLUSTER_TRAIN=True env # start pserver -stdbuf -oL nohup paddle pserver --port=$PADDLE_INIT_PORT --ports_num=$PADDLE_INIT_PORTS_NUM \ - --ports_num_for_sparse=$PADDLE_INIT_PORTS_NUM_FOR_SPARSE --nics=$NICS \ +stdbuf -oL nohup paddle pserver \ + --port=$PADDLE_INIT_PORT \ + --ports_num=$PADDLE_INIT_PORTS_NUM \ + --ports_num_for_sparse=$PADDLE_INIT_PORTS_NUM_FOR_SPARSE \ + --nics=$NICS \ --comment=paddle_cluster_pserver \ - --num_gradient_servers=$PADDLE_INIT_NUM_GRADIENT_SERVERS &> logs/pserver.log & + --num_gradient_servers=$PADDLE_INIT_NUM_GRADIENT_SERVERS \ + &> logs/pserver.log & # start trainer # NOTE: train.py will use the above environment variables as configuration -- GitLab From 7ccbdb1b274308c9c11df06d4f8db2d07e491ea9 Mon Sep 17 00:00:00 2001 From: typhoonzero Date: Tue, 6 Feb 2018 15:04:37 +0800 Subject: [PATCH 003/122] for test --- paddle/framework/block_desc.cc | 24 +++++++++++++++++++ paddle/framework/block_desc.h | 2 ++ paddle/pybind/protobuf.cc | 6 +++++ .../paddle/v2/fluid/distribute_transpiler.py | 2 +- python/paddle/v2/fluid/framework.py | 14 ++++------- 5 files changed, 37 insertions(+), 11 deletions(-) diff --git a/paddle/framework/block_desc.cc b/paddle/framework/block_desc.cc index dd2ed872521..8579582e7e4 100644 --- a/paddle/framework/block_desc.cc +++ b/paddle/framework/block_desc.cc @@ -42,6 +42,30 @@ bool BlockDesc::HasVar(const std::string &name) const { return vars_.find(name) != vars_.end(); } +void BlockDesc::RenameVar(const std::string &old_name, + const std::string &new_name) { + if (this->HasVar(old_name)) { + auto *var = this->Var(old_name); + var->SetName(new_name); + vars_[new_name].reset(var); + vars_.erase(old_name); + // rename inputs and outputs + for (const auto &op : ops_) { + auto *it = op.get(); + for (auto in_name : it->InputArgumentNames()) { + if (in_name == old_name) { + it->RenameInput(old_name, new_name); + } + } + for (auto out_name : it->OutputArgumentNames()) { + if (out_name == old_name) { + it->RenameOutput(old_name, new_name); + } + } + } + } +} + VarDesc *BlockDesc::FindVarRecursive(const std::string &name) const { if (name == kEmptyVarName) return nullptr; diff --git a/paddle/framework/block_desc.h b/paddle/framework/block_desc.h index 4b609e4bcb6..e87a543909d 100644 --- a/paddle/framework/block_desc.h +++ b/paddle/framework/block_desc.h @@ -55,6 +55,8 @@ class BlockDesc { bool HasVar(const std::string &var_name) const; + void RenameVar(const std::string &old_name, const std::string &new_name); + VarDesc *FindVarRecursive(const std::string &name_bytes) const; VarDesc &FindRecursiveOrCreateVar(const std::string &name_bytes); diff --git a/paddle/pybind/protobuf.cc b/paddle/pybind/protobuf.cc index 371d6119d4a..f39dc472629 100644 --- a/paddle/pybind/protobuf.cc +++ b/paddle/pybind/protobuf.cc @@ -171,6 +171,12 @@ void BindBlockDesc(py::module &m) { std::string name = byte_name; return self.HasVar(name); }) + .def("rename_var", + [](BlockDesc &self, py::bytes byte_name, py::bytes byte_name_new) { + std::string name = byte_name; + std::string new_name = byte_name_new; + return self.RenameVar(name, new_name); + }) .def("has_var_recursive", [](BlockDesc &self, py::bytes byte_name) { std::string name = byte_name; diff --git a/python/paddle/v2/fluid/distribute_transpiler.py b/python/paddle/v2/fluid/distribute_transpiler.py index 4533405e461..89e467b0bdb 100644 --- a/python/paddle/v2/fluid/distribute_transpiler.py +++ b/python/paddle/v2/fluid/distribute_transpiler.py @@ -203,7 +203,7 @@ class DistributeTranspiler: block_map[varname] = [] block_map[varname].append((long(offset), long(size))) for varname, splited in block_map.iteritems(): - orig_var = program.global_block().vars[varname] + orig_var = program.global_block().var(varname) if len(splited) == 1: # rename var to the trainer_id var diff --git a/python/paddle/v2/fluid/framework.py b/python/paddle/v2/fluid/framework.py index 415960f512f..5e7dd983732 100644 --- a/python/paddle/v2/fluid/framework.py +++ b/python/paddle/v2/fluid/framework.py @@ -740,15 +740,9 @@ class Block(object): """ if not self.has_var(name): raise ValueError("var %s is not in current" % name) - orig_var = self.var(name) - del self.vars[name] - orig_var.name = new_name - self.vars[new_name] = orig_var - for op in self.ops: - if name in op.input_arg_names: - op.rename_input(name, new_name) - if name in op.output_arg_names: - op.rename_output(name, new_name) + self.desc.rename_var(name, new_name) + self.sync_with_cpp() + print("renamed var: ", self.var(new_name)) def create_parameter(self, *args, **kwargs): global_block = self.program.global_block() @@ -837,7 +831,7 @@ class Block(object): for p in other.iter_parameters(): assert isinstance(p, Parameter) v = self.vars.get(p.name, None) - print("var shape to copy", v) + print("var shape to copy", v, p) if v is None: raise ValueError("copy_param_info_from should be invoked with " "same topology") -- GitLab From 67881ad22a40628db7a5eb73a1f01c4df11ee9e1 Mon Sep 17 00:00:00 2001 From: Yang Yang Date: Tue, 6 Feb 2018 22:21:47 +0000 Subject: [PATCH 004/122] compile with nccl2 --- CMakeLists.txt | 1 - Dockerfile | 2 +- paddle/platform/CMakeLists.txt | 2 +- paddle/platform/dynload/CMakeLists.txt | 2 +- paddle/scripts/docker/build.sh | 5 ++++- 5 files changed, 7 insertions(+), 5 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 49334279f6d..3b4c7e65c67 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -141,7 +141,6 @@ include(external/boost) # download boost include(external/any) # download libn::any include(external/eigen) # download eigen3 include(external/pybind11) # download pybind11 -include(external/nccl) include(external/cares) include(external/grpc) diff --git a/Dockerfile b/Dockerfile index 6ac9901ac6c..ed559ca5c43 100644 --- a/Dockerfile +++ b/Dockerfile @@ -22,7 +22,7 @@ COPY ./paddle/scripts/docker/root/ /root/ RUN apt-get update && \ apt-get install -y \ - git python-pip python-dev openssh-server bison libnccl-dev \ + git python-pip python-dev openssh-server bison \ wget unzip unrar tar xz-utils bzip2 gzip coreutils ntp \ curl sed grep graphviz libjpeg-dev zlib1g-dev \ python-matplotlib gcc-4.8 g++-4.8 \ diff --git a/paddle/platform/CMakeLists.txt b/paddle/platform/CMakeLists.txt index d68caea9971..83164f07aaa 100644 --- a/paddle/platform/CMakeLists.txt +++ b/paddle/platform/CMakeLists.txt @@ -1,5 +1,5 @@ if(WITH_GPU) - cc_library(enforce SRCS enforce.cc DEPS nccl) + cc_library(enforce SRCS enforce.cc DEPS) else() cc_library(enforce SRCS enforce.cc) endif() diff --git a/paddle/platform/dynload/CMakeLists.txt b/paddle/platform/dynload/CMakeLists.txt index cf2081b4349..264b4ebf2c0 100644 --- a/paddle/platform/dynload/CMakeLists.txt +++ b/paddle/platform/dynload/CMakeLists.txt @@ -1,4 +1,4 @@ cc_library(dynamic_loader SRCS dynamic_loader.cc DEPS glog gflags enforce) nv_library(dynload_cuda SRCS cublas.cc cudnn.cc curand.cc nccl.cc - DEPS dynamic_loader nccl) + DEPS dynamic_loader) cc_library(dynload_warpctc SRCS warpctc.cc DEPS dynamic_loader warpctc) diff --git a/paddle/scripts/docker/build.sh b/paddle/scripts/docker/build.sh index ba496db5f83..26ecb128eb8 100644 --- a/paddle/scripts/docker/build.sh +++ b/paddle/scripts/docker/build.sh @@ -34,6 +34,7 @@ function cmake_gen() { Configuring cmake in /paddle/build ... -DCMAKE_BUILD_TYPE=${CMAKE_BUILD_TYPE:-Release} ${PYTHON_FLAGS} + -DWITH_DSO=ON -DWITH_DOC=OFF -DWITH_GPU=${WITH_GPU:-OFF} -DWITH_DISTRIBUTE=${WITH_DISTRIBUTE:-OFF} @@ -57,6 +58,7 @@ EOF cmake .. \ -DCMAKE_BUILD_TYPE=${CMAKE_BUILD_TYPE:-Release} \ ${PYTHON_FLAGS} \ + -DWITH_DSO=ON \ -DWITH_DOC=OFF \ -DWITH_GPU=${WITH_GPU:-OFF} \ -DWITH_DISTRIBUTE=${WITH_DISTRIBUTE:-OFF} \ @@ -173,7 +175,7 @@ EOF if [[ ${WITH_GPU} == "ON" ]]; then NCCL_DEPS="apt-get install -y libnccl-dev &&" else - NCCL_DEPS="" + NCCL_DEPS="" fi cat >> /paddle/build/Dockerfile < Date: Wed, 7 Feb 2018 23:53:15 +0000 Subject: [PATCH 005/122] add ncclGroup; it is necessary in nccl2 --- paddle/platform/nccl_test.cu | 2 ++ 1 file changed, 2 insertions(+) diff --git a/paddle/platform/nccl_test.cu b/paddle/platform/nccl_test.cu index ef6d8458747..5a75ff3382b 100644 --- a/paddle/platform/nccl_test.cu +++ b/paddle/platform/nccl_test.cu @@ -89,6 +89,7 @@ TEST(NCCL, all_reduce) { VLOG(1) << "Invoking ncclAllReduce"; + dynload::ncclGroupStart(); for (int i = 0; i < dev_count; ++i) { VLOG(1) << "Invoking ncclAllReduce with device " << i; SetDeviceId(i); @@ -97,6 +98,7 @@ TEST(NCCL, all_reduce) { ncclSum, comms[i], data[i]->dev_ctx.stream())); VLOG(1) << "Invoked ncclAllReduce for device " << i; } + dynload::ncclGroupEnd(); VLOG(1) << "Invoked ncclAllReduce"; -- GitLab From 1c91574bbdf5b7a46ad5cba35908354b178bf0e4 Mon Sep 17 00:00:00 2001 From: Yang Yang Date: Fri, 9 Feb 2018 21:35:14 +0000 Subject: [PATCH 006/122] backward insert callback pass compile --- python/paddle/v2/fluid/backward.py | 46 ++++++++++++++++++++++++++++-- 1 file changed, 44 insertions(+), 2 deletions(-) diff --git a/python/paddle/v2/fluid/backward.py b/python/paddle/v2/fluid/backward.py index 29243c90e87..2946ef19678 100644 --- a/python/paddle/v2/fluid/backward.py +++ b/python/paddle/v2/fluid/backward.py @@ -199,6 +199,47 @@ def _remove_no_grad_branch_(op_descs, no_grad_set): return op_descs +def _callback_lookup_(op): + """ + Only used in _append_backward_ops_ + Build and returns a callback function for certain op. For example + + parallel_do: AllReduce + + :param op: + :return: callback function + """ + print(op.type) + if op.type == 'parallel_do': + param_names = set(op.input('parameters')) + param_grad_names = [n + "@GRAD" for n in param_names] + + class ParallelDoCallBack(object): + def __init__(self, param_grad_names): + self.has_inserted_nccl_init = False + self.param_grad_names = param_grad_names + + def __call__(self, block, context): + # TODO(tonyyang-svail): insert nccl init + + for o_param in context.output_names(): + for o_argu in context.output(o_param): + if o_argu in self.param_grad_names: + print("reduce", o_argu) + op_desc = block.desc.append_op() + framework.Operator( + block, + type='fill_constant', + desc=op_desc, + inputs={}, + attrs={'shape': [1], }, + outputs={'Out': [block.create_var()]}) + + return ParallelDoCallBack(param_grad_names) + else: + return None + + def _append_backward_ops_(block, ops, target_block, @@ -239,7 +280,8 @@ def _append_backward_ops_(block, sub_block = program.block(op.block_attr("sub_block")) grad_sub_block = program.create_block(parent_idx=sub_block.idx) _append_backward_ops_(sub_block, sub_block.ops, grad_sub_block, - no_grad_dict, grad_to_var) + no_grad_dict, grad_to_var, + _callback_lookup_(op)) grad_sub_block_list.append(grad_sub_block.desc) # Getting op's corresponding grad_op @@ -258,7 +300,7 @@ def _append_backward_ops_(block, for op_desc in grad_op_descs: new_op_desc = target_block.desc.append_op() new_op_desc.copy_from(op_desc) - callback(block=target_block, context=grad_to_var) + callback(block=target_block, context=new_op_desc) def _append_backward_vars_(block, start_op_idx, grad_to_var, grad_info_map): -- GitLab From 672cdc21a0e95a59590be1b6be376f73ad9ba116 Mon Sep 17 00:00:00 2001 From: Yang Yang Date: Fri, 9 Feb 2018 21:52:48 +0000 Subject: [PATCH 007/122] add nccl --- CMakeLists.txt | 1 - paddle/framework/executor.cc | 6 ++++-- paddle/framework/framework.proto | 1 + paddle/operators/nccl_op.cc | 16 ++++++++-------- paddle/platform/CMakeLists.txt | 2 +- paddle/platform/dynload/CMakeLists.txt | 2 +- paddle/pybind/protobuf.cc | 3 ++- paddle/scripts/docker/build.sh | 5 ++++- 8 files changed, 21 insertions(+), 15 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 3a21574b855..37556a37a09 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -141,7 +141,6 @@ include(external/boost) # download boost include(external/any) # download libn::any include(external/eigen) # download eigen3 include(external/pybind11) # download pybind11 -include(external/nccl) include(external/cares) include(external/grpc) diff --git a/paddle/framework/executor.cc b/paddle/framework/executor.cc index 2a88e5a9298..c604fdcc7b1 100644 --- a/paddle/framework/executor.cc +++ b/paddle/framework/executor.cc @@ -23,6 +23,7 @@ limitations under the License. */ #include "paddle/framework/lod_tensor_array.h" #include "paddle/framework/op_registry.h" #include "paddle/framework/reader.h" +#include "paddle/operators/nccl/nccl_gpu_common.h" // platform::Communicator #include "paddle/platform/place.h" #include "paddle/platform/profiler.h" @@ -53,6 +54,8 @@ static void CreateTensor(Variable* var, proto::VarDesc::VarType var_type) { var->GetMutable(); } else if (var_type == proto::VarDesc::PLACE_LIST) { var->GetMutable(); + } else if (var_type == proto::VarDesc::NCCL_COM) { + var->GetMutable(); } else if (var_type == proto::VarDesc::READER) { var->GetMutable(); } else { @@ -118,13 +121,12 @@ void Executor::Run(const ProgramDesc& pdesc, Scope* scope, int block_id, for (auto& op_desc : block.AllOps()) { auto op = paddle::framework::OpRegistry::CreateOp(*op_desc); - VLOG(4) << op->DebugStringEx(local_scope); + VLOG(3) << op->DebugStringEx(local_scope); platform::DeviceContextPool& pool = platform::DeviceContextPool::Instance(); platform::RecordEvent record_event(op->Type(), pool.Get(place_)); op->Run(*local_scope, place_); - VLOG(3) << op->DebugStringEx(local_scope); if (FLAGS_benchmark) { VLOG(2) << "Memory used after operator " + op->Type() + " running: " << memory::memory_usage(place_); diff --git a/paddle/framework/framework.proto b/paddle/framework/framework.proto index d7be1a7352d..1e3db1a3bab 100644 --- a/paddle/framework/framework.proto +++ b/paddle/framework/framework.proto @@ -129,6 +129,7 @@ message VarDesc { LOD_TENSOR_ARRAY = 7; PLACE_LIST = 8; READER = 9; + NCCL_COM = 10; } required string name = 1; required VarType type = 2; diff --git a/paddle/operators/nccl_op.cc b/paddle/operators/nccl_op.cc index 9d51153b063..83ac67f353d 100644 --- a/paddle/operators/nccl_op.cc +++ b/paddle/operators/nccl_op.cc @@ -31,8 +31,13 @@ class NCCLInitOp : public framework::OperatorBase { const auto &name = Output("Communicator"); PADDLE_ENFORCE_NOT_NULL(scope.FindVar(name), "Can not find variable '%s' in the scope.", name); - std::vector gpus = Attr>("gpus"); - PADDLE_ENFORCE(!gpus.empty(), "Attr(gpus) should not be empty."); + + int count = platform::GetCUDADeviceCount(); + std::vector gpus(count); + for (int i = 0; i < count; ++i) { + gpus[i] = i; + } + PADDLE_ENFORCE(!gpus.empty(), "NCCL init with 0 gpus."); if (scope.FindVar(name) == nullptr) { PADDLE_THROW("Output(Communicator) is needed for ncclInit operator."); @@ -50,11 +55,6 @@ class NCCLInitOpMaker : public framework::OpProtoAndCheckerMaker { : OpProtoAndCheckerMaker(proto, op_checker) { AddOutput("Communicator", "Create Communicator for communicating between gpus"); - AddAttr>("gpus", "(vector) GPU id lists"); - AddAttr("dtype", - "(int, default 5 (FP32)) " - "Output data type") - .SetDefault(framework::proto::DataType::FP32); AddComment(R"DOC( NCCLInit Operator. @@ -77,7 +77,7 @@ class NCCLAllReduceOp : public framework::OperatorWithKernel { ctx->HasInput("Communicator"), " Input(Communicator) of AllReduce op input should not be NULL"); PADDLE_ENFORCE(ctx->HasOutput("Out"), - " Input(X) of AllReduce op input should not be NULL"); + " Output(Out) of AllReduce op output should not be NULL"); auto x_dims = ctx->GetInputsDim("X"); diff --git a/paddle/platform/CMakeLists.txt b/paddle/platform/CMakeLists.txt index 5ce4b3de39d..b91fd4cf541 100644 --- a/paddle/platform/CMakeLists.txt +++ b/paddle/platform/CMakeLists.txt @@ -1,5 +1,5 @@ if(WITH_GPU) - cc_library(enforce SRCS enforce.cc DEPS nccl) + cc_library(enforce SRCS enforce.cc DEPS) else() cc_library(enforce SRCS enforce.cc) endif() diff --git a/paddle/platform/dynload/CMakeLists.txt b/paddle/platform/dynload/CMakeLists.txt index cf2081b4349..264b4ebf2c0 100644 --- a/paddle/platform/dynload/CMakeLists.txt +++ b/paddle/platform/dynload/CMakeLists.txt @@ -1,4 +1,4 @@ cc_library(dynamic_loader SRCS dynamic_loader.cc DEPS glog gflags enforce) nv_library(dynload_cuda SRCS cublas.cc cudnn.cc curand.cc nccl.cc - DEPS dynamic_loader nccl) + DEPS dynamic_loader) cc_library(dynload_warpctc SRCS warpctc.cc DEPS dynamic_loader warpctc) diff --git a/paddle/pybind/protobuf.cc b/paddle/pybind/protobuf.cc index 0a92e10927c..02aeae8b3d2 100644 --- a/paddle/pybind/protobuf.cc +++ b/paddle/pybind/protobuf.cc @@ -241,7 +241,8 @@ void BindVarDsec(py::module &m) { .value("LOD_RANK_TABLE", proto::VarDesc::LOD_RANK_TABLE) .value("LOD_TENSOR_ARRAY", proto::VarDesc::LOD_TENSOR_ARRAY) .value("PLACE_LIST", proto::VarDesc::PLACE_LIST) - .value("READER", proto::VarDesc::READER); + .value("READER", proto::VarDesc::READER) + .value("NCCL_COM", proto::VarDesc::NCCL_COM); } void BindOpDesc(py::module &m) { diff --git a/paddle/scripts/docker/build.sh b/paddle/scripts/docker/build.sh index ba496db5f83..26ecb128eb8 100644 --- a/paddle/scripts/docker/build.sh +++ b/paddle/scripts/docker/build.sh @@ -34,6 +34,7 @@ function cmake_gen() { Configuring cmake in /paddle/build ... -DCMAKE_BUILD_TYPE=${CMAKE_BUILD_TYPE:-Release} ${PYTHON_FLAGS} + -DWITH_DSO=ON -DWITH_DOC=OFF -DWITH_GPU=${WITH_GPU:-OFF} -DWITH_DISTRIBUTE=${WITH_DISTRIBUTE:-OFF} @@ -57,6 +58,7 @@ EOF cmake .. \ -DCMAKE_BUILD_TYPE=${CMAKE_BUILD_TYPE:-Release} \ ${PYTHON_FLAGS} \ + -DWITH_DSO=ON \ -DWITH_DOC=OFF \ -DWITH_GPU=${WITH_GPU:-OFF} \ -DWITH_DISTRIBUTE=${WITH_DISTRIBUTE:-OFF} \ @@ -173,7 +175,7 @@ EOF if [[ ${WITH_GPU} == "ON" ]]; then NCCL_DEPS="apt-get install -y libnccl-dev &&" else - NCCL_DEPS="" + NCCL_DEPS="" fi cat >> /paddle/build/Dockerfile < Date: Fri, 9 Feb 2018 21:53:45 +0000 Subject: [PATCH 008/122] disable ncclInit infer shape & var type --- python/paddle/v2/fluid/framework.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/python/paddle/v2/fluid/framework.py b/python/paddle/v2/fluid/framework.py index a12427258e9..36f20d9155f 100644 --- a/python/paddle/v2/fluid/framework.py +++ b/python/paddle/v2/fluid/framework.py @@ -490,7 +490,7 @@ class Operator(object): 'feed', 'fetch', 'save', 'load', 'recurrent', 'rnn_memory_helper_grad', 'conditional_block', 'while', 'send', 'recv', 'listen_and_serv', 'parallel_do', 'save_combine', - 'load_combine' + 'load_combine', 'ncclInit' } if type not in no_kernel_op_set: self.desc.infer_var_type(self.block.desc) -- GitLab From f2129b193e91094b5e2a9faf8207599d3f2abd41 Mon Sep 17 00:00:00 2001 From: Yang Yang Date: Sat, 10 Feb 2018 02:35:45 +0000 Subject: [PATCH 009/122] pass run time --- python/paddle/v2/fluid/backward.py | 57 ++++++++++++++++++++++-------- 1 file changed, 43 insertions(+), 14 deletions(-) diff --git a/python/paddle/v2/fluid/backward.py b/python/paddle/v2/fluid/backward.py index 2946ef19678..34383827fd0 100644 --- a/python/paddle/v2/fluid/backward.py +++ b/python/paddle/v2/fluid/backward.py @@ -199,6 +199,15 @@ def _remove_no_grad_branch_(op_descs, no_grad_set): return op_descs +import proto.framework_pb2 as framework_pb2 + + +def serialize_op_decs(op_desc): + protostr = op_desc.serialize_to_string() + proto = framework_pb2.OpDesc.FromString(str(protostr)) + return proto.__str__() + + def _callback_lookup_(op): """ Only used in _append_backward_ops_ @@ -209,7 +218,6 @@ def _callback_lookup_(op): :param op: :return: callback function """ - print(op.type) if op.type == 'parallel_do': param_names = set(op.input('parameters')) param_grad_names = [n + "@GRAD" for n in param_names] @@ -220,20 +228,38 @@ def _callback_lookup_(op): self.param_grad_names = param_grad_names def __call__(self, block, context): - # TODO(tonyyang-svail): insert nccl init - - for o_param in context.output_names(): - for o_argu in context.output(o_param): + # move to parallel_do.py + # # TODO(tonyyang-svail): insert nccl init + if not self.has_inserted_nccl_init: + global_block = block.program.global_block() + op_desc = global_block.desc.append_op() + var_desc = global_block.desc.var('nccl_com') + var_desc.set_type(core.VarDesc.VarType.NCCL_COM) + self.nccl_com = global_block.create_var( + name='nccl_com', type=core.VarDesc.VarType.NCCL_COM) + framework.Operator( + global_block, + type='ncclInit', + desc=op_desc, + inputs={}, + outputs={'Communicator': [self.nccl_com]}) + self.has_inserted_nccl_init = True + + current_op_desc = context["__current_op_desc__"] + # print(serialize_op_decs(context)) + for o_param in current_op_desc.output_names(): + for o_argu in current_op_desc.output(o_param): if o_argu in self.param_grad_names: - print("reduce", o_argu) + # print("reduce", o_argu) op_desc = block.desc.append_op() - framework.Operator( - block, - type='fill_constant', - desc=op_desc, - inputs={}, - attrs={'shape': [1], }, - outputs={'Out': [block.create_var()]}) + op_desc.set_type("ncclAllReduce") + op_desc.set_input("X", [o_argu]) + # FIXME(tonyyang-svail): + # Looks like nccl_com has been changed to nccl_com_0 + op_desc.set_input("Communicator", ['nccl_com_0']) + out_var = block.create_var() + op_desc.set_output("Out", [out_var.name]) + op_desc.set_attr("reduction", "ncclSum") return ParallelDoCallBack(param_grad_names) else: @@ -300,7 +326,8 @@ def _append_backward_ops_(block, for op_desc in grad_op_descs: new_op_desc = target_block.desc.append_op() new_op_desc.copy_from(op_desc) - callback(block=target_block, context=new_op_desc) + grad_to_var["__current_op_desc__"] = new_op_desc + callback(block=target_block, context=grad_to_var) def _append_backward_vars_(block, start_op_idx, grad_to_var, grad_info_map): @@ -336,6 +363,8 @@ def _append_backward_vars_(block, start_op_idx, grad_to_var, grad_info_map): continue grad_info_map[grad_to_var[grad_var_name]] = (grad_var_name, block) # infer_shape and infer_type + if op_desc.type() == 'ncclInit': + continue op_desc.infer_var_type(block.desc) op_desc.infer_shape(block.desc) for arg in op_desc.output_arg_names(): -- GitLab From 0815c0f141d1df2088ed3c5a5391662bb4484e3d Mon Sep 17 00:00:00 2001 From: Yang Yang Date: Sat, 10 Feb 2018 03:16:02 +0000 Subject: [PATCH 010/122] add assign op --- python/paddle/v2/fluid/backward.py | 36 ++++++++++++++++++++---------- 1 file changed, 24 insertions(+), 12 deletions(-) diff --git a/python/paddle/v2/fluid/backward.py b/python/paddle/v2/fluid/backward.py index 34383827fd0..40c54bf220f 100644 --- a/python/paddle/v2/fluid/backward.py +++ b/python/paddle/v2/fluid/backward.py @@ -228,8 +228,6 @@ def _callback_lookup_(op): self.param_grad_names = param_grad_names def __call__(self, block, context): - # move to parallel_do.py - # # TODO(tonyyang-svail): insert nccl init if not self.has_inserted_nccl_init: global_block = block.program.global_block() op_desc = global_block.desc.append_op() @@ -250,16 +248,30 @@ def _callback_lookup_(op): for o_param in current_op_desc.output_names(): for o_argu in current_op_desc.output(o_param): if o_argu in self.param_grad_names: - # print("reduce", o_argu) - op_desc = block.desc.append_op() - op_desc.set_type("ncclAllReduce") - op_desc.set_input("X", [o_argu]) - # FIXME(tonyyang-svail): - # Looks like nccl_com has been changed to nccl_com_0 - op_desc.set_input("Communicator", ['nccl_com_0']) - out_var = block.create_var() - op_desc.set_output("Out", [out_var.name]) - op_desc.set_attr("reduction", "ncclSum") + # # print("reduce", o_argu) + # op_desc = block.desc.append_op() + # op_desc.set_type("ncclAllReduce") + # op_desc.set_input("X", [o_argu]) + # + # # FIXME(tonyyang-svail): + # # Looks like nccl_com has been changed to nccl_com_0 + # op_desc.set_input("Communicator", ['nccl_com_0']) + # out_var = block.create_var() + # op_desc.set_output("Out", [out_var.name]) + # op_desc.set_attr("reduction", "ncclSum") + allreduce_out_name = o_argu + "__nccl_all_reduce__" + op_desc = _create_op_desc_( + "ncclAllReduce", { + "X": [o_argu], + "Communicator": ['nccl_com_0'] + }, {"Out": [allreduce_out_name]}, + {"reduction": "ncclSum"}) + block.desc.append_op().copy_from(op_desc) + + op_desc = _create_op_desc_( + "assign", {"X": [allreduce_out_name]}, + {"Out": [o_argu]}, {}) + block.desc.append_op().copy_from(op_desc) return ParallelDoCallBack(param_grad_names) else: -- GitLab From 0d57ca46ea06257447cc2a82839d64d94fc5e421 Mon Sep 17 00:00:00 2001 From: Yang Yang Date: Sat, 10 Feb 2018 23:31:12 +0000 Subject: [PATCH 011/122] nccl pass parallel_do test --- paddle/operators/nccl_op.cc | 21 +++++++++- paddle/operators/nccl_op.cu.cc | 8 ++++ paddle/operators/parallel_do_op.cc | 24 ++++++++++- python/paddle/v2/fluid/backward.py | 41 +++++++++++-------- python/paddle/v2/fluid/layers/control_flow.py | 6 ++- .../paddle/v2/fluid/tests/test_parallel_op.py | 33 +++++++++------ 6 files changed, 99 insertions(+), 34 deletions(-) diff --git a/paddle/operators/nccl_op.cc b/paddle/operators/nccl_op.cc index 83ac67f353d..a906223f38c 100644 --- a/paddle/operators/nccl_op.cc +++ b/paddle/operators/nccl_op.cc @@ -12,6 +12,7 @@ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. */ +#include #include "paddle/framework/op_registry.h" #include "paddle/operators/nccl/nccl_gpu_common.h" @@ -49,6 +50,22 @@ class NCCLInitOp : public framework::OperatorBase { } }; +class NCCLInitOpVarTypeInference : public framework::VarTypeInference { + public: + void operator()(const framework::OpDesc &op_desc, + framework::BlockDesc *block) const override { + auto out_var_name = op_desc.Output("Communicator").front(); + auto &out_var = block->FindRecursiveOrCreateVar(out_var_name); + auto var_type = framework::proto::VarDesc::NCCL_COM; + out_var.SetType(var_type); + } +}; + +class NCCLInitOpShapeInference : public framework::InferShapeBase { + public: + void operator()(framework::InferShapeContext *ctx) const override {} +}; + class NCCLInitOpMaker : public framework::OpProtoAndCheckerMaker { public: NCCLInitOpMaker(OpProto *proto, OpAttrChecker *op_checker) @@ -214,7 +231,9 @@ Bcast the tensors. namespace ops = paddle::operators; REGISTER_OPERATOR(ncclInit, ops::NCCLInitOp, - paddle::framework::EmptyGradOpMaker, ops::NCCLInitOpMaker); + paddle::framework::EmptyGradOpMaker, ops::NCCLInitOpMaker, + ops::NCCLInitOpVarTypeInference, + ops::NCCLInitOpShapeInference); REGISTER_OP_WITHOUT_GRADIENT(ncclAllReduce, ops::NCCLAllReduceOp, ops::NCCLAllReduceOpMaker); diff --git a/paddle/operators/nccl_op.cu.cc b/paddle/operators/nccl_op.cu.cc index 1b986a13650..b6db63ac6ae 100644 --- a/paddle/operators/nccl_op.cu.cc +++ b/paddle/operators/nccl_op.cu.cc @@ -47,8 +47,11 @@ class NCCLAllReduceKernel : public framework::OpKernel { auto ins = ctx.MultiInput("X"); auto outs = ctx.MultiOutput("Out"); + LOG(INFO) << "------------------"; std::string reduction = ctx.Attr("reduction"); + LOG(INFO) << "------------------"; ncclRedOp_t reduction_op_ = ncclSum; + LOG(INFO) << "------------------"; if (reduction == "ncclMin") { reduction_op_ = ncclMin; @@ -62,14 +65,19 @@ class NCCLAllReduceKernel : public framework::OpKernel { PADDLE_THROW("Invalid reduction. default ncclSum."); } + LOG(INFO) << "------------------"; auto* comm = ctx.Input("Communicator"); + LOG(INFO) << "------------------"; auto stream = ctx.cuda_device_context().stream(); + LOG(INFO) << "------------------"; // device id int gpu_id = boost::get(ctx.GetPlace()).GetDeviceId(); + LOG(INFO) << "------------------"; int idx = comm->GetCommId(gpu_id); + LOG(INFO) << "------------------"; for (size_t i = 0; i < ins.size(); ++i) { VLOG(1) << "gpu : " << " invoke allreduce. send " << ins[i]->numel() << " recv " diff --git a/paddle/operators/parallel_do_op.cc b/paddle/operators/parallel_do_op.cc index 89045923f9f..950a95ae360 100644 --- a/paddle/operators/parallel_do_op.cc +++ b/paddle/operators/parallel_do_op.cc @@ -30,6 +30,7 @@ static constexpr char kOutputs[] = "outputs"; static constexpr char kParallelScopes[] = "parallel_scopes"; static constexpr char kParallelBlock[] = "sub_block"; +static constexpr char kUseNCCL[] = "use_nccl"; using LoDTensor = framework::LoDTensor; using SelectedRows = framework::SelectedRows; @@ -159,6 +160,7 @@ class ParallelDoOp : public framework::OperatorBase { } WaitOnPlaces(places); + // PADDLE_ENFORCE_EQ(places.size(), sub_scopes.size()); std::vector> workers; workers.reserve(places.size()); for (size_t place_idx = 0; place_idx < sub_scopes.size(); ++place_idx) { @@ -202,6 +204,8 @@ class ParallelDoOpProtoMaker : public framework::OpProtoAndCheckerMaker { AddOutput(kOutputs, "").AsDuplicable(); AddOutput(kParallelScopes, ""); AddAttr(kParallelBlock, ""); + AddAttr(kUseNCCL, "true if we use nccl on backward") + .SetDefault(false); AddComment(R"DOC( ParallelDo Operator. )DOC"); @@ -223,20 +227,22 @@ class ParallelDoGradOp : public framework::OperatorBase { auto &sub_scopes = scope.FindVar(Input(kParallelScopes)) ->Get>(); - auto &places = scope.FindVar(Input(kPlaces))->Get(); + // PADDLE_ENFORCE_EQ(places.size(), sub_scopes.size()); // feed output@grad SplitTensorAndMoveTensorToScopes( scope, const_cast *>(&sub_scopes), places, Inputs(framework::GradVarName(kOutputs))); WaitOnPlaces(places); + LOG(INFO) << "places " << places.size(); // exe run std::vector> workers; for (size_t i = 0; i < sub_scopes.size(); ++i) { auto &place = places[i]; auto *cur_scope = sub_scopes[i]; + LOG(INFO) << place; // execute workers.emplace_back(framework::Async([program, cur_scope, place, block] { @@ -245,12 +251,26 @@ class ParallelDoGradOp : public framework::OperatorBase { false /*create_local_scope*/); })); } + LOG(INFO) << "places " << places.size(); for (auto &worker : workers) { worker.wait(); } WaitOnPlaces(places); - AccumulateGrad(scope, place, sub_scopes, places); + // NCCL allreduce op will be added by backward, + // so no need to explicitly accumulate grad + if (!(Attr(kUseNCCL))) { + AccumulateGrad(scope, place, sub_scopes, places); + } else { + for (auto &place : places) { + PADDLE_ENFORCE(platform::is_gpu_place(place), + "NCCL only supports cuda place"); + } + } + for (auto &s : Outputs(framework::GradVarName(kParameters))) { + CopyOrShare(*sub_scopes[0]->FindVar(s), place, scope.FindVar(s)); + } + WaitOnPlaces(places); } void AccumulateGrad(const framework::Scope &scope, diff --git a/python/paddle/v2/fluid/backward.py b/python/paddle/v2/fluid/backward.py index 40c54bf220f..28768ef07fc 100644 --- a/python/paddle/v2/fluid/backward.py +++ b/python/paddle/v2/fluid/backward.py @@ -218,7 +218,7 @@ def _callback_lookup_(op): :param op: :return: callback function """ - if op.type == 'parallel_do': + if op.type == 'parallel_do' and op.attr('use_nccl'): param_names = set(op.input('parameters')) param_grad_names = [n + "@GRAD" for n in param_names] @@ -229,18 +229,25 @@ def _callback_lookup_(op): def __call__(self, block, context): if not self.has_inserted_nccl_init: - global_block = block.program.global_block() - op_desc = global_block.desc.append_op() - var_desc = global_block.desc.var('nccl_com') - var_desc.set_type(core.VarDesc.VarType.NCCL_COM) - self.nccl_com = global_block.create_var( - name='nccl_com', type=core.VarDesc.VarType.NCCL_COM) - framework.Operator( - global_block, - type='ncclInit', - desc=op_desc, - inputs={}, - outputs={'Communicator': [self.nccl_com]}) + # global_block = block.program.global_block() + # op_desc = global_block.desc.append_op() + # var_desc = global_block.desc.var('nccl_com__do_not_change_') + # var_desc.set_type(core.VarDesc.VarType.NCCL_COM) + # self.nccl_com = global_block.create_var( + # name='nccl_com', type=core.VarDesc.VarType.NCCL_COM) + # framework.Operator( + # global_block, + # type='ncclInit', + # desc=op_desc, + # inputs={}, + # outputs={'Communicator': [self.nccl_com]}) + op_desc = _create_op_desc_( + "ncclInit", {}, + {"Communicator": ['nccl_com__do_not_change_']}, {}) + # block.desc.append_op().copy_from(op_desc) + print(serialize_op_decs(op_desc)) + block.program.global_block().desc.append_op().copy_from( + op_desc) self.has_inserted_nccl_init = True current_op_desc = context["__current_op_desc__"] @@ -263,7 +270,8 @@ def _callback_lookup_(op): op_desc = _create_op_desc_( "ncclAllReduce", { "X": [o_argu], - "Communicator": ['nccl_com_0'] + "Communicator": + ['nccl_com__do_not_change_'] }, {"Out": [allreduce_out_name]}, {"reduction": "ncclSum"}) block.desc.append_op().copy_from(op_desc) @@ -375,10 +383,11 @@ def _append_backward_vars_(block, start_op_idx, grad_to_var, grad_info_map): continue grad_info_map[grad_to_var[grad_var_name]] = (grad_var_name, block) # infer_shape and infer_type - if op_desc.type() == 'ncclInit': - continue op_desc.infer_var_type(block.desc) op_desc.infer_shape(block.desc) + # ncclInit dones't need to set data_type + if op_desc.type() == 'ncclInit': + continue for arg in op_desc.output_arg_names(): if arg in new_vars: _infer_var_data_type_(arg, block) diff --git a/python/paddle/v2/fluid/layers/control_flow.py b/python/paddle/v2/fluid/layers/control_flow.py index 71a9459d556..5c9c2470661 100644 --- a/python/paddle/v2/fluid/layers/control_flow.py +++ b/python/paddle/v2/fluid/layers/control_flow.py @@ -237,12 +237,13 @@ class ParallelDo(object): ParallelDo class is used to create a ParallelDo. """ - def __init__(self, places, name=None): + def __init__(self, places, use_nccl=False, name=None): self.helper = LayerHelper("parallel_do", name=name) self.inputs = [] self.places = places self.outputs = [] self.status = StaticRNN.BEFORE_RNN_BLOCK + self.use_nccl = use_nccl def do(self): return BlockGuardWithCompletion(self) @@ -325,7 +326,8 @@ class ParallelDo(object): }, outputs={'outputs': outputs, 'parallel_scopes': [step_scope]}, - attrs={'sub_block': current_block}) + attrs={'sub_block': current_block, + 'use_nccl': self.use_nccl}) class BlockGuardWithCompletion(BlockGuard): diff --git a/python/paddle/v2/fluid/tests/test_parallel_op.py b/python/paddle/v2/fluid/tests/test_parallel_op.py index 367cc8b1aaf..8452d6835fa 100644 --- a/python/paddle/v2/fluid/tests/test_parallel_op.py +++ b/python/paddle/v2/fluid/tests/test_parallel_op.py @@ -67,12 +67,25 @@ class BaseParallelForTest(unittest.TestCase): fetch=fetch, place=gpu, use_parallel=True) + result_gpu_nccl = self._run_test_impl_( + callback=callback, + feed=feed, + fetch=fetch, + place=gpu, + use_parallel=True, + use_nccl=True) self._assert_same_(fetch, result_cpu, result_cpu_parallel, - result_gpu, result_gpu_parallel) + result_gpu, result_gpu_parallel, result_gpu_nccl) else: self._assert_same_(fetch, result_cpu, result_cpu_parallel) - def _run_test_impl_(self, callback, feed, fetch, place, use_parallel=False): + def _run_test_impl_(self, + callback, + feed, + fetch, + place, + use_parallel=False, + use_nccl=False): """ Run a single test, returns the fetch values Args: @@ -96,7 +109,7 @@ class BaseParallelForTest(unittest.TestCase): # Automatically insert parallel do if use_parallel = True if use_parallel: places = fluid.layers.get_places() - pd = fluid.layers.ParallelDo(places) + pd = fluid.layers.ParallelDo(places, use_nccl=use_nccl) data = next(generator) if isinstance(data, fluid.Variable): @@ -137,7 +150,9 @@ class BaseParallelForTest(unittest.TestCase): """ def _impl_(a, b, fetch_id, item_id): - item_str = ['CPU', 'ParallelCPU', 'GPU', 'ParallelGPU'] + item_str = [ + 'CPU', 'ParallelCPU', 'GPU', 'ParallelGPU', 'ParallelGPUNCCL' + ] flag = numpy.allclose(a, b, rtol=0.1) self.assertTrue(flag, "The {0} are different in {1}".format( fetch[fetch_id], item_str[item_id])) @@ -157,18 +172,10 @@ class ParallelOpTest(BaseParallelForTest): loss = fluid.layers.mean(x=hidden) yield loss - def test_simple_fc(self): - self.run_test( - callback=self.__network__, - feed={ - 'img': numpy.random.random(size=(51, 784)).astype('float32') - }, - fetch=['fc1.w@GRAD']) - def test_fc_with_tiny_data(self): self.run_test( callback=self.__network__, - feed={'img': numpy.random.random(size=(1, 784)).astype('float32')}, + feed={'img': numpy.random.random(size=(8, 784)).astype('float32')}, fetch=['fc1.w@GRAD']) -- GitLab From bb3ae20664a1bba5ce1e6d45e3afff274095e9e1 Mon Sep 17 00:00:00 2001 From: Yang Yang Date: Sat, 10 Feb 2018 23:34:36 +0000 Subject: [PATCH 012/122] nccl pass parallel_do test --- python/paddle/v2/fluid/tests/test_parallel_op.py | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/python/paddle/v2/fluid/tests/test_parallel_op.py b/python/paddle/v2/fluid/tests/test_parallel_op.py index 8452d6835fa..dc8c8060741 100644 --- a/python/paddle/v2/fluid/tests/test_parallel_op.py +++ b/python/paddle/v2/fluid/tests/test_parallel_op.py @@ -172,12 +172,18 @@ class ParallelOpTest(BaseParallelForTest): loss = fluid.layers.mean(x=hidden) yield loss - def test_fc_with_tiny_data(self): + def test_simple_fc(self): self.run_test( callback=self.__network__, feed={'img': numpy.random.random(size=(8, 784)).astype('float32')}, fetch=['fc1.w@GRAD']) + def test_fc_with_tiny_data(self): + self.run_test( + callback=self.__network__, + feed={'img': numpy.random.random(size=(1, 784)).astype('float32')}, + fetch=['fc1.w@GRAD']) + class ParallelOpTestMultipleInput(BaseParallelForTest): @staticmethod -- GitLab From 4bb492e76c09c1bd11953d3893d559f88b9ea219 Mon Sep 17 00:00:00 2001 From: Yang Yang Date: Sun, 11 Feb 2018 00:11:26 +0000 Subject: [PATCH 013/122] pass tiny data --- paddle/operators/nccl_op.cc | 24 ++++++++++++++++++++---- python/paddle/v2/fluid/backward.py | 9 ++++++--- 2 files changed, 26 insertions(+), 7 deletions(-) diff --git a/paddle/operators/nccl_op.cc b/paddle/operators/nccl_op.cc index a906223f38c..8e4edb78bba 100644 --- a/paddle/operators/nccl_op.cc +++ b/paddle/operators/nccl_op.cc @@ -19,6 +19,8 @@ limitations under the License. */ namespace paddle { namespace operators { +static constexpr char kParallelScopes[] = "parallel_scopes"; + // NCCLinitOp class NCCLInitOp : public framework::OperatorBase { public: @@ -29,24 +31,37 @@ class NCCLInitOp : public framework::OperatorBase { void Run(const framework::Scope &scope, const platform::Place &place) const override { + PADDLE_ENFORCE_NOT_NULL(scope.FindVar(Input(kParallelScopes)), + "Can not find variable '%s' in the scope.", + kParallelScopes); const auto &name = Output("Communicator"); PADDLE_ENFORCE_NOT_NULL(scope.FindVar(name), "Can not find variable '%s' in the scope.", name); - - int count = platform::GetCUDADeviceCount(); - std::vector gpus(count); - for (int i = 0; i < count; ++i) { + // A parallel do may not use all the gpus. For example, the batch size is 7 + // in the last batch while we have 8 gpu. In this case, parallel_do will + // create 7 parallel scopes, so should ncclInitOp create 7 gpu peers + LOG(INFO) << "---------------"; + auto ¶llel_scopes = scope.FindVar(Input(kParallelScopes)) + ->Get>(); + LOG(INFO) << "---------------"; + std::vector gpus(parallel_scopes.size()); + for (int i = 0; i < static_cast(parallel_scopes.size()); ++i) { gpus[i] = i; } + LOG(INFO) << "---------------"; PADDLE_ENFORCE(!gpus.empty(), "NCCL init with 0 gpus."); + LOG(INFO) << "---------------"; if (scope.FindVar(name) == nullptr) { PADDLE_THROW("Output(Communicator) is needed for ncclInit operator."); } + LOG(INFO) << "---------------"; platform::Communicator *comm = scope.FindVar(name)->GetMutable(); + LOG(INFO) << "---------------"; comm->InitAll(gpus); + LOG(INFO) << "---------------"; } }; @@ -70,6 +85,7 @@ class NCCLInitOpMaker : public framework::OpProtoAndCheckerMaker { public: NCCLInitOpMaker(OpProto *proto, OpAttrChecker *op_checker) : OpProtoAndCheckerMaker(proto, op_checker) { + AddInput(kParallelScopes, "The working place of parallel do."); AddOutput("Communicator", "Create Communicator for communicating between gpus"); AddComment(R"DOC( diff --git a/python/paddle/v2/fluid/backward.py b/python/paddle/v2/fluid/backward.py index 28768ef07fc..8ec9db81b38 100644 --- a/python/paddle/v2/fluid/backward.py +++ b/python/paddle/v2/fluid/backward.py @@ -223,9 +223,10 @@ def _callback_lookup_(op): param_grad_names = [n + "@GRAD" for n in param_names] class ParallelDoCallBack(object): - def __init__(self, param_grad_names): + def __init__(self, param_grad_names, parallel_scopes_name): self.has_inserted_nccl_init = False self.param_grad_names = param_grad_names + self.parallel_scopes_name = parallel_scopes_name def __call__(self, block, context): if not self.has_inserted_nccl_init: @@ -242,7 +243,8 @@ def _callback_lookup_(op): # inputs={}, # outputs={'Communicator': [self.nccl_com]}) op_desc = _create_op_desc_( - "ncclInit", {}, + "ncclInit", + {"parallel_scopes": self.parallel_scopes_name}, {"Communicator": ['nccl_com__do_not_change_']}, {}) # block.desc.append_op().copy_from(op_desc) print(serialize_op_decs(op_desc)) @@ -281,7 +283,8 @@ def _callback_lookup_(op): {"Out": [o_argu]}, {}) block.desc.append_op().copy_from(op_desc) - return ParallelDoCallBack(param_grad_names) + return ParallelDoCallBack(param_grad_names, + op.output("parallel_scopes")) else: return None -- GitLab From bfa78cacdfdf7988159419256432d5550a59c730 Mon Sep 17 00:00:00 2001 From: Yang Yang Date: Sun, 11 Feb 2018 00:11:56 +0000 Subject: [PATCH 014/122] clean up log(info) --- paddle/operators/nccl_op.cc | 7 ------- 1 file changed, 7 deletions(-) diff --git a/paddle/operators/nccl_op.cc b/paddle/operators/nccl_op.cc index 8e4edb78bba..ae912d7f362 100644 --- a/paddle/operators/nccl_op.cc +++ b/paddle/operators/nccl_op.cc @@ -40,28 +40,21 @@ class NCCLInitOp : public framework::OperatorBase { // A parallel do may not use all the gpus. For example, the batch size is 7 // in the last batch while we have 8 gpu. In this case, parallel_do will // create 7 parallel scopes, so should ncclInitOp create 7 gpu peers - LOG(INFO) << "---------------"; auto ¶llel_scopes = scope.FindVar(Input(kParallelScopes)) ->Get>(); - LOG(INFO) << "---------------"; std::vector gpus(parallel_scopes.size()); for (int i = 0; i < static_cast(parallel_scopes.size()); ++i) { gpus[i] = i; } - LOG(INFO) << "---------------"; PADDLE_ENFORCE(!gpus.empty(), "NCCL init with 0 gpus."); - LOG(INFO) << "---------------"; if (scope.FindVar(name) == nullptr) { PADDLE_THROW("Output(Communicator) is needed for ncclInit operator."); } - LOG(INFO) << "---------------"; platform::Communicator *comm = scope.FindVar(name)->GetMutable(); - LOG(INFO) << "---------------"; comm->InitAll(gpus); - LOG(INFO) << "---------------"; } }; -- GitLab From 3067114f3a08f39e44cd1e828381e06b633a7a48 Mon Sep 17 00:00:00 2001 From: Yang Yang Date: Sun, 11 Feb 2018 00:22:17 +0000 Subject: [PATCH 015/122] clean up --- paddle/fluid/operators/nccl_op.cu.cc | 8 ------ paddle/fluid/operators/parallel_do_op.cc | 5 ---- python/paddle/v2/fluid/backward.py | 25 ------------------- .../paddle/v2/fluid/tests/test_parallel_op.py | 4 ++- 4 files changed, 3 insertions(+), 39 deletions(-) diff --git a/paddle/fluid/operators/nccl_op.cu.cc b/paddle/fluid/operators/nccl_op.cu.cc index 7637c7ed163..333aed2903e 100644 --- a/paddle/fluid/operators/nccl_op.cu.cc +++ b/paddle/fluid/operators/nccl_op.cu.cc @@ -47,11 +47,8 @@ class NCCLAllReduceKernel : public framework::OpKernel { auto ins = ctx.MultiInput("X"); auto outs = ctx.MultiOutput("Out"); - LOG(INFO) << "------------------"; std::string reduction = ctx.Attr("reduction"); - LOG(INFO) << "------------------"; ncclRedOp_t reduction_op_ = ncclSum; - LOG(INFO) << "------------------"; if (reduction == "ncclMin") { reduction_op_ = ncclMin; @@ -65,19 +62,14 @@ class NCCLAllReduceKernel : public framework::OpKernel { PADDLE_THROW("Invalid reduction. default ncclSum."); } - LOG(INFO) << "------------------"; auto* comm = ctx.Input("Communicator"); - LOG(INFO) << "------------------"; auto stream = ctx.cuda_device_context().stream(); - LOG(INFO) << "------------------"; // device id int gpu_id = boost::get(ctx.GetPlace()).GetDeviceId(); - LOG(INFO) << "------------------"; int idx = comm->GetCommId(gpu_id); - LOG(INFO) << "------------------"; for (size_t i = 0; i < ins.size(); ++i) { VLOG(1) << "gpu : " << " invoke allreduce. send " << ins[i]->numel() << " recv " diff --git a/paddle/fluid/operators/parallel_do_op.cc b/paddle/fluid/operators/parallel_do_op.cc index ff5730bfe77..f808c713066 100644 --- a/paddle/fluid/operators/parallel_do_op.cc +++ b/paddle/fluid/operators/parallel_do_op.cc @@ -151,7 +151,6 @@ class ParallelDoOp : public framework::OperatorBase { } WaitOnPlaces(places); - // PADDLE_ENFORCE_EQ(places.size(), sub_scopes.size()); std::vector> workers; workers.reserve(places.size()); for (size_t place_idx = 0; place_idx < sub_scopes.size(); ++place_idx) { @@ -219,21 +218,18 @@ class ParallelDoGradOp : public framework::OperatorBase { auto &sub_scopes = scope.FindVar(Input(kParallelScopes)) ->Get>(); auto &places = scope.FindVar(Input(kPlaces))->Get(); - // PADDLE_ENFORCE_EQ(places.size(), sub_scopes.size()); // feed output@grad SplitTensorAndMoveTensorToScopes( scope, const_cast *>(&sub_scopes), places, Inputs(framework::GradVarName(kOutputs))); WaitOnPlaces(places); - LOG(INFO) << "places " << places.size(); // exe run std::vector> workers; for (size_t i = 0; i < sub_scopes.size(); ++i) { auto &place = places[i]; auto *cur_scope = sub_scopes[i]; - LOG(INFO) << place; // execute workers.emplace_back(framework::Async([program, cur_scope, place, block] { @@ -242,7 +238,6 @@ class ParallelDoGradOp : public framework::OperatorBase { false /*create_local_scope*/); })); } - LOG(INFO) << "places " << places.size(); for (auto &worker : workers) { worker.wait(); } diff --git a/python/paddle/v2/fluid/backward.py b/python/paddle/v2/fluid/backward.py index 8ec9db81b38..6da4325c64f 100644 --- a/python/paddle/v2/fluid/backward.py +++ b/python/paddle/v2/fluid/backward.py @@ -230,44 +230,19 @@ def _callback_lookup_(op): def __call__(self, block, context): if not self.has_inserted_nccl_init: - # global_block = block.program.global_block() - # op_desc = global_block.desc.append_op() - # var_desc = global_block.desc.var('nccl_com__do_not_change_') - # var_desc.set_type(core.VarDesc.VarType.NCCL_COM) - # self.nccl_com = global_block.create_var( - # name='nccl_com', type=core.VarDesc.VarType.NCCL_COM) - # framework.Operator( - # global_block, - # type='ncclInit', - # desc=op_desc, - # inputs={}, - # outputs={'Communicator': [self.nccl_com]}) op_desc = _create_op_desc_( "ncclInit", {"parallel_scopes": self.parallel_scopes_name}, {"Communicator": ['nccl_com__do_not_change_']}, {}) - # block.desc.append_op().copy_from(op_desc) print(serialize_op_decs(op_desc)) block.program.global_block().desc.append_op().copy_from( op_desc) self.has_inserted_nccl_init = True current_op_desc = context["__current_op_desc__"] - # print(serialize_op_decs(context)) for o_param in current_op_desc.output_names(): for o_argu in current_op_desc.output(o_param): if o_argu in self.param_grad_names: - # # print("reduce", o_argu) - # op_desc = block.desc.append_op() - # op_desc.set_type("ncclAllReduce") - # op_desc.set_input("X", [o_argu]) - # - # # FIXME(tonyyang-svail): - # # Looks like nccl_com has been changed to nccl_com_0 - # op_desc.set_input("Communicator", ['nccl_com_0']) - # out_var = block.create_var() - # op_desc.set_output("Out", [out_var.name]) - # op_desc.set_attr("reduction", "ncclSum") allreduce_out_name = o_argu + "__nccl_all_reduce__" op_desc = _create_op_desc_( "ncclAllReduce", { diff --git a/python/paddle/v2/fluid/tests/test_parallel_op.py b/python/paddle/v2/fluid/tests/test_parallel_op.py index 2914c8dbaae..66bb6442af9 100644 --- a/python/paddle/v2/fluid/tests/test_parallel_op.py +++ b/python/paddle/v2/fluid/tests/test_parallel_op.py @@ -175,7 +175,9 @@ class ParallelOpTest(BaseParallelForTest): def test_simple_fc(self): self.run_test( callback=self.__network__, - feed={'img': numpy.random.random(size=(8, 784)).astype('float32')}, + feed={ + 'img': numpy.random.random(size=(51, 784)).astype('float32') + }, fetch=['fc1.w@GRAD']) def test_fc_with_tiny_data(self): -- GitLab From 0e8568679d57b4a12b2283a19e4e2efc0f10c70d Mon Sep 17 00:00:00 2001 From: typhoonzero Date: Sun, 11 Feb 2018 10:40:18 +0800 Subject: [PATCH 016/122] wip --- paddle/framework/block_desc.cc | 44 ++++++------ paddle/framework/block_desc.h | 2 +- paddle/pybind/protobuf.cc | 10 +-- python/paddle/v2/dataset/common.py | 2 + .../paddle/v2/fluid/distribute_transpiler.py | 13 +++- python/paddle/v2/fluid/framework.py | 68 ++++++++++++++++++- 6 files changed, 111 insertions(+), 28 deletions(-) diff --git a/paddle/framework/block_desc.cc b/paddle/framework/block_desc.cc index 945f1d8f3e7..4bdd9ec04a2 100644 --- a/paddle/framework/block_desc.cc +++ b/paddle/framework/block_desc.cc @@ -42,28 +42,30 @@ bool BlockDesc::HasVar(const std::string &name) const { return vars_.find(name) != vars_.end(); } -void BlockDesc::RenameVar(const std::string &old_name, - const std::string &new_name) { - if (this->HasVar(old_name)) { - auto *var = this->Var(old_name); - var->SetName(new_name); - vars_[new_name].reset(var); - vars_.erase(old_name); - // rename inputs and outputs - for (const auto &op : ops_) { - auto *it = op.get(); - for (auto in_name : it->InputArgumentNames()) { - if (in_name == old_name) { - it->RenameInput(old_name, new_name); - } - } - for (auto out_name : it->OutputArgumentNames()) { - if (out_name == old_name) { - it->RenameOutput(old_name, new_name); - } - } - } +VarDesc *BlockDesc::RenameVar(const std::string &old_name, + const std::string &new_name) { + if (!this->HasVar(old_name)) { + return nullptr; + } + need_update_ = true; + auto *var = this->Var(old_name); + VarDesc *new_var = new VarDesc(*(var->Proto())); + new_var->SetName(new_name); + // new_var->SetShape(var->GetShape()); + // new_var->SetType(var->GetType()); + // new_var->SetDataType(var->GetDataType()); + // new_var->SetLoDLevel(var->GetLoDLevel()); + // new_var->SetPersistable(var->Persistable()); + + vars_[new_name].reset(new_var); + + // rename inputs and outputs + for (const auto &op : ops_) { + auto *it = op.get(); + it->Rename(old_name, new_name); } + vars_.erase(old_name); + return new_var; } VarDesc *BlockDesc::FindVarRecursive(const std::string &name) const { diff --git a/paddle/framework/block_desc.h b/paddle/framework/block_desc.h index e87a543909d..41bc7c1ad29 100644 --- a/paddle/framework/block_desc.h +++ b/paddle/framework/block_desc.h @@ -55,7 +55,7 @@ class BlockDesc { bool HasVar(const std::string &var_name) const; - void RenameVar(const std::string &old_name, const std::string &new_name); + VarDesc *RenameVar(const std::string &old_name, const std::string &new_name); VarDesc *FindVarRecursive(const std::string &name_bytes) const; diff --git a/paddle/pybind/protobuf.cc b/paddle/pybind/protobuf.cc index b1f621adca3..3f19ae7e50b 100644 --- a/paddle/pybind/protobuf.cc +++ b/paddle/pybind/protobuf.cc @@ -170,12 +170,14 @@ void BindBlockDesc(py::module &m) { [](BlockDesc &self, py::bytes byte_name) { std::string name = byte_name; return self.HasVar(name); - }) + }, + py::return_value_policy::reference) .def("rename_var", - [](BlockDesc &self, py::bytes byte_name, py::bytes byte_name_new) { + [](BlockDesc &self, const py::bytes &byte_name, + const py::bytes &byte_name_new) { std::string name = byte_name; std::string new_name = byte_name_new; - return self.RenameVar(name, new_name); + self.RenameVar(name, new_name); }) .def("has_var_recursive", [](BlockDesc &self, py::bytes byte_name) { @@ -213,7 +215,7 @@ void BindVarDsec(py::module &m) { py::class_ var_desc(m, "VarDesc", ""); var_desc .def("name", - [](const VarDesc &self) { + [](VarDesc &self) { py::bytes name = self.Name(); return name; }, diff --git a/python/paddle/v2/dataset/common.py b/python/paddle/v2/dataset/common.py index 9aba35a6481..c6ff09a1d1e 100644 --- a/python/paddle/v2/dataset/common.py +++ b/python/paddle/v2/dataset/common.py @@ -74,6 +74,8 @@ def download(url, module_name, md5sum, save_name=None): retry = 0 retry_limit = 3 while not (os.path.exists(filename) and md5file(filename) == md5sum): + if os.path.exists(filename): + print "file md5", md5file(filename), md5sum if retry < retry_limit: retry += 1 else: diff --git a/python/paddle/v2/fluid/distribute_transpiler.py b/python/paddle/v2/fluid/distribute_transpiler.py index 603dbcf707e..f0834d06634 100644 --- a/python/paddle/v2/fluid/distribute_transpiler.py +++ b/python/paddle/v2/fluid/distribute_transpiler.py @@ -175,6 +175,7 @@ class DistributeTranspiler: shape=[0]) # create send_op + print("send inputs: ", send_inputs) send_op = program.global_block().append_op( type="send", inputs={"X": send_inputs}, @@ -204,12 +205,12 @@ class DistributeTranspiler: block_map[varname].append((long(offset), long(size))) for varname, splited in block_map.iteritems(): orig_var = program.global_block().var(varname) - if len(splited) == 1: # rename var to the trainer_id var new_var_name = "%s.trainer_%d" % \ (orig_var.name, self.trainer_id) program.global_block().rename_var(varname, new_var_name) + print("renaming OK...", varname, new_var_name) var_mapping[varname] = \ [program.global_block().var(new_var_name)] continue @@ -375,7 +376,10 @@ class DistributeTranspiler: new_inputs = dict() # update param/grad shape first, then other inputs like # moment can use the updated shape + print("mark1") for key in opt_op.input_names: + # print("opt type: ", opt_op.type) + # print("opt op input: ", key) if key == "Grad": grad_block = None for g in self.param_grad_ep_mapping[endpoint]["grads"]: @@ -422,6 +426,7 @@ class DistributeTranspiler: new_inputs[key] = tmpvar + print("mark2") for key in opt_op.input_names: if key in ["Param", "Grad"]: continue @@ -453,6 +458,7 @@ class DistributeTranspiler: inputs=new_inputs, outputs=outputs, attrs=opt_op.attrs) + print("mark3") def _append_pserver_non_opt_ops(self, program, pserver_program, opt_op): # Append the ops for parameters that do not need to be optimized/updated @@ -523,6 +529,11 @@ class DistributeTranspiler: optimize_sub_program = Program() # Iterate through the ops and append ops as needed for idx, opt_op in enumerate(self.optimize_ops): + print("mark0") + print(opt_op.inputs.keys()) + for v in opt_op.inputs.values(): + print(v.name) + print(v.shape) is_op_on_pserver = self._is_op_on_pserver(endpoint, self.optimize_ops, idx) if not is_op_on_pserver: diff --git a/python/paddle/v2/fluid/framework.py b/python/paddle/v2/fluid/framework.py index 553b3f3b913..417fcb4fd36 100644 --- a/python/paddle/v2/fluid/framework.py +++ b/python/paddle/v2/fluid/framework.py @@ -741,9 +741,75 @@ class Block(object): """ if not self.has_var(name): raise ValueError("var %s is not in current" % name) + v = self.var(name) + stop_gradient = None + trainable = None + optimize_attr = None + regularizer = None + gradient_clip_attr = None + error_clip = None + if type(v) == Parameter: + stop_gradient = v.stop_gradient + trainable = v.trainable + optimize_attr = v.optimize_attr + regularizer = v.regularizer + gradient_clip_attr = v.gradient_clip_attr + error_clip = v.error_clip + elif type(v) == Variable: + error_clip = v.error_clip + stop_gradient = v.stop_gradient + else: + raise ValueError("unsupported var type: %s", type(v)) + + def _clear_op_io_for_var(name): + for op in self.ops: + for k in op.inputs.keys(): + + if op.inputs[k].name == name: + op.inputs[k] = None + for k in op.outputs.keys(): + if op.outputs[k].name == name: + op.outputs[k] = None + + _clear_op_io_for_var(name) self.desc.rename_var(name, new_name) + d = self.desc.find_var(new_name) + var = None + if type(v) == Parameter: + var = Parameter( + self, + d.shape(), + d.dtype(), + name=new_name, + stop_gradient=stop_gradient, + trainable=trainable, + optimize_attr=optimize_attr, + regularizer=regularizer, + gradient_clip_attr=gradient_clip_attr, + error_clip=error_clip) + elif type(v) == Variable: + var = Variable( + self, + name=new_name, + error_clip=error_clip, + stop_gradient=stop_gradient) + + # rename the python side, sync_with_cpp will only add + # new vars/ops to python side. + self.vars[new_name] = var + for op in self.ops: + print("### rename op i/o ", name, op.inputs) + if op.inputs: + for k in op.inputs.keys(): + if op.inputs[k] == None: + print("rename input: ", name, var) + op.inputs[k] = var + if op.outputs: + for k in op.outputs.keys(): + if op.outputs[k] == None: + op.outputs[k] = var + del self.vars[name] self.sync_with_cpp() - print("renamed var: ", self.var(new_name)) def create_parameter(self, *args, **kwargs): global_block = self.program.global_block() -- GitLab From 82c33c61d9e7584060916c604478b67f59fbdfc0 Mon Sep 17 00:00:00 2001 From: Yu Yang Date: Sun, 11 Feb 2018 10:46:25 +0800 Subject: [PATCH 017/122] Fix constructor bug in mixed_vector --- paddle/fluid/framework/mixed_vector.h | 5 ++--- paddle/fluid/framework/mixed_vector_test.cu | 8 ++++++++ 2 files changed, 10 insertions(+), 3 deletions(-) diff --git a/paddle/fluid/framework/mixed_vector.h b/paddle/fluid/framework/mixed_vector.h index 9756754260d..902dedd48e1 100644 --- a/paddle/fluid/framework/mixed_vector.h +++ b/paddle/fluid/framework/mixed_vector.h @@ -37,9 +37,8 @@ class Vector { // Fill vector with value. The vector size is `count`. explicit Vector(size_t count, const T& value = T()) { - if (count == 0) { - InitEmpty(); - } else { + InitEmpty(); + if (count != 0) { resize(count); T* ptr = begin(); for (size_t i = 0; i < count; ++i) { diff --git a/paddle/fluid/framework/mixed_vector_test.cu b/paddle/fluid/framework/mixed_vector_test.cu index a8906452566..20b79d60c1a 100644 --- a/paddle/fluid/framework/mixed_vector_test.cu +++ b/paddle/fluid/framework/mixed_vector_test.cu @@ -15,6 +15,7 @@ #include "glog/logging.h" #include "gtest/gtest.h" +#include "mixed_vector.h" #include "paddle/fluid/framework/mixed_vector.h" #include "paddle/fluid/platform/gpu_info.h" @@ -91,3 +92,10 @@ TEST(mixed_vector, MultiGPU) { ASSERT_EQ(tmp[i], i * 100); } } + +TEST(mixed_vector, InitWithCount) { + paddle::framework::Vector vec(10, 10); + for (int i = 0; i < 10; ++i) { + ASSERT_EQ(vec[i], 10); + } +} -- GitLab From 816fa8f32e951f2c6bef9c7b59bd2cb8dd4d9f96 Mon Sep 17 00:00:00 2001 From: Yu Yang Date: Sun, 11 Feb 2018 10:59:56 +0800 Subject: [PATCH 018/122] Fix warnings --- paddle/fluid/framework/mixed_vector.h | 7 ++++++- paddle/fluid/framework/mixed_vector_test.cu | 8 ++++---- 2 files changed, 10 insertions(+), 5 deletions(-) diff --git a/paddle/fluid/framework/mixed_vector.h b/paddle/fluid/framework/mixed_vector.h index 902dedd48e1..26f160e5093 100644 --- a/paddle/fluid/framework/mixed_vector.h +++ b/paddle/fluid/framework/mixed_vector.h @@ -121,6 +121,10 @@ class Vector { const T* begin() const { return &this->operator[](0); } const T* end() const { return &this->operator[](size()); } + const T* cbegin() const { return begin(); } + + const T* cend() const { return end(); } + const T& back() const { auto it = end(); --it; @@ -243,7 +247,8 @@ class Vector { bool operator==(const Vector& other) const { if (size() != other.size()) return false; - for (auto it1 = begin(), it2 = other.begin(); it1 < end(); ++it1, ++it2) { + for (const T *it1 = cbegin(), it2 = other.cbegin(); it1 < cend(); + ++it1, ++it2) { if (*it1 != *it2) { return false; } diff --git a/paddle/fluid/framework/mixed_vector_test.cu b/paddle/fluid/framework/mixed_vector_test.cu index 20b79d60c1a..83694a590f8 100644 --- a/paddle/fluid/framework/mixed_vector_test.cu +++ b/paddle/fluid/framework/mixed_vector_test.cu @@ -27,10 +27,10 @@ TEST(mixed_vector, CPU_VECTOR) { for (int i = 0; i < 10; ++i) { tmp.push_back(i); } - ASSERT_EQ(tmp.size(), 10); + ASSERT_EQ(tmp.size(), 10UL); vec tmp2; tmp2 = tmp; - ASSERT_EQ(tmp2.size(), 10); + ASSERT_EQ(tmp2.size(), 10UL); for (int i = 0; i < 10; ++i) { ASSERT_EQ(tmp2[i], i); ASSERT_EQ(tmp2[i], tmp[i]); @@ -59,7 +59,7 @@ TEST(mixed_vector, GPU_VECTOR) { for (int i = 0; i < 10; ++i) { tmp.push_back(i); } - ASSERT_EQ(tmp.size(), 10); + ASSERT_EQ(tmp.size(), 10UL); paddle::platform::CUDAPlace gpu(0); multiply_10<<<1, 1, 0, GetCUDAStream(gpu)>>>(tmp.MutableData(gpu)); @@ -80,7 +80,7 @@ TEST(mixed_vector, MultiGPU) { for (int i = 0; i < 10; ++i) { tmp.push_back(i); } - ASSERT_EQ(tmp.size(), 10); + ASSERT_EQ(tmp.size(), 10UL); paddle::platform::CUDAPlace gpu0(0); paddle::platform::SetDeviceId(0); multiply_10<<<1, 1, 0, GetCUDAStream(gpu0)>>>(tmp.MutableData(gpu0)); -- GitLab From ae2296e806fb3b70f2ffe326815ade868039715f Mon Sep 17 00:00:00 2001 From: Yu Yang Date: Sun, 11 Feb 2018 11:01:11 +0800 Subject: [PATCH 019/122] Clean code --- paddle/fluid/framework/mixed_vector_test.cu | 1 - 1 file changed, 1 deletion(-) diff --git a/paddle/fluid/framework/mixed_vector_test.cu b/paddle/fluid/framework/mixed_vector_test.cu index 83694a590f8..0d5a914eac7 100644 --- a/paddle/fluid/framework/mixed_vector_test.cu +++ b/paddle/fluid/framework/mixed_vector_test.cu @@ -15,7 +15,6 @@ #include "glog/logging.h" #include "gtest/gtest.h" -#include "mixed_vector.h" #include "paddle/fluid/framework/mixed_vector.h" #include "paddle/fluid/platform/gpu_info.h" -- GitLab From 190119bb98eaca554bb183488f6828fd2b3e18c0 Mon Sep 17 00:00:00 2001 From: Yu Yang Date: Sun, 11 Feb 2018 11:28:32 +0800 Subject: [PATCH 020/122] Extract for-loop init. Make nvcc happy --- paddle/fluid/framework/mixed_vector.h | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/paddle/fluid/framework/mixed_vector.h b/paddle/fluid/framework/mixed_vector.h index 26f160e5093..4dc3de54dee 100644 --- a/paddle/fluid/framework/mixed_vector.h +++ b/paddle/fluid/framework/mixed_vector.h @@ -247,8 +247,9 @@ class Vector { bool operator==(const Vector& other) const { if (size() != other.size()) return false; - for (const T *it1 = cbegin(), it2 = other.cbegin(); it1 < cend(); - ++it1, ++it2) { + auto it1 = cbegin(); + auto it2 = other.cbegin(); + for (; it1 < cend(); ++it1, ++it2) { if (*it1 != *it2) { return false; } -- GitLab From 0c45eab7fffd94169ddda0d61e0613524dbcd8e6 Mon Sep 17 00:00:00 2001 From: Yang Yang Date: Sun, 11 Feb 2018 05:43:55 +0000 Subject: [PATCH 021/122] no getmutable nccl_com --- paddle/fluid/framework/executor.cc | 7 +++---- python/paddle/v2/fluid/tests/test_parallel_op.py | 4 ++-- 2 files changed, 5 insertions(+), 6 deletions(-) diff --git a/paddle/fluid/framework/executor.cc b/paddle/fluid/framework/executor.cc index 5e1358ab0e9..254df564e2f 100644 --- a/paddle/fluid/framework/executor.cc +++ b/paddle/fluid/framework/executor.cc @@ -23,7 +23,6 @@ limitations under the License. */ #include "paddle/fluid/framework/lod_tensor_array.h" #include "paddle/fluid/framework/op_registry.h" #include "paddle/fluid/framework/reader.h" -#include "paddle/fluid/operators/nccl/nccl_gpu_common.h" // platform::Communicator #include "paddle/fluid/platform/place.h" #include "paddle/fluid/platform/profiler.h" @@ -54,15 +53,15 @@ static void CreateTensor(Variable* var, proto::VarDesc::VarType var_type) { var->GetMutable(); } else if (var_type == proto::VarDesc::PLACE_LIST) { var->GetMutable(); - } else if (var_type == proto::VarDesc::NCCL_COM) { - var->GetMutable(); } else if (var_type == proto::VarDesc::READER) { var->GetMutable(); + } else if (var_type == proto::VarDesc::NCCL_COM) { + // GetMutable will be called in ncclInit } else { PADDLE_THROW( "Variable type %d is not in " "[LOD_TENSOR, SELECTED_ROWS, FEED_MINIBATCH, FETCH_LIST, " - "LOD_RANK_TABLE, PLACE_LIST, READER]", + "LOD_RANK_TABLE, PLACE_LIST, READER, NCCL_COM]", var_type); } } diff --git a/python/paddle/v2/fluid/tests/test_parallel_op.py b/python/paddle/v2/fluid/tests/test_parallel_op.py index 66bb6442af9..7f6d0b8d32e 100644 --- a/python/paddle/v2/fluid/tests/test_parallel_op.py +++ b/python/paddle/v2/fluid/tests/test_parallel_op.py @@ -212,5 +212,5 @@ class ParallelOpTestMultipleInput(BaseParallelForTest): fetch=['fc1.w@GRAD', 'fc2.w@GRAD', 'fc3.w@GRAD']) -#if __name__ == '__main__': -# unittest.main() +if __name__ == '__main__': + unittest.main() -- GitLab From f35401c4da32e575bcf902c293549465374e5d60 Mon Sep 17 00:00:00 2001 From: Yang Yang Date: Sun, 11 Feb 2018 05:47:06 +0000 Subject: [PATCH 022/122] diable debug string due to vector bug --- paddle/fluid/framework/executor.cc | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/paddle/fluid/framework/executor.cc b/paddle/fluid/framework/executor.cc index 254df564e2f..3723a9131d7 100644 --- a/paddle/fluid/framework/executor.cc +++ b/paddle/fluid/framework/executor.cc @@ -120,11 +120,12 @@ void Executor::Run(const ProgramDesc& pdesc, Scope* scope, int block_id, for (auto& op_desc : block.AllOps()) { auto op = paddle::framework::OpRegistry::CreateOp(*op_desc); - VLOG(3) << op->DebugStringEx(local_scope); + // VLOG(3) << op->DebugStringEx(local_scope); platform::DeviceContextPool& pool = platform::DeviceContextPool::Instance(); platform::RecordEvent record_event(op->Type(), pool.Get(place_)); + VLOG(3) << op->Type(); op->Run(*local_scope, place_); if (FLAGS_benchmark) { VLOG(2) << "Memory used after operator " + op->Type() + " running: " -- GitLab From 21071f7106e0873c3360c80d5744f7b120bb6bd9 Mon Sep 17 00:00:00 2001 From: typhoonzero Date: Sun, 11 Feb 2018 15:00:34 +0800 Subject: [PATCH 023/122] no create trainer var on listen_and_serv --- paddle/fluid/operators/listen_and_serv_op.cc | 4 ++- .../paddle/v2/fluid/distribute_transpiler.py | 30 ++++++++----------- python/paddle/v2/fluid/framework.py | 23 -------------- 3 files changed, 16 insertions(+), 41 deletions(-) diff --git a/paddle/fluid/operators/listen_and_serv_op.cc b/paddle/fluid/operators/listen_and_serv_op.cc index 3e5a17f2167..8b9bd43f076 100644 --- a/paddle/fluid/operators/listen_and_serv_op.cc +++ b/paddle/fluid/operators/listen_and_serv_op.cc @@ -85,7 +85,7 @@ class ListenAndServOp : public framework::OperatorBase { rpc_service_->SetScope(&recv_scope); rpc_service_->SetDevCtx(&dev_ctx); auto ins = Inputs("X"); - auto fan_in = ins.size(); + auto fan_in = Attr("Fanin"); auto *block = Attr(kOptimizeBlock); auto *program = block->Program(); @@ -163,6 +163,8 @@ from send_op and send back variables to recv_op. .AddCustomChecker([](const std::string &ip) { return !ip.empty(); }); AddAttr(kOptimizeBlock, "BlockID to run on server side."); + AddAttr("Fanin", "How many clients send to this server.") + .SetDefault(1); } }; diff --git a/python/paddle/v2/fluid/distribute_transpiler.py b/python/paddle/v2/fluid/distribute_transpiler.py index c6a4ab0ec70..67f09f9e661 100644 --- a/python/paddle/v2/fluid/distribute_transpiler.py +++ b/python/paddle/v2/fluid/distribute_transpiler.py @@ -14,7 +14,7 @@ from __future__ import print_function import framework -from framework import Program, default_main_program, Parameter, Variable +from framework import Program, default_main_program, default_startup_program, Parameter, Variable import optimizer from layer_helper import LayerHelper from distributed_spliter import * @@ -97,7 +97,7 @@ class DistributeTranspiler: parameter servers. :param optimize_ops: op list of optimization, should be the - return value of Optimizer.minimize + return value of Optimizer.minimize :type optimize_ops: list :param params_grads: list of tuple(weight, gradient) :type params_grads: list @@ -131,6 +131,7 @@ class DistributeTranspiler: # 4. append concat_op to trainer to update local weights. # 5. create new program for parameter server. # 6. create parameter server program by split_method generated endpoint->VarBlock + # 7. update startup_program, rename variables to variables with trainer_id pserver_endpoints = pservers.split(",") @@ -175,7 +176,6 @@ class DistributeTranspiler: shape=[0]) # create send_op - print("send inputs: ", send_inputs) send_op = program.global_block().append_op( type="send", inputs={"X": send_inputs}, @@ -194,6 +194,15 @@ class DistributeTranspiler: outputs={"Out": [orig_param]}, attrs={"axis": 0}) + # step 7 + startup_prog = default_startup_program() + for varname in startup_prog.global_block().vars.keys(): + if varname in param_var_mapping and \ + len(param_var_mapping[varname]) == 1: + new_var_name = "%s.trainer_%d" % \ + (varname, self.trainer_id) + startup_prog.global_block().rename_var(varname, new_var_name) + def _create_vars_from_blocklist(self, program, block_list): # Create respective variables using the block_list block_map = dict() @@ -210,7 +219,6 @@ class DistributeTranspiler: new_var_name = "%s.trainer_%d" % \ (orig_var.name, self.trainer_id) program.global_block().rename_var(varname, new_var_name) - print("renaming OK...", varname, new_var_name) var_mapping[varname] = \ [program.global_block().var(new_var_name)] continue @@ -377,10 +385,7 @@ class DistributeTranspiler: new_inputs = dict() # update param/grad shape first, then other inputs like # moment can use the updated shape - print("mark1") for key in opt_op.input_names: - # print("opt type: ", opt_op.type) - # print("opt op input: ", key) if key == "Grad": grad_block = None for g in self.param_grad_ep_mapping[endpoint]["grads"]: @@ -427,7 +432,6 @@ class DistributeTranspiler: new_inputs[key] = tmpvar - print("mark2") for key in opt_op.input_names: if key in ["Param", "Grad"]: continue @@ -451,7 +455,6 @@ class DistributeTranspiler: inputs=new_inputs, outputs=outputs, attrs=opt_op.attrs) - print("mark3") def _append_pserver_non_opt_ops(self, optimize_block, opt_op): program = optimize_block.program @@ -505,8 +508,6 @@ class DistributeTranspiler: suff_idx = v.name.find(".trainer_") if suff_idx >= 0: orig_var_name = v.name[:suff_idx] - print("create variable for program: %s.trainer_%d" % - (orig_var_name, trainer_id)) var = pserver_program.global_block().create_var( name="%s.trainer_%d" % (orig_var_name, trainer_id), persistable=True, @@ -517,11 +518,6 @@ class DistributeTranspiler: optimize_block = pserver_program.create_block(0) # Iterate through the ops and append ops as needed for idx, opt_op in enumerate(self.optimize_ops): - print("mark0") - print(opt_op.inputs.keys()) - for v in opt_op.inputs.values(): - print(v.name) - print(v.shape) is_op_on_pserver = self._is_op_on_pserver(endpoint, self.optimize_ops, idx) if not is_op_on_pserver: @@ -547,7 +543,7 @@ class DistributeTranspiler: # p.name # for p in self.param_grad_ep_mapping[endpoint]["grads"] # ], - # "Fanin": self.trainers + "Fanin": self.trainers }) pserver_program.sync_with_cpp() return pserver_program diff --git a/python/paddle/v2/fluid/framework.py b/python/paddle/v2/fluid/framework.py index 417fcb4fd36..02e2f8a6a19 100644 --- a/python/paddle/v2/fluid/framework.py +++ b/python/paddle/v2/fluid/framework.py @@ -761,17 +761,6 @@ class Block(object): else: raise ValueError("unsupported var type: %s", type(v)) - def _clear_op_io_for_var(name): - for op in self.ops: - for k in op.inputs.keys(): - - if op.inputs[k].name == name: - op.inputs[k] = None - for k in op.outputs.keys(): - if op.outputs[k].name == name: - op.outputs[k] = None - - _clear_op_io_for_var(name) self.desc.rename_var(name, new_name) d = self.desc.find_var(new_name) var = None @@ -797,17 +786,6 @@ class Block(object): # rename the python side, sync_with_cpp will only add # new vars/ops to python side. self.vars[new_name] = var - for op in self.ops: - print("### rename op i/o ", name, op.inputs) - if op.inputs: - for k in op.inputs.keys(): - if op.inputs[k] == None: - print("rename input: ", name, var) - op.inputs[k] = var - if op.outputs: - for k in op.outputs.keys(): - if op.outputs[k] == None: - op.outputs[k] = var del self.vars[name] self.sync_with_cpp() @@ -901,7 +879,6 @@ class Block(object): for p in other.iter_parameters(): assert isinstance(p, Parameter) v = self.vars.get(p.name, None) - print("var shape to copy", v, p) if v is None: raise ValueError("copy_param_info_from should be invoked with " "same topology") -- GitLab From a8b630c89c290a40818346672e91d97675042f36 Mon Sep 17 00:00:00 2001 From: typhoonzero Date: Sun, 11 Feb 2018 15:04:46 +0800 Subject: [PATCH 024/122] remove comments --- python/paddle/v2/fluid/distribute_transpiler.py | 10 ---------- 1 file changed, 10 deletions(-) diff --git a/python/paddle/v2/fluid/distribute_transpiler.py b/python/paddle/v2/fluid/distribute_transpiler.py index 67f09f9e661..48ad4500fd3 100644 --- a/python/paddle/v2/fluid/distribute_transpiler.py +++ b/python/paddle/v2/fluid/distribute_transpiler.py @@ -361,8 +361,6 @@ class DistributeTranspiler: j = idx - 1 while j >= 0: prev_op = all_ops[j] - # prev_output_names = [o.name for o in prev_op.outputs.values()] - # prev_input_names = [o.name for o in prev_op.inputs.values()] # NOTE(typhoonzero): consider list input/output prev_output_names = prev_op.desc.output_arg_names() prev_input_names = prev_op.desc.input_arg_names() @@ -535,14 +533,6 @@ class DistributeTranspiler: attrs={ "OptimizeBlock": optimize_block, "endpoint": endpoint, - # "ParamList": [ - # p.name - # for p in self.param_grad_ep_mapping[endpoint]["params"] - # ], - # "GradList": [ - # p.name - # for p in self.param_grad_ep_mapping[endpoint]["grads"] - # ], "Fanin": self.trainers }) pserver_program.sync_with_cpp() -- GitLab From 2cfb2928dbe1b3c6848e9c4a8d187c3e1e4245ca Mon Sep 17 00:00:00 2001 From: typhoonzero Date: Sun, 11 Feb 2018 16:44:52 +0800 Subject: [PATCH 025/122] Fix develop dist transpiler bug --- .../paddle/v2/fluid/distribute_transpiler.py | 78 ++++++++----------- 1 file changed, 34 insertions(+), 44 deletions(-) diff --git a/python/paddle/v2/fluid/distribute_transpiler.py b/python/paddle/v2/fluid/distribute_transpiler.py index e4675e24b17..62d1f3434c1 100644 --- a/python/paddle/v2/fluid/distribute_transpiler.py +++ b/python/paddle/v2/fluid/distribute_transpiler.py @@ -191,7 +191,6 @@ class DistributeTranspiler: for b in param_blocks: varname, block_id, _ = b.split(":") send_outputs.append(param_var_mapping[varname][int(block_id)]) - # let send_op know which endpoint to send which var to, eplist has the same # order as send_inputs. eplist = split_method(send_inputs, pserver_endpoints) @@ -230,21 +229,6 @@ class DistributeTranspiler: outputs={"Out": [orig_param]}, attrs={"axis": 0}) - self.lr_param_mapping = self._create_lr_param_mapping() - - def _create_lr_param_mapping(self): - lr_mapping = dict() - for _, opt_op in enumerate(self.optimize_ops): - if not opt_op.inputs or not opt_op.inputs.has_key("LearningRate") \ - or not opt_op.inputs.has_key("Param"): - continue - lr = opt_op.inputs["LearningRate"].name - param = opt_op.inputs["Param"].name - if not lr_mapping.has_key(lr): - lr_mapping.update({lr: list()}) - lr_mapping[lr].append(param) - return lr_mapping - def _create_vars_from_blocklist(self, program, block_list): # Create respective variables using the block_list block_map = dict() @@ -369,18 +353,19 @@ class DistributeTranspiler: pass return orig_shape - def _fetch_var_names(self, param_dict): - res = [] - if not param_dict: - return res - for _, values in param_dict.iteritems(): - if not isinstance(values, list): - values = [values] - res += [v.name for v in values] - return res + # def _fetch_var_names(self, param_dict): + # res = [] + # if not param_dict: + # return res + # for _, values in param_dict.iteritems(): + # if not isinstance(values, list): + # values = [values] + # res += [v.name for v in values] + # return res def _append_pserver_ops(self, optimize_block, opt_op, endpoint): program = optimize_block.program + pserver_block = program.global_block() new_inputs = dict() # update param/grad shape first, then other inputs like # moment can use the updated shape @@ -395,11 +380,11 @@ class DistributeTranspiler: # do not append this op if current endpoint # is not dealing with this grad block return - merged_var = program.global_block().vars[grad_block.name] + merged_var = pserver_block.vars[grad_block.name] # append merging ops if trainers > 1 if self.trainers > 1: vars2merge = self._create_var_for_trainers( - program.global_block(), grad_block, self.trainers) + pserver_block, grad_block, self.trainers) optimize_block.append_op( type="sum", inputs={"X": vars2merge}, @@ -419,29 +404,27 @@ class DistributeTranspiler: break if not param_block: return - tmpvar = program.global_block().create_var( + tmpvar = pserver_block.create_var( name=param_block.name, persistable=True, dtype=param_block.dtype, shape=param_block.shape) - new_inputs[key] = tmpvar elif key == "LearningRate": # leraning rate variable has already be created by non-optimize op, # don't create it once again. - new_inputs[key] = program.global_block().vars[opt_op.input(key)[ - 0]] + new_inputs[key] = pserver_block.vars[opt_op.input(key)[0]] for key in opt_op.input_names: new_shape = None if key in ["Param", "Grad", "LearningRate"]: continue - var = program.global_block().vars[opt_op.input(key)[0]] + var = self.program.global_block().vars[opt_op.input(key)[0]] # update accumulator variable shape param_shape = new_inputs["Param"].shape new_shape = self._get_optimizer_input_shape(opt_op.type, key, var.shape, param_shape) - tmpvar = program.global_block().create_var( + tmpvar = pserver_block.create_var( name=var.name, persistable=var.persistable, dtype=var.dtype, @@ -449,11 +432,14 @@ class DistributeTranspiler: new_inputs[key] = tmpvar # change output's ParamOut variable + outputs = self._get_output_map_from_op(self.program.global_block().vars, + opt_op) opt_op.outputs["ParamOut"] = new_inputs["Param"] + optimize_block.append_op( type=opt_op.type, inputs=new_inputs, - outputs=opt_op.outputs, + outputs=outputs, attrs=opt_op.attrs) def _append_pserver_non_opt_ops(self, optimize_block, opt_op): @@ -497,11 +483,16 @@ class DistributeTranspiler: # If one op's input is another op's output or # one op's output is another op's input, we say # the two operator is connected. - op1_input_names = self._fetch_var_names(op1.inputs) - op1_output_names = self._fetch_var_names(op1.outputs) + # op1_input_names = self._fetch_var_names(op1.inputs) + # op1_output_names = self._fetch_var_names(op1.outputs) + op1_input_names = op1.desc.input_arg_names() + op1_output_names = op1.desc.output_arg_names() + + # op2_input_names = self._fetch_var_names(op2.inputs) + # op2_output_names = self._fetch_var_names(op2.outputs) + op2_input_names = op2.desc.input_arg_names() + op2_output_names = op2.desc.output_arg_names() - op2_input_names = self._fetch_var_names(op2.inputs) - op2_output_names = self._fetch_var_names(op2.outputs) if set(op1_output_names) & set(op2_input_names) or \ set(op1_input_names) & set(op2_output_names): return True @@ -521,8 +512,8 @@ class DistributeTranspiler: def _is_opt_op(self, op): # NOTE: It's a HACK implement. # optimize op: SGDOptimize, MomentumOptimizer, AdamOptimizer and etc... - if op.inputs and op.inputs.has_key("Param") \ - and op.inputs.has_key("LearningRate"): + if "Param" in op.input_names and \ + "LearningRate" in op.input_names: return True return False @@ -530,12 +521,12 @@ class DistributeTranspiler: param_names = [ p.name for p in self.param_grad_ep_mapping[endpoint]["params"] ] - if op.inputs["Param"].name in param_names: + if op.input("Param") in param_names: return True else: for n in param_names: - param = op.inputs["Param"].name - if same_or_split_var(n, param) and n != op.inputs["Param"].name: + param = op.input("Param")[0] + if same_or_split_var(n, param) and n != param: return True return False return False @@ -564,7 +555,6 @@ class DistributeTranspiler: persistable=True, dtype=v.dtype, shape=v.shape) - # step6 optimize_block = pserver_program.create_block(0) # step 6.1 -- GitLab From 92ac30efd9bab1e7bcf9c0d98e3b44dd4edbc5a3 Mon Sep 17 00:00:00 2001 From: typhoonzero Date: Sun, 11 Feb 2018 16:47:10 +0800 Subject: [PATCH 026/122] remove comments --- python/paddle/v2/fluid/distribute_transpiler.py | 14 -------------- 1 file changed, 14 deletions(-) diff --git a/python/paddle/v2/fluid/distribute_transpiler.py b/python/paddle/v2/fluid/distribute_transpiler.py index 62d1f3434c1..ff84e609e22 100644 --- a/python/paddle/v2/fluid/distribute_transpiler.py +++ b/python/paddle/v2/fluid/distribute_transpiler.py @@ -353,16 +353,6 @@ class DistributeTranspiler: pass return orig_shape - # def _fetch_var_names(self, param_dict): - # res = [] - # if not param_dict: - # return res - # for _, values in param_dict.iteritems(): - # if not isinstance(values, list): - # values = [values] - # res += [v.name for v in values] - # return res - def _append_pserver_ops(self, optimize_block, opt_op, endpoint): program = optimize_block.program pserver_block = program.global_block() @@ -483,13 +473,9 @@ class DistributeTranspiler: # If one op's input is another op's output or # one op's output is another op's input, we say # the two operator is connected. - # op1_input_names = self._fetch_var_names(op1.inputs) - # op1_output_names = self._fetch_var_names(op1.outputs) op1_input_names = op1.desc.input_arg_names() op1_output_names = op1.desc.output_arg_names() - # op2_input_names = self._fetch_var_names(op2.inputs) - # op2_output_names = self._fetch_var_names(op2.outputs) op2_input_names = op2.desc.input_arg_names() op2_output_names = op2.desc.output_arg_names() -- GitLab From 01f4bcb57ee99a9d5c2d52cbc7cbce4c4a0454c8 Mon Sep 17 00:00:00 2001 From: typhoonzero Date: Sun, 11 Feb 2018 16:54:01 +0800 Subject: [PATCH 027/122] remove inputs/outputs from Operator --- python/paddle/v2/fluid/distribute_transpiler.py | 2 +- python/paddle/v2/fluid/framework.py | 3 --- 2 files changed, 1 insertion(+), 4 deletions(-) diff --git a/python/paddle/v2/fluid/distribute_transpiler.py b/python/paddle/v2/fluid/distribute_transpiler.py index ff84e609e22..f84481adf7a 100644 --- a/python/paddle/v2/fluid/distribute_transpiler.py +++ b/python/paddle/v2/fluid/distribute_transpiler.py @@ -424,7 +424,7 @@ class DistributeTranspiler: # change output's ParamOut variable outputs = self._get_output_map_from_op(self.program.global_block().vars, opt_op) - opt_op.outputs["ParamOut"] = new_inputs["Param"] + outputs["ParamOut"] = new_inputs["Param"] optimize_block.append_op( type=opt_op.type, diff --git a/python/paddle/v2/fluid/framework.py b/python/paddle/v2/fluid/framework.py index a517db68c58..35d3df785ba 100644 --- a/python/paddle/v2/fluid/framework.py +++ b/python/paddle/v2/fluid/framework.py @@ -400,9 +400,6 @@ class Operator(object): """ self.block = block self.desc = desc - # for clone a new operator - self.inputs = inputs - self.outputs = outputs self.attrs = attrs if len(self.desc.type()) != 0: return -- GitLab From 9a05c9075043345e34b4461ded2ce92ba6501ae4 Mon Sep 17 00:00:00 2001 From: typhoonzero Date: Mon, 12 Feb 2018 10:38:31 +0800 Subject: [PATCH 028/122] fix StridedNumelCopyWithAxis --- paddle/fluid/operators/strided_memcpy.h | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/paddle/fluid/operators/strided_memcpy.h b/paddle/fluid/operators/strided_memcpy.h index 385124305e2..4036d1091db 100644 --- a/paddle/fluid/operators/strided_memcpy.h +++ b/paddle/fluid/operators/strided_memcpy.h @@ -58,6 +58,7 @@ inline void StridedNumelCopyWithAxis(const platform::DeviceContext& ctx, int64_t before = dst_stride_numel[0] / dst_stride_numel[axis]; int64_t src_after = src_stride_numel[axis]; int64_t dst_after = dst_stride_numel[axis]; + int64_t copy_size = std::min(src_after, dst_after); auto place = ctx.GetPlace(); PADDLE_ENFORCE_EQ(src_stride_numel.size(), dst_stride_numel.size(), @@ -82,14 +83,14 @@ inline void StridedNumelCopyWithAxis(const platform::DeviceContext& ctx, if (platform::is_cpu_place(place)) { auto& cpu_place = boost::get(place); memory::Copy(cpu_place, dst + i * dst_after, cpu_place, - src + i * src_after, sizeof(T) * src_after); + src + i * src_after, sizeof(T) * copy_size); } else { #ifdef PADDLE_WITH_CUDA auto& gpu_place = boost::get(place); auto& cuda_ctx = reinterpret_cast(ctx); memory::Copy(gpu_place, dst + i * dst_after, gpu_place, - src + i * src_after, sizeof(T) * src_after, + src + i * src_after, sizeof(T) * copy_size, cuda_ctx.stream()); #else PADDLE_THROW("Paddle is not compiled with GPU"); -- GitLab From 49c50c9fda76f0e3ca7b157ab84cf03919b23166 Mon Sep 17 00:00:00 2001 From: chengduoZH Date: Sun, 11 Feb 2018 15:22:00 +0800 Subject: [PATCH 029/122] Add multiBox API --- python/paddle/v2/fluid/layers/detection.py | 159 +++++++++++++++++- python/paddle/v2/fluid/nets.py | 33 ++++ .../paddle/v2/fluid/tests/test_detection.py | 61 +++++++ 3 files changed, 251 insertions(+), 2 deletions(-) diff --git a/python/paddle/v2/fluid/layers/detection.py b/python/paddle/v2/fluid/layers/detection.py index 054443cb435..bbe2765e138 100644 --- a/python/paddle/v2/fluid/layers/detection.py +++ b/python/paddle/v2/fluid/layers/detection.py @@ -1,4 +1,4 @@ -# Copyright (c) 2018 PaddlePaddle Authors. All Rights Reserve. +# Copyright (c) 2018 PaddlePaddle Authors. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. @@ -16,8 +16,19 @@ All layers just related to the detection neural network. """ from ..layer_helper import LayerHelper +from ..param_attr import ParamAttr +from ..framework import Variable +from layer_function_generator import autodoc +from tensor import concat +from ops import reshape +from ..nets import img_conv_with_bn +from nn import transpose +import math -__all__ = ['detection_output', ] +__all__ = [ + 'detection_output', + 'multi_box_head', +] def detection_output(scores, @@ -114,3 +125,147 @@ def detection_output(scores, 'nms_eta': 1.0 }) return nmsed_outs + + +def multi_box_head(inputs, + num_classes, + min_sizes=None, + max_sizes=None, + min_ratio=None, + max_ratio=None, + aspect_ratios=None, + flip=False, + share_location=True, + kernel_size=1, + pad=1, + stride=1, + use_batchnorm=False, + base_size=None, + name=None): + """ + **Multi Box Head** + + input many Variable, and return mbox_loc, mbox_conf + + Args: + inputs(list): The list of input Variables, the format + of all Variables is NCHW. + num_classes(int): The number of calss. + min_sizes(list, optional, default=None): The length of + min_size is used to compute the the number of prior box. + If the min_size is None, it will be computed according + to min_ratio and max_ratio. + max_sizes(list, optional, default=None): The length of max_size + is used to compute the the number of prior box. + min_ratio(int): If the min_sizes is None, min_ratio and min_ratio + will be used to compute the min_sizes and max_sizes. + max_ratio(int): If the min_sizes is None, min_ratio and min_ratio + will be used to compute the min_sizes and max_sizes. + aspect_ratios(list): The number of the aspect ratios is used to + compute the number of prior box. + base_size(int): the base_size is used to get min_size + and max_size according to min_ratio and max_ratio. + flip(bool, optional, default=False): Whether to flip + aspect ratios. + name(str, optional, None): Name of the prior box layer. + + Returns: + + mbox_loc(Variable): the output prior boxes of PriorBoxOp. The layout is + [num_priors, 4]. num_priors is the total box count of each + position of inputs. + mbox_conf(Variable): the expanded variances of PriorBoxOp. The layout + is [num_priors, 4]. num_priors is the total box count of each + position of inputs + + Examples: + .. code-block:: python + + + """ + + assert isinstance(inputs, list), 'inputs should be a list.' + + if min_sizes is not None: + assert len(inputs) == len(min_sizes) + + if max_sizes is not None: + assert len(inputs) == len(max_sizes) + + if min_sizes is None: + # if min_sizes is None, min_sizes and max_sizes + # will be set according to max_ratio and min_ratio + assert max_ratio is not None and min_ratio is not None + min_sizes = [] + max_sizes = [] + num_layer = len(inputs) + step = int(math.floor(((max_ratio - min_ratio)) / (num_layer - 2))) + for ratio in xrange(min_ratio, max_ratio + 1, step): + min_sizes.append(base_size * ratio / 100.) + max_sizes.append(base_size * (ratio + step) / 100.) + min_sizes = [base_size * .10] + min_sizes + max_sizes = [base_size * .20] + max_sizes + + if aspect_ratios is not None: + assert len(inputs) == len(aspect_ratios) + + mbox_locs = [] + mbox_confs = [] + for i, input in enumerate(inputs): + min_size = min_sizes[i] + if type(min_size) is not list: + min_size = [min_size] + + max_size = [] + if max_sizes is not None: + max_size = max_sizes[i] + if type(max_size) is not list: + max_size = [max_size] + if max_size: + assert len(max_size) == len( + min_size), "max_size and min_size should have same length." + + aspect_ratio = [] + if aspect_ratios is not None: + aspect_ratio = aspect_ratios[i] + if type(aspect_ratio) is not list: + aspect_ratio = [aspect_ratio] + + num_priors_per_location = 0 + if max_sizes is not None: + num_priors_per_location = len(min_size) + len(aspect_ratio) * len( + min_size) + len(max_size) + else: + num_priors_per_location = len(min_size) + len(aspect_ratio) * len( + min_size) + if flip: + num_priors_per_location += len(aspect_ratio) * len(min_size) + + # mbox_loc + num_loc_output = num_priors_per_location * 4 + if share_location: + num_loc_output *= num_classes + + mbox_loc = img_conv_with_bn( + input=input, + conv_num_filter=num_loc_output, + conv_padding=pad, + conv_stride=stride, + conv_filter_size=kernel_size, + conv_with_batchnorm=use_batchnorm) + mbox_loc = transpose(mbox_loc, perm=[0, 2, 3, 1]) + mbox_locs.append(mbox_loc) + + # get the number of prior box + num_conf_output = num_priors_per_location * num_classes + conf_loc = img_conv_with_bn( + input=input, + conv_num_filter=num_conf_output, + conv_padding=pad, + conv_stride=stride, + conv_filter_size=kernel_size, + conv_with_batchnorm=use_batchnorm) + conf_loc = transpose(conf_loc, perm=[0, 2, 3, 1]) + mbox_confs.append(conf_loc) + + return mbox_locs, mbox_confs diff --git a/python/paddle/v2/fluid/nets.py b/python/paddle/v2/fluid/nets.py index be7878f869b..b7deccfd1f5 100644 --- a/python/paddle/v2/fluid/nets.py +++ b/python/paddle/v2/fluid/nets.py @@ -18,6 +18,7 @@ __all__ = [ "sequence_conv_pool", "glu", "scaled_dot_product_attention", + "img_conv_with_bn", ] @@ -107,6 +108,38 @@ def img_conv_group(input, return pool_out +def img_conv_with_bn(input, + conv_num_filter, + conv_padding=1, + conv_filter_size=3, + conv_stride=1, + conv_act=None, + param_attr=None, + conv_with_batchnorm=False, + conv_batchnorm_drop_rate=0.0, + use_cudnn=True): + """ + Image Convolution Group, Used for vgg net. + """ + conv2d = layers.conv2d( + input=input, + num_filters=conv_num_filter, + filter_size=conv_filter_size, + padding=conv_padding, + stride=conv_stride, + param_attr=param_attr, + act=conv_act, + use_cudnn=use_cudnn) + + if conv_with_batchnorm: + conv2d = layers.batch_norm(input=conv2d) + drop_rate = conv_batchnorm_drop_rate + if abs(drop_rate) > 1e-5: + conv2d = layers.dropout(x=conv2d, dropout_prob=drop_rate) + + return conv2d + + def sequence_conv_pool(input, num_filters, filter_size, diff --git a/python/paddle/v2/fluid/tests/test_detection.py b/python/paddle/v2/fluid/tests/test_detection.py index 75498ad7703..d2207f1bfa9 100644 --- a/python/paddle/v2/fluid/tests/test_detection.py +++ b/python/paddle/v2/fluid/tests/test_detection.py @@ -13,7 +13,13 @@ # limitations under the License. from __future__ import print_function +import paddle.v2.fluid as fluid +import paddle.v2.fluid.core as core +import paddle.v2.fluid.layers as layers +import paddle.v2.fluid.layers.detection as detection +from paddle.v2.fluid.framework import Program, program_guard import unittest +import numpy as np import paddle.v2.fluid.layers as layers from paddle.v2.fluid.framework import Program, program_guard @@ -49,5 +55,60 @@ class TestBook(unittest.TestCase): print(str(program)) +class TestMultiBoxHead(unittest.TestCase): + def test_prior_box(self): + data_shape = [3, 224, 224] + mbox_locs, mbox_confs = self.multi_box_output(data_shape) + # print mbox_locs.shape + # print mbox_confs.shape + # assert len(box.shape) == 2 + # assert box.shape == var.shape + # assert box.shape[1] == 4 + + def multi_box_output(self, data_shape): + images = fluid.layers.data( + name='pixel', shape=data_shape, dtype='float32') + conv1 = fluid.layers.conv2d( + input=images, + num_filters=3, + filter_size=3, + stride=2, + use_cudnn=False) + conv2 = fluid.layers.conv2d( + input=conv1, + num_filters=3, + filter_size=3, + stride=2, + use_cudnn=False) + conv3 = fluid.layers.conv2d( + input=conv2, + num_filters=3, + filter_size=3, + stride=2, + use_cudnn=False) + conv4 = fluid.layers.conv2d( + input=conv3, + num_filters=3, + filter_size=3, + stride=2, + use_cudnn=False) + conv5 = fluid.layers.conv2d( + input=conv4, + num_filters=3, + filter_size=3, + stride=2, + use_cudnn=False) + + mbox_locs, mbox_confs = detection.multi_box_head( + inputs=[conv1, conv2, conv3, conv4, conv5, conv5], + num_classes=21, + min_ratio=20, + max_ratio=90, + aspect_ratios=[[2.], [2., 3.], [2., 3.], [2., 3.], [2.], [2.]], + base_size=300, + flip=True) + return mbox_locs, mbox_confs + + if __name__ == '__main__': unittest.main() -- GitLab From dca9941e4bbd6e1976d8a4a4dd1bba3ae0e36200 Mon Sep 17 00:00:00 2001 From: typhoonzero Date: Mon, 12 Feb 2018 13:58:41 +0800 Subject: [PATCH 030/122] pass size when copy --- paddle/fluid/operators/concat_op.h | 4 ++-- paddle/fluid/operators/split_op.h | 2 +- paddle/fluid/operators/strided_memcpy.h | 9 ++++----- python/paddle/v2/fluid/distribute_transpiler.py | 5 +++++ 4 files changed, 12 insertions(+), 8 deletions(-) diff --git a/paddle/fluid/operators/concat_op.h b/paddle/fluid/operators/concat_op.h index 878e5305856..c8a4292932d 100644 --- a/paddle/fluid/operators/concat_op.h +++ b/paddle/fluid/operators/concat_op.h @@ -38,7 +38,7 @@ class ConcatKernel : public framework::OpKernel { auto in_stride = framework::stride_numel(in->dims()); StridedNumelCopyWithAxis(ctx.device_context(), axis, out->data() + output_offset, out_stride, - in->data(), in_stride); + in->data(), in_stride, in_stride[axis]); output_offset += in_stride[axis]; } } @@ -59,7 +59,7 @@ class ConcatGradKernel : public framework::OpKernel { auto out_stride = framework::stride_numel(out->dims()); StridedNumelCopyWithAxis(ctx.device_context(), axis, out->data(), out_stride, in->data() + input_offset, - in_stride); + in_stride, out_stride[axis]); input_offset += out_stride[axis]; } } diff --git a/paddle/fluid/operators/split_op.h b/paddle/fluid/operators/split_op.h index 06bcf82620b..54420e1bf6e 100644 --- a/paddle/fluid/operators/split_op.h +++ b/paddle/fluid/operators/split_op.h @@ -38,7 +38,7 @@ class SplitOpKernel : public framework::OpKernel { auto out_stride = framework::stride_numel(out->dims()); StridedNumelCopyWithAxis(ctx.device_context(), axis, out->data(), out_stride, in->data() + input_offset, - in_stride); + in_stride, out_stride[axis]); input_offset += out_stride[axis]; } } diff --git a/paddle/fluid/operators/strided_memcpy.h b/paddle/fluid/operators/strided_memcpy.h index 4036d1091db..4c7b90693a2 100644 --- a/paddle/fluid/operators/strided_memcpy.h +++ b/paddle/fluid/operators/strided_memcpy.h @@ -54,11 +54,11 @@ inline void StridedNumelCopyWithAxis(const platform::DeviceContext& ctx, int64_t axis, T* dst, const framework::DDim& dst_stride_numel, const T* src, - const framework::DDim& src_stride_numel) { + const framework::DDim& src_stride_numel, + int64_t size) { int64_t before = dst_stride_numel[0] / dst_stride_numel[axis]; int64_t src_after = src_stride_numel[axis]; int64_t dst_after = dst_stride_numel[axis]; - int64_t copy_size = std::min(src_after, dst_after); auto place = ctx.GetPlace(); PADDLE_ENFORCE_EQ(src_stride_numel.size(), dst_stride_numel.size(), @@ -83,15 +83,14 @@ inline void StridedNumelCopyWithAxis(const platform::DeviceContext& ctx, if (platform::is_cpu_place(place)) { auto& cpu_place = boost::get(place); memory::Copy(cpu_place, dst + i * dst_after, cpu_place, - src + i * src_after, sizeof(T) * copy_size); + src + i * src_after, sizeof(T) * size); } else { #ifdef PADDLE_WITH_CUDA auto& gpu_place = boost::get(place); auto& cuda_ctx = reinterpret_cast(ctx); memory::Copy(gpu_place, dst + i * dst_after, gpu_place, - src + i * src_after, sizeof(T) * copy_size, - cuda_ctx.stream()); + src + i * src_after, sizeof(T) * size, cuda_ctx.stream()); #else PADDLE_THROW("Paddle is not compiled with GPU"); #endif diff --git a/python/paddle/v2/fluid/distribute_transpiler.py b/python/paddle/v2/fluid/distribute_transpiler.py index f84481adf7a..689920af0c4 100644 --- a/python/paddle/v2/fluid/distribute_transpiler.py +++ b/python/paddle/v2/fluid/distribute_transpiler.py @@ -121,6 +121,7 @@ def split_dense_variable(var_list, block_size += dim1 - remains # update split_count after aligning split_count = int(math.ceil(var_numel / float(block_size))) + print("###split var ", var.name, var.shape, block_size, split_count) for block_id in xrange(split_count): curr_block_size = min(block_size, var_numel - ( (block_id) * block_size)) @@ -255,6 +256,7 @@ class DistributeTranspiler: splited_shape = [rows] if len(orig_shape) >= 2: splited_shape.extend(orig_shape[1:]) + print("###splited: ", size, rows, splited_shape) var = program.global_block().create_var( name="%s.block%d" % (varname, i), psersistable=False, @@ -262,6 +264,7 @@ class DistributeTranspiler: type=orig_var.type, shape=splited_shape) # flattend splited var var_mapping[varname].append(var) + print("###created split var ", var) return var_mapping def _clone_var(self, block, var): @@ -528,6 +531,8 @@ class DistributeTranspiler: """ # step5 pserver_program = Program() + print("param mapping on pserver: #### ", + self.param_grad_ep_mapping[endpoint]["params"]) for v in self.param_grad_ep_mapping[endpoint]["params"]: self._clone_var(pserver_program.global_block(), v) for v in self.param_grad_ep_mapping[endpoint]["grads"]: -- GitLab From e9fa7a7b3a29f68c374e239054f261b41c03c985 Mon Sep 17 00:00:00 2001 From: chengduoZH Date: Mon, 12 Feb 2018 14:03:59 +0800 Subject: [PATCH 031/122] follow comments of qingqing and code refine --- python/paddle/v2/fluid/layers/detection.py | 74 ++++++++++++------ .../paddle/v2/fluid/tests/test_detection.py | 75 ++++--------------- 2 files changed, 66 insertions(+), 83 deletions(-) diff --git a/python/paddle/v2/fluid/layers/detection.py b/python/paddle/v2/fluid/layers/detection.py index b045e1c56c8..aab9f032bd6 100644 --- a/python/paddle/v2/fluid/layers/detection.py +++ b/python/paddle/v2/fluid/layers/detection.py @@ -18,10 +18,9 @@ All layers just related to the detection neural network. from ..layer_helper import LayerHelper from ..param_attr import ParamAttr from ..framework import Variable -from ..nets import img_conv_with_bn -from tensor import concat -from ops import reshape -from nn import transpose +import tensor +import ops +import nn import math __all__ = [ @@ -184,10 +183,10 @@ def prior_box(inputs, name(str, optional, None): Name of the prior box layer. Returns: - boxes(Variable): the output prior boxes of PriorBoxOp. + boxes(Variable): the output prior boxes of PriorBox. The layout is [num_priors, 4]. num_priors is the total box count of each position of inputs. - Variances(Variable): the expanded variances of PriorBoxOp. + Variances(Variable): the expanded variances of PriorBox. The layout is [num_priors, 4]. num_priors is the total box count of each position of inputs @@ -250,7 +249,7 @@ def prior_box(inputs, new_shape = [ -1, reduce(lambda x, y: x * y, input.shape[axis:len(input.shape)]) ] - out = reshape(x=input, shape=new_shape) + out = ops.reshape(x=input, shape=new_shape) return out assert isinstance(inputs, list), 'inputs should be a list.' @@ -326,8 +325,8 @@ def prior_box(inputs, reshaped_boxes.append(_reshape_with_axis_(box_results[i], axis=3)) reshaped_vars.append(_reshape_with_axis_(var_results[i], axis=3)) - box = concat(reshaped_boxes) - var = concat(reshaped_vars) + box = tensor.concat(reshaped_boxes) + var = tensor.concat(reshaped_vars) return box, var @@ -345,12 +344,14 @@ def multi_box_head(inputs, pad=1, stride=1, use_batchnorm=False, - base_size=None, - name=None): + base_size=None): """ **Multi Box Head** - input many Variable, and return mbox_loc, mbox_conf + Generate prior boxes' location and confidence for SSD(Single + Shot MultiBox Detector)algorithm. The details of this algorithm, + please refer the section 2.1 of SSD paper (SSD: Single Shot + MultiBox Detector)`_ . Args: inputs(list): The list of input Variables, the format @@ -376,12 +377,12 @@ def multi_box_head(inputs, Returns: - mbox_loc(list): the output prior boxes of PriorBoxOp. The layout is - [num_priors, 4]. num_priors is the total box count of each - position of inputs. - mbox_conf(list): the expanded variances of PriorBoxOp. The layout - is [num_priors, 4]. num_priors is the total box count of each - position of inputs + mbox_loc(list): The predicted boxes' location of the inputs. + The layout of each element is [N, H, W, Priors]. Priors + is the number of predicted boxof each position of each input. + mbox_conf(list): The predicted boxes' confidence of the inputs. + The layout of each element is [N, H, W, Priors]. Priors + is the number of predicted box of each position of each input. Examples: .. code-block:: python @@ -396,6 +397,35 @@ def multi_box_head(inputs, flip=True) """ + def _conv_with_bn_(input, + conv_num_filter, + conv_padding=1, + conv_filter_size=3, + conv_stride=1, + conv_act=None, + param_attr=None, + conv_with_batchnorm=False, + conv_batchnorm_drop_rate=0.0, + use_cudnn=True): + + conv2d = nn.conv2d( + input=input, + num_filters=conv_num_filter, + filter_size=conv_filter_size, + padding=conv_padding, + stride=conv_stride, + param_attr=param_attr, + act=conv_act, + use_cudnn=use_cudnn) + + if conv_with_batchnorm: + conv2d = nn.batch_norm(input=conv2d) + drop_rate = conv_batchnorm_drop_rate + if abs(drop_rate) > 1e-5: + conv2d = nn.dropout(x=conv2d, dropout_prob=drop_rate) + + return conv2d + if not (isinstance(inputs, list)): raise ValueError('inputs should be a list.') @@ -469,26 +499,26 @@ def multi_box_head(inputs, if share_location: num_loc_output *= num_classes - mbox_loc = img_conv_with_bn( + mbox_loc = _conv_with_bn_( input=input, conv_num_filter=num_loc_output, conv_padding=pad, conv_stride=stride, conv_filter_size=kernel_size, conv_with_batchnorm=use_batchnorm) - mbox_loc = transpose(mbox_loc, perm=[0, 2, 3, 1]) + mbox_loc = nn.transpose(mbox_loc, perm=[0, 2, 3, 1]) mbox_locs.append(mbox_loc) # get conf_loc num_conf_output = num_priors_per_location * num_classes - conf_loc = img_conv_with_bn( + conf_loc = _conv_with_bn_( input=input, conv_num_filter=num_conf_output, conv_padding=pad, conv_stride=stride, conv_filter_size=kernel_size, conv_with_batchnorm=use_batchnorm) - conf_loc = transpose(conf_loc, perm=[0, 2, 3, 1]) + conf_loc = nn.transpose(conf_loc, perm=[0, 2, 3, 1]) mbox_confs.append(conf_loc) return mbox_locs, mbox_confs diff --git a/python/paddle/v2/fluid/tests/test_detection.py b/python/paddle/v2/fluid/tests/test_detection.py index d50efb3f746..2f1ecd66775 100644 --- a/python/paddle/v2/fluid/tests/test_detection.py +++ b/python/paddle/v2/fluid/tests/test_detection.py @@ -47,7 +47,7 @@ class TestBook(unittest.TestCase): out = layers.detection_output( scores=scores, loc=loc, prior_box=pb, prior_box_var=pbv) self.assertIsNotNone(out) - print(str(program)) + # print(str(program)) class TestPriorBox(unittest.TestCase): @@ -62,36 +62,11 @@ class TestPriorBox(unittest.TestCase): def prior_box_output(self, data_shape): images = fluid.layers.data( name='pixel', shape=data_shape, dtype='float32') - conv1 = fluid.layers.conv2d( - input=images, - num_filters=3, - filter_size=3, - stride=2, - use_cudnn=False) - conv2 = fluid.layers.conv2d( - input=conv1, - num_filters=3, - filter_size=3, - stride=2, - use_cudnn=False) - conv3 = fluid.layers.conv2d( - input=conv2, - num_filters=3, - filter_size=3, - stride=2, - use_cudnn=False) - conv4 = fluid.layers.conv2d( - input=conv3, - num_filters=3, - filter_size=3, - stride=2, - use_cudnn=False) - conv5 = fluid.layers.conv2d( - input=conv4, - num_filters=3, - filter_size=3, - stride=2, - use_cudnn=False) + conv1 = fluid.layers.conv2d(images, 3, 3, 2) + conv2 = fluid.layers.conv2d(conv1, 3, 3, 2) + conv3 = fluid.layers.conv2d(conv2, 3, 3, 2) + conv4 = fluid.layers.conv2d(conv3, 3, 3, 2) + conv5 = fluid.layers.conv2d(conv4, 3, 3, 2) box, var = detection.prior_box( inputs=[conv1, conv2, conv3, conv4, conv5, conv5], @@ -112,39 +87,17 @@ class TestMultiBoxHead(unittest.TestCase): data_shape = [3, 224, 224] mbox_locs, mbox_confs = self.multi_box_output(data_shape) + for loc, conf in zip(mbox_locs, mbox_confs): + assert loc.shape[1:3] == conf.shape[1:3] + def multi_box_output(self, data_shape): images = fluid.layers.data( name='pixel', shape=data_shape, dtype='float32') - conv1 = fluid.layers.conv2d( - input=images, - num_filters=3, - filter_size=3, - stride=2, - use_cudnn=False) - conv2 = fluid.layers.conv2d( - input=conv1, - num_filters=3, - filter_size=3, - stride=2, - use_cudnn=False) - conv3 = fluid.layers.conv2d( - input=conv2, - num_filters=3, - filter_size=3, - stride=2, - use_cudnn=False) - conv4 = fluid.layers.conv2d( - input=conv3, - num_filters=3, - filter_size=3, - stride=2, - use_cudnn=False) - conv5 = fluid.layers.conv2d( - input=conv4, - num_filters=3, - filter_size=3, - stride=2, - use_cudnn=False) + conv1 = fluid.layers.conv2d(images, 3, 3, 2) + conv2 = fluid.layers.conv2d(conv1, 3, 3, 2) + conv3 = fluid.layers.conv2d(conv2, 3, 3, 2) + conv4 = fluid.layers.conv2d(conv3, 3, 3, 2) + conv5 = fluid.layers.conv2d(conv4, 3, 3, 2) mbox_locs, mbox_confs = detection.multi_box_head( inputs=[conv1, conv2, conv3, conv4, conv5, conv5], -- GitLab From 8c302d4845b579a7d90d8123f5f31d7b2b4eb193 Mon Sep 17 00:00:00 2001 From: fengjiayi Date: Mon, 12 Feb 2018 16:19:37 +0800 Subject: [PATCH 032/122] remove kwargs in layer apis --- python/paddle/v2/fluid/layers/nn.py | 54 ++++++++++++++--------------- 1 file changed, 27 insertions(+), 27 deletions(-) diff --git a/python/paddle/v2/fluid/layers/nn.py b/python/paddle/v2/fluid/layers/nn.py index 5ebd329fc02..8d1cd85fcea 100644 --- a/python/paddle/v2/fluid/layers/nn.py +++ b/python/paddle/v2/fluid/layers/nn.py @@ -829,12 +829,12 @@ def crf_decoding(input, param_attr, label=None): return viterbi_path -def cos_sim(X, Y, **kwargs): +def cos_sim(X, Y): """ This function performs the cosine similarity between two tensors X and Y and returns that as the output. """ - helper = LayerHelper('cos_sim', **kwargs) + helper = LayerHelper('cos_sim', **locals()) out = helper.create_tmp_variable(dtype=X.dtype) xnorm = helper.create_tmp_variable(dtype=X.dtype) ynorm = helper.create_tmp_variable(dtype=X.dtype) @@ -848,7 +848,7 @@ def cos_sim(X, Y, **kwargs): return out -def dropout(x, dropout_prob, is_test=False, seed=None, **kwargs): +def dropout(x, dropout_prob, is_test=False, seed=None): """ Computes dropout. @@ -877,7 +877,7 @@ def dropout(x, dropout_prob, is_test=False, seed=None, **kwargs): droped = fluid.layers.dropout(input=x, dropout_rate=0.5) """ - helper = LayerHelper('dropout', **kwargs) + helper = LayerHelper('dropout', **locals()) out = helper.create_tmp_variable(dtype=x.dtype) mask = helper.create_tmp_variable(dtype=x.dtype, stop_gradient=True) helper.append_op( @@ -894,7 +894,7 @@ def dropout(x, dropout_prob, is_test=False, seed=None, **kwargs): return out -def cross_entropy(input, label, **kwargs): +def cross_entropy(input, label, soft_label=False): """ **Cross Entropy Layer** @@ -903,15 +903,15 @@ def cross_entropy(input, label, **kwargs): computation. 1) One-hot cross-entropy: - `soft_label = False`, `Label[i, 0]` indicates the class index for sample i: + `soft_label = False`, `Label[i, 0]` indicates the class index for sample i: .. math:: Y[i] = -\log(X[i, Label[i]]) 2) Soft-label cross-entropy: - `soft_label = True`, `Label[i, j]` indicates the soft label of class j - for sample i: + `soft_label = True`, `Label[i, j]` indicates the soft label of class j + for sample i: .. math:: @@ -921,8 +921,8 @@ def cross_entropy(input, label, **kwargs): equals one. 3) One-hot cross-entropy with vecterized `label`: - As a special case of 2), when each row of 'label' has only one - non-zero element which is equal to 1, soft-label cross-entropy degenerates + As a special case of 2), when each row of 'label' has only one + non-zero element which is equal to 1, soft-label cross-entropy degenerates to a one-hot cross-entropy with one-hot label representation. Args: @@ -936,7 +936,7 @@ def cross_entropy(input, label, **kwargs): tensor with shape [N x 1]. When `soft_label` is set to `True`, `label` is a tensor with shape [N x D]. - soft_label (bool, via `**kwargs`): a flag indicating whether to + soft_label (bool): a flag indicating whether to interpretate the given labels as soft labels, default `False`. @@ -956,18 +956,18 @@ def cross_entropy(input, label, **kwargs): predict = fluid.layers.fc(input=net, size=classdim, act='softmax') cost = fluid.layers.cross_entropy(input=predict, label=label) """ - helper = LayerHelper('cross_entropy', **kwargs) + helper = LayerHelper('cross_entropy', **locals()) out = helper.create_tmp_variable(dtype=input.dtype) helper.append_op( type='cross_entropy', inputs={'X': [input], 'Label': [label]}, outputs={'Y': [out]}, - attrs=kwargs) + attrs={"soft_label": soft_label}) return out -def square_error_cost(input, label, **kwargs): +def square_error_cost(input, label): """ **Square error cost layer** @@ -1002,7 +1002,7 @@ def square_error_cost(input, label, **kwargs): cost = layers.square_error_cost(input=y_predict, label=y) """ - helper = LayerHelper('square_error_cost', **kwargs) + helper = LayerHelper('square_error_cost', **locals()) minus_out = helper.create_tmp_variable(dtype=input.dtype) helper.append_op( type='elementwise_sub', @@ -1017,12 +1017,12 @@ def square_error_cost(input, label, **kwargs): return square_out -def accuracy(input, label, k=1, correct=None, total=None, **kwargs): +def accuracy(input, label, k=1, correct=None, total=None): """ This function computes the accuracy using the input and label. The output is the top_k inputs and their indices. """ - helper = LayerHelper("accuracy", **kwargs) + helper = LayerHelper("accuracy", **locals()) topk_out = helper.create_tmp_variable(dtype=input.dtype) topk_indices = helper.create_tmp_variable(dtype="int64") helper.append_op( @@ -1055,13 +1055,12 @@ def chunk_eval(input, label, chunk_scheme, num_chunk_types, - excluded_chunk_types=None, - **kwargs): + excluded_chunk_types=None): """ This function computes and outputs the precision, recall and F1-score of chunk detection. """ - helper = LayerHelper("chunk_eval", **kwargs) + helper = LayerHelper("chunk_eval", **locals()) # prepare output precision = helper.create_tmp_variable(dtype="float32") @@ -1293,7 +1292,7 @@ def conv2d(input, return helper.append_activation(pre_act) -def sequence_pool(input, pool_type, **kwargs): +def sequence_pool(input, pool_type): """ This function add the operator for sequence pooling. It pools features of all time-steps of each instance, and is applied @@ -1343,7 +1342,7 @@ def sequence_pool(input, pool_type, **kwargs): sqrt_x = fluid.layers.sequence_pool(input=x, pool_type='sqrt') max_x = fluid.layers.sequence_pool(input=x, pool_type='max') """ - helper = LayerHelper('sequence_pool', input=input, **kwargs) + helper = LayerHelper('sequence_pool', **locals()) dtype = helper.input_dtype() pool_out = helper.create_tmp_variable(dtype) max_index = helper.create_tmp_variable(dtype) @@ -1363,7 +1362,7 @@ def sequence_pool(input, pool_type, **kwargs): return pool_out -def sequence_first_step(input, **kwargs): +def sequence_first_step(input): """ This funciton get the first step of sequence. @@ -1396,7 +1395,7 @@ def sequence_first_step(input, **kwargs): return sequence_pool(input=input, pool_type="first") -def sequence_last_step(input, **kwargs): +def sequence_last_step(input): """ This funciton get the last step of sequence. @@ -2336,7 +2335,8 @@ def l2_normalize(x, axis, epsilon=1e-12, name=None): normed = fluid.layers.l2_normalize(x=data, axis=1) """ - if len(x.shape) == 1: axis = 0 + if len(x.shape) == 1: + axis = 0 helper = LayerHelper("l2_normalize", **locals()) @@ -2654,7 +2654,7 @@ def ctc_greedy_decoder(input, blank, name=None): return ctc_out -def warpctc(input, label, blank=0, norm_by_times=False, **kwargs): +def warpctc(input, label, blank=0, norm_by_times=False): """ An operator integrating the open source Warp-CTC library (https://github.com/baidu-research/warp-ctc) @@ -2695,7 +2695,7 @@ def warpctc(input, label, blank=0, norm_by_times=False, **kwargs): cost = layers.warpctc(input=y_predict, label=y) """ - helper = LayerHelper('warpctc', **kwargs) + helper = LayerHelper('warpctc', **locals()) loss_out = helper.create_tmp_variable(dtype=input.dtype) grad_out = helper.create_tmp_variable(dtype=input.dtype) helper.append_op( -- GitLab From 057efd1709db21744d672e3b1db74da561bd77ae Mon Sep 17 00:00:00 2001 From: qingqing01 Date: Mon, 12 Feb 2018 16:21:44 +0800 Subject: [PATCH 033/122] Implement multibox loss wrapper for SSD in Python API. (#8385) * Implement multibox loss wrapper in Python API. * Add some wrappers for SSD detection. * Fix conflicts. * Add unit testing for SSD loss wrapper. * Update doc in Python API. * Refine unit testing. * Add more unit testing and update some interface arguments. --- .../fluid/operators/mine_hard_examples_op.cc | 2 + python/paddle/v2/fluid/layers/__init__.py | 3 - python/paddle/v2/fluid/layers/detection.py | 374 +++++++++++++++++- .../paddle/v2/fluid/tests/test_detection.py | 81 +++- 4 files changed, 424 insertions(+), 36 deletions(-) diff --git a/paddle/fluid/operators/mine_hard_examples_op.cc b/paddle/fluid/operators/mine_hard_examples_op.cc index 73a6c0b6793..540cf867418 100644 --- a/paddle/fluid/operators/mine_hard_examples_op.cc +++ b/paddle/fluid/operators/mine_hard_examples_op.cc @@ -237,6 +237,8 @@ class MineHardExamplesOp : public framework::OperatorWithKernel { } ctx->SetOutputDim("UpdatedMatchIndices", idx_dims); + // The first dimension of NegIndices will be set correcttly in Compute. + ctx->SetOutputDim("NegIndices", {-1, 1}); } protected: diff --git a/python/paddle/v2/fluid/layers/__init__.py b/python/paddle/v2/fluid/layers/__init__.py index cfbbf710b6a..f4fb2ca2798 100644 --- a/python/paddle/v2/fluid/layers/__init__.py +++ b/python/paddle/v2/fluid/layers/__init__.py @@ -16,8 +16,6 @@ import ops from ops import * import nn from nn import * -import detection -from detection import * import io from io import * import tensor @@ -33,7 +31,6 @@ from detection import * __all__ = [] __all__ += math_op_patch.__all__ -__all__ += detection.__all__ __all__ += nn.__all__ __all__ += io.__all__ __all__ += tensor.__all__ diff --git a/python/paddle/v2/fluid/layers/detection.py b/python/paddle/v2/fluid/layers/detection.py index 0f3256d7652..659ebd5f765 100644 --- a/python/paddle/v2/fluid/layers/detection.py +++ b/python/paddle/v2/fluid/layers/detection.py @@ -1,10 +1,10 @@ -# Copyright (c) 2018 PaddlePaddle Authors. All Rights Reserved. +# Copyright (c) 2018 PaddlePaddle Authors. All Rights Reserve. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # -# http://www.apache.org/licenses/LICENSE-2.0 +# http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, software # distributed under the License is distributed on an "AS IS" BASIS, @@ -15,17 +15,31 @@ All layers just related to the detection neural network. """ +from layer_function_generator import generate_layer_fn from ..layer_helper import LayerHelper -from ..framework import Variable -from tensor import concat -from ops import reshape +import nn +import ops +import tensor import math __all__ = [ - 'detection_output', 'prior_box', + 'bipartite_match', + 'target_assign', + 'detection_output', + 'ssd_loss', ] +__auto__ = [ + 'iou_similarity', + 'box_coder', +] + +__all__ += __auto__ + +for _OP in set(__auto__): + globals()[_OP] = generate_layer_fn(_OP) + def detection_output(scores, loc, @@ -95,18 +109,13 @@ def detection_output(scores, """ helper = LayerHelper("detection_output", **locals()) - decoded_box = helper.create_tmp_variable(dtype=loc.dtype) - helper.append_op( - type="box_coder", - inputs={ - 'PriorBox': prior_box, - 'PriorBoxVar': prior_box_var, - 'TargetBox': loc - }, - outputs={'OutputBox': decoded_box}, - attrs={'code_type': 'decode_center_size'}) - nmsed_outs = helper.create_tmp_variable(dtype=decoded_box.dtype) + decoded_box = box_coder( + prior_box=prior_box, + prior_box_var=prior_box_var, + target_box=loc, + code_type='decode_center_size') + nmsed_outs = helper.create_tmp_variable(dtype=decoded_box.dtype) helper.append_op( type="multiclass_nms", inputs={'Scores': scores, @@ -246,7 +255,7 @@ def prior_box(inputs, new_shape = [ -1, reduce(lambda x, y: x * y, input.shape[axis:len(input.shape)]) ] - out = reshape(x=input, shape=new_shape) + out = ops.reshape(x=input, shape=new_shape) return out assert isinstance(inputs, list), 'inputs should be a list.' @@ -322,7 +331,332 @@ def prior_box(inputs, reshaped_boxes.append(_reshape_with_axis_(box_results[i], axis=3)) reshaped_vars.append(_reshape_with_axis_(var_results[i], axis=3)) - box = concat(reshaped_boxes) - var = concat(reshaped_vars) + box = tensor.concat(reshaped_boxes) + var = tensor.concat(reshaped_vars) return box, var + + +def bipartite_match(dist_matrix, name=None): + """ + **Bipartite matchint operator** + + This operator is a greedy bipartite matching algorithm, which is used to + obtain the matching with the maximum distance based on the input + distance matrix. For input 2D matrix, the bipartite matching algorithm can + find the matched column for each row, also can find the matched row for + each column. And this operator only calculate matched indices from column + to row. For each instance, the number of matched indices is the number of + of columns of the input ditance matrix. + + There are two outputs to save matched indices and distance. + A simple description, this algothrim matched the best (maximum distance) + row entity to the column entity and the matched indices are not duplicated + in each row of ColToRowMatchIndices. If the column entity is not matched + any row entity, set -1 in ColToRowMatchIndices. + + Please note that the input DistMat can be LoDTensor (with LoD) or Tensor. + If LoDTensor with LoD, the height of ColToRowMatchIndices is batch size. + If Tensor, the height of ColToRowMatchIndices is 1. + + Args: + dist_matrix(Variable): This input is a 2-D LoDTensor with shape + [K, M]. It is pair-wise distance matrix between the entities + represented by each row and each column. For example, assumed one + entity is A with shape [K], another entity is B with shape [M]. The + dist_matirx[i][j] is the distance between A[i] and B[j]. The bigger + the distance is, the better macthing the pairs are. Please note, + This tensor can contain LoD information to represent a batch of + inputs. One instance of this batch can contain different numbers of + entities. + Returns: + match_indices(Variable): A 2-D Tensor with shape [N, M] in int type. + N is the batch size. If match_indices[i][j] is -1, it + means B[j] does not match any entity in i-th instance. + Otherwise, it means B[j] is matched to row + match_indices[i][j] in i-th instance. The row number of + i-th instance is saved in match_indices[i][j]. + match_distance(Variable): A 2-D Tensor with shape [N, M] in float type. + N is batch size. If match_indices[i][j] is -1, + match_distance[i][j] is also -1.0. Otherwise, assumed + match_distance[i][j] = d, and the row offsets of each instance + are called LoD. Then match_distance[i][j] = dist_matrix[d+LoD[i]][j]. + """ + helper = LayerHelper('bipartite_match', **locals()) + match_indices = helper.create_tmp_variable(dtype='int32') + match_distance = helper.create_tmp_variable(dtype=dist_matrix.dtype) + helper.append_op( + type='bipartite_match', + inputs={'DistMat': dist_matrix}, + outputs={ + 'ColToRowMatchIndices': match_indices, + 'ColToRowMatchDist': match_distance + }) + return match_indices, match_distance + + +def target_assign(input, + matched_indices, + negative_indices=None, + mismatch_value=None, + name=None): + """ + **Target assigner operator** + + This operator can be, for given the target bounding boxes or labels, + to assign classification and regression targets to each prediction as well as + weights to prediction. The weights is used to specify which prediction would + not contribute to training loss. + + For each instance, the output `out` and`out_weight` are assigned based on + `match_indices` and `negative_indices`. + Assumed that the row offset for each instance in `input` is called lod, + this operator assigns classification/regression targets by performing the + following steps: + + 1. Assigning all outpts based on `match_indices`: + + If id = match_indices[i][j] > 0, + + out[i][j][0 : K] = X[lod[i] + id][j % P][0 : K] + out_weight[i][j] = 1. + + Otherwise, + + out[j][j][0 : K] = {mismatch_value, mismatch_value, ...} + out_weight[i][j] = 0. + + 2. Assigning out_weight based on `neg_indices` if `neg_indices` is provided: + + Assumed that the row offset for each instance in `neg_indices` is called neg_lod, + for i-th instance and each `id` of neg_indices in this instance: + + out[i][id][0 : K] = {mismatch_value, mismatch_value, ...} + out_weight[i][id] = 1.0 + + Args: + inputs (Variable): This input is a 3D LoDTensor with shape [M, P, K]. + matched_indices (Variable): Tensor), The input matched indices + is 2D Tenosr with shape [N, P], If MatchIndices[i][j] is -1, + the j-th entity of column is not matched to any entity of row in + i-th instance. + negative_indices (Variable): The input negative example indices are + an optional input with shape [Neg, 1] and int32 type, where Neg is + the total number of negative example indices. + mismatch_value (float32): Fill this value to the mismatched location. + + Returns: + out (Variable): The output is a 3D Tensor with shape [N, P, K], + N and P is the same as they are in `neg_indices`, K is the + same as it in input of X. If `match_indices[i][j]`. + out_weight (Variable): The weight for output with the shape of [N, P, 1]. + """ + helper = LayerHelper('target_assign', **locals()) + out = helper.create_tmp_variable(dtype=input.dtype) + out_weight = helper.create_tmp_variable(dtype='float32') + helper.append_op( + type='target_assign', + inputs={ + 'X': input, + 'MatchIndices': matched_indices, + 'NegIndices': negative_indices + }, + outputs={'Out': out, + 'OutWeight': out_weight}, + attrs={'mismatch_value': mismatch_value}) + return out, out_weight + + +def ssd_loss(location, + confidence, + gt_box, + gt_label, + prior_box, + prior_box_var=None, + background_label=0, + overlap_threshold=0.5, + neg_pos_ratio=3.0, + neg_overlap=0.5, + loc_loss_weight=1.0, + conf_loss_weight=1.0, + match_type='per_prediction', + mining_type='max_negative', + sample_size=None): + """ + **Multi-box loss layer for object dection algorithm of SSD** + + This layer is to compute dection loss for SSD given the location offset + predictions, confidence predictions, prior boxes and ground-truth boudding + boxes and labels, and the type of hard example mining. The returned loss + is a weighted sum of the localization loss (or regression loss) and + confidence loss (or classification loss) by performing the following steps: + + 1. Find matched boundding box by bipartite matching algorithm. + 1.1 Compute IOU similarity between ground-truth boxes and prior boxes. + 1.2 Compute matched boundding box by bipartite matching algorithm. + 2. Compute confidence for mining hard examples + 2.1. Get the target label based on matched indices. + 2.2. Compute confidence loss. + 3. Apply hard example mining to get the negative example indices and update + the matched indices. + 4. Assign classification and regression targets + 4.1. Encoded bbox according to the prior boxes. + 4.2. Assign regression targets. + 4.3. Assign classification targets. + 5. Compute the overall objective loss. + 5.1 Compute confidence loss. + 5.1 Compute localization loss. + 5.3 Compute the overall weighted loss. + + Args: + location (Variable): The location predictions are a 3D Tensor with + shape [N, Np, 4], N is the batch size, Np is total number of + predictions for each instance. 4 is the number of coordinate values, + the layout is [xmin, ymin, xmax, ymax]. + confidence (Variable): The confidence predictions are a 3D Tensor + with shape [N, Np, C], N and Np are the same as they are in + `location`, C is the class number. + gt_box (Variable): The ground-truth boudding boxes (bboxes) are a 2D + LoDTensor with shape [Ng, 4], Ng is the total number of ground-truth + bboxes of mini-batch input. + gt_label (Variable): The ground-truth labels are a 2D LoDTensor + with shape [Ng, 1]. + prior_box (Variable): The prior boxes are a 2D Tensor with shape [Np, 4]. + prior_box_var (Variable): The variance of prior boxes are a 2D Tensor + with shape [Np, 4]. + background_label (int): The index of background label, 0 by default. + overlap_threshold (float): If match_type is 'per_prediction', use + `overlap_threshold` to determine the extra matching bboxes when + finding matched boxes. 0.5 by default. + neg_pos_ratio (float): The ratio of the negative boxes to the positive + boxes, used only when mining_type is max_negative, 3.0 by defalut. + neg_overlap (float): The negative overlap upper bound for the unmatched + predictions. Use only when mining_type is max_negative, + 0.5 by default. + sample_size (int): The max sample size of negative box, used only when + mining_type is hard_example. + loc_loss_weight (float): Weight for localization loss, 1.0 by default. + conf_loss_weight (float): Weight for confidence loss, 1.0 by default. + match_type (str): The type of matching method during training, should + be 'bipartite' or 'per_prediction'. + mining_type (str): The hard example mining type, should be 'hard_example' + or 'max_negative', now only support `max_negative`. + + Returns: + Variable: The weighted sum of the localization loss and confidence loss, + with shape [N * Np, 1], N and Np are the same as they are + in `location`. + + Raises: + ValueError: If mining_type is 'hard_example', now only support + mining type of `max_negative`. + + Examples: + .. code-block:: python + + pb = layers.data( + name='prior_box', + shape=[10, 4], + append_batch_size=False, + dtype='float32') + pbv = layers.data( + name='prior_box_var', + shape=[10, 4], + append_batch_size=False, + dtype='float32') + loc = layers.data(name='target_box', shape=[10, 4], dtype='float32') + scores = layers.data(name='scores', shape=[10, 21], dtype='float32') + gt_box = layers.data( + name='gt_box', shape=[4], lod_level=1, dtype='float32') + gt_label = layers.data( + name='gt_label', shape=[1], lod_level=1, dtype='float32') + loss = layers.ssd_loss(loc, scores, gt_box, gt_label, pb, pbv) + """ + + helper = LayerHelper('ssd_loss', **locals()) + if mining_type != 'max_negative': + raise ValueError("Only support mining_type == max_negative now.") + + num, num_prior, num_class = confidence.shape + + def __reshape_to_2d(var): + return ops.reshape(x=var, shape=[-1, var.shape[-1]]) + + # 1. Find matched boundding box by prior box. + # 1.1 Compute IOU similarity between ground-truth boxes and prior boxes. + iou = iou_similarity(x=gt_box, y=prior_box) + # 1.2 Compute matched boundding box by bipartite matching algorithm. + matched_indices, matched_dist = bipartite_match(iou) + + # 2. Compute confidence for mining hard examples + # 2.1. Get the target label based on matched indices + gt_label = ops.reshape(x=gt_label, shape=gt_label.shape + (1, )) + target_label, _ = target_assign( + gt_label, matched_indices, mismatch_value=background_label) + # 2.2. Compute confidence loss. + # Reshape confidence to 2D tensor. + confidence = __reshape_to_2d(confidence) + target_label = tensor.cast(x=target_label, dtype='int64') + target_label = __reshape_to_2d(target_label) + conf_loss = nn.softmax_with_cross_entropy(confidence, target_label) + + # 3. Mining hard examples + conf_loss = ops.reshape(x=conf_loss, shape=(num, num_prior)) + neg_indices = helper.create_tmp_variable(dtype='int32') + dtype = matched_indices.dtype + updated_matched_indices = helper.create_tmp_variable(dtype=dtype) + helper.append_op( + type='mine_hard_examples', + inputs={ + 'ClsLoss': conf_loss, + 'LocLoss': None, + 'MatchIndices': matched_indices, + 'MatchDist': matched_dist, + }, + outputs={ + 'NegIndices': neg_indices, + 'UpdatedMatchIndices': updated_matched_indices + }, + attrs={ + 'neg_pos_ratio': neg_pos_ratio, + 'neg_dist_threshold': neg_pos_ratio, + 'mining_type': mining_type, + 'sample_size': sample_size, + }) + + # 4. Assign classification and regression targets + # 4.1. Encoded bbox according to the prior boxes. + encoded_bbox = box_coder( + prior_box=prior_box, + prior_box_var=prior_box_var, + target_box=gt_box, + code_type='encode_center_size') + # 4.2. Assign regression targets + target_bbox, target_loc_weight = target_assign( + encoded_bbox, updated_matched_indices, mismatch_value=background_label) + # 4.3. Assign classification targets + target_label, target_conf_weight = target_assign( + gt_label, + updated_matched_indices, + negative_indices=neg_indices, + mismatch_value=background_label) + + # 5. Compute loss. + # 5.1 Compute confidence loss. + target_label = __reshape_to_2d(target_label) + target_label = tensor.cast(x=target_label, dtype='int64') + conf_loss = nn.softmax_with_cross_entropy(confidence, target_label) + target_conf_weight = __reshape_to_2d(target_conf_weight) + conf_loss = conf_loss * target_conf_weight + + # 5.2 Compute regression loss. + location = __reshape_to_2d(location) + target_bbox = __reshape_to_2d(target_bbox) + + loc_loss = nn.smooth_l1(location, target_bbox) + target_loc_weight = __reshape_to_2d(target_loc_weight) + loc_loss = loc_loss * target_loc_weight + + # 5.3 Compute overall weighted loss. + loss = conf_loss_weight * conf_loss + loc_loss_weight * loc_loss + return loss diff --git a/python/paddle/v2/fluid/tests/test_detection.py b/python/paddle/v2/fluid/tests/test_detection.py index fecc2a6226f..b731fc9b02e 100644 --- a/python/paddle/v2/fluid/tests/test_detection.py +++ b/python/paddle/v2/fluid/tests/test_detection.py @@ -13,16 +13,12 @@ # limitations under the License. from __future__ import print_function -import paddle.v2.fluid as fluid -import paddle.v2.fluid.core as core import paddle.v2.fluid.layers as layers -import paddle.v2.fluid.layers.detection as detection from paddle.v2.fluid.framework import Program, program_guard import unittest -import numpy as np -class TestBook(unittest.TestCase): +class TestDetection(unittest.TestCase): def test_detection_output(self): program = Program() with program_guard(program): @@ -49,6 +45,66 @@ class TestBook(unittest.TestCase): out = layers.detection_output( scores=scores, loc=loc, prior_box=pb, prior_box_var=pbv) self.assertIsNotNone(out) + self.assertEqual(out.shape[-1], 6) + print(str(program)) + + def test_detection_api(self): + program = Program() + with program_guard(program): + x = layers.data(name='x', shape=[4], dtype='float32') + y = layers.data(name='y', shape=[4], dtype='float32') + z = layers.data(name='z', shape=[4], dtype='float32', lod_level=1) + iou = layers.iou_similarity(x=x, y=y) + bcoder = layers.box_coder( + prior_box=x, + prior_box_var=y, + target_box=z, + code_type='encode_center_size') + self.assertIsNotNone(iou) + self.assertIsNotNone(bcoder) + + matched_indices, matched_dist = layers.bipartite_match(iou) + self.assertIsNotNone(matched_indices) + self.assertIsNotNone(matched_dist) + + gt = layers.data( + name='gt', shape=[1, 1], dtype='int32', lod_level=1) + trg, trg_weight = layers.target_assign( + gt, matched_indices, mismatch_value=0) + self.assertIsNotNone(trg) + self.assertIsNotNone(trg_weight) + + gt2 = layers.data( + name='gt2', shape=[10, 4], dtype='float32', lod_level=1) + trg, trg_weight = layers.target_assign( + gt2, matched_indices, mismatch_value=0) + self.assertIsNotNone(trg) + self.assertIsNotNone(trg_weight) + + print(str(program)) + + def test_ssd_loss(self): + program = Program() + with program_guard(program): + pb = layers.data( + name='prior_box', + shape=[10, 4], + append_batch_size=False, + dtype='float32') + pbv = layers.data( + name='prior_box_var', + shape=[10, 4], + append_batch_size=False, + dtype='float32') + loc = layers.data(name='target_box', shape=[10, 4], dtype='float32') + scores = layers.data(name='scores', shape=[10, 21], dtype='float32') + gt_box = layers.data( + name='gt_box', shape=[4], lod_level=1, dtype='float32') + gt_label = layers.data( + name='gt_label', shape=[1], lod_level=1, dtype='int32') + loss = layers.ssd_loss(loc, scores, gt_box, gt_label, pb, pbv) + self.assertIsNotNone(loss) + self.assertEqual(loss.shape[-1], 1) print(str(program)) @@ -62,40 +118,39 @@ class TestPriorBox(unittest.TestCase): assert box.shape[1] == 4 def prior_box_output(self, data_shape): - images = fluid.layers.data( - name='pixel', shape=data_shape, dtype='float32') - conv1 = fluid.layers.conv2d( + images = layers.data(name='pixel', shape=data_shape, dtype='float32') + conv1 = layers.conv2d( input=images, num_filters=3, filter_size=3, stride=2, use_cudnn=False) - conv2 = fluid.layers.conv2d( + conv2 = layers.conv2d( input=conv1, num_filters=3, filter_size=3, stride=2, use_cudnn=False) - conv3 = fluid.layers.conv2d( + conv3 = layers.conv2d( input=conv2, num_filters=3, filter_size=3, stride=2, use_cudnn=False) - conv4 = fluid.layers.conv2d( + conv4 = layers.conv2d( input=conv3, num_filters=3, filter_size=3, stride=2, use_cudnn=False) - conv5 = fluid.layers.conv2d( + conv5 = layers.conv2d( input=conv4, num_filters=3, filter_size=3, stride=2, use_cudnn=False) - box, var = detection.prior_box( + box, var = layers.prior_box( inputs=[conv1, conv2, conv3, conv4, conv5, conv5], image=images, min_ratio=20, -- GitLab From 84d9c6907f96a896b5b366d0bacbcd3f79d9020a Mon Sep 17 00:00:00 2001 From: chengduoZH Date: Mon, 12 Feb 2018 15:52:08 +0800 Subject: [PATCH 034/122] follow comments of yaming and qingqing --- python/paddle/v2/fluid/layers/detection.py | 183 ++++++++++----------- python/paddle/v2/fluid/nets.py | 33 ---- 2 files changed, 86 insertions(+), 130 deletions(-) diff --git a/python/paddle/v2/fluid/layers/detection.py b/python/paddle/v2/fluid/layers/detection.py index aab9f032bd6..6d0f12f4750 100644 --- a/python/paddle/v2/fluid/layers/detection.py +++ b/python/paddle/v2/fluid/layers/detection.py @@ -151,36 +151,36 @@ def prior_box(inputs, `_ . Args: - inputs(list): The list of input Variables, the format + inputs(list|tuple): The list of input Variables, the format of all Variables is NCHW. image(Variable): The input image data of PriorBoxOp, the layout is NCHW. min_ratio(int): the min ratio of generated prior boxes. max_ratio(int): the max ratio of generated prior boxes. - aspect_ratios(list): the aspect ratios of generated prior + aspect_ratios(list|tuple): the aspect ratios of generated prior boxes. The length of input and aspect_ratios must be equal. base_size(int): the base_size is used to get min_size and max_size according to min_ratio and max_ratio. - step_w(list, optional, default=None): Prior boxes step + step_w(list|tuple|None): Prior boxes step across width. If step_w[i] == 0.0, the prior boxes step across width of the inputs[i] will be automatically calculated. - step_h(list, optional, default=None): Prior boxes step + step_h(list|tuple|None): Prior boxes step across height, If step_h[i] == 0.0, the prior boxes step across height of the inputs[i] will be automatically calculated. offset(float, optional, default=0.5): Prior boxes center offset. - variance(list, optional, default=[0.1, 0.1, 0.1, 0.1]): the variances + variance(list|tuple|[0.1, 0.1, 0.1, 0.1]): the variances to be encoded in prior boxes. - flip(bool, optional, default=False): Whether to flip + flip(bool|False): Whether to flip aspect ratios. clip(bool, optional, default=False): Whether to clip out-of-boundary boxes. - min_sizes(list, optional, default=None): If `len(inputs) <=2`, + min_sizes(list|tuple|None): If `len(inputs) <=2`, min_sizes must be set up, and the length of min_sizes should equal to the length of inputs. - max_sizes(list, optional, default=None): If `len(inputs) <=2`, + max_sizes(list|tuple|None): If `len(inputs) <=2`, max_sizes must be set up, and the length of min_sizes should equal to the length of inputs. - name(str, optional, None): Name of the prior box layer. + name(str|None): Name of the prior box layer. Returns: boxes(Variable): the output prior boxes of PriorBox. @@ -252,7 +252,16 @@ def prior_box(inputs, out = ops.reshape(x=input, shape=new_shape) return out - assert isinstance(inputs, list), 'inputs should be a list.' + def _is_list_or_tuple_(data): + return (isinstance(data, list) or isinstance(data, tuple)) + + def _is_list_or_tuple_and_equal(data, length, err_info): + if not (_is_list_or_tuple_(data) and len(data) == length): + raise ValueError(err_info) + + if not _is_list_or_tuple_(inputs): + raise ValueError('inputs should be a list or tuple.') + num_layer = len(inputs) if num_layer <= 2: @@ -269,26 +278,25 @@ def prior_box(inputs, max_sizes = [base_size * .20] + max_sizes if aspect_ratios: - if not (isinstance(aspect_ratios, list) and - len(aspect_ratios) == num_layer): - raise ValueError( - 'aspect_ratios should be list and the length of inputs ' - 'and aspect_ratios should be the same.') + _is_list_or_tuple_and_equal( + aspect_ratios, num_layer, + 'aspect_ratios should be list and the length of inputs ' + 'and aspect_ratios should be the same.') if step_h: - if not (isinstance(step_h, list) and len(step_h) == num_layer): - raise ValueError( - 'step_h should be list and the length of inputs and ' - 'step_h should be the same.') + _is_list_or_tuple_and_equal( + step_h, num_layer, + 'step_h should be list and the length of inputs and ' + 'step_h should be the same.') if step_w: - if not (isinstance(step_w, list) and len(step_w) == num_layer): - raise ValueError( - 'step_w should be list and the length of inputs and ' - 'step_w should be the same.') + _is_list_or_tuple_and_equal( + step_w, num_layer, + 'step_w should be list and the length of inputs and ' + 'step_w should be the same.') if steps: - if not (isinstance(steps, list) and len(steps) == num_layer): - raise ValueError( - 'steps should be list and the length of inputs and ' - 'step_w should be the same.') + _is_list_or_tuple_and_equal( + steps, num_layer, + 'steps should be list and the length of inputs and ' + 'step_w should be the same.') step_w = steps step_h = steps @@ -298,13 +306,13 @@ def prior_box(inputs, min_size = min_sizes[i] max_size = max_sizes[i] aspect_ratio = [] - if not isinstance(min_size, list): + if not _is_list_or_tuple_(min_size): min_size = [min_size] - if not isinstance(max_size, list): + if not _is_list_or_tuple_(max_size): max_size = [max_size] if aspect_ratios: aspect_ratio = aspect_ratios[i] - if not isinstance(aspect_ratio, list): + if not _is_list_or_tuple_(aspect_ratio): aspect_ratio = [aspect_ratio] box, var = _prior_box_(input, image, min_size, max_size, aspect_ratio, @@ -354,26 +362,26 @@ def multi_box_head(inputs, MultiBox Detector)`_ . Args: - inputs(list): The list of input Variables, the format + inputs(list|tuple): The list of input Variables, the format of all Variables is NCHW. - num_classes(int): The number of calss. - min_sizes(list, optional, default=None): The length of - min_size is used to compute the the number of prior box. + num_classes(int): The number of classes. + min_sizes(list|tuple|None): The number of + min_sizes is used to compute the number of predicted box. If the min_size is None, it will be computed according to min_ratio and max_ratio. - max_sizes(list, optional, default=None): The length of max_size - is used to compute the the number of prior box. - min_ratio(int): If the min_sizes is None, min_ratio and min_ratio + max_sizes(list|tuple|None): The number of max_sizes + is used to compute the the number of predicted box. + min_ratio(int|None): If the min_sizes is None, min_ratio and max_ratio will be used to compute the min_sizes and max_sizes. - max_ratio(int): If the min_sizes is None, min_ratio and min_ratio + max_ratio(int|None): If the min_sizes is None, max_ratio and min_ratio will be used to compute the min_sizes and max_sizes. - aspect_ratios(list): The number of the aspect ratios is used to + aspect_ratios(list|tuple): The number of the aspect ratios is used to compute the number of prior box. base_size(int): the base_size is used to get min_size and max_size according to min_ratio and max_ratio. - flip(bool, optional, default=False): Whether to flip + flip(bool|False): Whether to flip aspect ratios. - name(str, optional, None): Name of the prior box layer. + name(str|None): Name of the prior box layer. Returns: @@ -397,52 +405,33 @@ def multi_box_head(inputs, flip=True) """ - def _conv_with_bn_(input, - conv_num_filter, - conv_padding=1, - conv_filter_size=3, - conv_stride=1, - conv_act=None, - param_attr=None, - conv_with_batchnorm=False, - conv_batchnorm_drop_rate=0.0, - use_cudnn=True): - - conv2d = nn.conv2d( - input=input, - num_filters=conv_num_filter, - filter_size=conv_filter_size, - padding=conv_padding, - stride=conv_stride, - param_attr=param_attr, - act=conv_act, - use_cudnn=use_cudnn) - - if conv_with_batchnorm: - conv2d = nn.batch_norm(input=conv2d) - drop_rate = conv_batchnorm_drop_rate - if abs(drop_rate) > 1e-5: - conv2d = nn.dropout(x=conv2d, dropout_prob=drop_rate) + def _is_equal_(len1, len2, err_info): + if not (len1 == len2): + raise ValueError(err_info) - return conv2d + def _is_list_or_tuple_(data): + return (isinstance(data, list) or isinstance(data, tuple)) - if not (isinstance(inputs, list)): - raise ValueError('inputs should be a list.') + if not _is_list_or_tuple_(inputs): + raise ValueError('inputs should be a list or tuple.') if min_sizes is not None: - if not (len(inputs) == len(min_sizes)): - raise ValueError('the length of min_sizes ' - 'and inputs should be the same.') + _is_equal_( + len(inputs), + len(min_sizes), 'the length of min_sizes ' + 'and inputs should be equal.') if max_sizes is not None: - if not (len(inputs) == len(max_sizes)): - raise ValueError('the length of max_sizes ' - 'and inputs should be the same.') + _is_equal_( + len(inputs), + len(max_sizes), 'the length of max_sizes ' + 'and inputs should be equal.') if aspect_ratios is not None: - if not (len(inputs) == len(aspect_ratios)): - raise ValueError('the length of aspect_ratios ' - 'and inputs should be the same.') + _is_equal_( + len(inputs), + len(aspect_ratios), 'the length of aspect_ratios ' + 'and inputs should be equal.') if min_sizes is None: # If min_sizes is None, min_sizes and max_sizes @@ -464,22 +453,23 @@ def multi_box_head(inputs, mbox_confs = [] for i, input in enumerate(inputs): min_size = min_sizes[i] - if type(min_size) is not list: + if not _is_list_or_tuple_(min_size): min_size = [min_size] max_size = [] if max_sizes is not None: max_size = max_sizes[i] - if type(max_size) is not list: + if not _is_list_or_tuple_(max_size): max_size = [max_size] - if not (len(max_size) == len(min_size)): - raise ValueError( - 'max_size and min_size should have same length.') + _is_equal_( + len(max_size), + len(min_size), + 'the length of max_size and min_size should be equal.') aspect_ratio = [] if aspect_ratios is not None: aspect_ratio = aspect_ratios[i] - if type(aspect_ratio) is not list: + if not _is_list_or_tuple_(aspect_ratio): aspect_ratio = [aspect_ratio] # get the number of prior box on each location @@ -499,25 +489,24 @@ def multi_box_head(inputs, if share_location: num_loc_output *= num_classes - mbox_loc = _conv_with_bn_( + mbox_loc = nn.conv2d( input=input, - conv_num_filter=num_loc_output, - conv_padding=pad, - conv_stride=stride, - conv_filter_size=kernel_size, - conv_with_batchnorm=use_batchnorm) + num_filters=num_loc_output, + filter_size=kernel_size, + padding=pad, + stride=stride) + mbox_loc = nn.transpose(mbox_loc, perm=[0, 2, 3, 1]) mbox_locs.append(mbox_loc) # get conf_loc num_conf_output = num_priors_per_location * num_classes - conf_loc = _conv_with_bn_( + conf_loc = nn.conv2d( input=input, - conv_num_filter=num_conf_output, - conv_padding=pad, - conv_stride=stride, - conv_filter_size=kernel_size, - conv_with_batchnorm=use_batchnorm) + num_filters=num_conf_output, + filter_size=kernel_size, + padding=pad, + stride=stride) conf_loc = nn.transpose(conf_loc, perm=[0, 2, 3, 1]) mbox_confs.append(conf_loc) diff --git a/python/paddle/v2/fluid/nets.py b/python/paddle/v2/fluid/nets.py index b7deccfd1f5..be7878f869b 100644 --- a/python/paddle/v2/fluid/nets.py +++ b/python/paddle/v2/fluid/nets.py @@ -18,7 +18,6 @@ __all__ = [ "sequence_conv_pool", "glu", "scaled_dot_product_attention", - "img_conv_with_bn", ] @@ -108,38 +107,6 @@ def img_conv_group(input, return pool_out -def img_conv_with_bn(input, - conv_num_filter, - conv_padding=1, - conv_filter_size=3, - conv_stride=1, - conv_act=None, - param_attr=None, - conv_with_batchnorm=False, - conv_batchnorm_drop_rate=0.0, - use_cudnn=True): - """ - Image Convolution Group, Used for vgg net. - """ - conv2d = layers.conv2d( - input=input, - num_filters=conv_num_filter, - filter_size=conv_filter_size, - padding=conv_padding, - stride=conv_stride, - param_attr=param_attr, - act=conv_act, - use_cudnn=use_cudnn) - - if conv_with_batchnorm: - conv2d = layers.batch_norm(input=conv2d) - drop_rate = conv_batchnorm_drop_rate - if abs(drop_rate) > 1e-5: - conv2d = layers.dropout(x=conv2d, dropout_prob=drop_rate) - - return conv2d - - def sequence_conv_pool(input, num_filters, filter_size, -- GitLab From 0d4d9c4e1392d46a1c2c3588bd4d6eb4fdd0c980 Mon Sep 17 00:00:00 2001 From: typhoonzero Date: Mon, 12 Feb 2018 17:39:26 +0800 Subject: [PATCH 035/122] fix grpc short connection --- paddle/fluid/operators/listen_and_serv_op.cc | 4 ++-- paddle/fluid/operators/recv_op.cc | 4 ++-- paddle/fluid/operators/send_op.cc | 4 ++-- python/paddle/v2/fluid/distribute_transpiler.py | 11 +++-------- 4 files changed, 9 insertions(+), 14 deletions(-) diff --git a/paddle/fluid/operators/listen_and_serv_op.cc b/paddle/fluid/operators/listen_and_serv_op.cc index 426dd0dc0e9..8e88a7dcf14 100644 --- a/paddle/fluid/operators/listen_and_serv_op.cc +++ b/paddle/fluid/operators/listen_and_serv_op.cc @@ -82,8 +82,8 @@ class ListenAndServOp : public framework::OperatorBase { return string::Sprintf("%s.trainer_%d", varname, grads_counter_[varname]++); } - void Run(const framework::Scope &scope, - const platform::Place &dev_place) const override { + void RunImpl(const framework::Scope &scope, + const platform::Place &dev_place) const override { platform::DeviceContextPool &pool = platform::DeviceContextPool::Instance(); auto &dev_ctx = *pool.Get(dev_place); framework::Scope &recv_scope = scope.NewScope(); diff --git a/paddle/fluid/operators/recv_op.cc b/paddle/fluid/operators/recv_op.cc index c093f60ceed..17b57b5d45a 100644 --- a/paddle/fluid/operators/recv_op.cc +++ b/paddle/fluid/operators/recv_op.cc @@ -32,8 +32,8 @@ class RecvOp : public framework::OperatorBase { const framework::AttributeMap& attrs) : OperatorBase(type, inputs, outputs, attrs) {} - void Run(const framework::Scope& scope, - const platform::Place& place) const override { + void RunImpl(const framework::Scope& scope, + const platform::Place& place) const override { auto outs = Outputs("Out"); std::vector epmap = Attr>("epmap"); diff --git a/paddle/fluid/operators/send_op.cc b/paddle/fluid/operators/send_op.cc index b241f738cbf..39b6c0e8c51 100644 --- a/paddle/fluid/operators/send_op.cc +++ b/paddle/fluid/operators/send_op.cc @@ -48,8 +48,8 @@ class SendOp : public framework::OperatorBase { const framework::AttributeMap& attrs) : OperatorBase(type, inputs, outputs, attrs) {} - void Run(const framework::Scope& scope, - const platform::Place& place) const override { + void RunImpl(const framework::Scope& scope, + const platform::Place& place) const override { auto ins = Inputs("X"); auto outs = Outputs("Out"); std::vector epmap = Attr>("epmap"); diff --git a/python/paddle/v2/fluid/distribute_transpiler.py b/python/paddle/v2/fluid/distribute_transpiler.py index 689920af0c4..bf2e9e88f33 100644 --- a/python/paddle/v2/fluid/distribute_transpiler.py +++ b/python/paddle/v2/fluid/distribute_transpiler.py @@ -121,7 +121,6 @@ def split_dense_variable(var_list, block_size += dim1 - remains # update split_count after aligning split_count = int(math.ceil(var_numel / float(block_size))) - print("###split var ", var.name, var.shape, block_size, split_count) for block_id in xrange(split_count): curr_block_size = min(block_size, var_numel - ( (block_id) * block_size)) @@ -207,7 +206,7 @@ class DistributeTranspiler: rpc_client_var = program.global_block().create_var( name="RPC_CLIENT_VAR", - psersistable=True, + persistable=True, dtype='float32', # dtype and shape is not used in fact shape=[0]) @@ -256,15 +255,13 @@ class DistributeTranspiler: splited_shape = [rows] if len(orig_shape) >= 2: splited_shape.extend(orig_shape[1:]) - print("###splited: ", size, rows, splited_shape) var = program.global_block().create_var( name="%s.block%d" % (varname, i), - psersistable=False, + persistable=False, dtype=orig_var.dtype, type=orig_var.type, shape=splited_shape) # flattend splited var var_mapping[varname].append(var) - print("###created split var ", var) return var_mapping def _clone_var(self, block, var): @@ -322,7 +319,7 @@ class DistributeTranspiler: for i in xrange(trainers): var_each = block.create_var( name="%s.trainer_%d" % (var.name, i), - psersistable=var.persistable, + persistable=var.persistable, dtype=var.dtype, type=var.type, shape=var.shape) @@ -531,8 +528,6 @@ class DistributeTranspiler: """ # step5 pserver_program = Program() - print("param mapping on pserver: #### ", - self.param_grad_ep_mapping[endpoint]["params"]) for v in self.param_grad_ep_mapping[endpoint]["params"]: self._clone_var(pserver_program.global_block(), v) for v in self.param_grad_ep_mapping[endpoint]["grads"]: -- GitLab From 07923ba006220bf39ebd9fcf19c6b930012e5139 Mon Sep 17 00:00:00 2001 From: dzhwinter Date: Mon, 12 Feb 2018 17:56:15 +0800 Subject: [PATCH 036/122] Memory/dropout4 (#8407) * "merge random generator kernel and mul" * "fix dropout" --- paddle/fluid/operators/dropout_op.cu | 42 ++++++++++++++-------------- 1 file changed, 21 insertions(+), 21 deletions(-) diff --git a/paddle/fluid/operators/dropout_op.cu b/paddle/fluid/operators/dropout_op.cu index 4ae9f4ce54d..a4a96d48f99 100644 --- a/paddle/fluid/operators/dropout_op.cu +++ b/paddle/fluid/operators/dropout_op.cu @@ -23,24 +23,23 @@ namespace paddle { namespace operators { template -struct MaskGenerator { - AttrType dropout_prob; - int seed; +__global__ void RandomGenerator(const size_t n, const int seed, + const AttrType dropout_prob, const T* src, + T* mask_data, T* dst) { + thrust::minstd_rand rng; + rng.seed(seed); + thrust::uniform_real_distribution dist(0, 1); - __host__ __device__ MaskGenerator(AttrType dropout_prob, int seed) - : dropout_prob(dropout_prob), seed(seed) {} - - inline __host__ __device__ T operator()(const unsigned int n) const { - thrust::minstd_rand rng; - rng.seed(seed); - thrust::uniform_real_distribution dist(0, 1); - rng.discard(n); + int idx = blockDim.x * blockIdx.x + threadIdx.x; + for (; idx < n; idx += blockDim.x * gridDim.x) { if (dist(rng) < dropout_prob) { - return static_cast(0); + mask_data[idx] = static_cast(0); + } else { + mask_data[idx] = static_cast(1); } - return static_cast(1); + dst[idx] = mask_data[idx] * src[idx]; } -}; +} // It seems that Eigen::Tensor::setRandom in GPU will SEGFAULT. // Use std::random and thrust::random(thrust is a std library in CUDA) to @@ -61,18 +60,19 @@ class GPUDropoutKernel : public framework::OpKernel { if (!context.Attr("is_test")) { auto* mask = context.Output("Mask"); auto* mask_data = mask->mutable_data(context.GetPlace()); - int size = framework::product(mask->dims()); + size_t size = framework::product(mask->dims()); + auto* x_data = x->data(); + auto* y_data = y->mutable_data(context.GetPlace()); std::random_device rnd; int seed = context.Attr("fix_seed") ? context.Attr("seed") : rnd(); - thrust::counting_iterator index_sequence_begin(0); - thrust::transform(index_sequence_begin, index_sequence_begin + size, - thrust::device_ptr(mask_data), - MaskGenerator(dropout_prob, seed)); - auto M = EigenMatrix::Reshape(*mask, 1); - Y.device(place) = X * M; + int threads = 512; + int grid = (x->numel() + threads - 1) / threads; + RandomGenerator<<>>( + size, seed, dropout_prob, x_data, mask_data, y_data); } else { Y.device(place) = X * (1.0f - dropout_prob); } -- GitLab From 6e79d01b6517667123fe8897613a5821be91b94b Mon Sep 17 00:00:00 2001 From: chengduoZH Date: Mon, 12 Feb 2018 17:24:35 +0800 Subject: [PATCH 037/122] merge prior_box and multi_box --- python/paddle/v2/fluid/layers/detection.py | 486 +++++++----------- .../paddle/v2/fluid/tests/test_detection.py | 44 +- 2 files changed, 189 insertions(+), 341 deletions(-) diff --git a/python/paddle/v2/fluid/layers/detection.py b/python/paddle/v2/fluid/layers/detection.py index 6af5c8388b7..5ae4da1ea31 100644 --- a/python/paddle/v2/fluid/layers/detection.py +++ b/python/paddle/v2/fluid/layers/detection.py @@ -23,7 +23,6 @@ import nn import math __all__ = [ - 'prior_box', 'multi_box_head', 'bipartite_match', 'target_assign', @@ -133,219 +132,6 @@ def detection_output(scores, return nmsed_outs -def prior_box(inputs, - image, - min_ratio, - max_ratio, - aspect_ratios, - base_size, - steps=None, - step_w=None, - step_h=None, - offset=0.5, - variance=[0.1, 0.1, 0.1, 0.1], - flip=False, - clip=False, - min_sizes=None, - max_sizes=None, - name=None): - """ - **Prior_boxes** - - Generate prior boxes for SSD(Single Shot MultiBox Detector) - algorithm. The details of this algorithm, please refer the - section 2.2 of SSD paper (SSD: Single Shot MultiBox Detector) - `_ . - - Args: - inputs(list|tuple): The list of input Variables, the format - of all Variables is NCHW. - image(Variable): The input image data of PriorBoxOp, - the layout is NCHW. - min_ratio(int): the min ratio of generated prior boxes. - max_ratio(int): the max ratio of generated prior boxes. - aspect_ratios(list|tuple): the aspect ratios of generated prior - boxes. The length of input and aspect_ratios must be equal. - base_size(int): the base_size is used to get min_size - and max_size according to min_ratio and max_ratio. - step_w(list|tuple|None): Prior boxes step - across width. If step_w[i] == 0.0, the prior boxes step - across width of the inputs[i] will be automatically calculated. - step_h(list|tuple|None): Prior boxes step - across height, If step_h[i] == 0.0, the prior boxes - step across height of the inputs[i] will be automatically calculated. - offset(float, optional, default=0.5): Prior boxes center offset. - variance(list|tuple|[0.1, 0.1, 0.1, 0.1]): the variances - to be encoded in prior boxes. - flip(bool|False): Whether to flip - aspect ratios. - clip(bool, optional, default=False): Whether to clip - out-of-boundary boxes. - min_sizes(list|tuple|None): If `len(inputs) <=2`, - min_sizes must be set up, and the length of min_sizes - should equal to the length of inputs. - max_sizes(list|tuple|None): If `len(inputs) <=2`, - max_sizes must be set up, and the length of min_sizes - should equal to the length of inputs. - name(str|None): Name of the prior box layer. - - Returns: - boxes(Variable): the output prior boxes of PriorBox. - The layout is [num_priors, 4]. num_priors is the total - box count of each position of inputs. - Variances(Variable): the expanded variances of PriorBox. - The layout is [num_priors, 4]. num_priors is the total - box count of each position of inputs - - Examples: - .. code-block:: python - - prior_box( - inputs = [conv1, conv2, conv3, conv4, conv5, conv6], - image = data, - min_ratio = 20, # 0.20 - max_ratio = 90, # 0.90 - offset = 0.5, - base_size = 300, - variance = [0.1,0.1,0.1,0.1], - aspect_ratios = [[2.], [2., 3.], [2., 3.], [2., 3.], [2.], [2.]], - flip=True, - clip=True) - """ - - def _prior_box_(input, - image, - min_sizes, - max_sizes, - aspect_ratios, - variance, - flip=False, - clip=False, - step_w=0.0, - step_h=0.0, - offset=0.5, - name=None): - helper = LayerHelper("prior_box", **locals()) - dtype = helper.input_dtype() - - box = helper.create_tmp_variable(dtype) - var = helper.create_tmp_variable(dtype) - helper.append_op( - type="prior_box", - inputs={"Input": input, - "Image": image}, - outputs={"Boxes": box, - "Variances": var}, - attrs={ - 'min_sizes': min_sizes, - 'max_sizes': max_sizes, - 'aspect_ratios': aspect_ratios, - 'variances': variance, - 'flip': flip, - 'clip': clip, - 'step_w': step_w, - 'step_h': step_h, - 'offset': offset - }) - return box, var - - def _reshape_with_axis_(input, axis=1): - if not (axis > 0 and axis < len(input.shape)): - raise ValueError("The axis should be smaller than " - "the arity of input and bigger than 0.") - new_shape = [ - -1, reduce(lambda x, y: x * y, input.shape[axis:len(input.shape)]) - ] - out = ops.reshape(x=input, shape=new_shape) - return out - - def _is_list_or_tuple_(data): - return (isinstance(data, list) or isinstance(data, tuple)) - - def _is_list_or_tuple_and_equal(data, length, err_info): - if not (_is_list_or_tuple_(data) and len(data) == length): - raise ValueError(err_info) - - if not _is_list_or_tuple_(inputs): - raise ValueError('inputs should be a list or tuple.') - - num_layer = len(inputs) - - if num_layer <= 2: - assert min_sizes is not None and max_sizes is not None - assert len(min_sizes) == num_layer and len(max_sizes) == num_layer - else: - min_sizes = [] - max_sizes = [] - step = int(math.floor(((max_ratio - min_ratio)) / (num_layer - 2))) - for ratio in xrange(min_ratio, max_ratio + 1, step): - min_sizes.append(base_size * ratio / 100.) - max_sizes.append(base_size * (ratio + step) / 100.) - min_sizes = [base_size * .10] + min_sizes - max_sizes = [base_size * .20] + max_sizes - - if aspect_ratios: - _is_list_or_tuple_and_equal( - aspect_ratios, num_layer, - 'aspect_ratios should be list or tuple, and the length of inputs ' - 'and aspect_ratios should be the same.') - if step_h: - _is_list_or_tuple_and_equal( - step_h, num_layer, - 'step_h should be list or tuple, and the length of inputs and ' - 'step_h should be the same.') - if step_w: - _is_list_or_tuple_and_equal( - step_w, num_layer, - 'step_w should be list or tuple, and the length of inputs and ' - 'step_w should be the same.') - if steps: - _is_list_or_tuple_and_equal( - steps, num_layer, - 'steps should be list or tuple, and the length of inputs and ' - 'step_w should be the same.') - step_w = steps - step_h = steps - - box_results = [] - var_results = [] - for i, input in enumerate(inputs): - min_size = min_sizes[i] - max_size = max_sizes[i] - aspect_ratio = [] - if not _is_list_or_tuple_(min_size): - min_size = [min_size] - if not _is_list_or_tuple_(max_size): - max_size = [max_size] - if aspect_ratios: - aspect_ratio = aspect_ratios[i] - if not _is_list_or_tuple_(aspect_ratio): - aspect_ratio = [aspect_ratio] - - box, var = _prior_box_(input, image, min_size, max_size, aspect_ratio, - variance, flip, clip, step_w[i] - if step_w else 0.0, step_h[i] - if step_w else 0.0, offset) - - box_results.append(box) - var_results.append(var) - - if len(box_results) == 1: - box = box_results[0] - var = var_results[0] - else: - reshaped_boxes = [] - reshaped_vars = [] - for i in range(len(box_results)): - reshaped_boxes.append(_reshape_with_axis_(box_results[i], axis=3)) - reshaped_vars.append(_reshape_with_axis_(var_results[i], axis=3)) - - box = tensor.concat(reshaped_boxes) - var = tensor.concat(reshaped_vars) - - return box, var - - def bipartite_match(dist_matrix, name=None): """ **Bipartite matchint operator** @@ -672,106 +458,162 @@ def ssd_loss(location, def multi_box_head(inputs, + image, + base_size, num_classes, + aspect_ratios, + min_ratio, + max_ratio, min_sizes=None, max_sizes=None, - min_ratio=None, - max_ratio=None, - aspect_ratios=None, + steps=None, + step_w=None, + step_h=None, + offset=0.5, + variance=[0.1, 0.1, 0.1, 0.1], flip=False, - share_location=True, + clip=False, kernel_size=1, - pad=1, + pad=0, stride=1, - use_batchnorm=False, - base_size=None): + name=None): """ - **Multi Box Head** + **Prior_boxes** - Generate prior boxes' location and confidence for SSD(Single - Shot MultiBox Detector)algorithm. The details of this algorithm, - please refer the section 2.1 of SSD paper (SSD: Single Shot - MultiBox Detector)`_ . + Generate prior boxes for SSD(Single Shot MultiBox Detector) + algorithm. The details of this algorithm, please refer the + section 2.2 of SSD paper (SSD: Single Shot MultiBox Detector) + `_ . Args: inputs(list|tuple): The list of input Variables, the format of all Variables is NCHW. - num_classes(int): The number of classes. - min_sizes(list|tuple|None): The number of - min_sizes is used to compute the number of predicted box. - If the min_size is None, it will be computed according - to min_ratio and max_ratio. - max_sizes(list|tuple|None): The number of max_sizes - is used to compute the the number of predicted box. - min_ratio(int|None): If the min_sizes is None, min_ratio and max_ratio - will be used to compute the min_sizes and max_sizes. - max_ratio(int|None): If the min_sizes is None, max_ratio and min_ratio - will be used to compute the min_sizes and max_sizes. - aspect_ratios(list|tuple): The number of the aspect ratios is used to - compute the number of prior box. + image(Variable): The input image data of PriorBoxOp, + the layout is NCHW. base_size(int): the base_size is used to get min_size and max_size according to min_ratio and max_ratio. - flip(bool|False): Whether to flip - aspect ratios. - name(str|None): Name of the prior box layer. + num_classes(int): The number of classes. + aspect_ratios(list|tuple): the aspect ratios of generated prior + boxes. The length of input and aspect_ratios must be equal. + min_ratio(int): the min ratio of generated prior boxes. + max_ratio(int): the max ratio of generated prior boxes. + min_sizes(list|tuple|None): If `len(inputs) <=2`, + min_sizes must be set up, and the length of min_sizes + should equal to the length of inputs. Default: None. + max_sizes(list|tuple|None): If `len(inputs) <=2`, + max_sizes must be set up, and the length of min_sizes + should equal to the length of inputs. Default: None. + steps(list|tuple): If step_w and step_h are the same, + step_w and step_h can be replaced by steps. + step_w(list|tuple): Prior boxes step + across width. If step_w[i] == 0.0, the prior boxes step + across width of the inputs[i] will be automatically + calculated. Default: None. + step_h(list|tuple): Prior boxes step across height, If + step_h[i] == 0.0, the prior boxes step across height of + the inputs[i] will be automatically calculated. Default: None. + offset(float): Prior boxes center offset. Default: 0.5 + variance(list|tuple): the variances to be encoded in prior boxes. + Default:[0.1, 0.1, 0.1, 0.1]. + flip(bool): Whether to flip aspect ratios. Default:False. + clip(bool): Whether to clip out-of-boundary boxes. Default: False. + kernel_size(int): The kernel size of conv2d. Default: 1. + pad(int|list|tuple): The padding of conv2d. Default:0. + stride(int|list|tuple): The stride of conv2d. Default:1, + name(str): Name of the prior box layer. Default: None. Returns: - mbox_loc(list): The predicted boxes' location of the inputs. The layout of each element is [N, H, W, Priors]. Priors is the number of predicted boxof each position of each input. mbox_conf(list): The predicted boxes' confidence of the inputs. The layout of each element is [N, H, W, Priors]. Priors is the number of predicted box of each position of each input. + boxes(Variable): the output prior boxes of PriorBox. + The layout is [num_priors, 4]. num_priors is the total + box count of each position of inputs. + Variances(Variable): the expanded variances of PriorBox. + The layout is [num_priors, 4]. num_priors is the total + box count of each position of inputs + Examples: .. code-block:: python - - mbox_locs, mbox_confs = detection.multi_box_head( - inputs=[conv1, conv2, conv3, conv4, conv5, conv5], - num_classes=21, - min_ratio=20, - max_ratio=90, - aspect_ratios=[[2.], [2., 3.], [2., 3.], [2., 3.], [2.], [2.]], - base_size=300, - flip=True) + mbox_locs, mbox_confs, box, var = layers.multi_box_head( + inputs=[conv1, conv2, conv3, conv4, conv5, conv5], + image=images, + num_classes=21, + min_ratio=20, + max_ratio=90, + aspect_ratios=[[2.], [2., 3.], [2., 3.], [2., 3.], [2.], [2.]], + base_size=300, + offset=0.5, + flip=True, + clip=True) """ - def _is_equal_(len1, len2, err_info): - if not (len1 == len2): - raise ValueError(err_info) + def _prior_box_(input, + image, + min_sizes, + max_sizes, + aspect_ratios, + variance, + flip=False, + clip=False, + step_w=0.0, + step_h=0.0, + offset=0.5, + name=None): + helper = LayerHelper("prior_box", **locals()) + dtype = helper.input_dtype() + + box = helper.create_tmp_variable(dtype) + var = helper.create_tmp_variable(dtype) + helper.append_op( + type="prior_box", + inputs={"Input": input, + "Image": image}, + outputs={"Boxes": box, + "Variances": var}, + attrs={ + 'min_sizes': min_sizes, + 'max_sizes': max_sizes, + 'aspect_ratios': aspect_ratios, + 'variances': variance, + 'flip': flip, + 'clip': clip, + 'step_w': step_w, + 'step_h': step_h, + 'offset': offset + }) + return box, var + + def _reshape_with_axis_(input, axis=1): + if not (axis > 0 and axis < len(input.shape)): + raise ValueError("The axis should be smaller than " + "the arity of input and bigger than 0.") + new_shape = [ + -1, reduce(lambda x, y: x * y, input.shape[axis:len(input.shape)]) + ] + out = ops.reshape(x=input, shape=new_shape) + return out def _is_list_or_tuple_(data): return (isinstance(data, list) or isinstance(data, tuple)) + def _is_list_or_tuple_and_equal(data, length, err_info): + if not (_is_list_or_tuple_(data) and len(data) == length): + raise ValueError(err_info) + if not _is_list_or_tuple_(inputs): raise ValueError('inputs should be a list or tuple.') - if min_sizes is not None: - _is_equal_( - len(inputs), - len(min_sizes), 'the length of min_sizes ' - 'and inputs should be equal.') - - if max_sizes is not None: - _is_equal_( - len(inputs), - len(max_sizes), 'the length of max_sizes ' - 'and inputs should be equal.') - - if aspect_ratios is not None: - _is_equal_( - len(inputs), - len(aspect_ratios), 'the length of aspect_ratios ' - 'and inputs should be equal.') - - if min_sizes is None: - # If min_sizes is None, min_sizes and max_sizes - # will be set according to max_ratio and min_ratio. - num_layer = len(inputs) - assert max_ratio is not None and min_ratio is not None,\ - 'max_ratio and min_ratio must be not None.' - assert num_layer >= 3, 'The length of the input data is at least three.' + num_layer = len(inputs) + + if num_layer <= 2: + assert min_sizes is not None and max_sizes is not None + assert len(min_sizes) == num_layer and len(max_sizes) == num_layer + else: min_sizes = [] max_sizes = [] step = int(math.floor(((max_ratio - min_ratio)) / (num_layer - 2))) @@ -781,21 +623,43 @@ def multi_box_head(inputs, min_sizes = [base_size * .10] + min_sizes max_sizes = [base_size * .20] + max_sizes + if aspect_ratios: + _is_list_or_tuple_and_equal( + aspect_ratios, num_layer, + 'aspect_ratios should be list or tuple, and the length of inputs ' + 'and aspect_ratios should be the same.') + if step_h: + _is_list_or_tuple_and_equal( + step_h, num_layer, + 'step_h should be list or tuple, and the length of inputs and ' + 'step_h should be the same.') + if step_w: + _is_list_or_tuple_and_equal( + step_w, num_layer, + 'step_w should be list or tuple, and the length of inputs and ' + 'step_w should be the same.') + if steps: + _is_list_or_tuple_and_equal( + steps, num_layer, + 'steps should be list or tuple, and the length of inputs and ' + 'step_w should be the same.') + step_w = steps + step_h = steps + mbox_locs = [] mbox_confs = [] + box_results = [] + var_results = [] for i, input in enumerate(inputs): min_size = min_sizes[i] + max_size = max_sizes[i] + if not _is_list_or_tuple_(min_size): min_size = [min_size] - - max_size = [] - if max_sizes is not None: - max_size = max_sizes[i] - if not _is_list_or_tuple_(max_size): - max_size = [max_size] - _is_equal_( - len(max_size), - len(min_size), + if not _is_list_or_tuple_(max_size): + max_size = [max_size] + if not (len(max_size) == len(min_size)): + raise ValueError( 'the length of max_size and min_size should be equal.') aspect_ratio = [] @@ -804,23 +668,18 @@ def multi_box_head(inputs, if not _is_list_or_tuple_(aspect_ratio): aspect_ratio = [aspect_ratio] - # get the number of prior box on each location - num_priors_per_location = 0 - if max_sizes is not None: - num_priors_per_location = len(min_size) + \ - len(aspect_ratio) * len(min_size) +\ - len(max_size) - else: - num_priors_per_location = len(min_size) +\ - len(aspect_ratio) * len(min_size) - if flip: - num_priors_per_location += len(aspect_ratio) * len(min_size) - - # get mbox_loc - num_loc_output = num_priors_per_location * 4 - if share_location: - num_loc_output *= num_classes + box, var = _prior_box_(input, image, min_size, max_size, aspect_ratio, + variance, flip, clip, step_w[i] + if step_w else 0.0, step_h[i] + if step_w else 0.0, offset) + + box_results.append(box) + var_results.append(var) + + num_boxes = box.shape[2] + # get box_loc + num_loc_output = num_boxes * num_classes * 4 mbox_loc = nn.conv2d( input=input, num_filters=num_loc_output, @@ -832,7 +691,7 @@ def multi_box_head(inputs, mbox_locs.append(mbox_loc) # get conf_loc - num_conf_output = num_priors_per_location * num_classes + num_conf_output = num_boxes * num_classes conf_loc = nn.conv2d( input=input, num_filters=num_conf_output, @@ -842,4 +701,17 @@ def multi_box_head(inputs, conf_loc = nn.transpose(conf_loc, perm=[0, 2, 3, 1]) mbox_confs.append(conf_loc) - return mbox_locs, mbox_confs + if len(box_results) == 1: + box = box_results[0] + var = var_results[0] + else: + reshaped_boxes = [] + reshaped_vars = [] + for i in range(len(box_results)): + reshaped_boxes.append(_reshape_with_axis_(box_results[i], axis=3)) + reshaped_vars.append(_reshape_with_axis_(var_results[i], axis=3)) + + box = tensor.concat(reshaped_boxes) + var = tensor.concat(reshaped_vars) + + return mbox_locs, mbox_confs, box, var diff --git a/python/paddle/v2/fluid/tests/test_detection.py b/python/paddle/v2/fluid/tests/test_detection.py index dd28a05313c..8c0ca0d8fc5 100644 --- a/python/paddle/v2/fluid/tests/test_detection.py +++ b/python/paddle/v2/fluid/tests/test_detection.py @@ -109,16 +109,19 @@ class TestDetection(unittest.TestCase): print(str(program)) -class TestPriorBox(unittest.TestCase): - def test_prior_box(self): +class TestMultiBoxHead(unittest.TestCase): + def test_multi_box_head(self): data_shape = [3, 224, 224] - box, var = self.prior_box_output(data_shape) + mbox_locs, mbox_confs, box, var = self.multi_box_head_output(data_shape) assert len(box.shape) == 2 assert box.shape == var.shape assert box.shape[1] == 4 - def prior_box_output(self, data_shape): + for loc, conf in zip(mbox_locs, mbox_confs): + assert loc.shape[1:3] == conf.shape[1:3] + + def multi_box_head_output(self, data_shape): images = fluid.layers.data( name='pixel', shape=data_shape, dtype='float32') conv1 = fluid.layers.conv2d(images, 3, 3, 2) @@ -127,46 +130,19 @@ class TestPriorBox(unittest.TestCase): conv4 = fluid.layers.conv2d(conv3, 3, 3, 2) conv5 = fluid.layers.conv2d(conv4, 3, 3, 2) - box, var = layers.prior_box( + mbox_locs, mbox_confs, box, var = layers.multi_box_head( inputs=[conv1, conv2, conv3, conv4, conv5, conv5], image=images, + num_classes=21, min_ratio=20, max_ratio=90, - # steps=[8, 16, 32, 64, 100, 300], aspect_ratios=[[2.], [2., 3.], [2., 3.], [2., 3.], [2.], [2.]], base_size=300, offset=0.5, flip=True, clip=True) - return box, var - - -class TestMultiBoxHead(unittest.TestCase): - def test_prior_box(self): - data_shape = [3, 224, 224] - mbox_locs, mbox_confs = self.multi_box_output(data_shape) - - for loc, conf in zip(mbox_locs, mbox_confs): - assert loc.shape[1:3] == conf.shape[1:3] - - def multi_box_output(self, data_shape): - images = fluid.layers.data( - name='pixel', shape=data_shape, dtype='float32') - conv1 = fluid.layers.conv2d(images, 3, 3, 2) - conv2 = fluid.layers.conv2d(conv1, 3, 3, 2) - conv3 = fluid.layers.conv2d(conv2, 3, 3, 2) - conv4 = fluid.layers.conv2d(conv3, 3, 3, 2) - conv5 = fluid.layers.conv2d(conv4, 3, 3, 2) - mbox_locs, mbox_confs = detection.multi_box_head( - inputs=[conv1, conv2, conv3, conv4, conv5, conv5], - num_classes=21, - min_ratio=20, - max_ratio=90, - aspect_ratios=[[2.], [2., 3.], [2., 3.], [2., 3.], [2.], [2.]], - base_size=300, - flip=True) - return mbox_locs, mbox_confs + return mbox_locs, mbox_confs, box, var if __name__ == '__main__': -- GitLab From 24509f4af942bb250564756ad636691c7921e1df Mon Sep 17 00:00:00 2001 From: qingqing01 Date: Mon, 12 Feb 2018 18:48:00 +0800 Subject: [PATCH 038/122] Fix the grammar in copyright. (#8403) --- CMakeLists.txt | 2 +- LICENSE | 2 +- benchmark/cluster/vgg16/vgg16_fluid.py | 2 +- benchmark/cluster/vgg16/vgg16_v2.py | 2 +- benchmark/paddle/image/alexnet.py | 2 +- benchmark/paddle/image/provider.py | 2 +- benchmark/paddle/rnn/imdb.py | 2 +- benchmark/paddle/rnn/provider.py | 2 +- benchmark/tensorflow/image/alexnet.py | 2 +- benchmark/tensorflow/image/alexnet_multi_gpu.py | 2 +- benchmark/tensorflow/image/googlenet.py | 2 +- benchmark/tensorflow/image/googlenet_multi_gpu.py | 2 +- benchmark/tensorflow/image/smallnet_mnist_cifar.py | 2 +- benchmark/tensorflow/rnn/reader.py | 2 +- cmake/configure.cmake | 2 +- cmake/cross_compiling/android.cmake | 2 +- cmake/cross_compiling/host.cmake | 2 +- cmake/cross_compiling/ios.cmake | 2 +- cmake/cross_compiling/raspberry_pi.cmake | 2 +- cmake/external/boost.cmake | 2 +- cmake/external/cares.cmake | 2 +- cmake/external/gflags.cmake | 2 +- cmake/external/glog.cmake | 2 +- cmake/external/grpc.cmake | 2 +- cmake/external/gtest.cmake | 2 +- cmake/external/mkldnn.cmake | 2 +- cmake/external/mklml.cmake | 2 +- cmake/external/nccl.cmake | 2 +- cmake/external/openblas.cmake | 2 +- cmake/external/protobuf.cmake | 2 +- cmake/external/pybind11.cmake | 2 +- cmake/external/python.cmake | 2 +- cmake/external/swig.cmake | 2 +- cmake/external/warpctc.cmake | 2 +- cmake/external/zlib.cmake | 2 +- cmake/generic.cmake | 2 +- cmake/make_resource.py | 2 +- cmake/system.cmake | 2 +- doc/faq/local/src/reduce_min_pool_size.py | 2 +- doc/faq/local/src/word2vec_config.py | 2 +- doc/faq/local/src/word2vec_dataprovider.py | 2 +- doc/getstarted/concepts/src/infer.py | 2 +- doc/getstarted/concepts/src/train.py | 2 +- doc/howto/cluster/src/word2vec/api_train_v2.py | 2 +- .../cluster/src/word2vec/api_train_v2_cluster.py | 2 +- doc/howto/cluster/src/word2vec/prepare.py | 2 +- go/CMakeLists.txt | 2 +- go/cmd/master/CMakeLists.txt | 2 +- go/cmd/master/master.go | 2 +- go/cmd/pserver/CMakeLists.txt | 2 +- go/cmd/pserver/pserver.go | 2 +- go/connection/conn.go | 2 +- go/master/CMakeLists.txt | 2 +- go/master/c/CMakeLists.txt | 2 +- go/master/c/client.go | 2 +- go/master/client.go | 2 +- go/master/client_internal_test.go | 2 +- go/master/client_test.go | 2 +- go/master/etcd_client.go | 2 +- go/master/inmem_store.go | 2 +- go/master/service.go | 2 +- go/master/service_internal_test.go | 2 +- go/pserver/CMakeLists.txt | 2 +- go/pserver/client/CMakeLists.txt | 2 +- go/pserver/client/c/CMakeLists.txt | 2 +- go/pserver/client/c/cclient.go | 2 +- go/pserver/client/c/test/CMakeLists.txt | 2 +- go/pserver/client/c/test/test_cclient.c | 2 +- go/pserver/client/c/test/test_mnist.py | 2 +- go/pserver/client/c/test/test_train.py | 2 +- go/pserver/client/client.go | 2 +- go/pserver/client/client_test.go | 2 +- go/pserver/client/etcd_client.go | 2 +- go/pserver/etcd_client.go | 2 +- go/pserver/optimizer.go | 2 +- go/pserver/optimizer_test.go | 2 +- go/pserver/service.go | 2 +- go/pserver/service_test.go | 2 +- go/utils/networkhelper/CMakeLists.txt | 2 +- go/utils/networkhelper/helper.go | 2 +- go/utils/networkhelper/helper_test.go | 2 +- paddle/api/Arguments.cpp | 2 +- paddle/api/ConfigParser.cpp | 2 +- paddle/api/Evaluator.cpp | 2 +- paddle/api/GradientMachine.cpp | 2 +- paddle/api/Internal.h | 2 +- paddle/api/Matrix.cpp | 2 +- paddle/api/PaddleAPI.h | 2 +- paddle/api/PaddleAPIPrivate.h | 2 +- paddle/api/Parameter.cpp | 2 +- paddle/api/ParameterOptimizer.cpp | 2 +- paddle/api/ParameterUpdater.cpp | 2 +- paddle/api/SequenceGenerator.cpp | 2 +- paddle/api/Trainer.cpp | 2 +- paddle/api/Util.cpp | 2 +- paddle/api/Vector.cpp | 2 +- paddle/api/test/testTrainConfig.py | 2 +- paddle/capi/Arguments.cpp | 2 +- paddle/capi/Main.cpp | 2 +- paddle/capi/Matrix.cpp | 2 +- paddle/capi/Vector.cpp | 2 +- paddle/capi/arguments.h | 2 +- paddle/capi/capi.h | 2 +- paddle/capi/capi_private.h | 2 +- paddle/capi/error.cpp | 2 +- paddle/capi/error.h | 2 +- .../capi/examples/model_inference/common/common.h | 2 +- paddle/capi/examples/model_inference/dense/main.c | 2 +- .../model_inference/dense/merge_v2_model.py | 2 +- .../examples/model_inference/dense/mnist_v2.py | 2 +- .../model_inference/dense/trainer_config.py | 2 +- .../examples/model_inference/multi_thread/main.c | 2 +- .../model_inference/multi_thread/main_gpu.c | 2 +- .../model_inference/multi_thread/trainer_config.py | 14 +++++++++++++- .../capi/examples/model_inference/sequence/main.c | 2 +- .../model_inference/sequence/trainer_config.py | 2 +- .../examples/model_inference/sparse_binary/main.c | 2 +- .../sparse_binary/trainer_config.py | 14 +++++++++++++- paddle/capi/gradient_machine.cpp | 2 +- paddle/capi/gradient_machine.h | 2 +- paddle/capi/main.h | 2 +- paddle/capi/matrix.h | 2 +- paddle/capi/tests/test_Arguments.cpp | 2 +- paddle/capi/tests/test_GradientMachine.cpp | 2 +- paddle/capi/tests/test_Matrix.cpp | 2 +- paddle/capi/tests/test_Vector.cpp | 2 +- paddle/capi/tests/test_predict_network.py | 2 +- paddle/capi/vector.h | 2 +- paddle/cuda/include/hl_activation_functions.h | 2 +- paddle/cuda/include/hl_aggregate.h | 2 +- paddle/cuda/include/hl_avx_functions.h | 2 +- paddle/cuda/include/hl_base.h | 2 +- paddle/cuda/include/hl_batch_norm.h | 2 +- paddle/cuda/include/hl_batch_transpose.h | 2 +- paddle/cuda/include/hl_cnn.h | 2 +- paddle/cuda/include/hl_cpu_gru.cuh | 2 +- paddle/cuda/include/hl_cpu_lstm.cuh | 2 +- paddle/cuda/include/hl_cpu_matrix_kernel.cuh | 2 +- .../cuda/include/hl_cpu_matrix_kernel_detail.cuh | 2 +- paddle/cuda/include/hl_cpu_scalar.cuh | 2 +- paddle/cuda/include/hl_cpu_simd_neon.cuh | 2 +- paddle/cuda/include/hl_cpu_simd_sse.cuh | 2 +- paddle/cuda/include/hl_cuda.h | 2 +- paddle/cuda/include/hl_cuda.ph | 2 +- paddle/cuda/include/hl_cuda_cublas.h | 2 +- paddle/cuda/include/hl_cuda_cudnn.h | 2 +- paddle/cuda/include/hl_cuda_cudnn.ph | 2 +- paddle/cuda/include/hl_device_functions.cuh | 2 +- paddle/cuda/include/hl_functions.h | 2 +- paddle/cuda/include/hl_gpu.h | 2 +- paddle/cuda/include/hl_gpu_functions.cuh | 2 +- paddle/cuda/include/hl_gpu_gru.cuh | 2 +- paddle/cuda/include/hl_gpu_lstm.cuh | 2 +- paddle/cuda/include/hl_gpu_matrix_kernel.cuh | 2 +- paddle/cuda/include/hl_gru_ops.cuh | 2 +- paddle/cuda/include/hl_lstm.h | 2 +- paddle/cuda/include/hl_lstm_ops.cuh | 2 +- paddle/cuda/include/hl_matrix.h | 2 +- paddle/cuda/include/hl_matrix_apply.cuh | 2 +- paddle/cuda/include/hl_matrix_base.cuh | 2 +- paddle/cuda/include/hl_matrix_base_detail.cuh | 2 +- paddle/cuda/include/hl_matrix_ops.cuh | 2 +- paddle/cuda/include/hl_matrix_type.cuh | 2 +- paddle/cuda/include/hl_perturbation_util.cuh | 2 +- paddle/cuda/include/hl_recurrent_apply.cuh | 2 +- paddle/cuda/include/hl_sequence.h | 2 +- paddle/cuda/include/hl_sparse.h | 2 +- paddle/cuda/include/hl_sparse.ph | 2 +- paddle/cuda/include/hl_table_apply.h | 2 +- paddle/cuda/include/hl_tensor_ops.h | 2 +- paddle/cuda/include/hl_thread.ph | 2 +- paddle/cuda/include/hl_time.h | 2 +- paddle/cuda/include/hl_top_k.h | 2 +- paddle/cuda/include/hl_warpctc_wrap.h | 2 +- paddle/cuda/include/stub/hl_aggregate_stub.h | 2 +- paddle/cuda/include/stub/hl_cnn_stub.h | 2 +- paddle/cuda/include/stub/hl_cuda_cublas_stub.h | 2 +- paddle/cuda/include/stub/hl_cuda_cudnn_stub.h | 2 +- paddle/cuda/include/stub/hl_cuda_stub.h | 2 +- paddle/cuda/include/stub/hl_lstm_stub.h | 2 +- paddle/cuda/include/stub/hl_matrix_stub.h | 2 +- paddle/cuda/include/stub/hl_sequence_stub.h | 2 +- paddle/cuda/include/stub/hl_sparse_stub.h | 2 +- paddle/cuda/src/avx_mathfun.h | 2 +- paddle/cuda/src/hl_avx_functions.cc | 2 +- paddle/cuda/src/hl_batch_norm.cu | 2 +- paddle/cuda/src/hl_batch_transpose.cu | 2 +- paddle/cuda/src/hl_cpu_functions.cc | 2 +- paddle/cuda/src/hl_cuda_aggregate.cu | 2 +- paddle/cuda/src/hl_cuda_cnn.cu | 2 +- paddle/cuda/src/hl_cuda_cublas.cc | 2 +- paddle/cuda/src/hl_cuda_cudnn.cc | 2 +- paddle/cuda/src/hl_cuda_device.cc | 2 +- paddle/cuda/src/hl_cuda_lstm.cu | 2 +- paddle/cuda/src/hl_cuda_matrix.cu | 2 +- paddle/cuda/src/hl_cuda_sequence.cu | 2 +- paddle/cuda/src/hl_cuda_sparse.cu | 2 +- paddle/cuda/src/hl_cuda_sparse.cuh | 2 +- paddle/cuda/src/hl_math.cc | 2 +- paddle/cuda/src/hl_perturbation_util.cu | 2 +- paddle/cuda/src/hl_table_apply.cu | 2 +- paddle/cuda/src/hl_time.cc | 2 +- paddle/cuda/src/hl_top_k.cu | 2 +- paddle/cuda/src/hl_warpctc_wrap.cc | 2 +- paddle/fluid/framework/attribute.cc | 2 +- paddle/fluid/framework/attribute.h | 2 +- paddle/fluid/framework/backward.cc | 2 +- paddle/fluid/framework/backward.h | 2 +- paddle/fluid/framework/backward_test.cc | 2 +- paddle/fluid/framework/block_desc.cc | 2 +- paddle/fluid/framework/block_desc.h | 2 +- paddle/fluid/framework/data_device_transform.cc | 2 +- paddle/fluid/framework/data_device_transform.h | 2 +- .../fluid/framework/data_device_transform_test.cu | 2 +- paddle/fluid/framework/data_layout.h | 2 +- paddle/fluid/framework/data_layout_transform.cc | 2 +- paddle/fluid/framework/data_layout_transform.h | 2 +- .../fluid/framework/data_layout_transform_test.cc | 4 ++-- paddle/fluid/framework/data_transform.cc | 2 +- paddle/fluid/framework/data_transform.h | 2 +- paddle/fluid/framework/data_type.h | 2 +- paddle/fluid/framework/data_type_transform.cc | 2 +- paddle/fluid/framework/data_type_transform.h | 2 +- paddle/fluid/framework/data_type_transform_test.cc | 2 +- paddle/fluid/framework/ddim.cc | 2 +- paddle/fluid/framework/ddim.h | 2 +- paddle/fluid/framework/ddim_test.cc | 2 +- paddle/fluid/framework/dim.h | 2 +- paddle/fluid/framework/dim_test.cu | 2 +- paddle/fluid/framework/eigen.h | 2 +- paddle/fluid/framework/eigen_test.cc | 2 +- paddle/fluid/framework/executor.cc | 2 +- paddle/fluid/framework/executor.h | 2 +- paddle/fluid/framework/feed_fetch_method.cc | 2 +- paddle/fluid/framework/feed_fetch_method.h | 2 +- paddle/fluid/framework/feed_fetch_type.h | 2 +- paddle/fluid/framework/framework.proto | 2 +- paddle/fluid/framework/grad_op_desc_maker.h | 2 +- paddle/fluid/framework/init.cc | 2 +- paddle/fluid/framework/init.h | 2 +- paddle/fluid/framework/init_test.cc | 2 +- paddle/fluid/framework/library_type.h | 2 +- paddle/fluid/framework/lod_rank_table.cc | 2 +- paddle/fluid/framework/lod_rank_table.h | 2 +- paddle/fluid/framework/lod_tensor.cc | 2 +- paddle/fluid/framework/lod_tensor.h | 2 +- paddle/fluid/framework/lod_tensor_array.h | 2 +- paddle/fluid/framework/lod_tensor_test.cc | 2 +- paddle/fluid/framework/lod_tensor_test.cu | 2 +- paddle/fluid/framework/mixed_vector.h | 2 +- paddle/fluid/framework/mixed_vector_test.cu | 2 +- paddle/fluid/framework/op_desc.cc | 2 +- paddle/fluid/framework/op_desc.h | 2 +- paddle/fluid/framework/op_info.cc | 2 +- paddle/fluid/framework/op_info.h | 2 +- paddle/fluid/framework/op_kernel_type.h | 2 +- paddle/fluid/framework/op_kernel_type_test.cc | 2 +- paddle/fluid/framework/op_proto_maker.cc | 2 +- paddle/fluid/framework/op_proto_maker.h | 2 +- paddle/fluid/framework/op_proto_maker_test.cc | 2 +- paddle/fluid/framework/op_registry.cc | 2 +- paddle/fluid/framework/op_registry.h | 2 +- paddle/fluid/framework/op_registry_test.cc | 2 +- paddle/fluid/framework/operator.cc | 2 +- paddle/fluid/framework/operator.h | 2 +- paddle/fluid/framework/operator_test.cc | 2 +- paddle/fluid/framework/program_desc.cc | 2 +- paddle/fluid/framework/program_desc.h | 2 +- paddle/fluid/framework/program_desc_test.cc | 2 +- paddle/fluid/framework/proto_desc.h | 2 +- paddle/fluid/framework/prune.cc | 2 +- paddle/fluid/framework/prune.h | 2 +- paddle/fluid/framework/prune_test.cc | 2 +- paddle/fluid/framework/scope.cc | 2 +- paddle/fluid/framework/scope.h | 2 +- paddle/fluid/framework/scope_test.cc | 2 +- paddle/fluid/framework/selected_rows.cc | 2 +- paddle/fluid/framework/selected_rows.h | 2 +- paddle/fluid/framework/selected_rows_test.cc | 2 +- paddle/fluid/framework/shape_inference.cc | 2 +- paddle/fluid/framework/shape_inference.h | 2 +- paddle/fluid/framework/tensor.cc | 2 +- paddle/fluid/framework/tensor.h | 2 +- paddle/fluid/framework/tensor_impl.h | 2 +- paddle/fluid/framework/tensor_test.cc | 2 +- paddle/fluid/framework/tensor_util.h | 2 +- paddle/fluid/framework/tensor_util_test.cc | 2 +- paddle/fluid/framework/threadpool.cc | 2 +- paddle/fluid/framework/threadpool.h | 2 +- paddle/fluid/framework/threadpool_test.cc | 2 +- paddle/fluid/framework/type_defs.h | 2 +- paddle/fluid/framework/var_desc.cc | 2 +- paddle/fluid/framework/var_desc.h | 2 +- paddle/fluid/framework/var_type.h | 2 +- paddle/fluid/framework/var_type_inference.h | 2 +- paddle/fluid/framework/var_type_inference_test.cc | 4 ++-- paddle/fluid/framework/variable.h | 2 +- paddle/fluid/framework/variable_test.cc | 2 +- paddle/fluid/inference/io.cc | 2 +- paddle/fluid/inference/io.h | 2 +- .../tests/book/test_inference_fit_a_line.cc | 2 +- .../book/test_inference_image_classification.cc | 2 +- .../book/test_inference_label_semantic_roles.cc | 2 +- .../tests/book/test_inference_recognize_digits.cc | 2 +- .../book/test_inference_recommender_system.cc | 2 +- .../book/test_inference_rnn_encoder_decoder.cc | 2 +- .../book/test_inference_understand_sentiment.cc | 2 +- .../tests/book/test_inference_word2vec.cc | 2 +- paddle/fluid/inference/tests/test_helper.h | 2 +- paddle/fluid/memory/detail/buddy_allocator.cc | 2 +- paddle/fluid/memory/detail/buddy_allocator.h | 2 +- paddle/fluid/memory/detail/memory_block.cc | 2 +- paddle/fluid/memory/detail/memory_block.h | 2 +- paddle/fluid/memory/detail/meta_cache.cc | 2 +- paddle/fluid/memory/detail/meta_cache.h | 2 +- paddle/fluid/memory/detail/meta_data.cc | 2 +- paddle/fluid/memory/detail/meta_data.h | 2 +- paddle/fluid/memory/detail/system_allocator.cc | 2 +- paddle/fluid/memory/detail/system_allocator.h | 2 +- .../fluid/memory/detail/system_allocator_test.cc | 2 +- paddle/fluid/memory/memcpy.cc | 2 +- paddle/fluid/memory/memcpy.h | 2 +- paddle/fluid/memory/memory.cc | 2 +- paddle/fluid/memory/memory.h | 2 +- paddle/fluid/memory/memory_test.cc | 2 +- paddle/fluid/operators/accuracy_op.cc | 2 +- paddle/fluid/operators/accuracy_op.cu | 2 +- paddle/fluid/operators/accuracy_op.h | 2 +- paddle/fluid/operators/activation_op.cc | 2 +- paddle/fluid/operators/activation_op.cu | 2 +- paddle/fluid/operators/activation_op.h | 2 +- paddle/fluid/operators/adadelta_op.cc | 2 +- paddle/fluid/operators/adadelta_op.cu | 2 +- paddle/fluid/operators/adadelta_op.h | 2 +- paddle/fluid/operators/adagrad_op.cc | 2 +- paddle/fluid/operators/adagrad_op.cu | 2 +- paddle/fluid/operators/adagrad_op.h | 2 +- paddle/fluid/operators/adam_op.cc | 2 +- paddle/fluid/operators/adam_op.cu | 2 +- paddle/fluid/operators/adam_op.h | 2 +- paddle/fluid/operators/adamax_op.cc | 2 +- paddle/fluid/operators/adamax_op.cu | 2 +- paddle/fluid/operators/adamax_op.h | 2 +- paddle/fluid/operators/array_operator.h | 2 +- paddle/fluid/operators/array_to_lod_tensor_op.cc | 2 +- paddle/fluid/operators/assign_op.cc | 2 +- paddle/fluid/operators/assign_value_op.cc | 2 +- paddle/fluid/operators/assign_value_op.cu.cc | 2 +- paddle/fluid/operators/assign_value_op.h | 2 +- paddle/fluid/operators/auc_op.cc | 2 +- paddle/fluid/operators/auc_op.h | 2 +- paddle/fluid/operators/batch_norm_op.cc | 2 +- paddle/fluid/operators/batch_norm_op.cu.cc | 2 +- paddle/fluid/operators/batch_norm_op.h | 2 +- paddle/fluid/operators/beam_search_decode_op.cc | 2 +- paddle/fluid/operators/beam_search_decode_op.h | 2 +- .../fluid/operators/beam_search_decode_op_test.cc | 2 +- paddle/fluid/operators/beam_search_op.cc | 2 +- paddle/fluid/operators/beam_search_op.h | 2 +- paddle/fluid/operators/beam_search_op_test.cc | 2 +- .../fluid/operators/bilinear_tensor_product_op.cc | 2 +- .../fluid/operators/bilinear_tensor_product_op.cu | 2 +- .../fluid/operators/bilinear_tensor_product_op.h | 2 +- paddle/fluid/operators/bipartite_match_op.cc | 2 +- paddle/fluid/operators/box_coder_op.cc | 2 +- paddle/fluid/operators/box_coder_op.cu | 2 +- paddle/fluid/operators/box_coder_op.h | 2 +- paddle/fluid/operators/cast_op.cc | 2 +- paddle/fluid/operators/cast_op.cu | 2 +- paddle/fluid/operators/cast_op.h | 2 +- paddle/fluid/operators/chunk_eval_op.cc | 2 +- paddle/fluid/operators/chunk_eval_op.h | 2 +- paddle/fluid/operators/clip_by_norm_op.cc | 2 +- paddle/fluid/operators/clip_by_norm_op.cu | 2 +- paddle/fluid/operators/clip_by_norm_op.h | 2 +- paddle/fluid/operators/clip_op.cc | 2 +- paddle/fluid/operators/clip_op.cu | 2 +- paddle/fluid/operators/clip_op.h | 2 +- paddle/fluid/operators/compare_op.cc | 2 +- paddle/fluid/operators/compare_op.cu | 2 +- paddle/fluid/operators/compare_op.h | 2 +- paddle/fluid/operators/concat_op.cc | 2 +- paddle/fluid/operators/concat_op.cu.cc | 2 +- paddle/fluid/operators/concat_op.h | 2 +- paddle/fluid/operators/cond_op.cc | 2 +- paddle/fluid/operators/cond_op.h | 2 +- paddle/fluid/operators/conditional_block_op.cc | 2 +- paddle/fluid/operators/conv_cudnn_op.cu.cc | 2 +- paddle/fluid/operators/conv_op.cc | 2 +- paddle/fluid/operators/conv_op.cu.cc | 2 +- paddle/fluid/operators/conv_op.h | 2 +- paddle/fluid/operators/conv_shift_op.cc | 2 +- paddle/fluid/operators/conv_shift_op.cu | 2 +- paddle/fluid/operators/conv_shift_op.h | 2 +- .../fluid/operators/conv_transpose_cudnn_op.cu.cc | 2 +- paddle/fluid/operators/conv_transpose_op.cc | 2 +- paddle/fluid/operators/conv_transpose_op.cu.cc | 2 +- paddle/fluid/operators/conv_transpose_op.h | 2 +- paddle/fluid/operators/cos_sim_op.cc | 2 +- paddle/fluid/operators/cos_sim_op.cu | 2 +- paddle/fluid/operators/cos_sim_op.h | 2 +- paddle/fluid/operators/crf_decoding_op.cc | 2 +- paddle/fluid/operators/crf_decoding_op.h | 2 +- paddle/fluid/operators/crop_op.cc | 2 +- paddle/fluid/operators/crop_op.cu | 2 +- paddle/fluid/operators/crop_op.h | 2 +- paddle/fluid/operators/cross_entropy_op.cc | 2 +- paddle/fluid/operators/cross_entropy_op.cu | 2 +- paddle/fluid/operators/cross_entropy_op.h | 2 +- paddle/fluid/operators/ctc_align_op.cc | 2 +- paddle/fluid/operators/ctc_align_op.cu | 2 +- paddle/fluid/operators/ctc_align_op.h | 2 +- paddle/fluid/operators/cum_op.h | 2 +- paddle/fluid/operators/cumsum_op.cc | 2 +- paddle/fluid/operators/cumsum_op.cu | 2 +- paddle/fluid/operators/decayed_adagrad_op.cc | 2 +- paddle/fluid/operators/decayed_adagrad_op.cu | 2 +- paddle/fluid/operators/decayed_adagrad_op.h | 2 +- paddle/fluid/operators/detail/grpc_client.cc | 2 +- paddle/fluid/operators/detail/grpc_client.h | 2 +- paddle/fluid/operators/detail/grpc_server.cc | 2 +- paddle/fluid/operators/detail/grpc_server.h | 2 +- paddle/fluid/operators/detail/safe_ref.h | 2 +- paddle/fluid/operators/detail/sendrecvop_utils.cc | 2 +- paddle/fluid/operators/detail/sendrecvop_utils.h | 2 +- paddle/fluid/operators/detail/simple_block_queue.h | 2 +- paddle/fluid/operators/detail/strided_memcpy.h | 2 +- paddle/fluid/operators/detection_map_op.cc | 2 +- paddle/fluid/operators/detection_map_op.h | 2 +- paddle/fluid/operators/detection_output_op.cc | 2 +- paddle/fluid/operators/detection_output_op.cu.cc | 2 +- paddle/fluid/operators/detection_output_op.h | 2 +- paddle/fluid/operators/dropout_op.cc | 2 +- paddle/fluid/operators/dropout_op.cu | 2 +- paddle/fluid/operators/dropout_op.h | 2 +- paddle/fluid/operators/edit_distance_op.cc | 2 +- paddle/fluid/operators/edit_distance_op.cu | 2 +- paddle/fluid/operators/edit_distance_op.h | 2 +- paddle/fluid/operators/elementwise_add_op.cc | 2 +- paddle/fluid/operators/elementwise_add_op.cu | 2 +- paddle/fluid/operators/elementwise_add_op.h | 2 +- paddle/fluid/operators/elementwise_div_op.cc | 2 +- paddle/fluid/operators/elementwise_div_op.cu | 2 +- paddle/fluid/operators/elementwise_div_op.h | 2 +- paddle/fluid/operators/elementwise_max_op.cc | 2 +- paddle/fluid/operators/elementwise_max_op.cu | 2 +- paddle/fluid/operators/elementwise_max_op.h | 2 +- paddle/fluid/operators/elementwise_min_op.cc | 2 +- paddle/fluid/operators/elementwise_min_op.cu | 2 +- paddle/fluid/operators/elementwise_min_op.h | 2 +- paddle/fluid/operators/elementwise_mul_op.cc | 2 +- paddle/fluid/operators/elementwise_mul_op.cu | 2 +- paddle/fluid/operators/elementwise_mul_op.h | 2 +- paddle/fluid/operators/elementwise_op.h | 2 +- paddle/fluid/operators/elementwise_op_function.h | 2 +- paddle/fluid/operators/elementwise_pow_op.cc | 2 +- paddle/fluid/operators/elementwise_pow_op.cu | 2 +- paddle/fluid/operators/elementwise_pow_op.h | 2 +- paddle/fluid/operators/elementwise_sub_op.cc | 2 +- paddle/fluid/operators/elementwise_sub_op.cu | 2 +- paddle/fluid/operators/elementwise_sub_op.h | 2 +- paddle/fluid/operators/expand_op.cc | 2 +- paddle/fluid/operators/expand_op.cu | 2 +- paddle/fluid/operators/expand_op.h | 2 +- paddle/fluid/operators/feed_op.cc | 2 +- paddle/fluid/operators/fetch_op.cc | 2 +- .../operators/fill_constant_batch_size_like_op.cc | 2 +- .../fill_constant_batch_size_like_op.cu.cc | 2 +- .../operators/fill_constant_batch_size_like_op.h | 2 +- paddle/fluid/operators/fill_constant_op.cc | 2 +- paddle/fluid/operators/fill_op.cc | 2 +- paddle/fluid/operators/fill_zeros_like_op.cc | 2 +- paddle/fluid/operators/fill_zeros_like_op.cu.cc | 2 +- paddle/fluid/operators/fill_zeros_like_op.h | 2 +- paddle/fluid/operators/ftrl_op.cc | 2 +- paddle/fluid/operators/ftrl_op.cu | 2 +- paddle/fluid/operators/ftrl_op.h | 2 +- paddle/fluid/operators/gather.cu.h | 2 +- paddle/fluid/operators/gather.h | 2 +- paddle/fluid/operators/gather_op.cc | 2 +- paddle/fluid/operators/gather_op.cu | 2 +- paddle/fluid/operators/gather_op.h | 2 +- paddle/fluid/operators/gather_test.cc | 2 +- paddle/fluid/operators/gaussian_random_op.cc | 2 +- paddle/fluid/operators/gaussian_random_op.cu | 2 +- paddle/fluid/operators/get_places_op.cc | 2 +- paddle/fluid/operators/gru_op.cc | 2 +- paddle/fluid/operators/gru_op.cu.cc | 2 +- paddle/fluid/operators/gru_op.h | 2 +- paddle/fluid/operators/gru_unit_op.cc | 2 +- paddle/fluid/operators/gru_unit_op.cu | 2 +- paddle/fluid/operators/gru_unit_op.h | 2 +- paddle/fluid/operators/hinge_loss_op.cc | 2 +- paddle/fluid/operators/hinge_loss_op.cu | 2 +- paddle/fluid/operators/hinge_loss_op.h | 2 +- paddle/fluid/operators/huber_loss_op.cc | 2 +- paddle/fluid/operators/huber_loss_op.cu | 2 +- paddle/fluid/operators/huber_loss_op.h | 2 +- paddle/fluid/operators/im2sequence_op.cc | 2 +- paddle/fluid/operators/im2sequence_op.cu | 2 +- paddle/fluid/operators/im2sequence_op.h | 2 +- paddle/fluid/operators/increment_op.cc | 2 +- paddle/fluid/operators/iou_similarity_op.cc | 2 +- paddle/fluid/operators/iou_similarity_op.cu | 2 +- paddle/fluid/operators/iou_similarity_op.h | 2 +- paddle/fluid/operators/is_empty_op.cc | 2 +- paddle/fluid/operators/l1_norm_op.cc | 2 +- paddle/fluid/operators/l1_norm_op.cu | 2 +- paddle/fluid/operators/l1_norm_op.h | 2 +- paddle/fluid/operators/label_smooth_op.cc | 2 +- paddle/fluid/operators/label_smooth_op.cu | 2 +- paddle/fluid/operators/label_smooth_op.h | 2 +- paddle/fluid/operators/layer_norm_op.cc | 2 +- paddle/fluid/operators/layer_norm_op.cu | 2 +- paddle/fluid/operators/layer_norm_op.h | 2 +- paddle/fluid/operators/linear_chain_crf_op.cc | 2 +- paddle/fluid/operators/linear_chain_crf_op.cu | 2 +- paddle/fluid/operators/linear_chain_crf_op.h | 2 +- paddle/fluid/operators/listen_and_serv_op.cc | 2 +- paddle/fluid/operators/load_combine_op.cc | 2 +- paddle/fluid/operators/load_op.cc | 2 +- paddle/fluid/operators/lod_array_length_op.cc | 2 +- paddle/fluid/operators/lod_rank_table_op.cc | 2 +- paddle/fluid/operators/lod_reset_op.cc | 2 +- paddle/fluid/operators/lod_reset_op.cu | 2 +- paddle/fluid/operators/lod_reset_op.h | 2 +- paddle/fluid/operators/lod_tensor_to_array_op.cc | 2 +- paddle/fluid/operators/log_loss_op.cc | 2 +- paddle/fluid/operators/log_loss_op.cu | 2 +- paddle/fluid/operators/log_loss_op.h | 2 +- paddle/fluid/operators/logical_op.cc | 2 +- paddle/fluid/operators/logical_op.cu | 2 +- paddle/fluid/operators/logical_op.h | 2 +- paddle/fluid/operators/lookup_table_op.cc | 2 +- paddle/fluid/operators/lookup_table_op.cu | 2 +- paddle/fluid/operators/lookup_table_op.h | 2 +- paddle/fluid/operators/lrn_op.cc | 2 +- paddle/fluid/operators/lrn_op.cu | 2 +- paddle/fluid/operators/lrn_op.h | 2 +- paddle/fluid/operators/lstm_op.cc | 2 +- paddle/fluid/operators/lstm_op.cu.cc | 2 +- paddle/fluid/operators/lstm_op.h | 2 +- paddle/fluid/operators/lstm_unit_op.cc | 2 +- paddle/fluid/operators/lstm_unit_op.cu | 2 +- paddle/fluid/operators/lstm_unit_op.h | 2 +- paddle/fluid/operators/lstmp_op.cc | 2 +- paddle/fluid/operators/lstmp_op.cu | 2 +- paddle/fluid/operators/lstmp_op.h | 2 +- paddle/fluid/operators/margin_rank_loss_op.cc | 2 +- paddle/fluid/operators/margin_rank_loss_op.cu | 2 +- paddle/fluid/operators/margin_rank_loss_op.h | 2 +- paddle/fluid/operators/math/context_project.cc | 2 +- paddle/fluid/operators/math/context_project.cu | 2 +- paddle/fluid/operators/math/context_project.h | 2 +- paddle/fluid/operators/math/cos_sim_functor.cc | 2 +- paddle/fluid/operators/math/cos_sim_functor.cu | 2 +- paddle/fluid/operators/math/cos_sim_functor.h | 2 +- paddle/fluid/operators/math/cross_entropy.cc | 2 +- paddle/fluid/operators/math/cross_entropy.cu | 2 +- paddle/fluid/operators/math/cross_entropy.h | 2 +- paddle/fluid/operators/math/depthwise_conv.cu | 2 +- paddle/fluid/operators/math/depthwise_conv.h | 2 +- .../operators/math/detail/activation_functions.h | 2 +- .../fluid/operators/math/detail/avx_functions.cc | 2 +- .../fluid/operators/math/detail/gru_cpu_kernel.h | 2 +- .../fluid/operators/math/detail/gru_gpu_kernel.h | 2 +- paddle/fluid/operators/math/detail/gru_kernel.h | 2 +- .../fluid/operators/math/detail/lstm_cpu_kernel.h | 2 +- .../fluid/operators/math/detail/lstm_gpu_kernel.h | 2 +- paddle/fluid/operators/math/detail/lstm_kernel.h | 2 +- paddle/fluid/operators/math/detection_util.h | 2 +- paddle/fluid/operators/math/gru_compute.cc | 2 +- paddle/fluid/operators/math/gru_compute.cu | 2 +- paddle/fluid/operators/math/gru_compute.h | 2 +- paddle/fluid/operators/math/im2col.cc | 2 +- paddle/fluid/operators/math/im2col.cu | 2 +- paddle/fluid/operators/math/im2col.h | 2 +- paddle/fluid/operators/math/im2col_test.cc | 2 +- paddle/fluid/operators/math/lstm_compute.cc | 2 +- paddle/fluid/operators/math/lstm_compute.cu | 2 +- paddle/fluid/operators/math/lstm_compute.h | 2 +- paddle/fluid/operators/math/math_function.cc | 2 +- paddle/fluid/operators/math/math_function.cu | 2 +- paddle/fluid/operators/math/math_function.h | 2 +- paddle/fluid/operators/math/math_function_impl.h | 2 +- paddle/fluid/operators/math/math_function_test.cc | 2 +- paddle/fluid/operators/math/math_function_test.cu | 2 +- paddle/fluid/operators/math/matmul.h | 2 +- paddle/fluid/operators/math/maxouting.cc | 2 +- paddle/fluid/operators/math/maxouting.cu | 2 +- paddle/fluid/operators/math/maxouting.h | 2 +- paddle/fluid/operators/math/pooling.cc | 2 +- paddle/fluid/operators/math/pooling.cu | 2 +- paddle/fluid/operators/math/pooling.h | 2 +- paddle/fluid/operators/math/sampler.cc | 2 +- paddle/fluid/operators/math/sampler.h | 2 +- .../fluid/operators/math/selected_rows_functor.cc | 2 +- .../fluid/operators/math/selected_rows_functor.cu | 2 +- .../fluid/operators/math/selected_rows_functor.h | 2 +- .../operators/math/selected_rows_functor_test.cc | 2 +- .../operators/math/selected_rows_functor_test.cu | 2 +- paddle/fluid/operators/math/sequence2batch.cc | 2 +- paddle/fluid/operators/math/sequence2batch.cu | 2 +- paddle/fluid/operators/math/sequence2batch.h | 2 +- paddle/fluid/operators/math/sequence_padding.cc | 2 +- paddle/fluid/operators/math/sequence_padding.cu | 2 +- paddle/fluid/operators/math/sequence_padding.h | 2 +- .../fluid/operators/math/sequence_padding_test.cc | 2 +- paddle/fluid/operators/math/sequence_pooling.cc | 2 +- paddle/fluid/operators/math/sequence_pooling.cu | 2 +- paddle/fluid/operators/math/sequence_pooling.h | 2 +- paddle/fluid/operators/math/sequence_scale.cc | 2 +- paddle/fluid/operators/math/sequence_scale.cu | 2 +- paddle/fluid/operators/math/sequence_scale.h | 2 +- paddle/fluid/operators/math/softmax.cc | 2 +- paddle/fluid/operators/math/softmax.cu | 2 +- paddle/fluid/operators/math/softmax.h | 2 +- paddle/fluid/operators/math/softmax_impl.h | 2 +- paddle/fluid/operators/math/unpooling.cc | 2 +- paddle/fluid/operators/math/unpooling.cu | 2 +- paddle/fluid/operators/math/unpooling.h | 2 +- paddle/fluid/operators/math/vol2col.cc | 2 +- paddle/fluid/operators/math/vol2col.cu | 2 +- paddle/fluid/operators/math/vol2col.h | 2 +- paddle/fluid/operators/math/vol2col_test.cc | 2 +- paddle/fluid/operators/matmul_op.cc | 2 +- paddle/fluid/operators/matmul_op.cu.cc | 2 +- paddle/fluid/operators/matmul_op.h | 2 +- paddle/fluid/operators/max_sequence_len_op.cc | 2 +- paddle/fluid/operators/maxout_op.cc | 2 +- paddle/fluid/operators/maxout_op.cu.cc | 2 +- paddle/fluid/operators/maxout_op.h | 2 +- paddle/fluid/operators/mean_op.cc | 2 +- paddle/fluid/operators/mean_op.cu | 2 +- paddle/fluid/operators/mean_op.h | 2 +- paddle/fluid/operators/merge_lod_tensor_op.cc | 2 +- paddle/fluid/operators/mine_hard_examples_op.cc | 2 +- paddle/fluid/operators/minus_op.cc | 2 +- paddle/fluid/operators/minus_op.cu | 2 +- paddle/fluid/operators/minus_op.h | 2 +- paddle/fluid/operators/modified_huber_loss_op.cc | 2 +- paddle/fluid/operators/modified_huber_loss_op.cu | 2 +- paddle/fluid/operators/modified_huber_loss_op.h | 2 +- paddle/fluid/operators/momentum_op.cc | 2 +- paddle/fluid/operators/momentum_op.cu | 2 +- paddle/fluid/operators/momentum_op.h | 2 +- paddle/fluid/operators/mul_op.cc | 2 +- paddle/fluid/operators/mul_op.cu.cc | 2 +- paddle/fluid/operators/mul_op.h | 2 +- paddle/fluid/operators/multiclass_nms_op.cc | 2 +- paddle/fluid/operators/multiplex_op.cc | 2 +- paddle/fluid/operators/multiplex_op.cu | 2 +- paddle/fluid/operators/multiplex_op.h | 2 +- paddle/fluid/operators/nccl/nccl_gpu_common.cc | 2 +- paddle/fluid/operators/nccl/nccl_gpu_common.h | 2 +- paddle/fluid/operators/nccl_op.cc | 2 +- paddle/fluid/operators/nccl_op.cu.cc | 2 +- paddle/fluid/operators/nccl_op_test.cu.cc | 2 +- paddle/fluid/operators/nce_op.cc | 2 +- paddle/fluid/operators/nce_op.h | 2 +- paddle/fluid/operators/net_op.cc | 2 +- paddle/fluid/operators/net_op.h | 2 +- paddle/fluid/operators/net_op_test.cc | 2 +- paddle/fluid/operators/norm_op.cc | 2 +- paddle/fluid/operators/norm_op.cu | 2 +- paddle/fluid/operators/norm_op.h | 2 +- paddle/fluid/operators/one_hot_op.cc | 2 +- paddle/fluid/operators/one_hot_op.cu | 2 +- paddle/fluid/operators/one_hot_op.h | 2 +- paddle/fluid/operators/pad_op.cc | 2 +- paddle/fluid/operators/pad_op.cu | 2 +- paddle/fluid/operators/pad_op.h | 2 +- paddle/fluid/operators/parallel_do_op.cc | 2 +- paddle/fluid/operators/pool_cudnn_op.cu.cc | 2 +- paddle/fluid/operators/pool_op.cc | 2 +- paddle/fluid/operators/pool_op.cu.cc | 2 +- paddle/fluid/operators/pool_op.h | 2 +- paddle/fluid/operators/pool_with_index_op.cc | 2 +- paddle/fluid/operators/pool_with_index_op.cu.cc | 2 +- paddle/fluid/operators/pool_with_index_op.h | 2 +- paddle/fluid/operators/precision_recall_op.cc | 2 +- paddle/fluid/operators/precision_recall_op.h | 2 +- paddle/fluid/operators/prelu_op.cc | 2 +- paddle/fluid/operators/prelu_op.cu | 2 +- paddle/fluid/operators/prelu_op.h | 2 +- paddle/fluid/operators/print_op.cc | 2 +- paddle/fluid/operators/prior_box_op.cc | 2 +- paddle/fluid/operators/prior_box_op.h | 2 +- paddle/fluid/operators/proximal_adagrad_op.cc | 2 +- paddle/fluid/operators/proximal_adagrad_op.cu | 2 +- paddle/fluid/operators/proximal_adagrad_op.h | 2 +- paddle/fluid/operators/proximal_gd_op.cc | 2 +- paddle/fluid/operators/proximal_gd_op.cu | 2 +- paddle/fluid/operators/proximal_gd_op.h | 2 +- paddle/fluid/operators/rank_loss_op.cc | 2 +- paddle/fluid/operators/rank_loss_op.cu | 2 +- paddle/fluid/operators/rank_loss_op.h | 2 +- paddle/fluid/operators/recurrent_op.cc | 2 +- paddle/fluid/operators/recv_op.cc | 2 +- paddle/fluid/operators/reduce_op.cc | 2 +- paddle/fluid/operators/reduce_op.cu | 2 +- paddle/fluid/operators/reduce_op.h | 2 +- .../operators/reorder_lod_tensor_by_rank_op.cc | 2 +- paddle/fluid/operators/reshape_op.cc | 2 +- paddle/fluid/operators/reshape_op.cu | 2 +- paddle/fluid/operators/reshape_op.h | 2 +- paddle/fluid/operators/rmsprop_op.cc | 2 +- paddle/fluid/operators/rmsprop_op.cu | 2 +- paddle/fluid/operators/rmsprop_op.h | 2 +- paddle/fluid/operators/rnn_memory_helper_op.cc | 2 +- paddle/fluid/operators/roi_pool_op.cc | 2 +- paddle/fluid/operators/roi_pool_op.cu | 2 +- paddle/fluid/operators/roi_pool_op.h | 2 +- paddle/fluid/operators/row_conv_op.cc | 2 +- paddle/fluid/operators/row_conv_op.cu | 2 +- paddle/fluid/operators/row_conv_op.h | 2 +- paddle/fluid/operators/save_combine_op.cc | 2 +- .../fluid/operators/save_load_combine_op_test.cc | 2 +- paddle/fluid/operators/save_load_op_test.cc | 2 +- paddle/fluid/operators/save_op.cc | 2 +- paddle/fluid/operators/scale_op.cc | 2 +- paddle/fluid/operators/scale_op.cu | 2 +- paddle/fluid/operators/scale_op.h | 2 +- paddle/fluid/operators/scatter.cu.h | 2 +- paddle/fluid/operators/scatter.h | 2 +- paddle/fluid/operators/scatter_op.cc | 2 +- paddle/fluid/operators/scatter_op.cu | 2 +- paddle/fluid/operators/scatter_op.h | 2 +- paddle/fluid/operators/scatter_test.cc | 2 +- paddle/fluid/operators/send_op.cc | 2 +- paddle/fluid/operators/send_recv_op_test.cc | 2 +- paddle/fluid/operators/sequence_concat_op.cc | 2 +- paddle/fluid/operators/sequence_concat_op.cu.cc | 2 +- paddle/fluid/operators/sequence_concat_op.h | 2 +- paddle/fluid/operators/sequence_conv_op.cc | 2 +- paddle/fluid/operators/sequence_conv_op.cu.cc | 2 +- paddle/fluid/operators/sequence_conv_op.h | 2 +- paddle/fluid/operators/sequence_erase_op.cc | 2 +- paddle/fluid/operators/sequence_erase_op.cu | 2 +- paddle/fluid/operators/sequence_erase_op.h | 2 +- paddle/fluid/operators/sequence_expand_op.cc | 2 +- paddle/fluid/operators/sequence_expand_op.cu | 2 +- paddle/fluid/operators/sequence_expand_op.h | 2 +- paddle/fluid/operators/sequence_pool_op.cc | 2 +- paddle/fluid/operators/sequence_pool_op.cu | 2 +- paddle/fluid/operators/sequence_pool_op.h | 2 +- paddle/fluid/operators/sequence_reshape_op.cc | 2 +- paddle/fluid/operators/sequence_reshape_op.cu | 2 +- paddle/fluid/operators/sequence_reshape_op.h | 2 +- paddle/fluid/operators/sequence_slice_op.cc | 2 +- paddle/fluid/operators/sequence_slice_op.cu | 2 +- paddle/fluid/operators/sequence_slice_op.h | 2 +- paddle/fluid/operators/sequence_softmax_op.cc | 2 +- paddle/fluid/operators/sequence_softmax_op.cu.cc | 2 +- paddle/fluid/operators/sequence_softmax_op.h | 2 +- paddle/fluid/operators/sgd_op.cc | 2 +- paddle/fluid/operators/sgd_op.cu | 2 +- paddle/fluid/operators/sgd_op.h | 2 +- paddle/fluid/operators/shrink_rnn_memory_op.cc | 2 +- .../sigmoid_cross_entropy_with_logits_op.cc | 2 +- .../sigmoid_cross_entropy_with_logits_op.cu | 2 +- .../sigmoid_cross_entropy_with_logits_op.h | 2 +- paddle/fluid/operators/sign_op.cc | 2 +- paddle/fluid/operators/sign_op.cu | 2 +- paddle/fluid/operators/sign_op.h | 2 +- paddle/fluid/operators/smooth_l1_loss_op.cc | 2 +- paddle/fluid/operators/smooth_l1_loss_op.cu | 2 +- paddle/fluid/operators/smooth_l1_loss_op.h | 2 +- paddle/fluid/operators/softmax_op.cc | 2 +- paddle/fluid/operators/softmax_op.cu.cc | 2 +- paddle/fluid/operators/softmax_op.h | 2 +- .../operators/softmax_with_cross_entropy_op.cc | 2 +- .../operators/softmax_with_cross_entropy_op.cu | 2 +- .../operators/softmax_with_cross_entropy_op.h | 2 +- paddle/fluid/operators/split_lod_tensor_op.cc | 2 +- paddle/fluid/operators/split_op.cc | 2 +- paddle/fluid/operators/split_op.cu.cc | 2 +- paddle/fluid/operators/split_op.h | 2 +- paddle/fluid/operators/split_selected_rows_op.cc | 2 +- paddle/fluid/operators/split_selected_rows_op.cu | 2 +- paddle/fluid/operators/split_selected_rows_op.h | 2 +- paddle/fluid/operators/spp_op.cc | 2 +- paddle/fluid/operators/spp_op.cu.cc | 2 +- paddle/fluid/operators/spp_op.h | 2 +- paddle/fluid/operators/squared_l2_distance_op.cc | 2 +- paddle/fluid/operators/squared_l2_distance_op.cu | 2 +- paddle/fluid/operators/squared_l2_distance_op.h | 2 +- paddle/fluid/operators/squared_l2_norm_op.cc | 2 +- paddle/fluid/operators/squared_l2_norm_op.cu | 2 +- paddle/fluid/operators/squared_l2_norm_op.h | 2 +- paddle/fluid/operators/strided_memcpy.h | 2 +- paddle/fluid/operators/strided_memcpy_test.cc | 2 +- paddle/fluid/operators/sum_op.cc | 2 +- paddle/fluid/operators/sum_op.cu | 2 +- paddle/fluid/operators/sum_op.h | 2 +- paddle/fluid/operators/target_assign_op.cc | 2 +- paddle/fluid/operators/target_assign_op.cu | 2 +- paddle/fluid/operators/target_assign_op.h | 2 +- .../fluid/operators/tensor_array_read_write_op.cc | 2 +- paddle/fluid/operators/top_k_op.cc | 2 +- paddle/fluid/operators/top_k_op.cu | 2 +- paddle/fluid/operators/top_k_op.h | 2 +- paddle/fluid/operators/transpose_op.cc | 2 +- paddle/fluid/operators/transpose_op.cu.cc | 2 +- paddle/fluid/operators/transpose_op.h | 2 +- paddle/fluid/operators/uniform_random_op.cc | 2 +- paddle/fluid/operators/uniform_random_op.cu | 2 +- paddle/fluid/operators/unpool_op.cc | 2 +- paddle/fluid/operators/unpool_op.cu.cc | 2 +- paddle/fluid/operators/unpool_op.h | 2 +- paddle/fluid/operators/warpctc_op.cc | 2 +- paddle/fluid/operators/warpctc_op.cu.cc | 2 +- paddle/fluid/operators/warpctc_op.h | 2 +- paddle/fluid/operators/while_op.cc | 2 +- paddle/fluid/platform/assert.h | 2 +- paddle/fluid/platform/call_once.h | 2 +- paddle/fluid/platform/cpu_info.cc | 2 +- paddle/fluid/platform/cpu_info.h | 2 +- paddle/fluid/platform/cpu_info_test.cc | 2 +- paddle/fluid/platform/cuda_helper.h | 2 +- paddle/fluid/platform/cuda_profiler.h | 2 +- paddle/fluid/platform/cudnn_helper.h | 2 +- paddle/fluid/platform/cudnn_helper_test.cc | 2 +- paddle/fluid/platform/details/device_ptr_cast.h | 2 +- paddle/fluid/platform/device_context.cc | 2 +- paddle/fluid/platform/device_context.h | 2 +- paddle/fluid/platform/device_context_test.cu | 2 +- paddle/fluid/platform/dynload/cublas.cc | 2 +- paddle/fluid/platform/dynload/cublas.h | 2 +- paddle/fluid/platform/dynload/cudnn.cc | 2 +- paddle/fluid/platform/dynload/cudnn.h | 2 +- paddle/fluid/platform/dynload/curand.cc | 2 +- paddle/fluid/platform/dynload/curand.h | 2 +- paddle/fluid/platform/dynload/dynamic_loader.cc | 2 +- paddle/fluid/platform/dynload/dynamic_loader.h | 2 +- paddle/fluid/platform/dynload/nccl.cc | 2 +- paddle/fluid/platform/dynload/nccl.h | 2 +- paddle/fluid/platform/dynload/warpctc.cc | 2 +- paddle/fluid/platform/dynload/warpctc.h | 2 +- paddle/fluid/platform/enforce.cc | 2 +- paddle/fluid/platform/enforce.h | 2 +- paddle/fluid/platform/enforce_test.cc | 2 +- paddle/fluid/platform/for_range.h | 2 +- paddle/fluid/platform/gpu_info.cc | 2 +- paddle/fluid/platform/gpu_info.h | 2 +- paddle/fluid/platform/hostdevice.h | 2 +- paddle/fluid/platform/macros.h | 2 +- paddle/fluid/platform/mkldnn_helper.h | 2 +- paddle/fluid/platform/nccl_test.cu | 2 +- paddle/fluid/platform/place.cc | 2 +- paddle/fluid/platform/place.h | 2 +- paddle/fluid/platform/place_test.cc | 2 +- paddle/fluid/platform/profiler.cc | 2 +- paddle/fluid/platform/profiler.h | 2 +- paddle/fluid/platform/profiler_test.cc | 2 +- paddle/fluid/platform/transform.h | 2 +- paddle/fluid/platform/transform_test.cu | 2 +- paddle/fluid/platform/variant.h | 2 +- paddle/fluid/pybind/const_value.cc | 2 +- paddle/fluid/pybind/const_value.h | 2 +- paddle/fluid/pybind/exception.cc | 2 +- paddle/fluid/pybind/exception.h | 2 +- paddle/fluid/pybind/protobuf.cc | 2 +- paddle/fluid/pybind/protobuf.h | 2 +- paddle/fluid/pybind/pybind.cc | 2 +- paddle/fluid/pybind/tensor_py.h | 2 +- paddle/fluid/string/piece.cc | 2 +- paddle/fluid/string/piece.h | 2 +- paddle/fluid/string/piece_test.cc | 2 +- paddle/fluid/string/printf.h | 2 +- paddle/fluid/string/printf_test.cc | 2 +- paddle/fluid/string/tinyformat/tinyformat.h | 2 +- paddle/fluid/string/to_string.h | 2 +- paddle/fluid/string/to_string_test.cc | 2 +- paddle/function/BlockExpandOp.cpp | 2 +- paddle/function/BlockExpandOpTest.cpp | 2 +- paddle/function/BufferArg.cpp | 2 +- paddle/function/BufferArg.h | 2 +- paddle/function/BufferArgTest.cpp | 2 +- paddle/function/ContextProjectionOp.cpp | 2 +- paddle/function/ContextProjectionOp.h | 2 +- paddle/function/ContextProjectionOpGpu.cu | 2 +- paddle/function/ContextProjectionOpTest.cpp | 2 +- paddle/function/ConvOp.h | 2 +- paddle/function/ConvOpTest.h | 2 +- paddle/function/CosSimOp.cpp | 2 +- paddle/function/CosSimOp.h | 2 +- paddle/function/CosSimOpGpu.cu | 2 +- paddle/function/CosSimOpTest.cpp | 2 +- paddle/function/CropOp.cpp | 2 +- paddle/function/CropOp.h | 2 +- paddle/function/CropOpGpu.cu | 2 +- paddle/function/CropOpTest.cpp | 2 +- paddle/function/CrossMapNormalOp.cpp | 2 +- paddle/function/CrossMapNormalOp.h | 2 +- paddle/function/CrossMapNormalOpGpu.cu | 2 +- paddle/function/CrossMapNormalOpTest.cpp | 2 +- paddle/function/DepthwiseConvOp.cpp | 2 +- paddle/function/DepthwiseConvOp.h | 2 +- paddle/function/DepthwiseConvOpGpu.cu | 2 +- paddle/function/DepthwiseConvOpTest.cpp | 2 +- paddle/function/EigenGemm.cpp | 2 +- paddle/function/Function.cpp | 2 +- paddle/function/Function.h | 2 +- paddle/function/FunctionTest.cpp | 2 +- paddle/function/FunctionTest.h | 2 +- paddle/function/GemmConvOp.cpp | 2 +- paddle/function/GemmConvOpTest.cpp | 2 +- paddle/function/GemmFunctor.cpp | 2 +- paddle/function/GemmFunctor.h | 2 +- paddle/function/GruFunctor.h | 2 +- paddle/function/Im2Col.h | 2 +- paddle/function/Im2ColOp.cpp | 2 +- paddle/function/Im2ColOpGpu.cu | 2 +- paddle/function/Im2ColTest.cpp | 2 +- paddle/function/MulOp.cpp | 2 +- paddle/function/MulOp.h | 2 +- paddle/function/MulOpGpu.cu | 2 +- paddle/function/MulOpTest.cpp | 2 +- paddle/function/NaiveConvOp.cpp | 2 +- paddle/function/PadOp.cpp | 2 +- paddle/function/PadOp.h | 2 +- paddle/function/PadOpGpu.cu | 2 +- paddle/function/PadOpTest.cpp | 2 +- paddle/function/RowConvOp.cpp | 2 +- paddle/function/RowConvOp.h | 2 +- paddle/function/RowConvOpGpu.cu | 2 +- paddle/function/RowConvOpTest.cpp | 2 +- paddle/function/ScaleSubRegionOp.cpp | 2 +- paddle/function/ScaleSubRegionOp.h | 2 +- paddle/function/ScaleSubRegionOpGpu.cu | 2 +- paddle/function/ScaleSubRegionOpTest.cpp | 2 +- paddle/function/SwitchOp.cpp | 2 +- paddle/function/SwitchOp.h | 2 +- paddle/function/SwitchOpTest.cpp | 2 +- paddle/function/TensorShape.h | 2 +- paddle/function/TensorShapeTest.cpp | 2 +- paddle/function/TensorType.h | 2 +- paddle/function/TensorTypeTest.cpp | 2 +- paddle/function/neon/NeonDepthwiseConv.cpp | 2 +- paddle/function/neon/NeonDepthwiseConv.h | 2 +- .../function/neon/NeonDepthwiseConvTranspose.cpp | 2 +- paddle/function/neon/neon_util.h | 2 +- paddle/function/nnpack/NNPACKConvOp.cpp | 2 +- paddle/function/nnpack/NNPACKConvOpTest.cpp | 2 +- paddle/gserver/activations/ActivationFunction.cpp | 2 +- paddle/gserver/activations/ActivationFunction.h | 2 +- paddle/gserver/activations/MKLDNNActivation.cpp | 2 +- paddle/gserver/activations/MKLDNNActivation.h | 2 +- paddle/gserver/dataproviders/DataProvider.cpp | 2 +- paddle/gserver/dataproviders/DataProvider.h | 2 +- paddle/gserver/dataproviders/DataProviderGroup.h | 2 +- paddle/gserver/dataproviders/MultiDataProvider.cpp | 2 +- paddle/gserver/dataproviders/MultiDataProvider.h | 2 +- paddle/gserver/dataproviders/ProtoReader.h | 2 +- paddle/gserver/dataproviders/PyDataProvider.cpp | 2 +- paddle/gserver/dataproviders/PyDataProvider.h | 2 +- paddle/gserver/dataproviders/PyDataProvider2.cpp | 2 +- paddle/gserver/evaluators/CTCErrorEvaluator.cpp | 2 +- paddle/gserver/evaluators/ChunkEvaluator.cpp | 2 +- .../gserver/evaluators/DetectionMAPEvaluator.cpp | 2 +- paddle/gserver/evaluators/Evaluator.cpp | 2 +- paddle/gserver/evaluators/Evaluator.h | 2 +- .../gserver/gradientmachines/GradientMachine.cpp | 2 +- paddle/gserver/gradientmachines/GradientMachine.h | 2 +- .../gradientmachines/GradientMachineMode.cpp | 2 +- .../gserver/gradientmachines/GradientMachineMode.h | 2 +- .../gradientmachines/MultiGradientMachine.cpp | 2 +- .../gradientmachines/MultiGradientMachine.h | 2 +- paddle/gserver/gradientmachines/MultiNetwork.cpp | 2 +- paddle/gserver/gradientmachines/MultiNetwork.h | 2 +- paddle/gserver/gradientmachines/NeuralNetwork.cpp | 2 +- paddle/gserver/gradientmachines/NeuralNetwork.h | 2 +- .../gradientmachines/ParallelNeuralNetwork.cpp | 2 +- .../gradientmachines/ParallelNeuralNetwork.h | 2 +- .../gradientmachines/RecurrentGradientMachine.cpp | 2 +- .../gradientmachines/RecurrentGradientMachine.h | 2 +- paddle/gserver/layers/AddtoLayer.cpp | 2 +- paddle/gserver/layers/AddtoLayer.h | 2 +- paddle/gserver/layers/AgentLayer.cpp | 2 +- paddle/gserver/layers/AgentLayer.h | 2 +- paddle/gserver/layers/AverageLayer.cpp | 2 +- paddle/gserver/layers/AverageLayer.h | 2 +- paddle/gserver/layers/BatchNormBaseLayer.cpp | 2 +- paddle/gserver/layers/BatchNormBaseLayer.h | 2 +- paddle/gserver/layers/BatchNormalizationLayer.cpp | 2 +- paddle/gserver/layers/BatchNormalizationLayer.h | 2 +- paddle/gserver/layers/BilinearInterpLayer.cpp | 2 +- paddle/gserver/layers/BilinearInterpLayer.h | 2 +- paddle/gserver/layers/BlockExpandLayer.cpp | 2 +- paddle/gserver/layers/BlockExpandLayer.h | 2 +- paddle/gserver/layers/CRFDecodingLayer.cpp | 2 +- paddle/gserver/layers/CRFDecodingLayer.h | 2 +- paddle/gserver/layers/CRFLayer.cpp | 2 +- paddle/gserver/layers/CRFLayer.h | 2 +- paddle/gserver/layers/CTCLayer.cpp | 2 +- paddle/gserver/layers/CTCLayer.h | 2 +- paddle/gserver/layers/ClipLayer.cpp | 2 +- paddle/gserver/layers/ConcatenateLayer.cpp | 2 +- paddle/gserver/layers/ContextProjection.cpp | 2 +- paddle/gserver/layers/ContextProjection.h | 2 +- paddle/gserver/layers/Conv3DLayer.cpp | 2 +- paddle/gserver/layers/Conv3DLayer.h | 2 +- paddle/gserver/layers/ConvBaseLayer.cpp | 2 +- paddle/gserver/layers/ConvBaseLayer.h | 2 +- paddle/gserver/layers/ConvBaseOperator.cpp | 2 +- paddle/gserver/layers/ConvBaseOperator.h | 2 +- paddle/gserver/layers/ConvBaseProjection.cpp | 2 +- paddle/gserver/layers/ConvBaseProjection.h | 2 +- paddle/gserver/layers/ConvOperator.cpp | 2 +- paddle/gserver/layers/ConvOperator.h | 2 +- paddle/gserver/layers/ConvProjection.cpp | 2 +- paddle/gserver/layers/ConvProjection.h | 2 +- paddle/gserver/layers/ConvShiftLayer.cpp | 2 +- paddle/gserver/layers/ConvTransOperator.cpp | 2 +- paddle/gserver/layers/ConvTransOperator.h | 2 +- paddle/gserver/layers/ConvTransProjection.cpp | 2 +- paddle/gserver/layers/ConvTransProjection.h | 2 +- paddle/gserver/layers/ConvexCombinationLayer.cpp | 2 +- paddle/gserver/layers/CosSimLayer.cpp | 2 +- paddle/gserver/layers/CosSimLayer.h | 2 +- paddle/gserver/layers/CosSimVecMatLayer.cpp | 2 +- paddle/gserver/layers/CostLayer.cpp | 2 +- paddle/gserver/layers/CostLayer.h | 2 +- paddle/gserver/layers/CropLayer.cpp | 2 +- paddle/gserver/layers/CropLayer.h | 2 +- paddle/gserver/layers/CrossChannelNormLayer.cpp | 2 +- paddle/gserver/layers/CrossEntropyOverBeam.cpp | 2 +- paddle/gserver/layers/CrossEntropyOverBeam.h | 2 +- paddle/gserver/layers/CudnnBatchNormLayer.cpp | 2 +- paddle/gserver/layers/CudnnBatchNormLayer.h | 2 +- paddle/gserver/layers/CudnnConvBaseLayer.cpp | 2 +- paddle/gserver/layers/CudnnConvBaseLayer.h | 2 +- paddle/gserver/layers/CudnnPoolLayer.cpp | 2 +- paddle/gserver/layers/CudnnPoolLayer.h | 2 +- paddle/gserver/layers/DataLayer.cpp | 2 +- paddle/gserver/layers/DataLayer.h | 2 +- paddle/gserver/layers/DataNormLayer.cpp | 2 +- paddle/gserver/layers/DataNormLayer.h | 2 +- paddle/gserver/layers/DeConv3DLayer.cpp | 2 +- paddle/gserver/layers/DeConv3DLayer.h | 2 +- paddle/gserver/layers/DetectionOutputLayer.cpp | 2 +- paddle/gserver/layers/DetectionOutputLayer.h | 2 +- paddle/gserver/layers/DetectionUtil.cpp | 2 +- paddle/gserver/layers/DetectionUtil.h | 2 +- paddle/gserver/layers/DotMulOperator.cpp | 2 +- paddle/gserver/layers/DotMulProjection.cpp | 2 +- paddle/gserver/layers/DotProdLayer.cpp | 2 +- paddle/gserver/layers/EosIdCheckLayer.cpp | 2 +- paddle/gserver/layers/ExpandConvLayer.cpp | 2 +- paddle/gserver/layers/ExpandConvLayer.h | 2 +- paddle/gserver/layers/ExpandLayer.cpp | 2 +- paddle/gserver/layers/ExpandLayer.h | 2 +- .../gserver/layers/FactorizationMachineLayer.cpp | 2 +- paddle/gserver/layers/FactorizationMachineLayer.h | 2 +- paddle/gserver/layers/FeatureMapExpandLayer.cpp | 2 +- paddle/gserver/layers/FullMatrixProjection.cpp | 2 +- paddle/gserver/layers/FullMatrixProjection.h | 2 +- paddle/gserver/layers/FullyConnectedLayer.cpp | 2 +- paddle/gserver/layers/FullyConnectedLayer.h | 2 +- paddle/gserver/layers/GatedRecurrentLayer.cpp | 2 +- paddle/gserver/layers/GatedRecurrentLayer.h | 2 +- paddle/gserver/layers/GetOutputLayer.cpp | 2 +- paddle/gserver/layers/GruCompute.cpp | 2 +- paddle/gserver/layers/GruCompute.cu | 2 +- paddle/gserver/layers/GruCompute.h | 2 +- paddle/gserver/layers/GruStepLayer.cpp | 2 +- paddle/gserver/layers/HierarchicalSigmoidLayer.cpp | 2 +- paddle/gserver/layers/HierarchicalSigmoidLayer.h | 2 +- paddle/gserver/layers/IdentityProjection.cpp | 2 +- paddle/gserver/layers/InterpolationLayer.cpp | 2 +- paddle/gserver/layers/KmaxSeqScoreLayer.cpp | 2 +- paddle/gserver/layers/L2DistanceLayer.cpp | 2 +- paddle/gserver/layers/L2DistanceLayer.h | 2 +- paddle/gserver/layers/Layer.cpp | 2 +- paddle/gserver/layers/Layer.h | 2 +- paddle/gserver/layers/LinearChainCRF.cpp | 2 +- paddle/gserver/layers/LinearChainCRF.h | 2 +- paddle/gserver/layers/LinearChainCTC.cpp | 2 +- paddle/gserver/layers/LinearChainCTC.h | 2 +- paddle/gserver/layers/LstmCompute.cpp | 2 +- paddle/gserver/layers/LstmCompute.cu | 2 +- paddle/gserver/layers/LstmCompute.h | 2 +- paddle/gserver/layers/LstmLayer.cpp | 2 +- paddle/gserver/layers/LstmLayer.h | 2 +- paddle/gserver/layers/LstmStepLayer.cpp | 2 +- paddle/gserver/layers/MDLstmLayer.cpp | 2 +- paddle/gserver/layers/MKLDNNAddtoLayer.cpp | 2 +- paddle/gserver/layers/MKLDNNAddtoLayer.h | 2 +- paddle/gserver/layers/MKLDNNBase.h | 2 +- paddle/gserver/layers/MKLDNNBatchNormLayer.cpp | 2 +- paddle/gserver/layers/MKLDNNBatchNormLayer.h | 2 +- paddle/gserver/layers/MKLDNNConcatLayer.cpp | 2 +- paddle/gserver/layers/MKLDNNConcatLayer.h | 2 +- paddle/gserver/layers/MKLDNNConvLayer.cpp | 2 +- paddle/gserver/layers/MKLDNNConvLayer.h | 2 +- paddle/gserver/layers/MKLDNNFcLayer.cpp | 2 +- paddle/gserver/layers/MKLDNNFcLayer.h | 2 +- paddle/gserver/layers/MKLDNNLRNLayer.cpp | 2 +- paddle/gserver/layers/MKLDNNLRNLayer.h | 2 +- paddle/gserver/layers/MKLDNNLayer.cpp | 2 +- paddle/gserver/layers/MKLDNNLayer.h | 2 +- paddle/gserver/layers/MKLDNNPoolLayer.cpp | 2 +- paddle/gserver/layers/MKLDNNPoolLayer.h | 2 +- paddle/gserver/layers/MKLPackedRecurrentLayer.cpp | 2 +- paddle/gserver/layers/MKLPackedRecurrentLayer.h | 2 +- paddle/gserver/layers/MKLPackedWeight.h | 2 +- paddle/gserver/layers/MaxIdLayer.cpp | 2 +- paddle/gserver/layers/MaxLayer.cpp | 2 +- paddle/gserver/layers/MaxLayer.h | 2 +- paddle/gserver/layers/MaxOutLayer.cpp | 2 +- paddle/gserver/layers/MaxOutLayer.h | 2 +- paddle/gserver/layers/MaxPoolWithMaskLayer.cpp | 2 +- paddle/gserver/layers/MaxPoolWithMaskLayer.h | 2 +- paddle/gserver/layers/MixedLayer.cpp | 2 +- paddle/gserver/layers/MixedLayer.h | 2 +- paddle/gserver/layers/MultiBoxLossLayer.cpp | 2 +- paddle/gserver/layers/MultinomialSampler.cpp | 2 +- paddle/gserver/layers/MultinomialSampler.h | 2 +- paddle/gserver/layers/MultiplexLayer.cpp | 2 +- paddle/gserver/layers/NCELayer.cpp | 2 +- paddle/gserver/layers/NormLayer.cpp | 2 +- paddle/gserver/layers/NormLayer.h | 2 +- paddle/gserver/layers/NormProjectionLayer.cpp | 2 +- paddle/gserver/layers/NormProjectionLayer.h | 2 +- paddle/gserver/layers/Operator.cpp | 2 +- paddle/gserver/layers/Operator.h | 2 +- paddle/gserver/layers/OuterProdLayer.cpp | 2 +- paddle/gserver/layers/PadLayer.cpp | 2 +- paddle/gserver/layers/PadLayer.h | 2 +- paddle/gserver/layers/ParameterReluLayer.cpp | 2 +- paddle/gserver/layers/ParameterReluLayer.h | 2 +- paddle/gserver/layers/Pool3DLayer.cpp | 2 +- paddle/gserver/layers/Pool3DLayer.h | 2 +- paddle/gserver/layers/PoolLayer.cpp | 2 +- paddle/gserver/layers/PoolLayer.h | 2 +- paddle/gserver/layers/PoolProjection.cpp | 2 +- paddle/gserver/layers/PoolProjection.h | 2 +- paddle/gserver/layers/PoolProjectionLayer.cpp | 2 +- paddle/gserver/layers/PoolProjectionLayer.h | 2 +- paddle/gserver/layers/PowerLayer.cpp | 2 +- paddle/gserver/layers/PrintLayer.cpp | 2 +- paddle/gserver/layers/PriorBox.cpp | 2 +- paddle/gserver/layers/Projection.cpp | 2 +- paddle/gserver/layers/Projection.h | 2 +- paddle/gserver/layers/ROIPoolLayer.cpp | 2 +- paddle/gserver/layers/ROIPoolLayer.h | 2 +- paddle/gserver/layers/RecurrentLayer.cpp | 2 +- paddle/gserver/layers/RecurrentLayer.h | 2 +- paddle/gserver/layers/RecurrentLayerGroup.cpp | 2 +- paddle/gserver/layers/ResizeLayer.cpp | 2 +- paddle/gserver/layers/RotateLayer.cpp | 2 +- paddle/gserver/layers/RotateLayer.h | 2 +- paddle/gserver/layers/RowConvLayer.cpp | 2 +- paddle/gserver/layers/RowConvLayer.h | 2 +- paddle/gserver/layers/RowL2NormLayer.cpp | 2 +- paddle/gserver/layers/SamplingIdLayer.cpp | 2 +- paddle/gserver/layers/ScaleShiftLayer.cpp | 2 +- paddle/gserver/layers/ScaleSubRegionLayer.cpp | 2 +- paddle/gserver/layers/ScaleSubRegionLayer.h | 2 +- paddle/gserver/layers/ScalingLayer.cpp | 2 +- paddle/gserver/layers/ScalingProjection.cpp | 2 +- .../layers/SelectiveFullyConnectedLayer.cpp | 2 +- .../gserver/layers/SelectiveFullyConnectedLayer.h | 2 +- paddle/gserver/layers/SequenceConcatLayer.cpp | 2 +- .../gserver/layers/SequenceLastInstanceLayer.cpp | 2 +- paddle/gserver/layers/SequencePoolLayer.cpp | 2 +- paddle/gserver/layers/SequencePoolLayer.h | 2 +- paddle/gserver/layers/SequenceReshapeLayer.cpp | 2 +- paddle/gserver/layers/SequenceSliceLayer.cpp | 2 +- paddle/gserver/layers/SequenceToBatch.cpp | 2 +- paddle/gserver/layers/SequenceToBatch.h | 2 +- paddle/gserver/layers/SliceProjection.cpp | 2 +- paddle/gserver/layers/SlopeInterceptLayer.cpp | 2 +- paddle/gserver/layers/SpatialPyramidPoolLayer.cpp | 2 +- paddle/gserver/layers/SpatialPyramidPoolLayer.h | 2 +- paddle/gserver/layers/SubNestedSequenceLayer.cpp | 2 +- paddle/gserver/layers/SubSequenceLayer.cpp | 2 +- paddle/gserver/layers/SumToOneNormLayer.cpp | 2 +- paddle/gserver/layers/SwitchOrderLayer.cpp | 2 +- paddle/gserver/layers/SwitchOrderLayer.h | 2 +- paddle/gserver/layers/TableProjection.cpp | 2 +- paddle/gserver/layers/TableProjection.h | 2 +- paddle/gserver/layers/TensorLayer.cpp | 2 +- paddle/gserver/layers/TensorLayer.h | 2 +- paddle/gserver/layers/TransLayer.cpp | 2 +- paddle/gserver/layers/TransLayer.h | 2 +- .../layers/TransposedFullMatrixProjection.cpp | 2 +- paddle/gserver/layers/ValidationLayer.cpp | 2 +- paddle/gserver/layers/ValidationLayer.h | 2 +- paddle/gserver/layers/WarpCTCLayer.cpp | 2 +- paddle/gserver/layers/WarpCTCLayer.h | 2 +- paddle/gserver/tests/LayerGradUtil.cpp | 2 +- paddle/gserver/tests/LayerGradUtil.h | 2 +- paddle/gserver/tests/MKLDNNTester.cpp | 2 +- paddle/gserver/tests/MKLDNNTester.h | 2 +- paddle/gserver/tests/img_conv_cudnn.py | 2 +- paddle/gserver/tests/img_conv_exconv.py | 2 +- paddle/gserver/tests/pyDataProvider.py | 2 +- paddle/gserver/tests/rnn_data_provider.py | 2 +- paddle/gserver/tests/sequenceGen.py | 2 +- .../sequence_nest_rnn_multi_unequalength_inputs.py | 2 +- paddle/gserver/tests/sequence_recurrent.py | 2 +- paddle/gserver/tests/sequence_recurrent_group.py | 2 +- .../gserver/tests/sequence_rnn_matched_inputs.py | 2 +- paddle/gserver/tests/sequence_rnn_mixed_inputs.py | 2 +- .../sequence_rnn_multi_unequalength_inputs.py | 2 +- paddle/gserver/tests/test_ActivationGrad.cpp | 2 +- paddle/gserver/tests/test_BatchNorm.cpp | 2 +- paddle/gserver/tests/test_CRFLayerGrad.cpp | 2 +- paddle/gserver/tests/test_CompareSparse.cpp | 2 +- paddle/gserver/tests/test_CompareTwoNets.cpp | 2 +- paddle/gserver/tests/test_ConvTrans.cpp | 2 +- paddle/gserver/tests/test_ConvUnify.cpp | 2 +- .../tests/test_CrossEntropyOverBeamGrad.cpp | 2 +- paddle/gserver/tests/test_DetectionOutput.cpp | 2 +- paddle/gserver/tests/test_Evaluator.cpp | 2 +- paddle/gserver/tests/test_Expand.cpp | 2 +- paddle/gserver/tests/test_KmaxSeqScore.cpp | 2 +- paddle/gserver/tests/test_LayerGrad.cpp | 2 +- paddle/gserver/tests/test_LinearChainCRF.cpp | 2 +- paddle/gserver/tests/test_MKLDNN.cpp | 2 +- .../tests/test_MaxPoolingWithMaskOutput.cpp | 2 +- paddle/gserver/tests/test_MultinomialSampler.cpp | 2 +- paddle/gserver/tests/test_NetworkCompare.cpp | 2 +- paddle/gserver/tests/test_PriorBox.cpp | 2 +- paddle/gserver/tests/test_PyDataProvider.cpp | 2 +- paddle/gserver/tests/test_PyDataProvider2.cpp | 2 +- paddle/gserver/tests/test_PyDataProvider2.py | 2 +- .../tests/test_RecurrentGradientMachine.cpp | 2 +- paddle/gserver/tests/test_RecurrentLayer.cpp | 2 +- paddle/gserver/tests/test_SelectiveFCLayer.cpp | 2 +- paddle/gserver/tests/test_SeqSliceLayerGrad.cpp | 2 +- paddle/gserver/tests/test_WarpCTCLayer.cpp | 2 +- paddle/math/Allocator.h | 2 +- paddle/math/BaseMatrix.cu | 2 +- paddle/math/BaseMatrix.h | 2 +- paddle/math/CpuSparseMatrix.cpp | 2 +- paddle/math/CpuSparseMatrix.h | 2 +- paddle/math/ExecViaCpu.h | 2 +- paddle/math/MKLDNNMatrix.cpp | 2 +- paddle/math/MKLDNNMatrix.h | 2 +- paddle/math/MathFunctions.cpp | 2 +- paddle/math/MathFunctions.h | 2 +- paddle/math/MathUtils.cpp | 2 +- paddle/math/MathUtils.h | 2 +- paddle/math/Matrix.cpp | 2 +- paddle/math/Matrix.h | 2 +- paddle/math/MatrixBitCode.cpp | 2 +- paddle/math/MemoryHandle.cpp | 2 +- paddle/math/MemoryHandle.h | 2 +- paddle/math/NEONFunctions.cpp | 2 +- paddle/math/NEONFunctions.h | 2 +- paddle/math/PoolAllocator.cpp | 2 +- paddle/math/PoolAllocator.h | 2 +- paddle/math/RowBuffer.h | 2 +- paddle/math/SIMDFunctions.cpp | 2 +- paddle/math/SIMDFunctions.h | 2 +- paddle/math/SparseMatrix.cpp | 2 +- paddle/math/SparseMatrix.h | 2 +- paddle/math/SparseRowMatrix.cpp | 2 +- paddle/math/SparseRowMatrix.h | 2 +- paddle/math/Storage.cpp | 2 +- paddle/math/Storage.h | 2 +- paddle/math/TensorApply.h | 2 +- paddle/math/TensorAssign.h | 2 +- paddle/math/TensorEvaluate.h | 2 +- paddle/math/TensorExpression.h | 2 +- paddle/math/TrainingAlgorithmOp.cu | 2 +- paddle/math/TrainingAlgorithmOp.h | 2 +- paddle/math/Vector.cpp | 2 +- paddle/math/Vector.h | 2 +- paddle/math/float16.h | 2 +- paddle/math/tests/OriginalOptimizerApi.h | 2 +- paddle/math/tests/PerfUtils.h | 2 +- paddle/math/tests/TensorCheck.h | 2 +- paddle/math/tests/TestUtils.h | 2 +- paddle/math/tests/test_Allocator.cpp | 2 +- paddle/math/tests/test_BaseMatrix.cpp | 2 +- paddle/math/tests/test_CpuGpuVector.cpp | 2 +- paddle/math/tests/test_ExecViaCpu.cpp | 2 +- paddle/math/tests/test_FPException.cpp | 2 +- paddle/math/tests/test_GpuProfiler.cpp | 2 +- paddle/math/tests/test_Matrix.cpp | 2 +- paddle/math/tests/test_RowBuffer.cpp | 2 +- paddle/math/tests/test_SIMDFunctions.cpp | 2 +- paddle/math/tests/test_SparseMatrix.cpp | 2 +- paddle/math/tests/test_Tensor.cu | 2 +- paddle/math/tests/test_TrainingAlgorithm.cpp | 2 +- paddle/math/tests/test_batchTranspose.cpp | 2 +- paddle/math/tests/test_float16.cpp | 2 +- paddle/math/tests/test_float16.cu | 2 +- paddle/math/tests/test_lazyAssign.cu | 2 +- paddle/math/tests/test_matrixCompare.cpp | 2 +- paddle/math/tests/test_matrixUtil.h | 2 +- paddle/math/tests/test_perturbation.cpp | 2 +- paddle/math/tests/test_sparseMatrixCompare.cpp | 2 +- paddle/optimizer/adadelta_optimizer.cc | 2 +- paddle/optimizer/adadelta_optimizer.h | 2 +- paddle/optimizer/adagrad_optimizer.cc | 2 +- paddle/optimizer/adagrad_optimizer.h | 2 +- paddle/optimizer/adam_optimizer.cc | 2 +- paddle/optimizer/adam_optimizer.h | 2 +- paddle/optimizer/lr_policy.h | 2 +- paddle/optimizer/optimizer.cc | 2 +- paddle/optimizer/optimizer.h | 2 +- paddle/optimizer/parameter_optimizer.cc | 2 +- paddle/optimizer/parameter_optimizer.h | 2 +- paddle/optimizer/parameter_optimizer_test.cc | 2 +- paddle/optimizer/serialization.h | 2 +- paddle/optimizer/serialization_test.cc | 2 +- paddle/optimizer/sgd_optimizer.cc | 2 +- paddle/optimizer/sgd_optimizer.h | 2 +- paddle/optimizer/tensor.h | 2 +- paddle/parameter/Argument.cpp | 2 +- paddle/parameter/Argument.h | 2 +- paddle/parameter/AverageOptimizer.cpp | 2 +- paddle/parameter/AverageOptimizer.h | 2 +- paddle/parameter/FirstOrderOptimizer.cpp | 2 +- paddle/parameter/FirstOrderOptimizer.h | 2 +- paddle/parameter/LearningRateScheduler.cpp | 2 +- paddle/parameter/LearningRateScheduler.h | 2 +- paddle/parameter/OptimizerFunctions.cpp | 2 +- paddle/parameter/OptimizerFunctions.h | 2 +- paddle/parameter/OptimizerWithRegularizer.cpp | 2 +- paddle/parameter/OptimizerWithRegularizer.h | 2 +- paddle/parameter/Parameter.cpp | 2 +- paddle/parameter/Parameter.h | 2 +- paddle/parameter/ParameterOptimizer.cpp | 2 +- paddle/parameter/ParameterOptimizer.h | 2 +- paddle/parameter/ParameterUpdateFunctions.cpp | 2 +- paddle/parameter/ParameterUpdateFunctions.h | 2 +- paddle/parameter/ParameterUpdaterBase.cpp | 2 +- paddle/parameter/ParameterUpdaterBase.h | 2 +- paddle/parameter/ParameterUpdaterHook.cpp | 2 +- paddle/parameter/ParameterUpdaterHook.h | 2 +- paddle/parameter/Regularizer.cpp | 2 +- paddle/parameter/Regularizer.h | 2 +- paddle/parameter/ThreadLocalBuffer.cpp | 2 +- paddle/parameter/ThreadLocalBuffer.h | 2 +- paddle/parameter/Weight.cpp | 2 +- paddle/parameter/Weight.h | 2 +- paddle/parameter/tests/test_argument.cpp | 2 +- paddle/parameter/tests/test_common.cpp | 2 +- paddle/pserver/BaseClient.cpp | 2 +- paddle/pserver/BaseClient.h | 2 +- paddle/pserver/LightNetwork.cpp | 2 +- paddle/pserver/LightNetwork.h | 2 +- paddle/pserver/ParameterClient2.cpp | 2 +- paddle/pserver/ParameterClient2.h | 2 +- paddle/pserver/ParameterServer2.cpp | 2 +- paddle/pserver/ParameterServer2.h | 2 +- paddle/pserver/ParameterServer2Main.cpp | 2 +- paddle/pserver/ParameterServerController.cpp | 2 +- paddle/pserver/ParameterServerController.h | 2 +- paddle/pserver/ProtoServer.cpp | 2 +- paddle/pserver/ProtoServer.h | 2 +- paddle/pserver/RDMANetwork.h | 2 +- paddle/pserver/SocketChannel.cpp | 2 +- paddle/pserver/SocketChannel.h | 2 +- paddle/pserver/SparseParameterDistribution.cpp | 2 +- paddle/pserver/SparseParameterDistribution.h | 2 +- paddle/pserver/test/SocketTest.cpp | 2 +- paddle/pserver/test/test_ParameterServer2.cpp | 2 +- paddle/pserver/test/test_ProtoServer.cpp | 2 +- proto/DataConfig.proto | 2 +- proto/DataFormat.proto | 2 +- proto/ModelConfig.proto | 2 +- proto/OptimizerConfig.proto | 2 +- proto/ParameterConfig.proto | 2 +- proto/ParameterServerConfig.proto | 4 ++-- proto/ParameterService.proto | 2 +- proto/TrainerConfig.proto | 2 +- .../tests/ProtobufEqualMain.cpp | 2 +- .../tests/configs/img_layers.py | 2 +- .../tests/configs/img_trans_layers.py | 2 +- .../tests/configs/last_first_seq.py | 2 +- .../tests/configs/layer_activations.py | 2 +- .../tests/configs/math_ops.py | 2 +- .../tests/configs/projections.py | 2 +- .../tests/configs/shared_fc.py | 2 +- .../tests/configs/shared_gru.py | 2 +- .../tests/configs/shared_lstm.py | 2 +- .../tests/configs/simple_rnn_layers.py | 2 +- .../tests/configs/test_BatchNorm3D.py | 2 +- .../tests/configs/test_bi_grumemory.py | 2 +- .../tests/configs/test_bilinear_interp.py | 2 +- .../tests/configs/test_clip_layer.py | 2 +- .../tests/configs/test_conv3d_layer.py | 2 +- .../tests/configs/test_cost_layers.py | 2 +- .../tests/configs/test_cost_layers_with_weight.py | 2 +- .../tests/configs/test_crop.py | 2 +- .../tests/configs/test_deconv3d_layer.py | 2 +- .../tests/configs/test_detection_output_layer.py | 2 +- .../tests/configs/test_dot_prod_layer.py | 2 +- .../tests/configs/test_expand_layer.py | 2 +- .../tests/configs/test_factorization_machine.py | 2 +- .../tests/configs/test_fc.py | 2 +- .../tests/configs/test_gated_unit_layer.py | 2 +- .../tests/configs/test_grumemory_layer.py | 2 +- .../tests/configs/test_hsigmoid.py | 2 +- .../tests/configs/test_l2_distance_layer.py | 2 +- .../tests/configs/test_lstmemory_layer.py | 2 +- .../tests/configs/test_maxout.py | 2 +- .../tests/configs/test_multibox_loss_layer.py | 2 +- .../tests/configs/test_multiplex_layer.py | 2 +- .../tests/configs/test_ntm_layers.py | 2 +- .../tests/configs/test_pad.py | 2 +- .../tests/configs/test_pooling3D_layer.py | 2 +- .../tests/configs/test_prelu_layer.py | 2 +- .../tests/configs/test_print_layer.py | 2 +- .../tests/configs/test_recursive_topology.py | 2 +- .../tests/configs/test_repeat_layer.py | 2 +- .../tests/configs/test_resize_layer.py | 2 +- .../tests/configs/test_rnn_group.py | 2 +- .../tests/configs/test_roi_pool_layer.py | 2 +- .../tests/configs/test_row_conv.py | 2 +- .../tests/configs/test_row_l2_norm_layer.py | 2 +- .../tests/configs/test_scale_shift_layer.py | 2 +- .../tests/configs/test_scale_sub_region_layer.py | 2 +- .../tests/configs/test_seq_concat_reshape.py | 2 +- .../tests/configs/test_sequence_pooling.py | 2 +- .../tests/configs/test_smooth_l1.py | 2 +- .../tests/configs/test_split_datasource.py | 2 +- .../tests/configs/test_spp_layer.py | 2 +- .../tests/configs/unused_layers.py | 2 +- .../tests/configs/util_layers.py | 2 +- .../tests/test_reset_hook.py | 2 +- python/paddle/utils/image_multiproc.py | 2 +- python/paddle/v2/dataset/tests/imikolov_test.py | 2 +- python/paddle/v2/event.py | 2 +- python/paddle/v2/fluid/__init__.py | 2 +- python/paddle/v2/fluid/backward.py | 2 +- python/paddle/v2/fluid/clip.py | 2 +- python/paddle/v2/fluid/data_feeder.py | 2 +- python/paddle/v2/fluid/debuger.py | 2 +- python/paddle/v2/fluid/default_scope_funcs.py | 2 +- python/paddle/v2/fluid/distribute_transpiler.py | 2 +- .../v2/fluid/distribute_transpiler_simple.py | 2 +- python/paddle/v2/fluid/distributed_spliter.py | 2 +- python/paddle/v2/fluid/evaluator.py | 2 +- python/paddle/v2/fluid/executor.py | 2 +- python/paddle/v2/fluid/framework.py | 2 +- python/paddle/v2/fluid/graphviz.py | 2 +- python/paddle/v2/fluid/initializer.py | 2 +- python/paddle/v2/fluid/io.py | 2 +- python/paddle/v2/fluid/layer_helper.py | 2 +- python/paddle/v2/fluid/layers/__init__.py | 2 +- python/paddle/v2/fluid/layers/control_flow.py | 2 +- python/paddle/v2/fluid/layers/device.py | 2 +- python/paddle/v2/fluid/layers/io.py | 2 +- .../v2/fluid/layers/layer_function_generator.py | 2 +- python/paddle/v2/fluid/layers/math_op_patch.py | 2 +- python/paddle/v2/fluid/layers/nn.py | 2 +- python/paddle/v2/fluid/layers/ops.py | 2 +- python/paddle/v2/fluid/layers/tensor.py | 2 +- .../v2/fluid/memory_optimization_transpiler.py | 2 +- python/paddle/v2/fluid/net_drawer.py | 2 +- python/paddle/v2/fluid/nets.py | 2 +- python/paddle/v2/fluid/op.py | 2 +- python/paddle/v2/fluid/optimizer.py | 2 +- python/paddle/v2/fluid/param_attr.py | 2 +- python/paddle/v2/fluid/profiler.py | 2 +- python/paddle/v2/fluid/regularizer.py | 2 +- python/paddle/v2/fluid/tests/__init__.py | 2 +- python/paddle/v2/fluid/tests/book/__init__.py | 2 +- .../fluid/tests/book/notest_rnn_encoder_decoer.py | 2 +- .../paddle/v2/fluid/tests/book/test_fit_a_line.py | 2 +- .../fluid/tests/book/test_image_classification.py | 2 +- .../fluid/tests/book/test_label_semantic_roles.py | 2 +- .../fluid/tests/book/test_machine_translation.py | 2 +- .../v2/fluid/tests/book/test_recognize_digits.py | 2 +- .../v2/fluid/tests/book/test_recommender_system.py | 2 +- python/paddle/v2/fluid/tests/book/test_word2vec.py | 2 +- .../book_distribute/notest_dist_fit_a_line.py | 2 +- .../notest_dist_label_semantic_roles.py | 2 +- .../tests/book_distribute/notest_dist_word2vec.py | 2 +- .../book_distribute/notest_machine_translation.py | 2 +- .../notest_recognize_digits_conv_dist.py | 2 +- .../notest_recognize_digits_mlp_dist.py | 2 +- .../notest_recommender_system_dist.py | 2 +- .../notest_understand_sentiment_conv_dist.py | 2 +- .../notest_understand_sentiment_dynamic_lstm.py | 2 +- .../fluid/tests/book_distribute/test_split_var.py | 2 +- .../test_memopt_fit_a_line.py | 2 +- .../test_memopt_image_classification_train.py | 2 +- .../test_memopt_machine_translation.py | 2 +- python/paddle/v2/fluid/tests/decorators.py | 2 +- python/paddle/v2/fluid/tests/demo/fc_gan.py | 2 +- python/paddle/v2/fluid/tests/op_test.py | 2 +- python/paddle/v2/fluid/tests/test_accuracy_op.py | 2 +- python/paddle/v2/fluid/tests/test_activation_op.py | 2 +- python/paddle/v2/fluid/tests/test_adadelta_op.py | 2 +- python/paddle/v2/fluid/tests/test_adagrad_op.py | 2 +- python/paddle/v2/fluid/tests/test_adam_op.py | 2 +- python/paddle/v2/fluid/tests/test_adamax_op.py | 2 +- .../v2/fluid/tests/test_array_read_write_op.py | 2 +- python/paddle/v2/fluid/tests/test_assign_op.py | 2 +- .../paddle/v2/fluid/tests/test_assign_value_op.py | 2 +- python/paddle/v2/fluid/tests/test_auc_op.py | 2 +- python/paddle/v2/fluid/tests/test_batch_norm_op.py | 2 +- .../v2/fluid/tests/test_beam_search_decode_op.py | 2 +- .../paddle/v2/fluid/tests/test_beam_search_op.py | 2 +- .../fluid/tests/test_bilinear_tensor_product_op.py | 2 +- .../v2/fluid/tests/test_bipartite_match_op.py | 2 +- python/paddle/v2/fluid/tests/test_box_coder_op.py | 2 +- python/paddle/v2/fluid/tests/test_calc_gradient.py | 2 +- python/paddle/v2/fluid/tests/test_cast_op.py | 2 +- python/paddle/v2/fluid/tests/test_chunk_eval_op.py | 2 +- .../paddle/v2/fluid/tests/test_clip_by_norm_op.py | 2 +- python/paddle/v2/fluid/tests/test_clip_op.py | 2 +- python/paddle/v2/fluid/tests/test_compare_op.py | 2 +- python/paddle/v2/fluid/tests/test_concat_op.py | 2 +- python/paddle/v2/fluid/tests/test_cond_op.py | 2 +- .../v2/fluid/tests/test_conditional_block.py | 2 +- python/paddle/v2/fluid/tests/test_const_value.py | 2 +- python/paddle/v2/fluid/tests/test_conv2d_op.py | 2 +- .../v2/fluid/tests/test_conv2d_transpose_op.py | 2 +- python/paddle/v2/fluid/tests/test_conv3d_op.py | 2 +- .../v2/fluid/tests/test_conv3d_transpose_op.py | 2 +- python/paddle/v2/fluid/tests/test_conv_shift_op.py | 2 +- python/paddle/v2/fluid/tests/test_cos_sim_op.py | 2 +- .../v2/fluid/tests/test_create_op_doc_string.py | 2 +- .../paddle/v2/fluid/tests/test_crf_decoding_op.py | 2 +- python/paddle/v2/fluid/tests/test_crop_op.py | 2 +- .../paddle/v2/fluid/tests/test_cross_entropy_op.py | 2 +- python/paddle/v2/fluid/tests/test_ctc_align.py | 2 +- python/paddle/v2/fluid/tests/test_cumsum_op.py | 2 +- python/paddle/v2/fluid/tests/test_data_feeder.py | 2 +- .../v2/fluid/tests/test_decayed_adagrad_op.py | 2 +- .../v2/fluid/tests/test_default_scope_funcs.py | 2 +- python/paddle/v2/fluid/tests/test_detection.py | 2 +- .../v2/fluid/tests/test_detection_output_op.py | 2 +- python/paddle/v2/fluid/tests/test_dropout_op.py | 2 +- python/paddle/v2/fluid/tests/test_dyn_rnn.py | 2 +- .../v2/fluid/tests/test_dynrnn_gradient_check.py | 2 +- .../v2/fluid/tests/test_dynrnn_static_input.py | 2 +- .../paddle/v2/fluid/tests/test_edit_distance_op.py | 2 +- .../v2/fluid/tests/test_elementwise_add_op.py | 2 +- .../v2/fluid/tests/test_elementwise_div_op.py | 2 +- .../v2/fluid/tests/test_elementwise_max_op.py | 2 +- .../v2/fluid/tests/test_elementwise_min_op.py | 2 +- .../v2/fluid/tests/test_elementwise_mul_op.py | 2 +- .../v2/fluid/tests/test_elementwise_pow_op.py | 2 +- .../v2/fluid/tests/test_elementwise_sub_op.py | 2 +- python/paddle/v2/fluid/tests/test_error_clip.py | 2 +- python/paddle/v2/fluid/tests/test_exception.py | 2 +- .../paddle/v2/fluid/tests/test_executor_and_mul.py | 2 +- python/paddle/v2/fluid/tests/test_expand_op.py | 2 +- .../v2/fluid/tests/test_feed_fetch_method.py | 2 +- .../tests/test_fill_constant_batch_size_like_op.py | 2 +- .../paddle/v2/fluid/tests/test_fill_constant_op.py | 2 +- python/paddle/v2/fluid/tests/test_fill_op.py | 2 +- .../v2/fluid/tests/test_fill_zeros_like_op.py | 2 +- .../v2/fluid/tests/test_framework_debug_str.py | 2 +- python/paddle/v2/fluid/tests/test_ftrl_op.py | 2 +- python/paddle/v2/fluid/tests/test_gather_op.py | 2 +- .../v2/fluid/tests/test_gaussian_random_op.py | 2 +- python/paddle/v2/fluid/tests/test_get_places_op.py | 2 +- python/paddle/v2/fluid/tests/test_gradient_clip.py | 2 +- python/paddle/v2/fluid/tests/test_gru_op.py | 2 +- python/paddle/v2/fluid/tests/test_gru_unit_op.py | 2 +- python/paddle/v2/fluid/tests/test_hinge_loss_op.py | 2 +- python/paddle/v2/fluid/tests/test_huber_loss_op.py | 2 +- .../paddle/v2/fluid/tests/test_im2sequence_op.py | 2 +- .../fluid/tests/test_image_classification_layer.py | 2 +- python/paddle/v2/fluid/tests/test_infer_shape.py | 2 +- .../v2/fluid/tests/test_inference_model_io.py | 2 +- python/paddle/v2/fluid/tests/test_initializer.py | 2 +- .../v2/fluid/tests/test_iou_similarity_op.py | 2 +- python/paddle/v2/fluid/tests/test_is_empty_op.py | 2 +- python/paddle/v2/fluid/tests/test_l1_norm_op.py | 2 +- .../paddle/v2/fluid/tests/test_label_smooth_op.py | 2 +- python/paddle/v2/fluid/tests/test_layer_norm_op.py | 2 +- python/paddle/v2/fluid/tests/test_layers.py | 2 +- .../v2/fluid/tests/test_linear_chain_crf_op.py | 2 +- .../v2/fluid/tests/test_lod_array_length_op.py | 2 +- .../paddle/v2/fluid/tests/test_lod_rank_table.py | 2 +- python/paddle/v2/fluid/tests/test_lod_reset_op.py | 2 +- .../paddle/v2/fluid/tests/test_lod_tensor_array.py | 2 +- .../v2/fluid/tests/test_lod_tensor_array_ops.py | 2 +- python/paddle/v2/fluid/tests/test_log_loss_op.py | 2 +- python/paddle/v2/fluid/tests/test_logical_op.py | 2 +- .../paddle/v2/fluid/tests/test_lookup_table_op.py | 2 +- python/paddle/v2/fluid/tests/test_lrn_op.py | 2 +- python/paddle/v2/fluid/tests/test_lstm_op.py | 2 +- python/paddle/v2/fluid/tests/test_lstm_unit_op.py | 2 +- python/paddle/v2/fluid/tests/test_lstmp_op.py | 2 +- .../v2/fluid/tests/test_margin_rank_loss_op.py | 2 +- python/paddle/v2/fluid/tests/test_math_op_patch.py | 2 +- python/paddle/v2/fluid/tests/test_matmul_op.py | 2 +- python/paddle/v2/fluid/tests/test_maxout_op.py | 2 +- python/paddle/v2/fluid/tests/test_mean_op.py | 2 +- .../tests/test_memory_optimization_transpiler.py | 2 +- python/paddle/v2/fluid/tests/test_minus_op.py | 2 +- .../paddle/v2/fluid/tests/test_mnist_if_else_op.py | 2 +- .../v2/fluid/tests/test_modified_huber_loss_op.py | 2 +- python/paddle/v2/fluid/tests/test_momentum_op.py | 2 +- python/paddle/v2/fluid/tests/test_mul_op.py | 2 +- .../v2/fluid/tests/test_multiclass_nms_op.py | 2 +- .../v2/fluid/tests/test_multihead_attention.py | 2 +- python/paddle/v2/fluid/tests/test_multiplex_op.py | 2 +- python/paddle/v2/fluid/tests/test_nce.py | 2 +- python/paddle/v2/fluid/tests/test_net.py | 2 +- python/paddle/v2/fluid/tests/test_norm_op.py | 2 +- .../v2/fluid/tests/test_normalization_wrapper.py | 2 +- python/paddle/v2/fluid/tests/test_one_hot_op.py | 2 +- .../paddle/v2/fluid/tests/test_op_support_gpu.py | 2 +- python/paddle/v2/fluid/tests/test_operator.py | 2 +- python/paddle/v2/fluid/tests/test_operator_desc.py | 2 +- python/paddle/v2/fluid/tests/test_optimizer.py | 2 +- python/paddle/v2/fluid/tests/test_pad_op.py | 2 +- python/paddle/v2/fluid/tests/test_parallel_op.py | 2 +- python/paddle/v2/fluid/tests/test_parameter.py | 2 +- python/paddle/v2/fluid/tests/test_pool2d_op.py | 2 +- python/paddle/v2/fluid/tests/test_pool3d_op.py | 2 +- python/paddle/v2/fluid/tests/test_pool_max_op.py | 2 +- .../fluid/tests/test_positive_negative_pair_op.py | 2 +- .../v2/fluid/tests/test_precision_recall_op.py | 2 +- python/paddle/v2/fluid/tests/test_prelu_op.py | 2 +- python/paddle/v2/fluid/tests/test_print_op.py | 2 +- python/paddle/v2/fluid/tests/test_prior_box_op.py | 2 +- python/paddle/v2/fluid/tests/test_profiler.py | 2 +- python/paddle/v2/fluid/tests/test_program.py | 2 +- python/paddle/v2/fluid/tests/test_protobuf.py | 2 +- .../paddle/v2/fluid/tests/test_protobuf_descs.py | 2 +- .../v2/fluid/tests/test_proximal_adagrad_op.py | 2 +- .../paddle/v2/fluid/tests/test_proximal_gd_op.py | 2 +- python/paddle/v2/fluid/tests/test_rank_loss_op.py | 2 +- python/paddle/v2/fluid/tests/test_recurrent_op.py | 2 +- python/paddle/v2/fluid/tests/test_recv_op.py | 2 +- python/paddle/v2/fluid/tests/test_reduce_op.py | 2 +- python/paddle/v2/fluid/tests/test_registry.py | 2 +- python/paddle/v2/fluid/tests/test_regularizer.py | 2 +- .../v2/fluid/tests/test_reorder_lod_tensor.py | 2 +- python/paddle/v2/fluid/tests/test_reshape_op.py | 2 +- python/paddle/v2/fluid/tests/test_rmsprop_op.py | 2 +- .../v2/fluid/tests/test_rnn_memory_helper_op.py | 2 +- python/paddle/v2/fluid/tests/test_roi_pool_op.py | 2 +- python/paddle/v2/fluid/tests/test_row_conv_op.py | 2 +- python/paddle/v2/fluid/tests/test_scale_op.py | 2 +- python/paddle/v2/fluid/tests/test_scatter_op.py | 2 +- python/paddle/v2/fluid/tests/test_scope.py | 2 +- python/paddle/v2/fluid/tests/test_selected_rows.py | 2 +- python/paddle/v2/fluid/tests/test_seq_concat_op.py | 2 +- python/paddle/v2/fluid/tests/test_seq_conv.py | 2 +- python/paddle/v2/fluid/tests/test_seq_pool.py | 2 +- .../v2/fluid/tests/test_sequence_erase_op.py | 2 +- .../paddle/v2/fluid/tests/test_sequence_expand.py | 2 +- .../paddle/v2/fluid/tests/test_sequence_reshape.py | 2 +- .../v2/fluid/tests/test_sequence_slice_op.py | 2 +- .../v2/fluid/tests/test_sequence_softmax_op.py | 2 +- python/paddle/v2/fluid/tests/test_sgd_op.py | 2 +- .../v2/fluid/tests/test_shrink_rnn_memory.py | 2 +- .../test_sigmoid_cross_entropy_with_logits_op.py | 2 +- python/paddle/v2/fluid/tests/test_sign_op.py | 2 +- .../v2/fluid/tests/test_smooth_l1_loss_op.py | 2 +- python/paddle/v2/fluid/tests/test_softmax_op.py | 2 +- .../tests/test_softmax_with_cross_entropy_op.py | 2 +- .../tests/test_split_and_merge_lod_tensor_op.py | 2 +- python/paddle/v2/fluid/tests/test_split_op.py | 2 +- .../v2/fluid/tests/test_split_selected_rows_op.py | 2 +- python/paddle/v2/fluid/tests/test_spp_op.py | 2 +- .../v2/fluid/tests/test_squared_l2_distance_op.py | 2 +- .../v2/fluid/tests/test_squared_l2_norm_op.py | 2 +- python/paddle/v2/fluid/tests/test_sum_op.py | 2 +- python/paddle/v2/fluid/tests/test_switch.py | 2 +- .../paddle/v2/fluid/tests/test_target_assign_op.py | 2 +- python/paddle/v2/fluid/tests/test_tensor.py | 2 +- python/paddle/v2/fluid/tests/test_top_k_op.py | 2 +- python/paddle/v2/fluid/tests/test_transpose_op.py | 2 +- .../v2/fluid/tests/test_uniform_random_op.py | 2 +- python/paddle/v2/fluid/tests/test_unpool_op.py | 2 +- python/paddle/v2/fluid/tests/test_variable.py | 2 +- python/paddle/v2/fluid/tests/test_warpctc_op.py | 2 +- .../v2/fluid/tests/test_weight_normalization.py | 2 +- python/paddle/v2/fluid/tests/test_while_op.py | 2 +- python/paddle/v2/image.py | 2 +- python/paddle/v2/inference.py | 2 +- python/paddle/v2/master/__init__.py | 2 +- python/paddle/v2/master/client.py | 2 +- python/paddle/v2/reader/tests/__init__.py | 2 +- python/paddle/v2/reader/tests/creator_test.py | 4 ++-- python/paddle/v2/reader/tests/decorator_test.py | 2 +- python/paddle/v2/tests/test_image.py | 2 +- python/paddle/v2/tests/test_layer.py | 2 +- python/paddle/v2/tests/test_op.py | 2 +- python/paddle/v2/tests/test_paramconf_order.py | 4 ++-- python/paddle/v2/tests/test_parameters.py | 2 +- python/paddle/v2/tests/test_rnn_layer.py | 2 +- python/paddle/v2/tests/test_topology.py | 2 +- python/paddle/v2/trainer.py | 2 +- tools/manylinux1/build_scripts/manylinux1-check.py | 2 +- .../manylinux1/build_scripts/python-tag-abi-tag.py | 2 +- tools/manylinux1/build_scripts/ssl-check.py | 2 +- 1695 files changed, 1724 insertions(+), 1700 deletions(-) mode change 120000 => 100755 paddle/capi/examples/model_inference/multi_thread/trainer_config.py mode change 120000 => 100755 paddle/capi/examples/model_inference/sparse_binary/trainer_config.py diff --git a/CMakeLists.txt b/CMakeLists.txt index 3a21574b855..ae04f9ff3f4 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -1,4 +1,4 @@ -# Copyright (c) 2016 PaddlePaddle Authors. All Rights Reserve. +# Copyright (c) 2016 PaddlePaddle Authors. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/LICENSE b/LICENSE index e77bd090ee4..5fe86943b37 100644 --- a/LICENSE +++ b/LICENSE @@ -188,7 +188,7 @@ Copyright (c) 2016 PaddlePaddle Authors. All Rights Reserved same "printed page" as the copyright notice for easier identification within third-party archives. - Copyright (c) 2016 PaddlePaddle Authors. All Rights Reserve. + Copyright (c) 2016 PaddlePaddle Authors. All Rights Reserved. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/benchmark/cluster/vgg16/vgg16_fluid.py b/benchmark/cluster/vgg16/vgg16_fluid.py index 499e06ec42f..99395699f2f 100644 --- a/benchmark/cluster/vgg16/vgg16_fluid.py +++ b/benchmark/cluster/vgg16/vgg16_fluid.py @@ -1,4 +1,4 @@ -# Copyright (c) 2018 PaddlePaddle Authors. All Rights Reserve. +# Copyright (c) 2018 PaddlePaddle Authors. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/benchmark/cluster/vgg16/vgg16_v2.py b/benchmark/cluster/vgg16/vgg16_v2.py index 6ac6b3c3325..1a66af32d71 100644 --- a/benchmark/cluster/vgg16/vgg16_v2.py +++ b/benchmark/cluster/vgg16/vgg16_v2.py @@ -1,4 +1,4 @@ -# Copyright (c) 2018 PaddlePaddle Authors. All Rights Reserve. +# Copyright (c) 2018 PaddlePaddle Authors. All Rights Reserved. # #Licensed under the Apache License, Version 2.0 (the "License"); #you may not use this file except in compliance with the License. diff --git a/benchmark/paddle/image/alexnet.py b/benchmark/paddle/image/alexnet.py index 70296081877..9efc3f0494e 100644 --- a/benchmark/paddle/image/alexnet.py +++ b/benchmark/paddle/image/alexnet.py @@ -1,4 +1,4 @@ -# Copyright (c) 2018 PaddlePaddle Authors. All Rights Reserve. +# Copyright (c) 2018 PaddlePaddle Authors. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/benchmark/paddle/image/provider.py b/benchmark/paddle/image/provider.py index 21e0d381aab..6ad817ccefa 100644 --- a/benchmark/paddle/image/provider.py +++ b/benchmark/paddle/image/provider.py @@ -1,4 +1,4 @@ -# Copyright (c) 2018 PaddlePaddle Authors. All Rights Reserve. +# Copyright (c) 2018 PaddlePaddle Authors. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/benchmark/paddle/rnn/imdb.py b/benchmark/paddle/rnn/imdb.py index c3b5faa19aa..2a67f9b0cf5 100755 --- a/benchmark/paddle/rnn/imdb.py +++ b/benchmark/paddle/rnn/imdb.py @@ -1,4 +1,4 @@ -# Copyright (c) 2018 PaddlePaddle Authors. All Rights Reserve. +# Copyright (c) 2018 PaddlePaddle Authors. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/benchmark/paddle/rnn/provider.py b/benchmark/paddle/rnn/provider.py index f35cd5b079f..23cc0c44a98 100644 --- a/benchmark/paddle/rnn/provider.py +++ b/benchmark/paddle/rnn/provider.py @@ -1,4 +1,4 @@ -# Copyright (c) 2018 PaddlePaddle Authors. All Rights Reserve. +# Copyright (c) 2018 PaddlePaddle Authors. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/benchmark/tensorflow/image/alexnet.py b/benchmark/tensorflow/image/alexnet.py index a37d7e7c622..95728b7a85a 100644 --- a/benchmark/tensorflow/image/alexnet.py +++ b/benchmark/tensorflow/image/alexnet.py @@ -1,4 +1,4 @@ -# Copyright (c) 2018 PaddlePaddle Authors. All Rights Reserve. +# Copyright (c) 2018 PaddlePaddle Authors. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/benchmark/tensorflow/image/alexnet_multi_gpu.py b/benchmark/tensorflow/image/alexnet_multi_gpu.py index 2ebab8fb60d..51dfe3f1cb2 100644 --- a/benchmark/tensorflow/image/alexnet_multi_gpu.py +++ b/benchmark/tensorflow/image/alexnet_multi_gpu.py @@ -1,4 +1,4 @@ -# Copyright (c) 2018 PaddlePaddle Authors. All Rights Reserve. +# Copyright (c) 2018 PaddlePaddle Authors. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/benchmark/tensorflow/image/googlenet.py b/benchmark/tensorflow/image/googlenet.py index 1202cbb171e..37b2ba69115 100644 --- a/benchmark/tensorflow/image/googlenet.py +++ b/benchmark/tensorflow/image/googlenet.py @@ -1,4 +1,4 @@ -# Copyright (c) 2018 PaddlePaddle Authors. All Rights Reserve. +# Copyright (c) 2018 PaddlePaddle Authors. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/benchmark/tensorflow/image/googlenet_multi_gpu.py b/benchmark/tensorflow/image/googlenet_multi_gpu.py index f06437eb6c8..7179c5301cd 100644 --- a/benchmark/tensorflow/image/googlenet_multi_gpu.py +++ b/benchmark/tensorflow/image/googlenet_multi_gpu.py @@ -1,4 +1,4 @@ -# Copyright (c) 2018 PaddlePaddle Authors. All Rights Reserve. +# Copyright (c) 2018 PaddlePaddle Authors. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/benchmark/tensorflow/image/smallnet_mnist_cifar.py b/benchmark/tensorflow/image/smallnet_mnist_cifar.py index 558c68575f4..2ca1623b6b4 100644 --- a/benchmark/tensorflow/image/smallnet_mnist_cifar.py +++ b/benchmark/tensorflow/image/smallnet_mnist_cifar.py @@ -1,4 +1,4 @@ -# Copyright (c) 2018 PaddlePaddle Authors. All Rights Reserve. +# Copyright (c) 2018 PaddlePaddle Authors. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/benchmark/tensorflow/rnn/reader.py b/benchmark/tensorflow/rnn/reader.py index 9660d3c22b3..ac08c10a423 100755 --- a/benchmark/tensorflow/rnn/reader.py +++ b/benchmark/tensorflow/rnn/reader.py @@ -1,4 +1,4 @@ -# Copyright (c) 2018 PaddlePaddle Authors. All Rights Reserve. +# Copyright (c) 2018 PaddlePaddle Authors. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/cmake/configure.cmake b/cmake/configure.cmake index 5c6bcfde76a..ae3295fe411 100644 --- a/cmake/configure.cmake +++ b/cmake/configure.cmake @@ -1,4 +1,4 @@ -# Copyright (c) 2016 PaddlePaddle Authors. All Rights Reserve. +# Copyright (c) 2016 PaddlePaddle Authors. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/cmake/cross_compiling/android.cmake b/cmake/cross_compiling/android.cmake index 84219cfa558..4cf2be3bdf0 100644 --- a/cmake/cross_compiling/android.cmake +++ b/cmake/cross_compiling/android.cmake @@ -1,4 +1,4 @@ -# Copyright (c) 2016 PaddlePaddle Authors. All Rights Reserve. +# Copyright (c) 2016 PaddlePaddle Authors. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/cmake/cross_compiling/host.cmake b/cmake/cross_compiling/host.cmake index 14c35266ec6..f9c6b12136f 100644 --- a/cmake/cross_compiling/host.cmake +++ b/cmake/cross_compiling/host.cmake @@ -1,4 +1,4 @@ -# Copyright (c) 2016 PaddlePaddle Authors. All Rights Reserve. +# Copyright (c) 2016 PaddlePaddle Authors. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/cmake/cross_compiling/ios.cmake b/cmake/cross_compiling/ios.cmake index d3f5bf6852b..10d389ec8ed 100644 --- a/cmake/cross_compiling/ios.cmake +++ b/cmake/cross_compiling/ios.cmake @@ -1,4 +1,4 @@ -# Copyright (c) 2016 PaddlePaddle Authors. All Rights Reserve. +# Copyright (c) 2016 PaddlePaddle Authors. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/cmake/cross_compiling/raspberry_pi.cmake b/cmake/cross_compiling/raspberry_pi.cmake index 817b39f6833..0425b2ae158 100644 --- a/cmake/cross_compiling/raspberry_pi.cmake +++ b/cmake/cross_compiling/raspberry_pi.cmake @@ -1,4 +1,4 @@ -# Copyright (c) 2016 PaddlePaddle Authors. All Rights Reserve. +# Copyright (c) 2016 PaddlePaddle Authors. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/cmake/external/boost.cmake b/cmake/external/boost.cmake index dbc676bdac3..9e135b2c0e6 100644 --- a/cmake/external/boost.cmake +++ b/cmake/external/boost.cmake @@ -1,4 +1,4 @@ -# Copyright (c) 2016 PaddlePaddle Authors. All Rights Reserve. +# Copyright (c) 2016 PaddlePaddle Authors. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/cmake/external/cares.cmake b/cmake/external/cares.cmake index aec51410b33..a743b572a6c 100644 --- a/cmake/external/cares.cmake +++ b/cmake/external/cares.cmake @@ -1,4 +1,4 @@ -# Copyright (c) 2016 PaddlePaddle Authors. All Rights Reserve. +# Copyright (c) 2016 PaddlePaddle Authors. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/cmake/external/gflags.cmake b/cmake/external/gflags.cmake index d4f252bb9f6..a1d2d0f4468 100644 --- a/cmake/external/gflags.cmake +++ b/cmake/external/gflags.cmake @@ -1,4 +1,4 @@ -# Copyright (c) 2016 PaddlePaddle Authors. All Rights Reserve. +# Copyright (c) 2016 PaddlePaddle Authors. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/cmake/external/glog.cmake b/cmake/external/glog.cmake index 0c6b3aafcb4..ac0181e69cb 100644 --- a/cmake/external/glog.cmake +++ b/cmake/external/glog.cmake @@ -1,4 +1,4 @@ -# Copyright (c) 2016 PaddlePaddle Authors. All Rights Reserve. +# Copyright (c) 2016 PaddlePaddle Authors. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/cmake/external/grpc.cmake b/cmake/external/grpc.cmake index 79b2449fe66..0853b981813 100644 --- a/cmake/external/grpc.cmake +++ b/cmake/external/grpc.cmake @@ -1,4 +1,4 @@ -# Copyright (c) 2016 PaddlePaddle Authors. All Rights Reserve. +# Copyright (c) 2016 PaddlePaddle Authors. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/cmake/external/gtest.cmake b/cmake/external/gtest.cmake index 5a4aa7a5b71..d335298742c 100644 --- a/cmake/external/gtest.cmake +++ b/cmake/external/gtest.cmake @@ -1,4 +1,4 @@ -# Copyright (c) 2016 PaddlePaddle Authors. All Rights Reserve. +# Copyright (c) 2016 PaddlePaddle Authors. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/cmake/external/mkldnn.cmake b/cmake/external/mkldnn.cmake index 89fc34796a0..aef5311a12c 100644 --- a/cmake/external/mkldnn.cmake +++ b/cmake/external/mkldnn.cmake @@ -1,4 +1,4 @@ -# Copyright (c) 2017 PaddlePaddle Authors. All Rights Reserve. +# Copyright (c) 2017 PaddlePaddle Authors. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/cmake/external/mklml.cmake b/cmake/external/mklml.cmake index 15a07ea3daf..739a910c7c6 100644 --- a/cmake/external/mklml.cmake +++ b/cmake/external/mklml.cmake @@ -1,4 +1,4 @@ -# Copyright (c) 2017 PaddlePaddle Authors. All Rights Reserve. +# Copyright (c) 2017 PaddlePaddle Authors. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/cmake/external/nccl.cmake b/cmake/external/nccl.cmake index fc43766efaf..af5c689c352 100644 --- a/cmake/external/nccl.cmake +++ b/cmake/external/nccl.cmake @@ -1,4 +1,4 @@ -# Copyright (c) 2016 PaddlePaddle Authors. All Rights Reserve. +# Copyright (c) 2016 PaddlePaddle Authors. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/cmake/external/openblas.cmake b/cmake/external/openblas.cmake index 4012a164be1..e2b7ef8d547 100644 --- a/cmake/external/openblas.cmake +++ b/cmake/external/openblas.cmake @@ -1,4 +1,4 @@ -# Copyright (c) 2016 PaddlePaddle Authors. All Rights Reserve. +# Copyright (c) 2016 PaddlePaddle Authors. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/cmake/external/protobuf.cmake b/cmake/external/protobuf.cmake index ff5855052da..0fde4373a4b 100644 --- a/cmake/external/protobuf.cmake +++ b/cmake/external/protobuf.cmake @@ -1,4 +1,4 @@ -# Copyright (c) 2016 PaddlePaddle Authors. All Rights Reserve. +# Copyright (c) 2016 PaddlePaddle Authors. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/cmake/external/pybind11.cmake b/cmake/external/pybind11.cmake index 4e87dc49d89..c885877a2bc 100644 --- a/cmake/external/pybind11.cmake +++ b/cmake/external/pybind11.cmake @@ -1,4 +1,4 @@ -# Copyright (c) 2016 PaddlePaddle Authors. All Rights Reserve. +# Copyright (c) 2016 PaddlePaddle Authors. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/cmake/external/python.cmake b/cmake/external/python.cmake index 46c68cce324..d7e5571bdbd 100644 --- a/cmake/external/python.cmake +++ b/cmake/external/python.cmake @@ -1,4 +1,4 @@ -# Copyright (c) 2016 PaddlePaddle Authors. All Rights Reserve. +# Copyright (c) 2016 PaddlePaddle Authors. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/cmake/external/swig.cmake b/cmake/external/swig.cmake index 9db457c7b2d..de07703695e 100644 --- a/cmake/external/swig.cmake +++ b/cmake/external/swig.cmake @@ -1,4 +1,4 @@ -# Copyright (c) 2016 PaddlePaddle Authors. All Rights Reserve. +# Copyright (c) 2016 PaddlePaddle Authors. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/cmake/external/warpctc.cmake b/cmake/external/warpctc.cmake index 5fa60df7b3f..9a9a20f897e 100644 --- a/cmake/external/warpctc.cmake +++ b/cmake/external/warpctc.cmake @@ -1,4 +1,4 @@ -# Copyright (c) 2016 PaddlePaddle Authors. All Rights Reserve. +# Copyright (c) 2016 PaddlePaddle Authors. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/cmake/external/zlib.cmake b/cmake/external/zlib.cmake index 1638cd8fdfc..e568880632c 100644 --- a/cmake/external/zlib.cmake +++ b/cmake/external/zlib.cmake @@ -1,4 +1,4 @@ -# Copyright (c) 2016 PaddlePaddle Authors. All Rights Reserve. +# Copyright (c) 2016 PaddlePaddle Authors. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/cmake/generic.cmake b/cmake/generic.cmake index 1cb54ba2164..12e07bd5f88 100644 --- a/cmake/generic.cmake +++ b/cmake/generic.cmake @@ -1,4 +1,4 @@ -# Copyright (c) 2016 PaddlePaddle Authors. All Rights Reserve. +# Copyright (c) 2016 PaddlePaddle Authors. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/cmake/make_resource.py b/cmake/make_resource.py index 4f9f5546b9d..09a2ca877dd 100644 --- a/cmake/make_resource.py +++ b/cmake/make_resource.py @@ -1,4 +1,4 @@ -# Copyright (c) 2018 PaddlePaddle Authors. All Rights Reserve. +# Copyright (c) 2018 PaddlePaddle Authors. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/cmake/system.cmake b/cmake/system.cmake index 396bd1a0797..c91ef911275 100644 --- a/cmake/system.cmake +++ b/cmake/system.cmake @@ -1,4 +1,4 @@ -# Copyright (c) 2016 PaddlePaddle Authors. All Rights Reserve. +# Copyright (c) 2016 PaddlePaddle Authors. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/doc/faq/local/src/reduce_min_pool_size.py b/doc/faq/local/src/reduce_min_pool_size.py index 9efdb5707ac..cba96652f76 100644 --- a/doc/faq/local/src/reduce_min_pool_size.py +++ b/doc/faq/local/src/reduce_min_pool_size.py @@ -1,4 +1,4 @@ -# Copyright (c) 2018 PaddlePaddle Authors. All Rights Reserve. +# Copyright (c) 2018 PaddlePaddle Authors. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/doc/faq/local/src/word2vec_config.py b/doc/faq/local/src/word2vec_config.py index b4fcf0960ed..a5b84e8ed4d 100644 --- a/doc/faq/local/src/word2vec_config.py +++ b/doc/faq/local/src/word2vec_config.py @@ -1,4 +1,4 @@ -# Copyright (c) 2018 PaddlePaddle Authors. All Rights Reserve. +# Copyright (c) 2018 PaddlePaddle Authors. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/doc/faq/local/src/word2vec_dataprovider.py b/doc/faq/local/src/word2vec_dataprovider.py index 3b6273b0574..9fe67b6d6cb 100644 --- a/doc/faq/local/src/word2vec_dataprovider.py +++ b/doc/faq/local/src/word2vec_dataprovider.py @@ -1,4 +1,4 @@ -# Copyright (c) 2018 PaddlePaddle Authors. All Rights Reserve. +# Copyright (c) 2018 PaddlePaddle Authors. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/doc/getstarted/concepts/src/infer.py b/doc/getstarted/concepts/src/infer.py index a1b60388c45..afe256f234a 100644 --- a/doc/getstarted/concepts/src/infer.py +++ b/doc/getstarted/concepts/src/infer.py @@ -1,4 +1,4 @@ -# Copyright (c) 2018 PaddlePaddle Authors. All Rights Reserve. +# Copyright (c) 2018 PaddlePaddle Authors. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/doc/getstarted/concepts/src/train.py b/doc/getstarted/concepts/src/train.py index 0e5bdb57bc9..a85d5d8a3ac 100644 --- a/doc/getstarted/concepts/src/train.py +++ b/doc/getstarted/concepts/src/train.py @@ -1,4 +1,4 @@ -# Copyright (c) 2018 PaddlePaddle Authors. All Rights Reserve. +# Copyright (c) 2018 PaddlePaddle Authors. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/doc/howto/cluster/src/word2vec/api_train_v2.py b/doc/howto/cluster/src/word2vec/api_train_v2.py index 9a65f14628d..9107e24c175 100644 --- a/doc/howto/cluster/src/word2vec/api_train_v2.py +++ b/doc/howto/cluster/src/word2vec/api_train_v2.py @@ -1,4 +1,4 @@ -# Copyright (c) 2018 PaddlePaddle Authors. All Rights Reserve. +# Copyright (c) 2018 PaddlePaddle Authors. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/doc/howto/cluster/src/word2vec/api_train_v2_cluster.py b/doc/howto/cluster/src/word2vec/api_train_v2_cluster.py index 2afce9a66e5..791504094f3 100644 --- a/doc/howto/cluster/src/word2vec/api_train_v2_cluster.py +++ b/doc/howto/cluster/src/word2vec/api_train_v2_cluster.py @@ -1,4 +1,4 @@ -# Copyright (c) 2018 PaddlePaddle Authors. All Rights Reserve. +# Copyright (c) 2018 PaddlePaddle Authors. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/doc/howto/cluster/src/word2vec/prepare.py b/doc/howto/cluster/src/word2vec/prepare.py index ade01c378ef..a42548fbf03 100644 --- a/doc/howto/cluster/src/word2vec/prepare.py +++ b/doc/howto/cluster/src/word2vec/prepare.py @@ -1,4 +1,4 @@ -# Copyright (c) 2018 PaddlePaddle Authors. All Rights Reserve. +# Copyright (c) 2018 PaddlePaddle Authors. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/go/CMakeLists.txt b/go/CMakeLists.txt index 29ce909c644..f3a9296c2c6 100644 --- a/go/CMakeLists.txt +++ b/go/CMakeLists.txt @@ -1,4 +1,4 @@ -# Copyright (c) 2016 PaddlePaddle Authors. All Rights Reserve. +# Copyright (c) 2016 PaddlePaddle Authors. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/go/cmd/master/CMakeLists.txt b/go/cmd/master/CMakeLists.txt index 9e149967e71..fc99d8d3bd1 100644 --- a/go/cmd/master/CMakeLists.txt +++ b/go/cmd/master/CMakeLists.txt @@ -1,4 +1,4 @@ -# Copyright (c) 2016 PaddlePaddle Authors. All Rights Reserve. +# Copyright (c) 2016 PaddlePaddle Authors. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/go/cmd/master/master.go b/go/cmd/master/master.go index f57db1c0a01..537df59c860 100644 --- a/go/cmd/master/master.go +++ b/go/cmd/master/master.go @@ -1,4 +1,4 @@ -// Copyright (c) 2016 PaddlePaddle Authors. All Rights Reserve. +// Copyright (c) 2016 PaddlePaddle Authors. All Rights Reserved. // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. diff --git a/go/cmd/pserver/CMakeLists.txt b/go/cmd/pserver/CMakeLists.txt index 51db6dff043..20d033c9386 100644 --- a/go/cmd/pserver/CMakeLists.txt +++ b/go/cmd/pserver/CMakeLists.txt @@ -1,4 +1,4 @@ -# Copyright (c) 2016 PaddlePaddle Authors. All Rights Reserve. +# Copyright (c) 2016 PaddlePaddle Authors. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/go/cmd/pserver/pserver.go b/go/cmd/pserver/pserver.go index 1358801c1cf..271274cafc5 100644 --- a/go/cmd/pserver/pserver.go +++ b/go/cmd/pserver/pserver.go @@ -1,4 +1,4 @@ -// Copyright (c) 2016 PaddlePaddle Authors. All Rights Reserve. +// Copyright (c) 2016 PaddlePaddle Authors. All Rights Reserved. // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. diff --git a/go/connection/conn.go b/go/connection/conn.go index ffa8db689da..b8353e8e18e 100644 --- a/go/connection/conn.go +++ b/go/connection/conn.go @@ -1,4 +1,4 @@ -// Copyright (c) 2016 PaddlePaddle Authors. All Rights Reserve. +// Copyright (c) 2016 PaddlePaddle Authors. All Rights Reserved. // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. diff --git a/go/master/CMakeLists.txt b/go/master/CMakeLists.txt index 93efa4eaf7d..b5101c3479d 100644 --- a/go/master/CMakeLists.txt +++ b/go/master/CMakeLists.txt @@ -1,4 +1,4 @@ -# Copyright (c) 2016 PaddlePaddle Authors. All Rights Reserve. +# Copyright (c) 2016 PaddlePaddle Authors. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/go/master/c/CMakeLists.txt b/go/master/c/CMakeLists.txt index 082d9f3f597..58b44e6445b 100644 --- a/go/master/c/CMakeLists.txt +++ b/go/master/c/CMakeLists.txt @@ -1,4 +1,4 @@ -# Copyright (c) 2016 PaddlePaddle Authors. All Rights Reserve. +# Copyright (c) 2016 PaddlePaddle Authors. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/go/master/c/client.go b/go/master/c/client.go index 9a3960d59cd..42c176d00bd 100644 --- a/go/master/c/client.go +++ b/go/master/c/client.go @@ -1,4 +1,4 @@ -// Copyright (c) 2016 PaddlePaddle Authors. All Rights Reserve. +// Copyright (c) 2016 PaddlePaddle Authors. All Rights Reserved. // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. diff --git a/go/master/client.go b/go/master/client.go index 7bcf8695534..e43903dd14e 100644 --- a/go/master/client.go +++ b/go/master/client.go @@ -1,4 +1,4 @@ -// Copyright (c) 2016 PaddlePaddle Authors. All Rights Reserve. +// Copyright (c) 2016 PaddlePaddle Authors. All Rights Reserved. // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. diff --git a/go/master/client_internal_test.go b/go/master/client_internal_test.go index 2f13fd0dcda..37028a9e1f8 100644 --- a/go/master/client_internal_test.go +++ b/go/master/client_internal_test.go @@ -1,4 +1,4 @@ -// Copyright (c) 2016 PaddlePaddle Authors. All Rights Reserve. +// Copyright (c) 2016 PaddlePaddle Authors. All Rights Reserved. // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. diff --git a/go/master/client_test.go b/go/master/client_test.go index 1963dbfd732..01ecad2dead 100644 --- a/go/master/client_test.go +++ b/go/master/client_test.go @@ -1,4 +1,4 @@ -// Copyright (c) 2016 PaddlePaddle Authors. All Rights Reserve. +// Copyright (c) 2016 PaddlePaddle Authors. All Rights Reserved. // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. diff --git a/go/master/etcd_client.go b/go/master/etcd_client.go index 2a41d36949c..36fe6112744 100644 --- a/go/master/etcd_client.go +++ b/go/master/etcd_client.go @@ -1,4 +1,4 @@ -// Copyright (c) 2016 PaddlePaddle Authors. All Rights Reserve. +// Copyright (c) 2016 PaddlePaddle Authors. All Rights Reserved. // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. diff --git a/go/master/inmem_store.go b/go/master/inmem_store.go index a5bd2d4fe15..33b4714317f 100644 --- a/go/master/inmem_store.go +++ b/go/master/inmem_store.go @@ -1,4 +1,4 @@ -// Copyright (c) 2016 PaddlePaddle Authors. All Rights Reserve. +// Copyright (c) 2016 PaddlePaddle Authors. All Rights Reserved. // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. diff --git a/go/master/service.go b/go/master/service.go index f3501028800..39f746e528e 100644 --- a/go/master/service.go +++ b/go/master/service.go @@ -1,4 +1,4 @@ -// Copyright (c) 2016 PaddlePaddle Authors. All Rights Reserve. +// Copyright (c) 2016 PaddlePaddle Authors. All Rights Reserved. // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. diff --git a/go/master/service_internal_test.go b/go/master/service_internal_test.go index bd1a939a555..dd22f3d548b 100644 --- a/go/master/service_internal_test.go +++ b/go/master/service_internal_test.go @@ -1,4 +1,4 @@ -// Copyright (c) 2016 PaddlePaddle Authors. All Rights Reserve. +// Copyright (c) 2016 PaddlePaddle Authors. All Rights Reserved. // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. diff --git a/go/pserver/CMakeLists.txt b/go/pserver/CMakeLists.txt index 9ac05199e7a..32f3b2baba3 100644 --- a/go/pserver/CMakeLists.txt +++ b/go/pserver/CMakeLists.txt @@ -1,4 +1,4 @@ -# Copyright (c) 2016 PaddlePaddle Authors. All Rights Reserve. +# Copyright (c) 2016 PaddlePaddle Authors. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/go/pserver/client/CMakeLists.txt b/go/pserver/client/CMakeLists.txt index e2956110600..1d6f45a6642 100644 --- a/go/pserver/client/CMakeLists.txt +++ b/go/pserver/client/CMakeLists.txt @@ -1,4 +1,4 @@ -# Copyright (c) 2016 PaddlePaddle Authors. All Rights Reserve. +# Copyright (c) 2016 PaddlePaddle Authors. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/go/pserver/client/c/CMakeLists.txt b/go/pserver/client/c/CMakeLists.txt index a932791c7cb..78776219dee 100644 --- a/go/pserver/client/c/CMakeLists.txt +++ b/go/pserver/client/c/CMakeLists.txt @@ -1,4 +1,4 @@ -# Copyright (c) 2016 PaddlePaddle Authors. All Rights Reserve. +# Copyright (c) 2016 PaddlePaddle Authors. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/go/pserver/client/c/cclient.go b/go/pserver/client/c/cclient.go index 2eeec1b6b3c..cddc28e46f4 100644 --- a/go/pserver/client/c/cclient.go +++ b/go/pserver/client/c/cclient.go @@ -1,4 +1,4 @@ -// Copyright (c) 2016 PaddlePaddle Authors. All Rights Reserve. +// Copyright (c) 2016 PaddlePaddle Authors. All Rights Reserved. // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. diff --git a/go/pserver/client/c/test/CMakeLists.txt b/go/pserver/client/c/test/CMakeLists.txt index 3724ccb60b7..411dc503326 100644 --- a/go/pserver/client/c/test/CMakeLists.txt +++ b/go/pserver/client/c/test/CMakeLists.txt @@ -1,4 +1,4 @@ -# Copyright (c) 2016 PaddlePaddle Authors. All Rights Reserve. +# Copyright (c) 2016 PaddlePaddle Authors. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/go/pserver/client/c/test/test_cclient.c b/go/pserver/client/c/test/test_cclient.c index 05ec421fff6..0116e42a0a6 100644 --- a/go/pserver/client/c/test/test_cclient.c +++ b/go/pserver/client/c/test/test_cclient.c @@ -1,4 +1,4 @@ -/* Copyright (c) 2016 PaddlePaddle Authors. All Rights Reserve. +/* Copyright (c) 2016 PaddlePaddle Authors. All Rights Reserved. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/go/pserver/client/c/test/test_mnist.py b/go/pserver/client/c/test/test_mnist.py index 821d9adfcb3..97f63aeb6d4 100644 --- a/go/pserver/client/c/test/test_mnist.py +++ b/go/pserver/client/c/test/test_mnist.py @@ -1,4 +1,4 @@ -# Copyright (c) 2018 PaddlePaddle Authors. All Rights Reserve. +# Copyright (c) 2018 PaddlePaddle Authors. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/go/pserver/client/c/test/test_train.py b/go/pserver/client/c/test/test_train.py index 445a8d3aa48..2db5a0bf6a5 100644 --- a/go/pserver/client/c/test/test_train.py +++ b/go/pserver/client/c/test/test_train.py @@ -1,4 +1,4 @@ -# Copyright (c) 2018 PaddlePaddle Authors. All Rights Reserve. +# Copyright (c) 2018 PaddlePaddle Authors. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/go/pserver/client/client.go b/go/pserver/client/client.go index 18fce34b376..2a8f66a07c7 100644 --- a/go/pserver/client/client.go +++ b/go/pserver/client/client.go @@ -1,4 +1,4 @@ -// Copyright (c) 2016 PaddlePaddle Authors. All Rights Reserve. +// Copyright (c) 2016 PaddlePaddle Authors. All Rights Reserved. // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. diff --git a/go/pserver/client/client_test.go b/go/pserver/client/client_test.go index ec832305ee8..3a067ff5188 100644 --- a/go/pserver/client/client_test.go +++ b/go/pserver/client/client_test.go @@ -1,4 +1,4 @@ -// Copyright (c) 2016 PaddlePaddle Authors. All Rights Reserve. +// Copyright (c) 2016 PaddlePaddle Authors. All Rights Reserved. // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. diff --git a/go/pserver/client/etcd_client.go b/go/pserver/client/etcd_client.go index 16d0c3b9430..3fb835a6e16 100644 --- a/go/pserver/client/etcd_client.go +++ b/go/pserver/client/etcd_client.go @@ -1,4 +1,4 @@ -// Copyright (c) 2016 PaddlePaddle Authors. All Rights Reserve. +// Copyright (c) 2016 PaddlePaddle Authors. All Rights Reserved. // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. diff --git a/go/pserver/etcd_client.go b/go/pserver/etcd_client.go index 08ddb247f26..719013b1bb4 100644 --- a/go/pserver/etcd_client.go +++ b/go/pserver/etcd_client.go @@ -1,4 +1,4 @@ -// Copyright (c) 2016 PaddlePaddle Authors. All Rights Reserve. +// Copyright (c) 2016 PaddlePaddle Authors. All Rights Reserved. // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. diff --git a/go/pserver/optimizer.go b/go/pserver/optimizer.go index 6d28cad25a7..f17577997bc 100644 --- a/go/pserver/optimizer.go +++ b/go/pserver/optimizer.go @@ -1,4 +1,4 @@ -// Copyright (c) 2016 PaddlePaddle Authors. All Rights Reserve. +// Copyright (c) 2016 PaddlePaddle Authors. All Rights Reserved. // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. diff --git a/go/pserver/optimizer_test.go b/go/pserver/optimizer_test.go index 565f56dc286..3b923879d5e 100644 --- a/go/pserver/optimizer_test.go +++ b/go/pserver/optimizer_test.go @@ -1,4 +1,4 @@ -// Copyright (c) 2016 PaddlePaddle Authors. All Rights Reserve. +// Copyright (c) 2016 PaddlePaddle Authors. All Rights Reserved. // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. diff --git a/go/pserver/service.go b/go/pserver/service.go index 7484ec90b1a..d6ead774af5 100644 --- a/go/pserver/service.go +++ b/go/pserver/service.go @@ -1,4 +1,4 @@ -// Copyright (c) 2016 PaddlePaddle Authors. All Rights Reserve. +// Copyright (c) 2016 PaddlePaddle Authors. All Rights Reserved. // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. diff --git a/go/pserver/service_test.go b/go/pserver/service_test.go index 58a743e1fad..6949348e933 100644 --- a/go/pserver/service_test.go +++ b/go/pserver/service_test.go @@ -1,4 +1,4 @@ -// Copyright (c) 2016 PaddlePaddle Authors. All Rights Reserve. +// Copyright (c) 2016 PaddlePaddle Authors. All Rights Reserved. // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. diff --git a/go/utils/networkhelper/CMakeLists.txt b/go/utils/networkhelper/CMakeLists.txt index 9233264ff3c..3100f2b5a52 100644 --- a/go/utils/networkhelper/CMakeLists.txt +++ b/go/utils/networkhelper/CMakeLists.txt @@ -1,4 +1,4 @@ -# Copyright (c) 2016 PaddlePaddle Authors. All Rights Reserve. +# Copyright (c) 2016 PaddlePaddle Authors. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/go/utils/networkhelper/helper.go b/go/utils/networkhelper/helper.go index c3fc747bdaf..d205b6c5020 100644 --- a/go/utils/networkhelper/helper.go +++ b/go/utils/networkhelper/helper.go @@ -1,4 +1,4 @@ -// Copyright (c) 2016 PaddlePaddle Authors. All Rights Reserve. +// Copyright (c) 2016 PaddlePaddle Authors. All Rights Reserved. // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. diff --git a/go/utils/networkhelper/helper_test.go b/go/utils/networkhelper/helper_test.go index 0bc02ad42a9..60b520fae15 100644 --- a/go/utils/networkhelper/helper_test.go +++ b/go/utils/networkhelper/helper_test.go @@ -1,4 +1,4 @@ -// Copyright (c) 2016 PaddlePaddle Authors. All Rights Reserve. +// Copyright (c) 2016 PaddlePaddle Authors. All Rights Reserved. // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. diff --git a/paddle/api/Arguments.cpp b/paddle/api/Arguments.cpp index c6f9106912c..62d6a574d55 100644 --- a/paddle/api/Arguments.cpp +++ b/paddle/api/Arguments.cpp @@ -1,4 +1,4 @@ -/* Copyright (c) 2016 PaddlePaddle Authors. All Rights Reserve. +/* Copyright (c) 2016 PaddlePaddle Authors. All Rights Reserved. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/paddle/api/ConfigParser.cpp b/paddle/api/ConfigParser.cpp index b6ff6ec7890..d362a1e7cf3 100644 --- a/paddle/api/ConfigParser.cpp +++ b/paddle/api/ConfigParser.cpp @@ -1,4 +1,4 @@ -/* Copyright (c) 2016 PaddlePaddle Authors. All Rights Reserve. +/* Copyright (c) 2016 PaddlePaddle Authors. All Rights Reserved. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/paddle/api/Evaluator.cpp b/paddle/api/Evaluator.cpp index fcda6eaf031..c4aac47cbec 100644 --- a/paddle/api/Evaluator.cpp +++ b/paddle/api/Evaluator.cpp @@ -1,4 +1,4 @@ -/* Copyright (c) 2016 PaddlePaddle Authors. All Rights Reserve. +/* Copyright (c) 2016 PaddlePaddle Authors. All Rights Reserved. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/paddle/api/GradientMachine.cpp b/paddle/api/GradientMachine.cpp index dcb5fe086fd..a3d6f0f080a 100644 --- a/paddle/api/GradientMachine.cpp +++ b/paddle/api/GradientMachine.cpp @@ -1,4 +1,4 @@ -/* Copyright (c) 2016 PaddlePaddle Authors. All Rights Reserve. +/* Copyright (c) 2016 PaddlePaddle Authors. All Rights Reserved. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/paddle/api/Internal.h b/paddle/api/Internal.h index d48dd3a04c1..2195cc6739d 100644 --- a/paddle/api/Internal.h +++ b/paddle/api/Internal.h @@ -1,4 +1,4 @@ -/* Copyright (c) 2016 PaddlePaddle Authors. All Rights Reserve. +/* Copyright (c) 2016 PaddlePaddle Authors. All Rights Reserved. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/paddle/api/Matrix.cpp b/paddle/api/Matrix.cpp index 7c375e5cfb9..8282b4629dc 100644 --- a/paddle/api/Matrix.cpp +++ b/paddle/api/Matrix.cpp @@ -1,4 +1,4 @@ -/* Copyright (c) 2016 PaddlePaddle Authors. All Rights Reserve. +/* Copyright (c) 2016 PaddlePaddle Authors. All Rights Reserved. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/paddle/api/PaddleAPI.h b/paddle/api/PaddleAPI.h index 0b9b83d4297..67368d1a99d 100644 --- a/paddle/api/PaddleAPI.h +++ b/paddle/api/PaddleAPI.h @@ -1,4 +1,4 @@ -/* Copyright (c) 2016 PaddlePaddle Authors. All Rights Reserve. +/* Copyright (c) 2016 PaddlePaddle Authors. All Rights Reserved. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/paddle/api/PaddleAPIPrivate.h b/paddle/api/PaddleAPIPrivate.h index f41352bfec7..e141fcd761d 100644 --- a/paddle/api/PaddleAPIPrivate.h +++ b/paddle/api/PaddleAPIPrivate.h @@ -1,4 +1,4 @@ -/* Copyright (c) 2016 PaddlePaddle Authors. All Rights Reserve. +/* Copyright (c) 2016 PaddlePaddle Authors. All Rights Reserved. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/paddle/api/Parameter.cpp b/paddle/api/Parameter.cpp index 19f7a898d6b..589d22e74e7 100644 --- a/paddle/api/Parameter.cpp +++ b/paddle/api/Parameter.cpp @@ -1,4 +1,4 @@ -/* Copyright (c) 2016 PaddlePaddle Authors. All Rights Reserve. +/* Copyright (c) 2016 PaddlePaddle Authors. All Rights Reserved. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/paddle/api/ParameterOptimizer.cpp b/paddle/api/ParameterOptimizer.cpp index 120eea3f701..d4620be3e6f 100644 --- a/paddle/api/ParameterOptimizer.cpp +++ b/paddle/api/ParameterOptimizer.cpp @@ -1,4 +1,4 @@ -/* Copyright (c) 2016 PaddlePaddle Authors. All Rights Reserve. +/* Copyright (c) 2016 PaddlePaddle Authors. All Rights Reserved. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/paddle/api/ParameterUpdater.cpp b/paddle/api/ParameterUpdater.cpp index 8cd73b348c5..63c000c959f 100644 --- a/paddle/api/ParameterUpdater.cpp +++ b/paddle/api/ParameterUpdater.cpp @@ -1,4 +1,4 @@ -/* Copyright (c) 2016 PaddlePaddle Authors. All Rights Reserve. +/* Copyright (c) 2016 PaddlePaddle Authors. All Rights Reserved. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/paddle/api/SequenceGenerator.cpp b/paddle/api/SequenceGenerator.cpp index 8428edc60df..1b30aec8f6b 100644 --- a/paddle/api/SequenceGenerator.cpp +++ b/paddle/api/SequenceGenerator.cpp @@ -1,4 +1,4 @@ -/* Copyright (c) 2016 PaddlePaddle Authors. All Rights Reserve. +/* Copyright (c) 2016 PaddlePaddle Authors. All Rights Reserved. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/paddle/api/Trainer.cpp b/paddle/api/Trainer.cpp index 84e4ca054ab..795460b6505 100644 --- a/paddle/api/Trainer.cpp +++ b/paddle/api/Trainer.cpp @@ -1,4 +1,4 @@ -/* Copyright (c) 2016 PaddlePaddle Authors. All Rights Reserve. +/* Copyright (c) 2016 PaddlePaddle Authors. All Rights Reserved. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/paddle/api/Util.cpp b/paddle/api/Util.cpp index 11bd05c09d1..618e87e9645 100644 --- a/paddle/api/Util.cpp +++ b/paddle/api/Util.cpp @@ -1,4 +1,4 @@ -/* Copyright (c) 2016 PaddlePaddle Authors. All Rights Reserve. +/* Copyright (c) 2016 PaddlePaddle Authors. All Rights Reserved. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/paddle/api/Vector.cpp b/paddle/api/Vector.cpp index 500bc448c92..e2a7b974ca7 100644 --- a/paddle/api/Vector.cpp +++ b/paddle/api/Vector.cpp @@ -1,4 +1,4 @@ -/* Copyright (c) 2016 PaddlePaddle Authors. All Rights Reserve. +/* Copyright (c) 2016 PaddlePaddle Authors. All Rights Reserved. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/paddle/api/test/testTrainConfig.py b/paddle/api/test/testTrainConfig.py index 1a1283e1168..c02d61ebad5 100644 --- a/paddle/api/test/testTrainConfig.py +++ b/paddle/api/test/testTrainConfig.py @@ -1,4 +1,4 @@ -# Copyright (c) 2018 PaddlePaddle Authors. All Rights Reserve. +# Copyright (c) 2018 PaddlePaddle Authors. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/paddle/capi/Arguments.cpp b/paddle/capi/Arguments.cpp index 1ec403077e7..87fac3d6c6a 100644 --- a/paddle/capi/Arguments.cpp +++ b/paddle/capi/Arguments.cpp @@ -1,4 +1,4 @@ -/* Copyright (c) 2016 PaddlePaddle Authors. All Rights Reserve. +/* Copyright (c) 2016 PaddlePaddle Authors. All Rights Reserved. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/paddle/capi/Main.cpp b/paddle/capi/Main.cpp index c0387893400..0a289dede65 100644 --- a/paddle/capi/Main.cpp +++ b/paddle/capi/Main.cpp @@ -1,4 +1,4 @@ -/* Copyright (c) 2016 PaddlePaddle Authors. All Rights Reserve. +/* Copyright (c) 2016 PaddlePaddle Authors. All Rights Reserved. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/paddle/capi/Matrix.cpp b/paddle/capi/Matrix.cpp index cbacd1fb71c..24b0020636c 100644 --- a/paddle/capi/Matrix.cpp +++ b/paddle/capi/Matrix.cpp @@ -1,4 +1,4 @@ -/* Copyright (c) 2016 PaddlePaddle Authors. All Rights Reserve. +/* Copyright (c) 2016 PaddlePaddle Authors. All Rights Reserved. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/paddle/capi/Vector.cpp b/paddle/capi/Vector.cpp index 564708e963b..afb5a9afefe 100644 --- a/paddle/capi/Vector.cpp +++ b/paddle/capi/Vector.cpp @@ -1,4 +1,4 @@ -/* Copyright (c) 2016 PaddlePaddle Authors. All Rights Reserve. +/* Copyright (c) 2016 PaddlePaddle Authors. All Rights Reserved. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/paddle/capi/arguments.h b/paddle/capi/arguments.h index 7c32524a00b..69a66bb012c 100644 --- a/paddle/capi/arguments.h +++ b/paddle/capi/arguments.h @@ -1,4 +1,4 @@ -/* Copyright (c) 2016 PaddlePaddle Authors. All Rights Reserve. +/* Copyright (c) 2016 PaddlePaddle Authors. All Rights Reserved. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/paddle/capi/capi.h b/paddle/capi/capi.h index 4097a1a35a6..749fcc4b799 100644 --- a/paddle/capi/capi.h +++ b/paddle/capi/capi.h @@ -1,4 +1,4 @@ -/* Copyright (c) 2016 PaddlePaddle Authors. All Rights Reserve. +/* Copyright (c) 2016 PaddlePaddle Authors. All Rights Reserved. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/paddle/capi/capi_private.h b/paddle/capi/capi_private.h index c7cdbd5f6f3..3332f42a4a6 100644 --- a/paddle/capi/capi_private.h +++ b/paddle/capi/capi_private.h @@ -1,4 +1,4 @@ -/* Copyright (c) 2016 PaddlePaddle Authors. All Rights Reserve. +/* Copyright (c) 2016 PaddlePaddle Authors. All Rights Reserved. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/paddle/capi/error.cpp b/paddle/capi/error.cpp index 96ce31b45fc..0c25de5ba98 100644 --- a/paddle/capi/error.cpp +++ b/paddle/capi/error.cpp @@ -1,4 +1,4 @@ -/* Copyright (c) 2016 PaddlePaddle Authors. All Rights Reserve. +/* Copyright (c) 2016 PaddlePaddle Authors. All Rights Reserved. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/paddle/capi/error.h b/paddle/capi/error.h index 2da9e0a3ef6..b0940725b50 100644 --- a/paddle/capi/error.h +++ b/paddle/capi/error.h @@ -1,4 +1,4 @@ -/* Copyright (c) 2016 PaddlePaddle Authors. All Rights Reserve. +/* Copyright (c) 2016 PaddlePaddle Authors. All Rights Reserved. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/paddle/capi/examples/model_inference/common/common.h b/paddle/capi/examples/model_inference/common/common.h index 9efcbc387e6..23248b0caf9 100644 --- a/paddle/capi/examples/model_inference/common/common.h +++ b/paddle/capi/examples/model_inference/common/common.h @@ -1,4 +1,4 @@ -// Copyright (c) 2018 PaddlePaddle Authors. All Rights Reserve. +// Copyright (c) 2018 PaddlePaddle Authors. All Rights Reserved. // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. diff --git a/paddle/capi/examples/model_inference/dense/main.c b/paddle/capi/examples/model_inference/dense/main.c index f795bfe11d7..90444889a74 100644 --- a/paddle/capi/examples/model_inference/dense/main.c +++ b/paddle/capi/examples/model_inference/dense/main.c @@ -1,4 +1,4 @@ -// Copyright (c) 2018 PaddlePaddle Authors. All Rights Reserve. +// Copyright (c) 2018 PaddlePaddle Authors. All Rights Reserved. // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. diff --git a/paddle/capi/examples/model_inference/dense/merge_v2_model.py b/paddle/capi/examples/model_inference/dense/merge_v2_model.py index 7aeb482903a..673aba2036c 100644 --- a/paddle/capi/examples/model_inference/dense/merge_v2_model.py +++ b/paddle/capi/examples/model_inference/dense/merge_v2_model.py @@ -1,4 +1,4 @@ -# Copyright (c) 2018 PaddlePaddle Authors. All Rights Reserve. +# Copyright (c) 2018 PaddlePaddle Authors. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/paddle/capi/examples/model_inference/dense/mnist_v2.py b/paddle/capi/examples/model_inference/dense/mnist_v2.py index 183eecfdf2c..3fd15d658ad 100644 --- a/paddle/capi/examples/model_inference/dense/mnist_v2.py +++ b/paddle/capi/examples/model_inference/dense/mnist_v2.py @@ -1,4 +1,4 @@ -# Copyright (c) 2018 PaddlePaddle Authors. All Rights Reserve. +# Copyright (c) 2018 PaddlePaddle Authors. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/paddle/capi/examples/model_inference/dense/trainer_config.py b/paddle/capi/examples/model_inference/dense/trainer_config.py index b94a21a7e40..eca2dce114b 100644 --- a/paddle/capi/examples/model_inference/dense/trainer_config.py +++ b/paddle/capi/examples/model_inference/dense/trainer_config.py @@ -1,4 +1,4 @@ -# Copyright (c) 2018 PaddlePaddle Authors. All Rights Reserve. +# Copyright (c) 2018 PaddlePaddle Authors. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/paddle/capi/examples/model_inference/multi_thread/main.c b/paddle/capi/examples/model_inference/multi_thread/main.c index eecb9138e76..0a99e6b9c8d 100644 --- a/paddle/capi/examples/model_inference/multi_thread/main.c +++ b/paddle/capi/examples/model_inference/multi_thread/main.c @@ -1,4 +1,4 @@ -// Copyright (c) 2018 PaddlePaddle Authors. All Rights Reserve. +// Copyright (c) 2018 PaddlePaddle Authors. All Rights Reserved. // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. diff --git a/paddle/capi/examples/model_inference/multi_thread/main_gpu.c b/paddle/capi/examples/model_inference/multi_thread/main_gpu.c index 85bb4565843..60f0c59e771 100644 --- a/paddle/capi/examples/model_inference/multi_thread/main_gpu.c +++ b/paddle/capi/examples/model_inference/multi_thread/main_gpu.c @@ -1,4 +1,4 @@ -// Copyright (c) 2018 PaddlePaddle Authors. All Rights Reserve. +// Copyright (c) 2018 PaddlePaddle Authors. All Rights Reserved. // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. diff --git a/paddle/capi/examples/model_inference/multi_thread/trainer_config.py b/paddle/capi/examples/model_inference/multi_thread/trainer_config.py deleted file mode 120000 index 70cfb1f7f4c..00000000000 --- a/paddle/capi/examples/model_inference/multi_thread/trainer_config.py +++ /dev/null @@ -1 +0,0 @@ -../dense/trainer_config.py \ No newline at end of file diff --git a/paddle/capi/examples/model_inference/multi_thread/trainer_config.py b/paddle/capi/examples/model_inference/multi_thread/trainer_config.py new file mode 100755 index 00000000000..fa6a12319a9 --- /dev/null +++ b/paddle/capi/examples/model_inference/multi_thread/trainer_config.py @@ -0,0 +1,13 @@ +# Copyright (c) 2018 PaddlePaddle Authors. All Rights Reservedd. +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. diff --git a/paddle/capi/examples/model_inference/sequence/main.c b/paddle/capi/examples/model_inference/sequence/main.c index 80937c830d6..25a38d32f0b 100644 --- a/paddle/capi/examples/model_inference/sequence/main.c +++ b/paddle/capi/examples/model_inference/sequence/main.c @@ -1,4 +1,4 @@ -// Copyright (c) 2018 PaddlePaddle Authors. All Rights Reserve. +// Copyright (c) 2018 PaddlePaddle Authors. All Rights Reserved. // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. diff --git a/paddle/capi/examples/model_inference/sequence/trainer_config.py b/paddle/capi/examples/model_inference/sequence/trainer_config.py index 889f8acdfd2..62ae97e2627 100644 --- a/paddle/capi/examples/model_inference/sequence/trainer_config.py +++ b/paddle/capi/examples/model_inference/sequence/trainer_config.py @@ -1,4 +1,4 @@ -# Copyright (c) 2018 PaddlePaddle Authors. All Rights Reserve. +# Copyright (c) 2018 PaddlePaddle Authors. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/paddle/capi/examples/model_inference/sparse_binary/main.c b/paddle/capi/examples/model_inference/sparse_binary/main.c index efec010a91a..8df1b600885 100644 --- a/paddle/capi/examples/model_inference/sparse_binary/main.c +++ b/paddle/capi/examples/model_inference/sparse_binary/main.c @@ -1,4 +1,4 @@ -// Copyright (c) 2018 PaddlePaddle Authors. All Rights Reserve. +// Copyright (c) 2018 PaddlePaddle Authors. All Rights Reserved. // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. diff --git a/paddle/capi/examples/model_inference/sparse_binary/trainer_config.py b/paddle/capi/examples/model_inference/sparse_binary/trainer_config.py deleted file mode 120000 index 70cfb1f7f4c..00000000000 --- a/paddle/capi/examples/model_inference/sparse_binary/trainer_config.py +++ /dev/null @@ -1 +0,0 @@ -../dense/trainer_config.py \ No newline at end of file diff --git a/paddle/capi/examples/model_inference/sparse_binary/trainer_config.py b/paddle/capi/examples/model_inference/sparse_binary/trainer_config.py new file mode 100755 index 00000000000..fa6a12319a9 --- /dev/null +++ b/paddle/capi/examples/model_inference/sparse_binary/trainer_config.py @@ -0,0 +1,13 @@ +# Copyright (c) 2018 PaddlePaddle Authors. All Rights Reservedd. +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. diff --git a/paddle/capi/gradient_machine.cpp b/paddle/capi/gradient_machine.cpp index 1f0e033c5b7..ea9aab00e3d 100644 --- a/paddle/capi/gradient_machine.cpp +++ b/paddle/capi/gradient_machine.cpp @@ -1,4 +1,4 @@ -/* Copyright (c) 2016 PaddlePaddle Authors. All Rights Reserve. +/* Copyright (c) 2016 PaddlePaddle Authors. All Rights Reserved. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/paddle/capi/gradient_machine.h b/paddle/capi/gradient_machine.h index 7e37dea00b2..f46498b3753 100644 --- a/paddle/capi/gradient_machine.h +++ b/paddle/capi/gradient_machine.h @@ -1,4 +1,4 @@ -/* Copyright (c) 2016 PaddlePaddle Authors. All Rights Reserve. +/* Copyright (c) 2016 PaddlePaddle Authors. All Rights Reserved. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/paddle/capi/main.h b/paddle/capi/main.h index 99c4e8428db..a0cb7bc2967 100644 --- a/paddle/capi/main.h +++ b/paddle/capi/main.h @@ -1,4 +1,4 @@ -/* Copyright (c) 2016 PaddlePaddle Authors. All Rights Reserve. +/* Copyright (c) 2016 PaddlePaddle Authors. All Rights Reserved. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/paddle/capi/matrix.h b/paddle/capi/matrix.h index 8cc3e0034e0..f6747f7b1a1 100644 --- a/paddle/capi/matrix.h +++ b/paddle/capi/matrix.h @@ -1,4 +1,4 @@ -/* Copyright (c) 2016 PaddlePaddle Authors. All Rights Reserve. +/* Copyright (c) 2016 PaddlePaddle Authors. All Rights Reserved. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/paddle/capi/tests/test_Arguments.cpp b/paddle/capi/tests/test_Arguments.cpp index 4792ceb49a7..bb08adf716b 100644 --- a/paddle/capi/tests/test_Arguments.cpp +++ b/paddle/capi/tests/test_Arguments.cpp @@ -1,4 +1,4 @@ -/* Copyright (c) 2016 PaddlePaddle Authors. All Rights Reserve. +/* Copyright (c) 2016 PaddlePaddle Authors. All Rights Reserved. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/paddle/capi/tests/test_GradientMachine.cpp b/paddle/capi/tests/test_GradientMachine.cpp index 89aa64608dd..73b9e477b2a 100644 --- a/paddle/capi/tests/test_GradientMachine.cpp +++ b/paddle/capi/tests/test_GradientMachine.cpp @@ -1,4 +1,4 @@ -/* Copyright (c) 2016 PaddlePaddle Authors. All Rights Reserve. +/* Copyright (c) 2016 PaddlePaddle Authors. All Rights Reserved. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/paddle/capi/tests/test_Matrix.cpp b/paddle/capi/tests/test_Matrix.cpp index 6940c28448a..5ba051ae179 100644 --- a/paddle/capi/tests/test_Matrix.cpp +++ b/paddle/capi/tests/test_Matrix.cpp @@ -1,4 +1,4 @@ -/* Copyright (c) 2016 PaddlePaddle Authors. All Rights Reserve. +/* Copyright (c) 2016 PaddlePaddle Authors. All Rights Reserved. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/paddle/capi/tests/test_Vector.cpp b/paddle/capi/tests/test_Vector.cpp index 365160dc9a0..fa7407e484c 100644 --- a/paddle/capi/tests/test_Vector.cpp +++ b/paddle/capi/tests/test_Vector.cpp @@ -1,4 +1,4 @@ -/* Copyright (c) 2016 PaddlePaddle Authors. All Rights Reserve. +/* Copyright (c) 2016 PaddlePaddle Authors. All Rights Reserved. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/paddle/capi/tests/test_predict_network.py b/paddle/capi/tests/test_predict_network.py index 6560417b2a1..b8efb25704d 100644 --- a/paddle/capi/tests/test_predict_network.py +++ b/paddle/capi/tests/test_predict_network.py @@ -1,4 +1,4 @@ -# Copyright (c) 2018 PaddlePaddle Authors. All Rights Reserve. +# Copyright (c) 2018 PaddlePaddle Authors. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/paddle/capi/vector.h b/paddle/capi/vector.h index a92aeff1642..a79f7fdf789 100644 --- a/paddle/capi/vector.h +++ b/paddle/capi/vector.h @@ -1,4 +1,4 @@ -/* Copyright (c) 2016 PaddlePaddle Authors. All Rights Reserve. +/* Copyright (c) 2016 PaddlePaddle Authors. All Rights Reserved. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/paddle/cuda/include/hl_activation_functions.h b/paddle/cuda/include/hl_activation_functions.h index 93957fd9644..29ec2484200 100644 --- a/paddle/cuda/include/hl_activation_functions.h +++ b/paddle/cuda/include/hl_activation_functions.h @@ -1,4 +1,4 @@ -/* Copyright (c) 2016 PaddlePaddle Authors. All Rights Reserve. +/* Copyright (c) 2016 PaddlePaddle Authors. All Rights Reserved. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/paddle/cuda/include/hl_aggregate.h b/paddle/cuda/include/hl_aggregate.h index d2189de689f..1ca26aa3bbb 100644 --- a/paddle/cuda/include/hl_aggregate.h +++ b/paddle/cuda/include/hl_aggregate.h @@ -1,4 +1,4 @@ -/* Copyright (c) 2016 PaddlePaddle Authors. All Rights Reserve. +/* Copyright (c) 2016 PaddlePaddle Authors. All Rights Reserved. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/paddle/cuda/include/hl_avx_functions.h b/paddle/cuda/include/hl_avx_functions.h index 35f4eabb4c0..9fb99a36ea6 100644 --- a/paddle/cuda/include/hl_avx_functions.h +++ b/paddle/cuda/include/hl_avx_functions.h @@ -1,4 +1,4 @@ -/* Copyright (c) 2016 PaddlePaddle Authors. All Rights Reserve. +/* Copyright (c) 2016 PaddlePaddle Authors. All Rights Reserved. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/paddle/cuda/include/hl_base.h b/paddle/cuda/include/hl_base.h index 5b9884b7865..6c4f09dacb4 100644 --- a/paddle/cuda/include/hl_base.h +++ b/paddle/cuda/include/hl_base.h @@ -1,4 +1,4 @@ -/* Copyright (c) 2016 PaddlePaddle Authors. All Rights Reserve. +/* Copyright (c) 2016 PaddlePaddle Authors. All Rights Reserved. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/paddle/cuda/include/hl_batch_norm.h b/paddle/cuda/include/hl_batch_norm.h index afc5e0b2dea..7814204d1b0 100644 --- a/paddle/cuda/include/hl_batch_norm.h +++ b/paddle/cuda/include/hl_batch_norm.h @@ -1,4 +1,4 @@ -/* Copyright (c) 2016 PaddlePaddle Authors. All Rights Reserve. +/* Copyright (c) 2016 PaddlePaddle Authors. All Rights Reserved. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/paddle/cuda/include/hl_batch_transpose.h b/paddle/cuda/include/hl_batch_transpose.h index e2e958cd67a..a16d3764fc7 100644 --- a/paddle/cuda/include/hl_batch_transpose.h +++ b/paddle/cuda/include/hl_batch_transpose.h @@ -1,4 +1,4 @@ -/* Copyright (c) 2016 PaddlePaddle Authors. All Rights Reserve. +/* Copyright (c) 2016 PaddlePaddle Authors. All Rights Reserved. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/paddle/cuda/include/hl_cnn.h b/paddle/cuda/include/hl_cnn.h index 88418062927..63ec5156479 100644 --- a/paddle/cuda/include/hl_cnn.h +++ b/paddle/cuda/include/hl_cnn.h @@ -1,4 +1,4 @@ -/* Copyright (c) 2016 PaddlePaddle Authors. All Rights Reserve. +/* Copyright (c) 2016 PaddlePaddle Authors. All Rights Reserved. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/paddle/cuda/include/hl_cpu_gru.cuh b/paddle/cuda/include/hl_cpu_gru.cuh index e4f6bf42c61..ce1643932de 100644 --- a/paddle/cuda/include/hl_cpu_gru.cuh +++ b/paddle/cuda/include/hl_cpu_gru.cuh @@ -1,4 +1,4 @@ -/* Copyright (c) 2016 PaddlePaddle Authors. All Rights Reserve. +/* Copyright (c) 2016 PaddlePaddle Authors. All Rights Reserved. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/paddle/cuda/include/hl_cpu_lstm.cuh b/paddle/cuda/include/hl_cpu_lstm.cuh index 0e412fcdf57..58a97d1230d 100644 --- a/paddle/cuda/include/hl_cpu_lstm.cuh +++ b/paddle/cuda/include/hl_cpu_lstm.cuh @@ -1,4 +1,4 @@ -/* Copyright (c) 2016 PaddlePaddle Authors. All Rights Reserve. +/* Copyright (c) 2016 PaddlePaddle Authors. All Rights Reserved. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/paddle/cuda/include/hl_cpu_matrix_kernel.cuh b/paddle/cuda/include/hl_cpu_matrix_kernel.cuh index aaa24325514..4db9bb74e0a 100644 --- a/paddle/cuda/include/hl_cpu_matrix_kernel.cuh +++ b/paddle/cuda/include/hl_cpu_matrix_kernel.cuh @@ -1,4 +1,4 @@ -/* Copyright (c) 2016 PaddlePaddle Authors. All Rights Reserve. +/* Copyright (c) 2016 PaddlePaddle Authors. All Rights Reserved. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/paddle/cuda/include/hl_cpu_matrix_kernel_detail.cuh b/paddle/cuda/include/hl_cpu_matrix_kernel_detail.cuh index 85ca836fdc4..54a749b9907 100644 --- a/paddle/cuda/include/hl_cpu_matrix_kernel_detail.cuh +++ b/paddle/cuda/include/hl_cpu_matrix_kernel_detail.cuh @@ -1,4 +1,4 @@ -/* Copyright (c) 2016 PaddlePaddle Authors. All Rights Reserve. +/* Copyright (c) 2016 PaddlePaddle Authors. All Rights Reserved. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/paddle/cuda/include/hl_cpu_scalar.cuh b/paddle/cuda/include/hl_cpu_scalar.cuh index 93043cd4bc0..939302e9715 100644 --- a/paddle/cuda/include/hl_cpu_scalar.cuh +++ b/paddle/cuda/include/hl_cpu_scalar.cuh @@ -1,4 +1,4 @@ -/* Copyright (c) 2016 PaddlePaddle Authors. All Rights Reserve. +/* Copyright (c) 2016 PaddlePaddle Authors. All Rights Reserved. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/paddle/cuda/include/hl_cpu_simd_neon.cuh b/paddle/cuda/include/hl_cpu_simd_neon.cuh index 0b1cf4abdc4..e54e0f4646b 100644 --- a/paddle/cuda/include/hl_cpu_simd_neon.cuh +++ b/paddle/cuda/include/hl_cpu_simd_neon.cuh @@ -1,4 +1,4 @@ -/* Copyright (c) 2016 PaddlePaddle Authors. All Rights Reserve. +/* Copyright (c) 2016 PaddlePaddle Authors. All Rights Reserved. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/paddle/cuda/include/hl_cpu_simd_sse.cuh b/paddle/cuda/include/hl_cpu_simd_sse.cuh index a104b626220..20c37d4dd31 100644 --- a/paddle/cuda/include/hl_cpu_simd_sse.cuh +++ b/paddle/cuda/include/hl_cpu_simd_sse.cuh @@ -1,4 +1,4 @@ -/* Copyright (c) 2016 PaddlePaddle Authors. All Rights Reserve. +/* Copyright (c) 2016 PaddlePaddle Authors. All Rights Reserved. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/paddle/cuda/include/hl_cuda.h b/paddle/cuda/include/hl_cuda.h index 5383c1130bb..70efcccb818 100644 --- a/paddle/cuda/include/hl_cuda.h +++ b/paddle/cuda/include/hl_cuda.h @@ -1,4 +1,4 @@ -/* Copyright (c) 2016 PaddlePaddle Authors. All Rights Reserve. +/* Copyright (c) 2016 PaddlePaddle Authors. All Rights Reserved. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/paddle/cuda/include/hl_cuda.ph b/paddle/cuda/include/hl_cuda.ph index 701916b2792..7c4465e51ff 100644 --- a/paddle/cuda/include/hl_cuda.ph +++ b/paddle/cuda/include/hl_cuda.ph @@ -1,4 +1,4 @@ -/* Copyright (c) 2016 PaddlePaddle Authors. All Rights Reserve. +/* Copyright (c) 2016 PaddlePaddle Authors. All Rights Reserved. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/paddle/cuda/include/hl_cuda_cublas.h b/paddle/cuda/include/hl_cuda_cublas.h index e206e42b2ab..3959f81677b 100644 --- a/paddle/cuda/include/hl_cuda_cublas.h +++ b/paddle/cuda/include/hl_cuda_cublas.h @@ -1,4 +1,4 @@ -/* Copyright (c) 2016 PaddlePaddle Authors. All Rights Reserve. +/* Copyright (c) 2016 PaddlePaddle Authors. All Rights Reserved. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/paddle/cuda/include/hl_cuda_cudnn.h b/paddle/cuda/include/hl_cuda_cudnn.h index b44b071bd1b..4664e4144a8 100644 --- a/paddle/cuda/include/hl_cuda_cudnn.h +++ b/paddle/cuda/include/hl_cuda_cudnn.h @@ -1,4 +1,4 @@ -/* Copyright (c) 2016 PaddlePaddle Authors. All Rights Reserve. +/* Copyright (c) 2016 PaddlePaddle Authors. All Rights Reserved. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/paddle/cuda/include/hl_cuda_cudnn.ph b/paddle/cuda/include/hl_cuda_cudnn.ph index 61378937cee..bb3b89f6faa 100644 --- a/paddle/cuda/include/hl_cuda_cudnn.ph +++ b/paddle/cuda/include/hl_cuda_cudnn.ph @@ -1,4 +1,4 @@ -/* Copyright (c) 2016 PaddlePaddle Authors. All Rights Reserve. +/* Copyright (c) 2016 PaddlePaddle Authors. All Rights Reserved. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/paddle/cuda/include/hl_device_functions.cuh b/paddle/cuda/include/hl_device_functions.cuh index e0b5632f23e..ef068e10622 100755 --- a/paddle/cuda/include/hl_device_functions.cuh +++ b/paddle/cuda/include/hl_device_functions.cuh @@ -1,4 +1,4 @@ -/* Copyright (c) 2016 PaddlePaddle Authors. All Rights Reserve. +/* Copyright (c) 2016 PaddlePaddle Authors. All Rights Reserved. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/paddle/cuda/include/hl_functions.h b/paddle/cuda/include/hl_functions.h index 0d7e80a855d..9912b4c1799 100644 --- a/paddle/cuda/include/hl_functions.h +++ b/paddle/cuda/include/hl_functions.h @@ -1,4 +1,4 @@ -/* Copyright (c) 2016 PaddlePaddle Authors. All Rights Reserve. +/* Copyright (c) 2016 PaddlePaddle Authors. All Rights Reserved. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/paddle/cuda/include/hl_gpu.h b/paddle/cuda/include/hl_gpu.h index 4ab8de80d1c..50a2e9cdd29 100644 --- a/paddle/cuda/include/hl_gpu.h +++ b/paddle/cuda/include/hl_gpu.h @@ -1,4 +1,4 @@ -/* Copyright (c) 2016 PaddlePaddle Authors. All Rights Reserve. +/* Copyright (c) 2016 PaddlePaddle Authors. All Rights Reserved. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/paddle/cuda/include/hl_gpu_functions.cuh b/paddle/cuda/include/hl_gpu_functions.cuh index 8e64cbe360e..705aa71f4ba 100644 --- a/paddle/cuda/include/hl_gpu_functions.cuh +++ b/paddle/cuda/include/hl_gpu_functions.cuh @@ -1,4 +1,4 @@ -/* Copyright (c) 2016 PaddlePaddle Authors. All Rights Reserve. +/* Copyright (c) 2016 PaddlePaddle Authors. All Rights Reserved. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/paddle/cuda/include/hl_gpu_gru.cuh b/paddle/cuda/include/hl_gpu_gru.cuh index 6668e135d2b..9fcad2c3bc2 100644 --- a/paddle/cuda/include/hl_gpu_gru.cuh +++ b/paddle/cuda/include/hl_gpu_gru.cuh @@ -1,4 +1,4 @@ -/* Copyright (c) 2016 PaddlePaddle Authors. All Rights Reserve. +/* Copyright (c) 2016 PaddlePaddle Authors. All Rights Reserved. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/paddle/cuda/include/hl_gpu_lstm.cuh b/paddle/cuda/include/hl_gpu_lstm.cuh index 5dceba2f5b8..92517a44d23 100644 --- a/paddle/cuda/include/hl_gpu_lstm.cuh +++ b/paddle/cuda/include/hl_gpu_lstm.cuh @@ -1,4 +1,4 @@ -/* Copyright (c) 2016 PaddlePaddle Authors. All Rights Reserve. +/* Copyright (c) 2016 PaddlePaddle Authors. All Rights Reserved. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/paddle/cuda/include/hl_gpu_matrix_kernel.cuh b/paddle/cuda/include/hl_gpu_matrix_kernel.cuh index 9bbdf5fa726..0db023ce374 100644 --- a/paddle/cuda/include/hl_gpu_matrix_kernel.cuh +++ b/paddle/cuda/include/hl_gpu_matrix_kernel.cuh @@ -1,4 +1,4 @@ -/* Copyright (c) 2016 PaddlePaddle Authors. All Rights Reserve. +/* Copyright (c) 2016 PaddlePaddle Authors. All Rights Reserved. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/paddle/cuda/include/hl_gru_ops.cuh b/paddle/cuda/include/hl_gru_ops.cuh index 45f66ad533e..6c647c514db 100644 --- a/paddle/cuda/include/hl_gru_ops.cuh +++ b/paddle/cuda/include/hl_gru_ops.cuh @@ -1,4 +1,4 @@ -/* Copyright (c) 2016 PaddlePaddle Authors. All Rights Reserve. +/* Copyright (c) 2016 PaddlePaddle Authors. All Rights Reserved. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/paddle/cuda/include/hl_lstm.h b/paddle/cuda/include/hl_lstm.h index 857756e5cd4..5db4783bf4d 100644 --- a/paddle/cuda/include/hl_lstm.h +++ b/paddle/cuda/include/hl_lstm.h @@ -1,4 +1,4 @@ -/* Copyright (c) 2016 PaddlePaddle Authors. All Rights Reserve. +/* Copyright (c) 2016 PaddlePaddle Authors. All Rights Reserved. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/paddle/cuda/include/hl_lstm_ops.cuh b/paddle/cuda/include/hl_lstm_ops.cuh index 2601060cc2e..394fdf5ac07 100644 --- a/paddle/cuda/include/hl_lstm_ops.cuh +++ b/paddle/cuda/include/hl_lstm_ops.cuh @@ -1,4 +1,4 @@ -/* Copyright (c) 2016 PaddlePaddle Authors. All Rights Reserve. +/* Copyright (c) 2016 PaddlePaddle Authors. All Rights Reserved. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/paddle/cuda/include/hl_matrix.h b/paddle/cuda/include/hl_matrix.h index 7daca18761b..88d538343f9 100644 --- a/paddle/cuda/include/hl_matrix.h +++ b/paddle/cuda/include/hl_matrix.h @@ -1,4 +1,4 @@ -/* Copyright (c) 2016 PaddlePaddle Authors. All Rights Reserve. +/* Copyright (c) 2016 PaddlePaddle Authors. All Rights Reserved. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/paddle/cuda/include/hl_matrix_apply.cuh b/paddle/cuda/include/hl_matrix_apply.cuh index b10d177b970..a067c8233b9 100644 --- a/paddle/cuda/include/hl_matrix_apply.cuh +++ b/paddle/cuda/include/hl_matrix_apply.cuh @@ -1,4 +1,4 @@ -/* Copyright (c) 2016 PaddlePaddle Authors. All Rights Reserve. +/* Copyright (c) 2016 PaddlePaddle Authors. All Rights Reserved. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/paddle/cuda/include/hl_matrix_base.cuh b/paddle/cuda/include/hl_matrix_base.cuh index 53fdb47ec9c..a309bb0011c 100644 --- a/paddle/cuda/include/hl_matrix_base.cuh +++ b/paddle/cuda/include/hl_matrix_base.cuh @@ -1,4 +1,4 @@ -/* Copyright (c) 2016 PaddlePaddle Authors. All Rights Reserve. +/* Copyright (c) 2016 PaddlePaddle Authors. All Rights Reserved. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/paddle/cuda/include/hl_matrix_base_detail.cuh b/paddle/cuda/include/hl_matrix_base_detail.cuh index de1fd17d524..74211bcb929 100644 --- a/paddle/cuda/include/hl_matrix_base_detail.cuh +++ b/paddle/cuda/include/hl_matrix_base_detail.cuh @@ -1,4 +1,4 @@ -/* Copyright (c) 2016 PaddlePaddle Authors. All Rights Reserve. +/* Copyright (c) 2016 PaddlePaddle Authors. All Rights Reserved. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/paddle/cuda/include/hl_matrix_ops.cuh b/paddle/cuda/include/hl_matrix_ops.cuh index fc29201357c..4e8bd912349 100644 --- a/paddle/cuda/include/hl_matrix_ops.cuh +++ b/paddle/cuda/include/hl_matrix_ops.cuh @@ -1,4 +1,4 @@ -/* Copyright (c) 2016 PaddlePaddle Authors. All Rights Reserve. +/* Copyright (c) 2016 PaddlePaddle Authors. All Rights Reserved. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/paddle/cuda/include/hl_matrix_type.cuh b/paddle/cuda/include/hl_matrix_type.cuh index e18235219bd..e61c0d0a479 100644 --- a/paddle/cuda/include/hl_matrix_type.cuh +++ b/paddle/cuda/include/hl_matrix_type.cuh @@ -1,4 +1,4 @@ -/* Copyright (c) 2016 PaddlePaddle Authors. All Rights Reserve. +/* Copyright (c) 2016 PaddlePaddle Authors. All Rights Reserved. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/paddle/cuda/include/hl_perturbation_util.cuh b/paddle/cuda/include/hl_perturbation_util.cuh index 93b81bf0358..e0a27778cae 100644 --- a/paddle/cuda/include/hl_perturbation_util.cuh +++ b/paddle/cuda/include/hl_perturbation_util.cuh @@ -1,4 +1,4 @@ -/* Copyright (c) 2016 PaddlePaddle Authors. All Rights Reserve. +/* Copyright (c) 2016 PaddlePaddle Authors. All Rights Reserved. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/paddle/cuda/include/hl_recurrent_apply.cuh b/paddle/cuda/include/hl_recurrent_apply.cuh index 113446cf756..b2cc231f58d 100644 --- a/paddle/cuda/include/hl_recurrent_apply.cuh +++ b/paddle/cuda/include/hl_recurrent_apply.cuh @@ -1,4 +1,4 @@ -/* Copyright (c) 2016 PaddlePaddle Authors. All Rights Reserve. +/* Copyright (c) 2016 PaddlePaddle Authors. All Rights Reserved. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/paddle/cuda/include/hl_sequence.h b/paddle/cuda/include/hl_sequence.h index 973ddcceed9..3923bdd921b 100644 --- a/paddle/cuda/include/hl_sequence.h +++ b/paddle/cuda/include/hl_sequence.h @@ -1,4 +1,4 @@ -/* Copyright (c) 2016 PaddlePaddle Authors. All Rights Reserve. +/* Copyright (c) 2016 PaddlePaddle Authors. All Rights Reserved. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/paddle/cuda/include/hl_sparse.h b/paddle/cuda/include/hl_sparse.h index 67fe701c109..9aab52e045c 100644 --- a/paddle/cuda/include/hl_sparse.h +++ b/paddle/cuda/include/hl_sparse.h @@ -1,4 +1,4 @@ -/* Copyright (c) 2016 PaddlePaddle Authors. All Rights Reserve. +/* Copyright (c) 2016 PaddlePaddle Authors. All Rights Reserved. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/paddle/cuda/include/hl_sparse.ph b/paddle/cuda/include/hl_sparse.ph index 13bba178116..c0fdccb942c 100644 --- a/paddle/cuda/include/hl_sparse.ph +++ b/paddle/cuda/include/hl_sparse.ph @@ -1,4 +1,4 @@ -/* Copyright (c) 2016 PaddlePaddle Authors. All Rights Reserve. +/* Copyright (c) 2016 PaddlePaddle Authors. All Rights Reserved. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/paddle/cuda/include/hl_table_apply.h b/paddle/cuda/include/hl_table_apply.h index 2170b97f4d2..dff60aa0a22 100644 --- a/paddle/cuda/include/hl_table_apply.h +++ b/paddle/cuda/include/hl_table_apply.h @@ -1,4 +1,4 @@ -/* Copyright (c) 2016 PaddlePaddle Authors. All Rights Reserve. +/* Copyright (c) 2016 PaddlePaddle Authors. All Rights Reserved. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/paddle/cuda/include/hl_tensor_ops.h b/paddle/cuda/include/hl_tensor_ops.h index b2bf334dab9..85a022ff5e2 100644 --- a/paddle/cuda/include/hl_tensor_ops.h +++ b/paddle/cuda/include/hl_tensor_ops.h @@ -1,4 +1,4 @@ -/* Copyright (c) 2016 PaddlePaddle Authors. All Rights Reserve. +/* Copyright (c) 2016 PaddlePaddle Authors. All Rights Reserved. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/paddle/cuda/include/hl_thread.ph b/paddle/cuda/include/hl_thread.ph index a3830ff8d8a..4abede1517a 100644 --- a/paddle/cuda/include/hl_thread.ph +++ b/paddle/cuda/include/hl_thread.ph @@ -1,4 +1,4 @@ -/* Copyright (c) 2016 PaddlePaddle Authors. All Rights Reserve. +/* Copyright (c) 2016 PaddlePaddle Authors. All Rights Reserved. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/paddle/cuda/include/hl_time.h b/paddle/cuda/include/hl_time.h index f63f0258206..61d80c065c8 100644 --- a/paddle/cuda/include/hl_time.h +++ b/paddle/cuda/include/hl_time.h @@ -1,4 +1,4 @@ -/* Copyright (c) 2016 PaddlePaddle Authors. All Rights Reserve. +/* Copyright (c) 2016 PaddlePaddle Authors. All Rights Reserved. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/paddle/cuda/include/hl_top_k.h b/paddle/cuda/include/hl_top_k.h index 79ae0d0e741..a3c7872f525 100644 --- a/paddle/cuda/include/hl_top_k.h +++ b/paddle/cuda/include/hl_top_k.h @@ -1,4 +1,4 @@ -/* Copyright (c) 2016 PaddlePaddle Authors. All Rights Reserve. +/* Copyright (c) 2016 PaddlePaddle Authors. All Rights Reserved. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/paddle/cuda/include/hl_warpctc_wrap.h b/paddle/cuda/include/hl_warpctc_wrap.h index 7885ae57014..0857bd1aa1b 100644 --- a/paddle/cuda/include/hl_warpctc_wrap.h +++ b/paddle/cuda/include/hl_warpctc_wrap.h @@ -1,4 +1,4 @@ -/* Copyright (c) 2016 PaddlePaddle Authors. All Rights Reserve. +/* Copyright (c) 2016 PaddlePaddle Authors. All Rights Reserved. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/paddle/cuda/include/stub/hl_aggregate_stub.h b/paddle/cuda/include/stub/hl_aggregate_stub.h index bbfa9b8fad5..2ac841facc6 100644 --- a/paddle/cuda/include/stub/hl_aggregate_stub.h +++ b/paddle/cuda/include/stub/hl_aggregate_stub.h @@ -1,4 +1,4 @@ -/* Copyright (c) 2016 PaddlePaddle Authors. All Rights Reserve. +/* Copyright (c) 2016 PaddlePaddle Authors. All Rights Reserved. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/paddle/cuda/include/stub/hl_cnn_stub.h b/paddle/cuda/include/stub/hl_cnn_stub.h index 706cc59a8e3..c39bd3228d3 100644 --- a/paddle/cuda/include/stub/hl_cnn_stub.h +++ b/paddle/cuda/include/stub/hl_cnn_stub.h @@ -1,4 +1,4 @@ -/* Copyright (c) 2016 PaddlePaddle Authors. All Rights Reserve. +/* Copyright (c) 2016 PaddlePaddle Authors. All Rights Reserved. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/paddle/cuda/include/stub/hl_cuda_cublas_stub.h b/paddle/cuda/include/stub/hl_cuda_cublas_stub.h index e86fd853f40..0b2300cda95 100644 --- a/paddle/cuda/include/stub/hl_cuda_cublas_stub.h +++ b/paddle/cuda/include/stub/hl_cuda_cublas_stub.h @@ -1,4 +1,4 @@ -/* Copyright (c) 2016 PaddlePaddle Authors. All Rights Reserve. +/* Copyright (c) 2016 PaddlePaddle Authors. All Rights Reserved. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/paddle/cuda/include/stub/hl_cuda_cudnn_stub.h b/paddle/cuda/include/stub/hl_cuda_cudnn_stub.h index 3afcc6fa85a..4b8bdf7507b 100644 --- a/paddle/cuda/include/stub/hl_cuda_cudnn_stub.h +++ b/paddle/cuda/include/stub/hl_cuda_cudnn_stub.h @@ -1,4 +1,4 @@ -/* Copyright (c) 2016 PaddlePaddle Authors. All Rights Reserve. +/* Copyright (c) 2016 PaddlePaddle Authors. All Rights Reserved. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/paddle/cuda/include/stub/hl_cuda_stub.h b/paddle/cuda/include/stub/hl_cuda_stub.h index 5246a8d5a48..ac8b22ef31a 100644 --- a/paddle/cuda/include/stub/hl_cuda_stub.h +++ b/paddle/cuda/include/stub/hl_cuda_stub.h @@ -1,4 +1,4 @@ -/* Copyright (c) 2016 PaddlePaddle Authors. All Rights Reserve. +/* Copyright (c) 2016 PaddlePaddle Authors. All Rights Reserved. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/paddle/cuda/include/stub/hl_lstm_stub.h b/paddle/cuda/include/stub/hl_lstm_stub.h index 246ba79f632..be2b71787e5 100644 --- a/paddle/cuda/include/stub/hl_lstm_stub.h +++ b/paddle/cuda/include/stub/hl_lstm_stub.h @@ -1,4 +1,4 @@ -/* Copyright (c) 2016 PaddlePaddle Authors. All Rights Reserve. +/* Copyright (c) 2016 PaddlePaddle Authors. All Rights Reserved. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/paddle/cuda/include/stub/hl_matrix_stub.h b/paddle/cuda/include/stub/hl_matrix_stub.h index 46e77e14076..914a2edaf21 100644 --- a/paddle/cuda/include/stub/hl_matrix_stub.h +++ b/paddle/cuda/include/stub/hl_matrix_stub.h @@ -1,4 +1,4 @@ -/* Copyright (c) 2016 PaddlePaddle Authors. All Rights Reserve. +/* Copyright (c) 2016 PaddlePaddle Authors. All Rights Reserved. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/paddle/cuda/include/stub/hl_sequence_stub.h b/paddle/cuda/include/stub/hl_sequence_stub.h index 920b417b1c7..44bc3dbaff3 100644 --- a/paddle/cuda/include/stub/hl_sequence_stub.h +++ b/paddle/cuda/include/stub/hl_sequence_stub.h @@ -1,4 +1,4 @@ -/* Copyright (c) 2016 PaddlePaddle Authors. All Rights Reserve. +/* Copyright (c) 2016 PaddlePaddle Authors. All Rights Reserved. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/paddle/cuda/include/stub/hl_sparse_stub.h b/paddle/cuda/include/stub/hl_sparse_stub.h index bd17461d88f..4001d4fb741 100644 --- a/paddle/cuda/include/stub/hl_sparse_stub.h +++ b/paddle/cuda/include/stub/hl_sparse_stub.h @@ -1,4 +1,4 @@ -/* Copyright (c) 2016 PaddlePaddle Authors. All Rights Reserve. +/* Copyright (c) 2016 PaddlePaddle Authors. All Rights Reserved. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/paddle/cuda/src/avx_mathfun.h b/paddle/cuda/src/avx_mathfun.h index a0ba71faba9..8e698e746a1 100644 --- a/paddle/cuda/src/avx_mathfun.h +++ b/paddle/cuda/src/avx_mathfun.h @@ -1,4 +1,4 @@ -// Copyright (c) 2018 PaddlePaddle Authors. All Rights Reserve. +// Copyright (c) 2018 PaddlePaddle Authors. All Rights Reserved. // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. diff --git a/paddle/cuda/src/hl_avx_functions.cc b/paddle/cuda/src/hl_avx_functions.cc index 90664758764..6fb7c9dd06a 100644 --- a/paddle/cuda/src/hl_avx_functions.cc +++ b/paddle/cuda/src/hl_avx_functions.cc @@ -1,4 +1,4 @@ -/* Copyright (c) 2016 PaddlePaddle Authors. All Rights Reserve. +/* Copyright (c) 2016 PaddlePaddle Authors. All Rights Reserved. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/paddle/cuda/src/hl_batch_norm.cu b/paddle/cuda/src/hl_batch_norm.cu index 5828ecb8e04..f9ffde0d53e 100644 --- a/paddle/cuda/src/hl_batch_norm.cu +++ b/paddle/cuda/src/hl_batch_norm.cu @@ -1,4 +1,4 @@ -/* Copyright (c) 2016 PaddlePaddle Authors. All Rights Reserve. +/* Copyright (c) 2016 PaddlePaddle Authors. All Rights Reserved. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/paddle/cuda/src/hl_batch_transpose.cu b/paddle/cuda/src/hl_batch_transpose.cu index f4c253df7b4..221839905d7 100644 --- a/paddle/cuda/src/hl_batch_transpose.cu +++ b/paddle/cuda/src/hl_batch_transpose.cu @@ -1,4 +1,4 @@ -/* Copyright (c) 2016 PaddlePaddle Authors. All Rights Reserve. +/* Copyright (c) 2016 PaddlePaddle Authors. All Rights Reserved. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/paddle/cuda/src/hl_cpu_functions.cc b/paddle/cuda/src/hl_cpu_functions.cc index c2117a7315f..1306576bcb9 100644 --- a/paddle/cuda/src/hl_cpu_functions.cc +++ b/paddle/cuda/src/hl_cpu_functions.cc @@ -1,4 +1,4 @@ -/* Copyright (c) 2016 PaddlePaddle Authors. All Rights Reserve. +/* Copyright (c) 2016 PaddlePaddle Authors. All Rights Reserved. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/paddle/cuda/src/hl_cuda_aggregate.cu b/paddle/cuda/src/hl_cuda_aggregate.cu index 16a54ad343f..d30c264127f 100644 --- a/paddle/cuda/src/hl_cuda_aggregate.cu +++ b/paddle/cuda/src/hl_cuda_aggregate.cu @@ -1,4 +1,4 @@ -/* Copyright (c) 2016 PaddlePaddle Authors. All Rights Reserve. +/* Copyright (c) 2016 PaddlePaddle Authors. All Rights Reserved. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/paddle/cuda/src/hl_cuda_cnn.cu b/paddle/cuda/src/hl_cuda_cnn.cu index 2d1bc4f6d55..a4459243e8a 100644 --- a/paddle/cuda/src/hl_cuda_cnn.cu +++ b/paddle/cuda/src/hl_cuda_cnn.cu @@ -1,4 +1,4 @@ -/* Copyright (c) 2016 PaddlePaddle Authors. All Rights Reserve. +/* Copyright (c) 2016 PaddlePaddle Authors. All Rights Reserved. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/paddle/cuda/src/hl_cuda_cublas.cc b/paddle/cuda/src/hl_cuda_cublas.cc index 6163209e9bc..975df428789 100644 --- a/paddle/cuda/src/hl_cuda_cublas.cc +++ b/paddle/cuda/src/hl_cuda_cublas.cc @@ -1,4 +1,4 @@ -/* Copyright (c) 2016 PaddlePaddle Authors. All Rights Reserve. +/* Copyright (c) 2016 PaddlePaddle Authors. All Rights Reserved. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/paddle/cuda/src/hl_cuda_cudnn.cc b/paddle/cuda/src/hl_cuda_cudnn.cc index b8caf48f9c0..dfa935dcff9 100644 --- a/paddle/cuda/src/hl_cuda_cudnn.cc +++ b/paddle/cuda/src/hl_cuda_cudnn.cc @@ -1,4 +1,4 @@ -/* Copyright (c) 2016 PaddlePaddle Authors. All Rights Reserve. +/* Copyright (c) 2016 PaddlePaddle Authors. All Rights Reserved. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/paddle/cuda/src/hl_cuda_device.cc b/paddle/cuda/src/hl_cuda_device.cc index 4042d9742a9..3025aa48523 100644 --- a/paddle/cuda/src/hl_cuda_device.cc +++ b/paddle/cuda/src/hl_cuda_device.cc @@ -1,4 +1,4 @@ -/* Copyright (c) 2016 PaddlePaddle Authors. All Rights Reserve. +/* Copyright (c) 2016 PaddlePaddle Authors. All Rights Reserved. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/paddle/cuda/src/hl_cuda_lstm.cu b/paddle/cuda/src/hl_cuda_lstm.cu index a5ce81a904e..21c0c26b6ef 100644 --- a/paddle/cuda/src/hl_cuda_lstm.cu +++ b/paddle/cuda/src/hl_cuda_lstm.cu @@ -1,4 +1,4 @@ -/* Copyright (c) 2016 PaddlePaddle Authors. All Rights Reserve. +/* Copyright (c) 2016 PaddlePaddle Authors. All Rights Reserved. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/paddle/cuda/src/hl_cuda_matrix.cu b/paddle/cuda/src/hl_cuda_matrix.cu index 607efb4f6b0..3e17c8090c5 100644 --- a/paddle/cuda/src/hl_cuda_matrix.cu +++ b/paddle/cuda/src/hl_cuda_matrix.cu @@ -1,4 +1,4 @@ -/* Copyright (c) 2016 PaddlePaddle Authors. All Rights Reserve. +/* Copyright (c) 2016 PaddlePaddle Authors. All Rights Reserved. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/paddle/cuda/src/hl_cuda_sequence.cu b/paddle/cuda/src/hl_cuda_sequence.cu index c52780dfcaf..a3a5f038de7 100644 --- a/paddle/cuda/src/hl_cuda_sequence.cu +++ b/paddle/cuda/src/hl_cuda_sequence.cu @@ -1,4 +1,4 @@ -/* Copyright (c) 2016 PaddlePaddle Authors. All Rights Reserve. +/* Copyright (c) 2016 PaddlePaddle Authors. All Rights Reserved. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/paddle/cuda/src/hl_cuda_sparse.cu b/paddle/cuda/src/hl_cuda_sparse.cu index 6351e7e01ee..432041fed5a 100644 --- a/paddle/cuda/src/hl_cuda_sparse.cu +++ b/paddle/cuda/src/hl_cuda_sparse.cu @@ -1,4 +1,4 @@ -/* Copyright (c) 2016 PaddlePaddle Authors. All Rights Reserve. +/* Copyright (c) 2016 PaddlePaddle Authors. All Rights Reserved. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/paddle/cuda/src/hl_cuda_sparse.cuh b/paddle/cuda/src/hl_cuda_sparse.cuh index 72572756a67..adb898c9ac6 100644 --- a/paddle/cuda/src/hl_cuda_sparse.cuh +++ b/paddle/cuda/src/hl_cuda_sparse.cuh @@ -1,4 +1,4 @@ -/* Copyright (c) 2016 PaddlePaddle Authors. All Rights Reserve. +/* Copyright (c) 2016 PaddlePaddle Authors. All Rights Reserved. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/paddle/cuda/src/hl_math.cc b/paddle/cuda/src/hl_math.cc index 3048693fb87..585b356d0a7 100644 --- a/paddle/cuda/src/hl_math.cc +++ b/paddle/cuda/src/hl_math.cc @@ -1,4 +1,4 @@ -/* Copyright (c) 2016 PaddlePaddle Authors. All Rights Reserve. +/* Copyright (c) 2016 PaddlePaddle Authors. All Rights Reserved. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/paddle/cuda/src/hl_perturbation_util.cu b/paddle/cuda/src/hl_perturbation_util.cu index d01a91561ef..e15cbb14393 100644 --- a/paddle/cuda/src/hl_perturbation_util.cu +++ b/paddle/cuda/src/hl_perturbation_util.cu @@ -1,4 +1,4 @@ -/* Copyright (c) 2016 PaddlePaddle Authors. All Rights Reserve. +/* Copyright (c) 2016 PaddlePaddle Authors. All Rights Reserved. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/paddle/cuda/src/hl_table_apply.cu b/paddle/cuda/src/hl_table_apply.cu index d3b71c75e6e..efa4bef02ba 100644 --- a/paddle/cuda/src/hl_table_apply.cu +++ b/paddle/cuda/src/hl_table_apply.cu @@ -1,4 +1,4 @@ -/* Copyright (c) 2016 PaddlePaddle Authors. All Rights Reserve. +/* Copyright (c) 2016 PaddlePaddle Authors. All Rights Reserved. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/paddle/cuda/src/hl_time.cc b/paddle/cuda/src/hl_time.cc index 7e5d7e8aaec..26af9ec806a 100644 --- a/paddle/cuda/src/hl_time.cc +++ b/paddle/cuda/src/hl_time.cc @@ -1,4 +1,4 @@ -/* Copyright (c) 2016 PaddlePaddle Authors. All Rights Reserve. +/* Copyright (c) 2016 PaddlePaddle Authors. All Rights Reserved. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/paddle/cuda/src/hl_top_k.cu b/paddle/cuda/src/hl_top_k.cu index 1896a56634c..fea8712a773 100644 --- a/paddle/cuda/src/hl_top_k.cu +++ b/paddle/cuda/src/hl_top_k.cu @@ -1,4 +1,4 @@ -/* Copyright (c) 2016 PaddlePaddle Authors. All Rights Reserve. +/* Copyright (c) 2016 PaddlePaddle Authors. All Rights Reserved. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/paddle/cuda/src/hl_warpctc_wrap.cc b/paddle/cuda/src/hl_warpctc_wrap.cc index 9f812dd0dea..5111bceaff2 100644 --- a/paddle/cuda/src/hl_warpctc_wrap.cc +++ b/paddle/cuda/src/hl_warpctc_wrap.cc @@ -1,4 +1,4 @@ -/* Copyright (c) 2016 PaddlePaddle Authors. All Rights Reserve. +/* Copyright (c) 2016 PaddlePaddle Authors. All Rights Reserved. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/paddle/fluid/framework/attribute.cc b/paddle/fluid/framework/attribute.cc index 1d7e7366b07..0dcecb62dba 100644 --- a/paddle/fluid/framework/attribute.cc +++ b/paddle/fluid/framework/attribute.cc @@ -1,4 +1,4 @@ -/* Copyright (c) 2016 PaddlePaddle Authors. All Rights Reserve. +/* Copyright (c) 2016 PaddlePaddle Authors. All Rights Reserved. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/paddle/fluid/framework/attribute.h b/paddle/fluid/framework/attribute.h index 16be42ae714..8428bf8e339 100644 --- a/paddle/fluid/framework/attribute.h +++ b/paddle/fluid/framework/attribute.h @@ -1,4 +1,4 @@ -/* Copyright (c) 2016 PaddlePaddle Authors. All Rights Reserve. +/* Copyright (c) 2016 PaddlePaddle Authors. All Rights Reserved. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/paddle/fluid/framework/backward.cc b/paddle/fluid/framework/backward.cc index c4795f4fc5c..68f4fd4424f 100644 --- a/paddle/fluid/framework/backward.cc +++ b/paddle/fluid/framework/backward.cc @@ -1,4 +1,4 @@ -/* Copyright (c) 2016 PaddlePaddle Authors. All Rights Reserve. +/* Copyright (c) 2016 PaddlePaddle Authors. All Rights Reserved. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/paddle/fluid/framework/backward.h b/paddle/fluid/framework/backward.h index 2ea6922426e..3a971090c25 100644 --- a/paddle/fluid/framework/backward.h +++ b/paddle/fluid/framework/backward.h @@ -1,4 +1,4 @@ -/* Copyright (c) 2016 PaddlePaddle Authors. All Rights Reserve. +/* Copyright (c) 2016 PaddlePaddle Authors. All Rights Reserved. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/paddle/fluid/framework/backward_test.cc b/paddle/fluid/framework/backward_test.cc index f9604c68913..cc1f871360e 100644 --- a/paddle/fluid/framework/backward_test.cc +++ b/paddle/fluid/framework/backward_test.cc @@ -1,4 +1,4 @@ -// Copyright (c) 2018 PaddlePaddle Authors. All Rights Reserve. +// Copyright (c) 2018 PaddlePaddle Authors. All Rights Reserved. // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. diff --git a/paddle/fluid/framework/block_desc.cc b/paddle/fluid/framework/block_desc.cc index 9550159155c..0dd37e7df06 100644 --- a/paddle/fluid/framework/block_desc.cc +++ b/paddle/fluid/framework/block_desc.cc @@ -1,4 +1,4 @@ -/* Copyright (c) 2016 PaddlePaddle Authors. All Rights Reserve. +/* Copyright (c) 2016 PaddlePaddle Authors. All Rights Reserved. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/paddle/fluid/framework/block_desc.h b/paddle/fluid/framework/block_desc.h index 5f7eca3878f..4e2b03e245f 100644 --- a/paddle/fluid/framework/block_desc.h +++ b/paddle/fluid/framework/block_desc.h @@ -1,4 +1,4 @@ -/* Copyright (c) 2016 PaddlePaddle Authors. All Rights Reserve. +/* Copyright (c) 2016 PaddlePaddle Authors. All Rights Reserved. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/paddle/fluid/framework/data_device_transform.cc b/paddle/fluid/framework/data_device_transform.cc index 3c6dd28455b..728a2fb6f33 100644 --- a/paddle/fluid/framework/data_device_transform.cc +++ b/paddle/fluid/framework/data_device_transform.cc @@ -1,4 +1,4 @@ -/* Copyright (c) 2016 PaddlePaddle Authors. All Rights Reserve. +/* Copyright (c) 2016 PaddlePaddle Authors. All Rights Reserved. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at diff --git a/paddle/fluid/framework/data_device_transform.h b/paddle/fluid/framework/data_device_transform.h index 0c4559f586a..8ff97646cfc 100644 --- a/paddle/fluid/framework/data_device_transform.h +++ b/paddle/fluid/framework/data_device_transform.h @@ -1,4 +1,4 @@ -/* Copyright (c) 2016 PaddlePaddle Authors. All Rights Reserve. +/* Copyright (c) 2016 PaddlePaddle Authors. All Rights Reserved. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at diff --git a/paddle/fluid/framework/data_device_transform_test.cu b/paddle/fluid/framework/data_device_transform_test.cu index f740f9b3268..c9ba0711755 100644 --- a/paddle/fluid/framework/data_device_transform_test.cu +++ b/paddle/fluid/framework/data_device_transform_test.cu @@ -1,4 +1,4 @@ -/* Copyright (c) 2016 PaddlePaddle Authors. All Rights Reserve. +/* Copyright (c) 2016 PaddlePaddle Authors. All Rights Reserved. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/paddle/fluid/framework/data_layout.h b/paddle/fluid/framework/data_layout.h index b72f13f2e8f..39222fc4ed6 100644 --- a/paddle/fluid/framework/data_layout.h +++ b/paddle/fluid/framework/data_layout.h @@ -1,4 +1,4 @@ -/* Copyright (c) 2016 PaddlePaddle Authors. All Rights Reserve. +/* Copyright (c) 2016 PaddlePaddle Authors. All Rights Reserved. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/paddle/fluid/framework/data_layout_transform.cc b/paddle/fluid/framework/data_layout_transform.cc index c546a508fe1..4ca447d50a7 100644 --- a/paddle/fluid/framework/data_layout_transform.cc +++ b/paddle/fluid/framework/data_layout_transform.cc @@ -1,4 +1,4 @@ -// Copyright (c) 2018 PaddlePaddle Authors. All Rights Reserve. +// Copyright (c) 2018 PaddlePaddle Authors. All Rights Reserved. // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. diff --git a/paddle/fluid/framework/data_layout_transform.h b/paddle/fluid/framework/data_layout_transform.h index 862405fbf46..ba15be9fc77 100644 --- a/paddle/fluid/framework/data_layout_transform.h +++ b/paddle/fluid/framework/data_layout_transform.h @@ -1,4 +1,4 @@ -// Copyright (c) 2018 PaddlePaddle Authors. All Rights Reserve. +// Copyright (c) 2018 PaddlePaddle Authors. All Rights Reserved. // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. diff --git a/paddle/fluid/framework/data_layout_transform_test.cc b/paddle/fluid/framework/data_layout_transform_test.cc index 99eb46bde34..73689cc9bc4 100644 --- a/paddle/fluid/framework/data_layout_transform_test.cc +++ b/paddle/fluid/framework/data_layout_transform_test.cc @@ -1,4 +1,4 @@ -// Copyright (c) 2018 PaddlePaddle Authors. All Rights Reserve. +// Copyright (c) 2018 PaddlePaddle Authors. All Rights Reserved. // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. @@ -41,4 +41,4 @@ TEST(DataTransform, DataLayoutFunction) { EXPECT_TRUE(in.layout() == DataLayout::kNHWC); EXPECT_TRUE(in.dims() == make_ddim({2, 3, 1, 2})); -} \ No newline at end of file +} diff --git a/paddle/fluid/framework/data_transform.cc b/paddle/fluid/framework/data_transform.cc index 9575d01af88..0475fc1d9aa 100644 --- a/paddle/fluid/framework/data_transform.cc +++ b/paddle/fluid/framework/data_transform.cc @@ -1,4 +1,4 @@ -/* Copyright (c) 2016 PaddlePaddle Authors. All Rights Reserve. +/* Copyright (c) 2016 PaddlePaddle Authors. All Rights Reserved. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/paddle/fluid/framework/data_transform.h b/paddle/fluid/framework/data_transform.h index 70d3a174acc..9ec67e6f3d6 100644 --- a/paddle/fluid/framework/data_transform.h +++ b/paddle/fluid/framework/data_transform.h @@ -1,4 +1,4 @@ -/* Copyright (c) 2016 PaddlePaddle Authors. All Rights Reserve. +/* Copyright (c) 2016 PaddlePaddle Authors. All Rights Reserved. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/paddle/fluid/framework/data_type.h b/paddle/fluid/framework/data_type.h index 7a527f0d0c1..127bbcf5d00 100644 --- a/paddle/fluid/framework/data_type.h +++ b/paddle/fluid/framework/data_type.h @@ -1,4 +1,4 @@ -/* Copyright (c) 2016 PaddlePaddle Authors. All Rights Reserve. +/* Copyright (c) 2016 PaddlePaddle Authors. All Rights Reserved. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/paddle/fluid/framework/data_type_transform.cc b/paddle/fluid/framework/data_type_transform.cc index 6921927305a..e5836998e23 100644 --- a/paddle/fluid/framework/data_type_transform.cc +++ b/paddle/fluid/framework/data_type_transform.cc @@ -1,4 +1,4 @@ -/* Copyright (c) 2016 PaddlePaddle Authors. All Rights Reserve. +/* Copyright (c) 2016 PaddlePaddle Authors. All Rights Reserved. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/paddle/fluid/framework/data_type_transform.h b/paddle/fluid/framework/data_type_transform.h index 830cced0939..e75da2588d0 100644 --- a/paddle/fluid/framework/data_type_transform.h +++ b/paddle/fluid/framework/data_type_transform.h @@ -1,4 +1,4 @@ -/* Copyright (c) 2016 PaddlePaddle Authors. All Rights Reserve. +/* Copyright (c) 2016 PaddlePaddle Authors. All Rights Reserved. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/paddle/fluid/framework/data_type_transform_test.cc b/paddle/fluid/framework/data_type_transform_test.cc index 88dbc51b217..444d3b823cf 100644 --- a/paddle/fluid/framework/data_type_transform_test.cc +++ b/paddle/fluid/framework/data_type_transform_test.cc @@ -1,4 +1,4 @@ -/* Copyright (c) 2018 PaddlePaddle Authors. All Rights Reserve. +/* Copyright (c) 2018 PaddlePaddle Authors. All Rights Reserved. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/paddle/fluid/framework/ddim.cc b/paddle/fluid/framework/ddim.cc index 98f1fa9d209..97afd366387 100644 --- a/paddle/fluid/framework/ddim.cc +++ b/paddle/fluid/framework/ddim.cc @@ -1,4 +1,4 @@ -/* Copyright (c) 2016 PaddlePaddle Authors. All Rights Reserve. +/* Copyright (c) 2016 PaddlePaddle Authors. All Rights Reserved. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/paddle/fluid/framework/ddim.h b/paddle/fluid/framework/ddim.h index 405d9af7028..5aff10d3b95 100644 --- a/paddle/fluid/framework/ddim.h +++ b/paddle/fluid/framework/ddim.h @@ -1,4 +1,4 @@ -/* Copyright (c) 2016 PaddlePaddle Authors. All Rights Reserve. +/* Copyright (c) 2016 PaddlePaddle Authors. All Rights Reserved. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/paddle/fluid/framework/ddim_test.cc b/paddle/fluid/framework/ddim_test.cc index 18d305a4036..c1eb3210fdc 100644 --- a/paddle/fluid/framework/ddim_test.cc +++ b/paddle/fluid/framework/ddim_test.cc @@ -1,4 +1,4 @@ -/* Copyright (c) 2016 PaddlePaddle Authors. All Rights Reserve. +/* Copyright (c) 2016 PaddlePaddle Authors. All Rights Reserved. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/paddle/fluid/framework/dim.h b/paddle/fluid/framework/dim.h index 3938fd3df5b..08b708006aa 100644 --- a/paddle/fluid/framework/dim.h +++ b/paddle/fluid/framework/dim.h @@ -1,4 +1,4 @@ -// Copyright (c) 2018 PaddlePaddle Authors. All Rights Reserve. +// Copyright (c) 2018 PaddlePaddle Authors. All Rights Reserved. // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. diff --git a/paddle/fluid/framework/dim_test.cu b/paddle/fluid/framework/dim_test.cu index 0f1969d7977..0f384d12e6f 100644 --- a/paddle/fluid/framework/dim_test.cu +++ b/paddle/fluid/framework/dim_test.cu @@ -1,4 +1,4 @@ -// Copyright (c) 2018 PaddlePaddle Authors. All Rights Reserve. +// Copyright (c) 2018 PaddlePaddle Authors. All Rights Reserved. // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. diff --git a/paddle/fluid/framework/eigen.h b/paddle/fluid/framework/eigen.h index d1b8c701a79..4ea1df655df 100644 --- a/paddle/fluid/framework/eigen.h +++ b/paddle/fluid/framework/eigen.h @@ -1,4 +1,4 @@ -/* Copyright (c) 2016 PaddlePaddle Authors. All Rights Reserve. +/* Copyright (c) 2016 PaddlePaddle Authors. All Rights Reserved. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/paddle/fluid/framework/eigen_test.cc b/paddle/fluid/framework/eigen_test.cc index f9e3abeccb3..bdc526d86f8 100644 --- a/paddle/fluid/framework/eigen_test.cc +++ b/paddle/fluid/framework/eigen_test.cc @@ -1,4 +1,4 @@ -// Copyright (c) 2018 PaddlePaddle Authors. All Rights Reserve. +// Copyright (c) 2018 PaddlePaddle Authors. All Rights Reserved. // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. diff --git a/paddle/fluid/framework/executor.cc b/paddle/fluid/framework/executor.cc index 816ad8d6590..179f9194a9d 100644 --- a/paddle/fluid/framework/executor.cc +++ b/paddle/fluid/framework/executor.cc @@ -1,4 +1,4 @@ -/* Copyright (c) 2016 PaddlePaddle Authors. All Rights Reserve. +/* Copyright (c) 2016 PaddlePaddle Authors. All Rights Reserved. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/paddle/fluid/framework/executor.h b/paddle/fluid/framework/executor.h index 893c949939e..c1f4d4e02a9 100644 --- a/paddle/fluid/framework/executor.h +++ b/paddle/fluid/framework/executor.h @@ -1,4 +1,4 @@ -/* Copyright (c) 2016 PaddlePaddle Authors. All Rights Reserve. +/* Copyright (c) 2016 PaddlePaddle Authors. All Rights Reserved. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/paddle/fluid/framework/feed_fetch_method.cc b/paddle/fluid/framework/feed_fetch_method.cc index a9bb17355d9..a8c3e227db3 100644 --- a/paddle/fluid/framework/feed_fetch_method.cc +++ b/paddle/fluid/framework/feed_fetch_method.cc @@ -1,4 +1,4 @@ -/* Copyright (c) 2016 PaddlePaddle Authors. All Rights Reserve. +/* Copyright (c) 2016 PaddlePaddle Authors. All Rights Reserved. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/paddle/fluid/framework/feed_fetch_method.h b/paddle/fluid/framework/feed_fetch_method.h index 5355c29047e..d6130f421e1 100644 --- a/paddle/fluid/framework/feed_fetch_method.h +++ b/paddle/fluid/framework/feed_fetch_method.h @@ -1,4 +1,4 @@ -/* Copyright (c) 2016 PaddlePaddle Authors. All Rights Reserve. +/* Copyright (c) 2016 PaddlePaddle Authors. All Rights Reserved. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/paddle/fluid/framework/feed_fetch_type.h b/paddle/fluid/framework/feed_fetch_type.h index 4281e36b138..b0d1e9f0a70 100644 --- a/paddle/fluid/framework/feed_fetch_type.h +++ b/paddle/fluid/framework/feed_fetch_type.h @@ -1,4 +1,4 @@ -/* Copyright (c) 2016 PaddlePaddle Authors. All Rights Reserve. +/* Copyright (c) 2016 PaddlePaddle Authors. All Rights Reserved. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/paddle/fluid/framework/framework.proto b/paddle/fluid/framework/framework.proto index d7be1a7352d..ad8da21ae0f 100644 --- a/paddle/fluid/framework/framework.proto +++ b/paddle/fluid/framework/framework.proto @@ -1,4 +1,4 @@ -/* Copyright (c) 2016 PaddlePaddle Authors. All Rights Reserve. +/* Copyright (c) 2016 PaddlePaddle Authors. All Rights Reserved. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/paddle/fluid/framework/grad_op_desc_maker.h b/paddle/fluid/framework/grad_op_desc_maker.h index 21dd4e88548..cf697187d62 100644 --- a/paddle/fluid/framework/grad_op_desc_maker.h +++ b/paddle/fluid/framework/grad_op_desc_maker.h @@ -1,4 +1,4 @@ -/* Copyright (c) 2016 PaddlePaddle Authors. All Rights Reserve. +/* Copyright (c) 2016 PaddlePaddle Authors. All Rights Reserved. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/paddle/fluid/framework/init.cc b/paddle/fluid/framework/init.cc index ad806a8cd79..2e0a224ff5d 100644 --- a/paddle/fluid/framework/init.cc +++ b/paddle/fluid/framework/init.cc @@ -1,4 +1,4 @@ -/* Copyright (c) 2016 PaddlePaddle Authors. All Rights Reserve. +/* Copyright (c) 2016 PaddlePaddle Authors. All Rights Reserved. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/paddle/fluid/framework/init.h b/paddle/fluid/framework/init.h index c8fd964d006..7d86d158119 100644 --- a/paddle/fluid/framework/init.h +++ b/paddle/fluid/framework/init.h @@ -1,4 +1,4 @@ -/* Copyright (c) 2016 PaddlePaddle Authors. All Rights Reserve. +/* Copyright (c) 2016 PaddlePaddle Authors. All Rights Reserved. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/paddle/fluid/framework/init_test.cc b/paddle/fluid/framework/init_test.cc index f3018541e27..2a03f0afe65 100644 --- a/paddle/fluid/framework/init_test.cc +++ b/paddle/fluid/framework/init_test.cc @@ -1,4 +1,4 @@ -/* Copyright (c) 2016 PaddlePaddle Authors. All Rights Reserve. +/* Copyright (c) 2016 PaddlePaddle Authors. All Rights Reserved. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/paddle/fluid/framework/library_type.h b/paddle/fluid/framework/library_type.h index 1e308483543..ea538731b46 100644 --- a/paddle/fluid/framework/library_type.h +++ b/paddle/fluid/framework/library_type.h @@ -1,4 +1,4 @@ -/* Copyright (c) 2016 PaddlePaddle Authors. All Rights Reserve. +/* Copyright (c) 2016 PaddlePaddle Authors. All Rights Reserved. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/paddle/fluid/framework/lod_rank_table.cc b/paddle/fluid/framework/lod_rank_table.cc index 31c87492349..6bc795b642b 100644 --- a/paddle/fluid/framework/lod_rank_table.cc +++ b/paddle/fluid/framework/lod_rank_table.cc @@ -1,4 +1,4 @@ -/* Copyright (c) 2016 PaddlePaddle Authors. All Rights Reserve. +/* Copyright (c) 2016 PaddlePaddle Authors. All Rights Reserved. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/paddle/fluid/framework/lod_rank_table.h b/paddle/fluid/framework/lod_rank_table.h index 0eaaf49e4c4..ef83e71160e 100644 --- a/paddle/fluid/framework/lod_rank_table.h +++ b/paddle/fluid/framework/lod_rank_table.h @@ -1,4 +1,4 @@ -/* Copyright (c) 2016 PaddlePaddle Authors. All Rights Reserve. +/* Copyright (c) 2016 PaddlePaddle Authors. All Rights Reserved. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/paddle/fluid/framework/lod_tensor.cc b/paddle/fluid/framework/lod_tensor.cc index 05c67e453d0..89768bcfd51 100644 --- a/paddle/fluid/framework/lod_tensor.cc +++ b/paddle/fluid/framework/lod_tensor.cc @@ -1,4 +1,4 @@ -/* Copyright (c) 2016 PaddlePaddle Authors. All Rights Reserve. +/* Copyright (c) 2016 PaddlePaddle Authors. All Rights Reserved. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/paddle/fluid/framework/lod_tensor.h b/paddle/fluid/framework/lod_tensor.h index 1509a9fb134..948389afb66 100644 --- a/paddle/fluid/framework/lod_tensor.h +++ b/paddle/fluid/framework/lod_tensor.h @@ -1,4 +1,4 @@ -/* Copyright (c) 2016 PaddlePaddle Authors. All Rights Reserve. +/* Copyright (c) 2016 PaddlePaddle Authors. All Rights Reserved. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/paddle/fluid/framework/lod_tensor_array.h b/paddle/fluid/framework/lod_tensor_array.h index 652513bd225..6d7b6a4ada8 100644 --- a/paddle/fluid/framework/lod_tensor_array.h +++ b/paddle/fluid/framework/lod_tensor_array.h @@ -1,4 +1,4 @@ -/* Copyright (c) 2016 PaddlePaddle Authors. All Rights Reserve. +/* Copyright (c) 2016 PaddlePaddle Authors. All Rights Reserved. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/paddle/fluid/framework/lod_tensor_test.cc b/paddle/fluid/framework/lod_tensor_test.cc index 7e0ed2495d6..5e135192ce7 100644 --- a/paddle/fluid/framework/lod_tensor_test.cc +++ b/paddle/fluid/framework/lod_tensor_test.cc @@ -1,4 +1,4 @@ -// Copyright (c) 2018 PaddlePaddle Authors. All Rights Reserve. +// Copyright (c) 2018 PaddlePaddle Authors. All Rights Reserved. // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. diff --git a/paddle/fluid/framework/lod_tensor_test.cu b/paddle/fluid/framework/lod_tensor_test.cu index 4dd7810c1b2..be65da5ba23 100644 --- a/paddle/fluid/framework/lod_tensor_test.cu +++ b/paddle/fluid/framework/lod_tensor_test.cu @@ -1,4 +1,4 @@ -// Copyright (c) 2018 PaddlePaddle Authors. All Rights Reserve. +// Copyright (c) 2018 PaddlePaddle Authors. All Rights Reserved. // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. diff --git a/paddle/fluid/framework/mixed_vector.h b/paddle/fluid/framework/mixed_vector.h index 6e5ceefadd7..c1a89a1261c 100644 --- a/paddle/fluid/framework/mixed_vector.h +++ b/paddle/fluid/framework/mixed_vector.h @@ -1,4 +1,4 @@ -/* Copyright (c) 2016 PaddlePaddle Authors. All Rights Reserve. +/* Copyright (c) 2016 PaddlePaddle Authors. All Rights Reserved. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/paddle/fluid/framework/mixed_vector_test.cu b/paddle/fluid/framework/mixed_vector_test.cu index 8ea574b31cc..4bf78499f2f 100644 --- a/paddle/fluid/framework/mixed_vector_test.cu +++ b/paddle/fluid/framework/mixed_vector_test.cu @@ -1,4 +1,4 @@ -/* Copyright (c) 2016 PaddlePaddle Authors. All Rights Reserve. +/* Copyright (c) 2016 PaddlePaddle Authors. All Rights Reserved. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/paddle/fluid/framework/op_desc.cc b/paddle/fluid/framework/op_desc.cc index cbc15e60b83..e740010c63c 100644 --- a/paddle/fluid/framework/op_desc.cc +++ b/paddle/fluid/framework/op_desc.cc @@ -1,4 +1,4 @@ -/* Copyright (c) 2016 PaddlePaddle Authors. All Rights Reserve. +/* Copyright (c) 2016 PaddlePaddle Authors. All Rights Reserved. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/paddle/fluid/framework/op_desc.h b/paddle/fluid/framework/op_desc.h index 698df829e56..b72aad6fb53 100644 --- a/paddle/fluid/framework/op_desc.h +++ b/paddle/fluid/framework/op_desc.h @@ -1,4 +1,4 @@ -/* Copyright (c) 2016 PaddlePaddle Authors. All Rights Reserve. +/* Copyright (c) 2016 PaddlePaddle Authors. All Rights Reserved. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/paddle/fluid/framework/op_info.cc b/paddle/fluid/framework/op_info.cc index 703c9c3234b..b99e82f8c43 100644 --- a/paddle/fluid/framework/op_info.cc +++ b/paddle/fluid/framework/op_info.cc @@ -1,4 +1,4 @@ -/* Copyright (c) 2016 PaddlePaddle Authors. All Rights Reserve. +/* Copyright (c) 2016 PaddlePaddle Authors. All Rights Reserved. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/paddle/fluid/framework/op_info.h b/paddle/fluid/framework/op_info.h index e6b3ff9e653..19e5c2c73ea 100644 --- a/paddle/fluid/framework/op_info.h +++ b/paddle/fluid/framework/op_info.h @@ -1,4 +1,4 @@ -/* Copyright (c) 2016 PaddlePaddle Authors. All Rights Reserve. +/* Copyright (c) 2016 PaddlePaddle Authors. All Rights Reserved. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/paddle/fluid/framework/op_kernel_type.h b/paddle/fluid/framework/op_kernel_type.h index b5dbff26d7e..980e4eafaac 100644 --- a/paddle/fluid/framework/op_kernel_type.h +++ b/paddle/fluid/framework/op_kernel_type.h @@ -1,4 +1,4 @@ -/* Copyright (c) 2016 PaddlePaddle Authors. All Rights Reserve. +/* Copyright (c) 2016 PaddlePaddle Authors. All Rights Reserved. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/paddle/fluid/framework/op_kernel_type_test.cc b/paddle/fluid/framework/op_kernel_type_test.cc index 64096907df5..e56fe35c01e 100644 --- a/paddle/fluid/framework/op_kernel_type_test.cc +++ b/paddle/fluid/framework/op_kernel_type_test.cc @@ -1,4 +1,4 @@ -/* Copyright (c) 2016 PaddlePaddle Authors. All Rights Reserve. +/* Copyright (c) 2016 PaddlePaddle Authors. All Rights Reserved. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/paddle/fluid/framework/op_proto_maker.cc b/paddle/fluid/framework/op_proto_maker.cc index 0a779b10b49..3116b03d043 100644 --- a/paddle/fluid/framework/op_proto_maker.cc +++ b/paddle/fluid/framework/op_proto_maker.cc @@ -1,4 +1,4 @@ -/* Copyright (c) 2016 PaddlePaddle Authors. All Rights Reserve. +/* Copyright (c) 2016 PaddlePaddle Authors. All Rights Reserved. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at diff --git a/paddle/fluid/framework/op_proto_maker.h b/paddle/fluid/framework/op_proto_maker.h index 1dbfc7d37be..cf56b0fa189 100644 --- a/paddle/fluid/framework/op_proto_maker.h +++ b/paddle/fluid/framework/op_proto_maker.h @@ -1,4 +1,4 @@ -/* Copyright (c) 2016 PaddlePaddle Authors. All Rights Reserve. +/* Copyright (c) 2016 PaddlePaddle Authors. All Rights Reserved. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at diff --git a/paddle/fluid/framework/op_proto_maker_test.cc b/paddle/fluid/framework/op_proto_maker_test.cc index cfefee8dbde..a8d8c6386af 100644 --- a/paddle/fluid/framework/op_proto_maker_test.cc +++ b/paddle/fluid/framework/op_proto_maker_test.cc @@ -1,4 +1,4 @@ -/* Copyright (c) 2016 PaddlePaddle Authors. All Rights Reserve. +/* Copyright (c) 2016 PaddlePaddle Authors. All Rights Reserved. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/paddle/fluid/framework/op_registry.cc b/paddle/fluid/framework/op_registry.cc index 739ec72ebc1..bfc411ca2c4 100644 --- a/paddle/fluid/framework/op_registry.cc +++ b/paddle/fluid/framework/op_registry.cc @@ -1,4 +1,4 @@ -/* Copyright (c) 2016 PaddlePaddle Authors. All Rights Reserve. +/* Copyright (c) 2016 PaddlePaddle Authors. All Rights Reserved. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/paddle/fluid/framework/op_registry.h b/paddle/fluid/framework/op_registry.h index 73faa99668a..f1424f13b44 100644 --- a/paddle/fluid/framework/op_registry.h +++ b/paddle/fluid/framework/op_registry.h @@ -1,4 +1,4 @@ -/* Copyright (c) 2016 PaddlePaddle Authors. All Rights Reserve. +/* Copyright (c) 2016 PaddlePaddle Authors. All Rights Reserved. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/paddle/fluid/framework/op_registry_test.cc b/paddle/fluid/framework/op_registry_test.cc index 2746168f1dd..b92647e892e 100644 --- a/paddle/fluid/framework/op_registry_test.cc +++ b/paddle/fluid/framework/op_registry_test.cc @@ -1,4 +1,4 @@ -/* Copyright (c) 2016 PaddlePaddle Authors. All Rights Reserve. +/* Copyright (c) 2016 PaddlePaddle Authors. All Rights Reserved. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/paddle/fluid/framework/operator.cc b/paddle/fluid/framework/operator.cc index 8effbf1bc62..bc529b8269a 100644 --- a/paddle/fluid/framework/operator.cc +++ b/paddle/fluid/framework/operator.cc @@ -1,4 +1,4 @@ -/* Copyright (c) 2016 PaddlePaddle Authors. All Rights Reserve. +/* Copyright (c) 2016 PaddlePaddle Authors. All Rights Reserved. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/paddle/fluid/framework/operator.h b/paddle/fluid/framework/operator.h index 708f87dc863..c2782066ce2 100644 --- a/paddle/fluid/framework/operator.h +++ b/paddle/fluid/framework/operator.h @@ -1,4 +1,4 @@ -/* Copyright (c) 2016 PaddlePaddle Authors. All Rights Reserve. +/* Copyright (c) 2016 PaddlePaddle Authors. All Rights Reserved. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/paddle/fluid/framework/operator_test.cc b/paddle/fluid/framework/operator_test.cc index 0732ec5afe8..08a471e0a11 100644 --- a/paddle/fluid/framework/operator_test.cc +++ b/paddle/fluid/framework/operator_test.cc @@ -1,4 +1,4 @@ -/* Copyright (c) 2016 PaddlePaddle Authors. All Rights Reserve. +/* Copyright (c) 2016 PaddlePaddle Authors. All Rights Reserved. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/paddle/fluid/framework/program_desc.cc b/paddle/fluid/framework/program_desc.cc index b3f2e97cd95..049731c7216 100644 --- a/paddle/fluid/framework/program_desc.cc +++ b/paddle/fluid/framework/program_desc.cc @@ -1,4 +1,4 @@ -/* Copyright (c) 2016 PaddlePaddle Authors. All Rights Reserve. +/* Copyright (c) 2016 PaddlePaddle Authors. All Rights Reserved. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/paddle/fluid/framework/program_desc.h b/paddle/fluid/framework/program_desc.h index 937de6ba927..8d4b999ad2f 100644 --- a/paddle/fluid/framework/program_desc.h +++ b/paddle/fluid/framework/program_desc.h @@ -1,4 +1,4 @@ -/* Copyright (c) 2016 PaddlePaddle Authors. All Rights Reserve. +/* Copyright (c) 2016 PaddlePaddle Authors. All Rights Reserved. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/paddle/fluid/framework/program_desc_test.cc b/paddle/fluid/framework/program_desc_test.cc index afd5c9dabfb..3a4a87cfa5a 100644 --- a/paddle/fluid/framework/program_desc_test.cc +++ b/paddle/fluid/framework/program_desc_test.cc @@ -1,4 +1,4 @@ -/* Copyright (c) 2016 PaddlePaddle Authors. All Rights Reserve. +/* Copyright (c) 2016 PaddlePaddle Authors. All Rights Reserved. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/paddle/fluid/framework/proto_desc.h b/paddle/fluid/framework/proto_desc.h index fa01224fefc..40521c07829 100644 --- a/paddle/fluid/framework/proto_desc.h +++ b/paddle/fluid/framework/proto_desc.h @@ -1,4 +1,4 @@ -/* Copyright (c) 2016 PaddlePaddle Authors. All Rights Reserve. +/* Copyright (c) 2016 PaddlePaddle Authors. All Rights Reserved. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/paddle/fluid/framework/prune.cc b/paddle/fluid/framework/prune.cc index 79dbd3bcab4..71d6e08112a 100644 --- a/paddle/fluid/framework/prune.cc +++ b/paddle/fluid/framework/prune.cc @@ -1,4 +1,4 @@ -/* Copyright (c) 2016 PaddlePaddle Authors. All Rights Reserve. +/* Copyright (c) 2016 PaddlePaddle Authors. All Rights Reserved. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/paddle/fluid/framework/prune.h b/paddle/fluid/framework/prune.h index 601e66b67a7..4c5a1dedd99 100644 --- a/paddle/fluid/framework/prune.h +++ b/paddle/fluid/framework/prune.h @@ -1,4 +1,4 @@ -/* Copyright (c) 2016 PaddlePaddle Authors. All Rights Reserve. +/* Copyright (c) 2016 PaddlePaddle Authors. All Rights Reserved. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/paddle/fluid/framework/prune_test.cc b/paddle/fluid/framework/prune_test.cc index 36b76f0763e..b612fe8ad58 100644 --- a/paddle/fluid/framework/prune_test.cc +++ b/paddle/fluid/framework/prune_test.cc @@ -1,4 +1,4 @@ -/* Copyright (c) 2016 PaddlePaddle Authors. All Rights Reserve. +/* Copyright (c) 2016 PaddlePaddle Authors. All Rights Reserved. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/paddle/fluid/framework/scope.cc b/paddle/fluid/framework/scope.cc index 91a8617d661..ea6c8cebd3f 100644 --- a/paddle/fluid/framework/scope.cc +++ b/paddle/fluid/framework/scope.cc @@ -1,4 +1,4 @@ -/* Copyright (c) 2016 PaddlePaddle Authors. All Rights Reserve. +/* Copyright (c) 2016 PaddlePaddle Authors. All Rights Reserved. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/paddle/fluid/framework/scope.h b/paddle/fluid/framework/scope.h index 2da9e0716e7..d8fad162e59 100644 --- a/paddle/fluid/framework/scope.h +++ b/paddle/fluid/framework/scope.h @@ -1,4 +1,4 @@ -/* Copyright (c) 2016 PaddlePaddle Authors. All Rights Reserve. +/* Copyright (c) 2016 PaddlePaddle Authors. All Rights Reserved. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/paddle/fluid/framework/scope_test.cc b/paddle/fluid/framework/scope_test.cc index d64acb130cb..ebf8178a831 100644 --- a/paddle/fluid/framework/scope_test.cc +++ b/paddle/fluid/framework/scope_test.cc @@ -1,4 +1,4 @@ -/* Copyright (c) 2016 PaddlePaddle Authors. All Rights Reserve. +/* Copyright (c) 2016 PaddlePaddle Authors. All Rights Reserved. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/paddle/fluid/framework/selected_rows.cc b/paddle/fluid/framework/selected_rows.cc index f5d9e9a4951..08c319002d1 100644 --- a/paddle/fluid/framework/selected_rows.cc +++ b/paddle/fluid/framework/selected_rows.cc @@ -1,4 +1,4 @@ -/* Copyright (c) 2016 PaddlePaddle Authors. All Rights Reserve. +/* Copyright (c) 2016 PaddlePaddle Authors. All Rights Reserved. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at diff --git a/paddle/fluid/framework/selected_rows.h b/paddle/fluid/framework/selected_rows.h index f1a263962b2..c9c2c1bb721 100644 --- a/paddle/fluid/framework/selected_rows.h +++ b/paddle/fluid/framework/selected_rows.h @@ -1,4 +1,4 @@ -/* Copyright (c) 2016 PaddlePaddle Authors. All Rights Reserve. +/* Copyright (c) 2016 PaddlePaddle Authors. All Rights Reserved. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at diff --git a/paddle/fluid/framework/selected_rows_test.cc b/paddle/fluid/framework/selected_rows_test.cc index d414f2a5934..960d8d64f04 100644 --- a/paddle/fluid/framework/selected_rows_test.cc +++ b/paddle/fluid/framework/selected_rows_test.cc @@ -1,4 +1,4 @@ -/* Copyright (c) 2016 PaddlePaddle Authors. All Rights Reserve. +/* Copyright (c) 2016 PaddlePaddle Authors. All Rights Reserved. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at diff --git a/paddle/fluid/framework/shape_inference.cc b/paddle/fluid/framework/shape_inference.cc index cfd2334f1af..1b518970acd 100644 --- a/paddle/fluid/framework/shape_inference.cc +++ b/paddle/fluid/framework/shape_inference.cc @@ -1,4 +1,4 @@ -/* Copyright (c) 2016 PaddlePaddle Authors. All Rights Reserve. +/* Copyright (c) 2016 PaddlePaddle Authors. All Rights Reserved. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/paddle/fluid/framework/shape_inference.h b/paddle/fluid/framework/shape_inference.h index c907523325c..3739d640fe9 100644 --- a/paddle/fluid/framework/shape_inference.h +++ b/paddle/fluid/framework/shape_inference.h @@ -1,4 +1,4 @@ -/* Copyright (c) 2016 PaddlePaddle Authors. All Rights Reserve. +/* Copyright (c) 2016 PaddlePaddle Authors. All Rights Reserved. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/paddle/fluid/framework/tensor.cc b/paddle/fluid/framework/tensor.cc index a56091d3c62..e97ada06f06 100644 --- a/paddle/fluid/framework/tensor.cc +++ b/paddle/fluid/framework/tensor.cc @@ -1,4 +1,4 @@ -/* Copyright (c) 2016 PaddlePaddle Authors. All Rights Reserve. +/* Copyright (c) 2016 PaddlePaddle Authors. All Rights Reserved. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/paddle/fluid/framework/tensor.h b/paddle/fluid/framework/tensor.h index 44d2c7dae94..f95af384eb0 100644 --- a/paddle/fluid/framework/tensor.h +++ b/paddle/fluid/framework/tensor.h @@ -1,4 +1,4 @@ -/* Copyright (c) 2016 PaddlePaddle Authors. All Rights Reserve. +/* Copyright (c) 2016 PaddlePaddle Authors. All Rights Reserved. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/paddle/fluid/framework/tensor_impl.h b/paddle/fluid/framework/tensor_impl.h index e69836292cd..59e6269ea04 100644 --- a/paddle/fluid/framework/tensor_impl.h +++ b/paddle/fluid/framework/tensor_impl.h @@ -1,4 +1,4 @@ -/* Copyright (c) 2016 PaddlePaddle Authors. All Rights Reserve. +/* Copyright (c) 2016 PaddlePaddle Authors. All Rights Reserved. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/paddle/fluid/framework/tensor_test.cc b/paddle/fluid/framework/tensor_test.cc index 6ed416e46f9..e1012de2ec3 100644 --- a/paddle/fluid/framework/tensor_test.cc +++ b/paddle/fluid/framework/tensor_test.cc @@ -1,4 +1,4 @@ -// Copyright (c) 2018 PaddlePaddle Authors. All Rights Reserve. +// Copyright (c) 2018 PaddlePaddle Authors. All Rights Reserved. // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. diff --git a/paddle/fluid/framework/tensor_util.h b/paddle/fluid/framework/tensor_util.h index b7e772b6daa..22519013cc4 100644 --- a/paddle/fluid/framework/tensor_util.h +++ b/paddle/fluid/framework/tensor_util.h @@ -1,4 +1,4 @@ -/* Copyright (c) 2016 PaddlePaddle Authors. All Rights Reserve. +/* Copyright (c) 2016 PaddlePaddle Authors. All Rights Reserved. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/paddle/fluid/framework/tensor_util_test.cc b/paddle/fluid/framework/tensor_util_test.cc index 8764c692e87..dcdbf9d3958 100644 --- a/paddle/fluid/framework/tensor_util_test.cc +++ b/paddle/fluid/framework/tensor_util_test.cc @@ -1,4 +1,4 @@ -// Copyright (c) 2018 PaddlePaddle Authors. All Rights Reserve. +// Copyright (c) 2018 PaddlePaddle Authors. All Rights Reserved. // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. diff --git a/paddle/fluid/framework/threadpool.cc b/paddle/fluid/framework/threadpool.cc index 2c4de41b0c4..9854d618d2b 100644 --- a/paddle/fluid/framework/threadpool.cc +++ b/paddle/fluid/framework/threadpool.cc @@ -1,4 +1,4 @@ -/* Copyright (c) 2016 PaddlePaddle Authors. All Rights Reserve. +/* Copyright (c) 2016 PaddlePaddle Authors. All Rights Reserved. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/paddle/fluid/framework/threadpool.h b/paddle/fluid/framework/threadpool.h index e88e6c01f02..606a93e13be 100644 --- a/paddle/fluid/framework/threadpool.h +++ b/paddle/fluid/framework/threadpool.h @@ -1,4 +1,4 @@ -/* Copyright (c) 2016 PaddlePaddle Authors. All Rights Reserve. +/* Copyright (c) 2016 PaddlePaddle Authors. All Rights Reserved. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/paddle/fluid/framework/threadpool_test.cc b/paddle/fluid/framework/threadpool_test.cc index 3fbfe7efc86..4da83d630a5 100644 --- a/paddle/fluid/framework/threadpool_test.cc +++ b/paddle/fluid/framework/threadpool_test.cc @@ -1,4 +1,4 @@ -/* Copyright (c) 2016 PaddlePaddle Authors. All Rights Reserve. +/* Copyright (c) 2016 PaddlePaddle Authors. All Rights Reserved. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/paddle/fluid/framework/type_defs.h b/paddle/fluid/framework/type_defs.h index 786d78a6440..4879209ece9 100644 --- a/paddle/fluid/framework/type_defs.h +++ b/paddle/fluid/framework/type_defs.h @@ -1,4 +1,4 @@ -/* Copyright (c) 2016 PaddlePaddle Authors. All Rights Reserve. +/* Copyright (c) 2016 PaddlePaddle Authors. All Rights Reserved. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/paddle/fluid/framework/var_desc.cc b/paddle/fluid/framework/var_desc.cc index 7ec9b2ced94..eb881469697 100644 --- a/paddle/fluid/framework/var_desc.cc +++ b/paddle/fluid/framework/var_desc.cc @@ -1,4 +1,4 @@ -/* Copyright (c) 2016 PaddlePaddle Authors. All Rights Reserve. +/* Copyright (c) 2016 PaddlePaddle Authors. All Rights Reserved. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/paddle/fluid/framework/var_desc.h b/paddle/fluid/framework/var_desc.h index cdb1bc3ec09..b272e5063e1 100644 --- a/paddle/fluid/framework/var_desc.h +++ b/paddle/fluid/framework/var_desc.h @@ -1,4 +1,4 @@ -/* Copyright (c) 2016 PaddlePaddle Authors. All Rights Reserve. +/* Copyright (c) 2016 PaddlePaddle Authors. All Rights Reserved. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/paddle/fluid/framework/var_type.h b/paddle/fluid/framework/var_type.h index 2dc4de52981..b5a6183892a 100644 --- a/paddle/fluid/framework/var_type.h +++ b/paddle/fluid/framework/var_type.h @@ -1,4 +1,4 @@ -/* Copyright (c) 2016 PaddlePaddle Authors. All Rights Reserve. +/* Copyright (c) 2016 PaddlePaddle Authors. All Rights Reserved. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/paddle/fluid/framework/var_type_inference.h b/paddle/fluid/framework/var_type_inference.h index 44fd4cd622c..f3035cd712b 100644 --- a/paddle/fluid/framework/var_type_inference.h +++ b/paddle/fluid/framework/var_type_inference.h @@ -1,4 +1,4 @@ -/* Copyright (c) 2016 PaddlePaddle Authors. All Rights Reserve. +/* Copyright (c) 2016 PaddlePaddle Authors. All Rights Reserved. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/paddle/fluid/framework/var_type_inference_test.cc b/paddle/fluid/framework/var_type_inference_test.cc index 0ee589c821a..961f209ee1c 100644 --- a/paddle/fluid/framework/var_type_inference_test.cc +++ b/paddle/fluid/framework/var_type_inference_test.cc @@ -1,4 +1,4 @@ -/* Copyright (c) 2016 PaddlePaddle Authors. All Rights Reserve. +/* Copyright (c) 2016 PaddlePaddle Authors. All Rights Reserved. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. @@ -102,4 +102,4 @@ TEST(InferVarType, sum_op_without_infer_var_type) { } } // namespace framework -} // namespace paddle \ No newline at end of file +} // namespace paddle diff --git a/paddle/fluid/framework/variable.h b/paddle/fluid/framework/variable.h index 9fb8ca92d68..87ddfe2ff9a 100644 --- a/paddle/fluid/framework/variable.h +++ b/paddle/fluid/framework/variable.h @@ -1,4 +1,4 @@ -// Copyright (c) 2018 PaddlePaddle Authors. All Rights Reserve. +// Copyright (c) 2018 PaddlePaddle Authors. All Rights Reserved. // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. diff --git a/paddle/fluid/framework/variable_test.cc b/paddle/fluid/framework/variable_test.cc index 8c14e506fd7..c5c1d215f4a 100644 --- a/paddle/fluid/framework/variable_test.cc +++ b/paddle/fluid/framework/variable_test.cc @@ -1,4 +1,4 @@ -// Copyright (c) 2018 PaddlePaddle Authors. All Rights Reserve. +// Copyright (c) 2018 PaddlePaddle Authors. All Rights Reserved. // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. diff --git a/paddle/fluid/inference/io.cc b/paddle/fluid/inference/io.cc index 58d7ab40bfa..71c5ab3db93 100644 --- a/paddle/fluid/inference/io.cc +++ b/paddle/fluid/inference/io.cc @@ -1,4 +1,4 @@ -/* Copyright (c) 2018 PaddlePaddle Authors. All Rights Reserve. +/* Copyright (c) 2018 PaddlePaddle Authors. All Rights Reserved. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/paddle/fluid/inference/io.h b/paddle/fluid/inference/io.h index 9d786406064..6817a6fca04 100644 --- a/paddle/fluid/inference/io.h +++ b/paddle/fluid/inference/io.h @@ -1,4 +1,4 @@ -/* Copyright (c) 2018 PaddlePaddle Authors. All Rights Reserve. +/* Copyright (c) 2018 PaddlePaddle Authors. All Rights Reserved. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/paddle/fluid/inference/tests/book/test_inference_fit_a_line.cc b/paddle/fluid/inference/tests/book/test_inference_fit_a_line.cc index fa18e69b3ac..9ab808efec3 100644 --- a/paddle/fluid/inference/tests/book/test_inference_fit_a_line.cc +++ b/paddle/fluid/inference/tests/book/test_inference_fit_a_line.cc @@ -1,4 +1,4 @@ -/* Copyright (c) 2018 PaddlePaddle Authors. All Rights Reserve. +/* Copyright (c) 2018 PaddlePaddle Authors. All Rights Reserved. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at diff --git a/paddle/fluid/inference/tests/book/test_inference_image_classification.cc b/paddle/fluid/inference/tests/book/test_inference_image_classification.cc index 27f17712bca..d6fc51301bc 100644 --- a/paddle/fluid/inference/tests/book/test_inference_image_classification.cc +++ b/paddle/fluid/inference/tests/book/test_inference_image_classification.cc @@ -1,4 +1,4 @@ -/* Copyright (c) 2018 PaddlePaddle Authors. All Rights Reserve. +/* Copyright (c) 2018 PaddlePaddle Authors. All Rights Reserved. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/paddle/fluid/inference/tests/book/test_inference_label_semantic_roles.cc b/paddle/fluid/inference/tests/book/test_inference_label_semantic_roles.cc index 55acd95f509..443193aae8b 100644 --- a/paddle/fluid/inference/tests/book/test_inference_label_semantic_roles.cc +++ b/paddle/fluid/inference/tests/book/test_inference_label_semantic_roles.cc @@ -1,4 +1,4 @@ -/* Copyright (c) 2018 PaddlePaddle Authors. All Rights Reserve. +/* Copyright (c) 2018 PaddlePaddle Authors. All Rights Reserved. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/paddle/fluid/inference/tests/book/test_inference_recognize_digits.cc b/paddle/fluid/inference/tests/book/test_inference_recognize_digits.cc index 99cf0f3095b..bd719489161 100644 --- a/paddle/fluid/inference/tests/book/test_inference_recognize_digits.cc +++ b/paddle/fluid/inference/tests/book/test_inference_recognize_digits.cc @@ -1,4 +1,4 @@ -/* Copyright (c) 2018 PaddlePaddle Authors. All Rights Reserve. +/* Copyright (c) 2018 PaddlePaddle Authors. All Rights Reserved. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/paddle/fluid/inference/tests/book/test_inference_recommender_system.cc b/paddle/fluid/inference/tests/book/test_inference_recommender_system.cc index 9208c2a5996..b42a33c9a90 100644 --- a/paddle/fluid/inference/tests/book/test_inference_recommender_system.cc +++ b/paddle/fluid/inference/tests/book/test_inference_recommender_system.cc @@ -1,4 +1,4 @@ -/* Copyright (c) 2018 PaddlePaddle Authors. All Rights Reserve. +/* Copyright (c) 2018 PaddlePaddle Authors. All Rights Reserved. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/paddle/fluid/inference/tests/book/test_inference_rnn_encoder_decoder.cc b/paddle/fluid/inference/tests/book/test_inference_rnn_encoder_decoder.cc index c88ca30cb78..a0523905bd1 100644 --- a/paddle/fluid/inference/tests/book/test_inference_rnn_encoder_decoder.cc +++ b/paddle/fluid/inference/tests/book/test_inference_rnn_encoder_decoder.cc @@ -1,4 +1,4 @@ -/* Copyright (c) 2018 PaddlePaddle Authors. All Rights Reserve. +/* Copyright (c) 2018 PaddlePaddle Authors. All Rights Reserved. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/paddle/fluid/inference/tests/book/test_inference_understand_sentiment.cc b/paddle/fluid/inference/tests/book/test_inference_understand_sentiment.cc index 3b29d52880c..e67064fb61d 100644 --- a/paddle/fluid/inference/tests/book/test_inference_understand_sentiment.cc +++ b/paddle/fluid/inference/tests/book/test_inference_understand_sentiment.cc @@ -1,4 +1,4 @@ -/* Copyright (c) 2018 PaddlePaddle Authors. All Rights Reserve. +/* Copyright (c) 2018 PaddlePaddle Authors. All Rights Reserved. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/paddle/fluid/inference/tests/book/test_inference_word2vec.cc b/paddle/fluid/inference/tests/book/test_inference_word2vec.cc index 93376b6824d..e2f2f36a822 100644 --- a/paddle/fluid/inference/tests/book/test_inference_word2vec.cc +++ b/paddle/fluid/inference/tests/book/test_inference_word2vec.cc @@ -1,4 +1,4 @@ -/* Copyright (c) 2018 PaddlePaddle Authors. All Rights Reserve. +/* Copyright (c) 2018 PaddlePaddle Authors. All Rights Reserved. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/paddle/fluid/inference/tests/test_helper.h b/paddle/fluid/inference/tests/test_helper.h index a6c93aa0737..abe2032cc05 100644 --- a/paddle/fluid/inference/tests/test_helper.h +++ b/paddle/fluid/inference/tests/test_helper.h @@ -1,4 +1,4 @@ -/* Copyright (c) 2018 PaddlePaddle Authors. All Rights Reserve. +/* Copyright (c) 2018 PaddlePaddle Authors. All Rights Reserved. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/paddle/fluid/memory/detail/buddy_allocator.cc b/paddle/fluid/memory/detail/buddy_allocator.cc index 2cee8271d27..87683783864 100644 --- a/paddle/fluid/memory/detail/buddy_allocator.cc +++ b/paddle/fluid/memory/detail/buddy_allocator.cc @@ -1,4 +1,4 @@ -/* Copyright (c) 2016 PaddlePaddle Authors. All Rights Reserve. +/* Copyright (c) 2016 PaddlePaddle Authors. All Rights Reserved. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/paddle/fluid/memory/detail/buddy_allocator.h b/paddle/fluid/memory/detail/buddy_allocator.h index 644d7933068..a4ee70c2586 100644 --- a/paddle/fluid/memory/detail/buddy_allocator.h +++ b/paddle/fluid/memory/detail/buddy_allocator.h @@ -1,4 +1,4 @@ -/* Copyright (c) 2016 PaddlePaddle Authors. All Rights Reserve. +/* Copyright (c) 2016 PaddlePaddle Authors. All Rights Reserved. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/paddle/fluid/memory/detail/memory_block.cc b/paddle/fluid/memory/detail/memory_block.cc index 23388cdd5b7..07123f2669c 100644 --- a/paddle/fluid/memory/detail/memory_block.cc +++ b/paddle/fluid/memory/detail/memory_block.cc @@ -1,4 +1,4 @@ -/* Copyright (c) 2016 PaddlePaddle Authors. All Rights Reserve. +/* Copyright (c) 2016 PaddlePaddle Authors. All Rights Reserved. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/paddle/fluid/memory/detail/memory_block.h b/paddle/fluid/memory/detail/memory_block.h index a4ca51b31b0..72b40b73177 100644 --- a/paddle/fluid/memory/detail/memory_block.h +++ b/paddle/fluid/memory/detail/memory_block.h @@ -1,4 +1,4 @@ -/* Copyright (c) 2016 PaddlePaddle Authors. All Rights Reserve. +/* Copyright (c) 2016 PaddlePaddle Authors. All Rights Reserved. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/paddle/fluid/memory/detail/meta_cache.cc b/paddle/fluid/memory/detail/meta_cache.cc index 7d78811c771..43249e842ad 100644 --- a/paddle/fluid/memory/detail/meta_cache.cc +++ b/paddle/fluid/memory/detail/meta_cache.cc @@ -1,4 +1,4 @@ -/* Copyright (c) 2016 PaddlePaddle Authors. All Rights Reserve. +/* Copyright (c) 2016 PaddlePaddle Authors. All Rights Reserved. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/paddle/fluid/memory/detail/meta_cache.h b/paddle/fluid/memory/detail/meta_cache.h index 635d6398e69..3283d756a6e 100644 --- a/paddle/fluid/memory/detail/meta_cache.h +++ b/paddle/fluid/memory/detail/meta_cache.h @@ -1,4 +1,4 @@ -/* Copyright (c) 2016 PaddlePaddle Authors. All Rights Reserve. +/* Copyright (c) 2016 PaddlePaddle Authors. All Rights Reserved. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/paddle/fluid/memory/detail/meta_data.cc b/paddle/fluid/memory/detail/meta_data.cc index eae49ebdcff..ad862af1705 100644 --- a/paddle/fluid/memory/detail/meta_data.cc +++ b/paddle/fluid/memory/detail/meta_data.cc @@ -1,4 +1,4 @@ -/* Copyright (c) 2016 PaddlePaddle Authors. All Rights Reserve. +/* Copyright (c) 2016 PaddlePaddle Authors. All Rights Reserved. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/paddle/fluid/memory/detail/meta_data.h b/paddle/fluid/memory/detail/meta_data.h index 368523701ef..14895ee8727 100644 --- a/paddle/fluid/memory/detail/meta_data.h +++ b/paddle/fluid/memory/detail/meta_data.h @@ -1,4 +1,4 @@ -/* Copyright (c) 2016 PaddlePaddle Authors. All Rights Reserve. +/* Copyright (c) 2016 PaddlePaddle Authors. All Rights Reserved. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/paddle/fluid/memory/detail/system_allocator.cc b/paddle/fluid/memory/detail/system_allocator.cc index 1f07c5e789c..8ac8978120a 100644 --- a/paddle/fluid/memory/detail/system_allocator.cc +++ b/paddle/fluid/memory/detail/system_allocator.cc @@ -1,4 +1,4 @@ -/* Copyright (c) 2016 PaddlePaddle Authors. All Rights Reserve. +/* Copyright (c) 2016 PaddlePaddle Authors. All Rights Reserved. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/paddle/fluid/memory/detail/system_allocator.h b/paddle/fluid/memory/detail/system_allocator.h index 552cab4f96f..e93c2c1e323 100644 --- a/paddle/fluid/memory/detail/system_allocator.h +++ b/paddle/fluid/memory/detail/system_allocator.h @@ -1,4 +1,4 @@ -/* Copyright (c) 2016 PaddlePaddle Authors. All Rights Reserve. +/* Copyright (c) 2016 PaddlePaddle Authors. All Rights Reserved. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/paddle/fluid/memory/detail/system_allocator_test.cc b/paddle/fluid/memory/detail/system_allocator_test.cc index a850e480ec9..d5df9e6897e 100644 --- a/paddle/fluid/memory/detail/system_allocator_test.cc +++ b/paddle/fluid/memory/detail/system_allocator_test.cc @@ -1,4 +1,4 @@ -/* Copyright (c) 2016 PaddlePaddle Authors. All Rights Reserve. +/* Copyright (c) 2016 PaddlePaddle Authors. All Rights Reserved. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/paddle/fluid/memory/memcpy.cc b/paddle/fluid/memory/memcpy.cc index 8938b361337..b991360d044 100644 --- a/paddle/fluid/memory/memcpy.cc +++ b/paddle/fluid/memory/memcpy.cc @@ -1,4 +1,4 @@ -/* Copyright (c) 2016 PaddlePaddle Authors. All Rights Reserve. +/* Copyright (c) 2016 PaddlePaddle Authors. All Rights Reserved. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/paddle/fluid/memory/memcpy.h b/paddle/fluid/memory/memcpy.h index 77d209c3fbe..7b2b8eb0662 100644 --- a/paddle/fluid/memory/memcpy.h +++ b/paddle/fluid/memory/memcpy.h @@ -1,4 +1,4 @@ -/* Copyright (c) 2016 PaddlePaddle Authors. All Rights Reserve. +/* Copyright (c) 2016 PaddlePaddle Authors. All Rights Reserved. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/paddle/fluid/memory/memory.cc b/paddle/fluid/memory/memory.cc index 6eedab5d034..d07f89439a1 100644 --- a/paddle/fluid/memory/memory.cc +++ b/paddle/fluid/memory/memory.cc @@ -1,4 +1,4 @@ -/* Copyright (c) 2016 PaddlePaddle Authors. All Rights Reserve. +/* Copyright (c) 2016 PaddlePaddle Authors. All Rights Reserved. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/paddle/fluid/memory/memory.h b/paddle/fluid/memory/memory.h index a9166a6746e..7c5db815d65 100644 --- a/paddle/fluid/memory/memory.h +++ b/paddle/fluid/memory/memory.h @@ -1,4 +1,4 @@ -/* Copyright (c) 2016 PaddlePaddle Authors. All Rights Reserve. +/* Copyright (c) 2016 PaddlePaddle Authors. All Rights Reserved. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/paddle/fluid/memory/memory_test.cc b/paddle/fluid/memory/memory_test.cc index d7505ef0f36..ae98d0d5254 100644 --- a/paddle/fluid/memory/memory_test.cc +++ b/paddle/fluid/memory/memory_test.cc @@ -1,4 +1,4 @@ -/* Copyright (c) 2016 PaddlePaddle Authors. All Rights Reserve. +/* Copyright (c) 2016 PaddlePaddle Authors. All Rights Reserved. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/paddle/fluid/operators/accuracy_op.cc b/paddle/fluid/operators/accuracy_op.cc index 43689b3b7da..ac10d759fec 100644 --- a/paddle/fluid/operators/accuracy_op.cc +++ b/paddle/fluid/operators/accuracy_op.cc @@ -1,4 +1,4 @@ -/* Copyright (c) 2016 PaddlePaddle Authors. All Rights Reserve. +/* Copyright (c) 2016 PaddlePaddle Authors. All Rights Reserved. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/paddle/fluid/operators/accuracy_op.cu b/paddle/fluid/operators/accuracy_op.cu index 4462b9ba5c0..630a4a2df2c 100644 --- a/paddle/fluid/operators/accuracy_op.cu +++ b/paddle/fluid/operators/accuracy_op.cu @@ -1,4 +1,4 @@ -/* Copyright (c) 2016 PaddlePaddle Authors. All Rights Reserve. +/* Copyright (c) 2016 PaddlePaddle Authors. All Rights Reserved. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/paddle/fluid/operators/accuracy_op.h b/paddle/fluid/operators/accuracy_op.h index b3ed1d3fe09..803244dd48e 100644 --- a/paddle/fluid/operators/accuracy_op.h +++ b/paddle/fluid/operators/accuracy_op.h @@ -1,4 +1,4 @@ -/* Copyright (c) 2016 PaddlePaddle Authors. All Rights Reserve. +/* Copyright (c) 2016 PaddlePaddle Authors. All Rights Reserved. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/paddle/fluid/operators/activation_op.cc b/paddle/fluid/operators/activation_op.cc index c04dd8cb916..d74c47b981e 100644 --- a/paddle/fluid/operators/activation_op.cc +++ b/paddle/fluid/operators/activation_op.cc @@ -1,4 +1,4 @@ -/* Copyright (c) 2016 PaddlePaddle Authors. All Rights Reserve. +/* Copyright (c) 2016 PaddlePaddle Authors. All Rights Reserved. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/paddle/fluid/operators/activation_op.cu b/paddle/fluid/operators/activation_op.cu index b86a7926a97..b2633d01762 100644 --- a/paddle/fluid/operators/activation_op.cu +++ b/paddle/fluid/operators/activation_op.cu @@ -1,4 +1,4 @@ -/* Copyright (c) 2016 PaddlePaddle Authors. All Rights Reserve. +/* Copyright (c) 2016 PaddlePaddle Authors. All Rights Reserved. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/paddle/fluid/operators/activation_op.h b/paddle/fluid/operators/activation_op.h index 7a6ae2224c8..8f791a6ca81 100644 --- a/paddle/fluid/operators/activation_op.h +++ b/paddle/fluid/operators/activation_op.h @@ -1,4 +1,4 @@ -/* Copyright (c) 2016 PaddlePaddle Authors. All Rights Reserve. +/* Copyright (c) 2016 PaddlePaddle Authors. All Rights Reserved. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/paddle/fluid/operators/adadelta_op.cc b/paddle/fluid/operators/adadelta_op.cc index ececd47e6a6..c9ed221a6e6 100644 --- a/paddle/fluid/operators/adadelta_op.cc +++ b/paddle/fluid/operators/adadelta_op.cc @@ -1,4 +1,4 @@ -/* Copyright (c) 2016 PaddlePaddle Authors. All Rights Reserve. +/* Copyright (c) 2016 PaddlePaddle Authors. All Rights Reserved. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/paddle/fluid/operators/adadelta_op.cu b/paddle/fluid/operators/adadelta_op.cu index 733482f788d..fc10c665747 100644 --- a/paddle/fluid/operators/adadelta_op.cu +++ b/paddle/fluid/operators/adadelta_op.cu @@ -1,4 +1,4 @@ -/* Copyright (c) 2016 PaddlePaddle Authors. All Rights Reserve. +/* Copyright (c) 2016 PaddlePaddle Authors. All Rights Reserved. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/paddle/fluid/operators/adadelta_op.h b/paddle/fluid/operators/adadelta_op.h index 82ced087104..822458daf66 100644 --- a/paddle/fluid/operators/adadelta_op.h +++ b/paddle/fluid/operators/adadelta_op.h @@ -1,4 +1,4 @@ -/* Copyright (c) 2016 PaddlePaddle Authors. All Rights Reserve. +/* Copyright (c) 2016 PaddlePaddle Authors. All Rights Reserved. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/paddle/fluid/operators/adagrad_op.cc b/paddle/fluid/operators/adagrad_op.cc index 61c0ecd019b..c990fe78438 100644 --- a/paddle/fluid/operators/adagrad_op.cc +++ b/paddle/fluid/operators/adagrad_op.cc @@ -1,4 +1,4 @@ -/* Copyright (c) 2016 PaddlePaddle Authors. All Rights Reserve. +/* Copyright (c) 2016 PaddlePaddle Authors. All Rights Reserved. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/paddle/fluid/operators/adagrad_op.cu b/paddle/fluid/operators/adagrad_op.cu index 1117363c133..e798101ca6a 100644 --- a/paddle/fluid/operators/adagrad_op.cu +++ b/paddle/fluid/operators/adagrad_op.cu @@ -1,4 +1,4 @@ -/* Copyright (c) 2016 PaddlePaddle Authors. All Rights Reserve. +/* Copyright (c) 2016 PaddlePaddle Authors. All Rights Reserved. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/paddle/fluid/operators/adagrad_op.h b/paddle/fluid/operators/adagrad_op.h index ee503b2c362..df520fcc898 100644 --- a/paddle/fluid/operators/adagrad_op.h +++ b/paddle/fluid/operators/adagrad_op.h @@ -1,4 +1,4 @@ -/* Copyright (c) 2016 PaddlePaddle Authors. All Rights Reserve. +/* Copyright (c) 2016 PaddlePaddle Authors. All Rights Reserved. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/paddle/fluid/operators/adam_op.cc b/paddle/fluid/operators/adam_op.cc index 25da9336b28..267dcab8104 100644 --- a/paddle/fluid/operators/adam_op.cc +++ b/paddle/fluid/operators/adam_op.cc @@ -1,4 +1,4 @@ -/* Copyright (c) 2016 PaddlePaddle Authors. All Rights Reserve. +/* Copyright (c) 2016 PaddlePaddle Authors. All Rights Reserved. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/paddle/fluid/operators/adam_op.cu b/paddle/fluid/operators/adam_op.cu index 85b806eb6a1..77f1991002e 100644 --- a/paddle/fluid/operators/adam_op.cu +++ b/paddle/fluid/operators/adam_op.cu @@ -1,4 +1,4 @@ -/* Copyright (c) 2016 PaddlePaddle Authors. All Rights Reserve. +/* Copyright (c) 2016 PaddlePaddle Authors. All Rights Reserved. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/paddle/fluid/operators/adam_op.h b/paddle/fluid/operators/adam_op.h index a51b46ef157..b332b671636 100644 --- a/paddle/fluid/operators/adam_op.h +++ b/paddle/fluid/operators/adam_op.h @@ -1,4 +1,4 @@ -/* Copyright (c) 2016 PaddlePaddle Authors. All Rights Reserve. +/* Copyright (c) 2016 PaddlePaddle Authors. All Rights Reserved. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/paddle/fluid/operators/adamax_op.cc b/paddle/fluid/operators/adamax_op.cc index b2249b8f96d..7e2f1cc66eb 100644 --- a/paddle/fluid/operators/adamax_op.cc +++ b/paddle/fluid/operators/adamax_op.cc @@ -1,4 +1,4 @@ -/* Copyright (c) 2016 PaddlePaddle Authors. All Rights Reserve. +/* Copyright (c) 2016 PaddlePaddle Authors. All Rights Reserved. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/paddle/fluid/operators/adamax_op.cu b/paddle/fluid/operators/adamax_op.cu index 44a5d6c7bde..05cafd7a8ee 100644 --- a/paddle/fluid/operators/adamax_op.cu +++ b/paddle/fluid/operators/adamax_op.cu @@ -1,4 +1,4 @@ -/* Copyright (c) 2016 PaddlePaddle Authors. All Rights Reserve. +/* Copyright (c) 2016 PaddlePaddle Authors. All Rights Reserved. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/paddle/fluid/operators/adamax_op.h b/paddle/fluid/operators/adamax_op.h index 124453c0ece..de644676fd9 100644 --- a/paddle/fluid/operators/adamax_op.h +++ b/paddle/fluid/operators/adamax_op.h @@ -1,4 +1,4 @@ -/* Copyright (c) 2016 PaddlePaddle Authors. All Rights Reserve. +/* Copyright (c) 2016 PaddlePaddle Authors. All Rights Reserved. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/paddle/fluid/operators/array_operator.h b/paddle/fluid/operators/array_operator.h index 4ffb414ecea..d0fc1533470 100644 --- a/paddle/fluid/operators/array_operator.h +++ b/paddle/fluid/operators/array_operator.h @@ -1,4 +1,4 @@ -/* Copyright (c) 2016 PaddlePaddle Authors. All Rights Reserve. +/* Copyright (c) 2016 PaddlePaddle Authors. All Rights Reserved. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/paddle/fluid/operators/array_to_lod_tensor_op.cc b/paddle/fluid/operators/array_to_lod_tensor_op.cc index 69464c4cff5..f59bfad6cca 100644 --- a/paddle/fluid/operators/array_to_lod_tensor_op.cc +++ b/paddle/fluid/operators/array_to_lod_tensor_op.cc @@ -1,4 +1,4 @@ -/* Copyright (c) 2016 PaddlePaddle Authors. All Rights Reserve. +/* Copyright (c) 2016 PaddlePaddle Authors. All Rights Reserved. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/paddle/fluid/operators/assign_op.cc b/paddle/fluid/operators/assign_op.cc index b72e72b12f8..eedf6b8c66f 100644 --- a/paddle/fluid/operators/assign_op.cc +++ b/paddle/fluid/operators/assign_op.cc @@ -1,4 +1,4 @@ -/* Copyright (c) 2016 PaddlePaddle Authors. All Rights Reserve. +/* Copyright (c) 2016 PaddlePaddle Authors. All Rights Reserved. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/paddle/fluid/operators/assign_value_op.cc b/paddle/fluid/operators/assign_value_op.cc index 835043d9ab4..2985fc28a08 100644 --- a/paddle/fluid/operators/assign_value_op.cc +++ b/paddle/fluid/operators/assign_value_op.cc @@ -1,4 +1,4 @@ -// Copyright (c) 2018 PaddlePaddle Authors. All Rights Reserve. +// Copyright (c) 2018 PaddlePaddle Authors. All Rights Reserved. // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. diff --git a/paddle/fluid/operators/assign_value_op.cu.cc b/paddle/fluid/operators/assign_value_op.cu.cc index 616163f97b9..08bfde5dc92 100644 --- a/paddle/fluid/operators/assign_value_op.cu.cc +++ b/paddle/fluid/operators/assign_value_op.cu.cc @@ -1,4 +1,4 @@ -/* Copyright (c) 2016 PaddlePaddle Authors. All Rights Reserve. +/* Copyright (c) 2016 PaddlePaddle Authors. All Rights Reserved. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/paddle/fluid/operators/assign_value_op.h b/paddle/fluid/operators/assign_value_op.h index 33a344cad59..90c9496a3c1 100644 --- a/paddle/fluid/operators/assign_value_op.h +++ b/paddle/fluid/operators/assign_value_op.h @@ -1,4 +1,4 @@ -// Copyright (c) 2018 PaddlePaddle Authors. All Rights Reserve. +// Copyright (c) 2018 PaddlePaddle Authors. All Rights Reserved. // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. diff --git a/paddle/fluid/operators/auc_op.cc b/paddle/fluid/operators/auc_op.cc index 8ac08ea4a19..71de78b1181 100644 --- a/paddle/fluid/operators/auc_op.cc +++ b/paddle/fluid/operators/auc_op.cc @@ -1,4 +1,4 @@ -/* Copyright (c) 2016 PaddlePaddle Authors. All Rights Reserve. +/* Copyright (c) 2016 PaddlePaddle Authors. All Rights Reserved. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/paddle/fluid/operators/auc_op.h b/paddle/fluid/operators/auc_op.h index e648db70974..f4e8208c3f2 100644 --- a/paddle/fluid/operators/auc_op.h +++ b/paddle/fluid/operators/auc_op.h @@ -1,4 +1,4 @@ -/* Copyright (c) 2016 PaddlePaddle Authors. All Rights Reserve. +/* Copyright (c) 2016 PaddlePaddle Authors. All Rights Reserved. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/paddle/fluid/operators/batch_norm_op.cc b/paddle/fluid/operators/batch_norm_op.cc index 506c25d50d4..215ae229aff 100644 --- a/paddle/fluid/operators/batch_norm_op.cc +++ b/paddle/fluid/operators/batch_norm_op.cc @@ -1,4 +1,4 @@ -/* Copyright (c) 2016 PaddlePaddle Authors. All Rights Reserve. +/* Copyright (c) 2016 PaddlePaddle Authors. All Rights Reserved. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/paddle/fluid/operators/batch_norm_op.cu.cc b/paddle/fluid/operators/batch_norm_op.cu.cc index b9c97211e14..2d1556efc66 100644 --- a/paddle/fluid/operators/batch_norm_op.cu.cc +++ b/paddle/fluid/operators/batch_norm_op.cu.cc @@ -1,4 +1,4 @@ -/* Copyright (c) 2016 PaddlePaddle Authors. All Rights Reserve. +/* Copyright (c) 2016 PaddlePaddle Authors. All Rights Reserved. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/paddle/fluid/operators/batch_norm_op.h b/paddle/fluid/operators/batch_norm_op.h index fa9942ad099..9e5fc41598f 100644 --- a/paddle/fluid/operators/batch_norm_op.h +++ b/paddle/fluid/operators/batch_norm_op.h @@ -1,4 +1,4 @@ -/* Copyright (c) 2016 PaddlePaddle Authors. All Rights Reserve. +/* Copyright (c) 2016 PaddlePaddle Authors. All Rights Reserved. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/paddle/fluid/operators/beam_search_decode_op.cc b/paddle/fluid/operators/beam_search_decode_op.cc index 6d3efcfeb84..dacb0e2681d 100644 --- a/paddle/fluid/operators/beam_search_decode_op.cc +++ b/paddle/fluid/operators/beam_search_decode_op.cc @@ -1,4 +1,4 @@ -/* Copyright (c) 2016 PaddlePaddle Authors. All Rights Reserve. +/* Copyright (c) 2016 PaddlePaddle Authors. All Rights Reserved. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/paddle/fluid/operators/beam_search_decode_op.h b/paddle/fluid/operators/beam_search_decode_op.h index aeecb8d39ac..40147ce1eb2 100644 --- a/paddle/fluid/operators/beam_search_decode_op.h +++ b/paddle/fluid/operators/beam_search_decode_op.h @@ -1,4 +1,4 @@ -/* Copyright (c) 2016 PaddlePaddle Authors. All Rights Reserve. +/* Copyright (c) 2016 PaddlePaddle Authors. All Rights Reserved. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/paddle/fluid/operators/beam_search_decode_op_test.cc b/paddle/fluid/operators/beam_search_decode_op_test.cc index 24f87279d5e..c3faf46e09b 100644 --- a/paddle/fluid/operators/beam_search_decode_op_test.cc +++ b/paddle/fluid/operators/beam_search_decode_op_test.cc @@ -1,4 +1,4 @@ -/* Copyright (c) 2016 PaddlePaddle Authors. All Rights Reserve. +/* Copyright (c) 2016 PaddlePaddle Authors. All Rights Reserved. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/paddle/fluid/operators/beam_search_op.cc b/paddle/fluid/operators/beam_search_op.cc index 6f4c8c7e06e..76985ea9c26 100644 --- a/paddle/fluid/operators/beam_search_op.cc +++ b/paddle/fluid/operators/beam_search_op.cc @@ -1,4 +1,4 @@ -/* Copyright (c) 2016 PaddlePaddle Authors. All Rights Reserve. +/* Copyright (c) 2016 PaddlePaddle Authors. All Rights Reserved. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/paddle/fluid/operators/beam_search_op.h b/paddle/fluid/operators/beam_search_op.h index bfbe78097d2..b333ef4e6c7 100644 --- a/paddle/fluid/operators/beam_search_op.h +++ b/paddle/fluid/operators/beam_search_op.h @@ -1,4 +1,4 @@ -/* Copyright (c) 2016 PaddlePaddle Authors. All Rights Reserve. +/* Copyright (c) 2016 PaddlePaddle Authors. All Rights Reserved. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/paddle/fluid/operators/beam_search_op_test.cc b/paddle/fluid/operators/beam_search_op_test.cc index ea2afda4d49..ec666359aa2 100644 --- a/paddle/fluid/operators/beam_search_op_test.cc +++ b/paddle/fluid/operators/beam_search_op_test.cc @@ -1,4 +1,4 @@ -/* Copyright (c) 2016 PaddlePaddle Authors. All Rights Reserve. +/* Copyright (c) 2016 PaddlePaddle Authors. All Rights Reserved. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/paddle/fluid/operators/bilinear_tensor_product_op.cc b/paddle/fluid/operators/bilinear_tensor_product_op.cc index cc378b1b453..2ec984d8e0f 100644 --- a/paddle/fluid/operators/bilinear_tensor_product_op.cc +++ b/paddle/fluid/operators/bilinear_tensor_product_op.cc @@ -1,4 +1,4 @@ -/* Copyright (c) 2016 PaddlePaddle Authors. All Rights Reserve. +/* Copyright (c) 2016 PaddlePaddle Authors. All Rights Reserved. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/paddle/fluid/operators/bilinear_tensor_product_op.cu b/paddle/fluid/operators/bilinear_tensor_product_op.cu index 2cec48ee69a..9426ffbe174 100644 --- a/paddle/fluid/operators/bilinear_tensor_product_op.cu +++ b/paddle/fluid/operators/bilinear_tensor_product_op.cu @@ -1,4 +1,4 @@ -/* Copyright (c) 2016 PaddlePaddle Authors. All Rights Reserve. +/* Copyright (c) 2016 PaddlePaddle Authors. All Rights Reserved. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/paddle/fluid/operators/bilinear_tensor_product_op.h b/paddle/fluid/operators/bilinear_tensor_product_op.h index 626fa957c42..ca80e6085c4 100644 --- a/paddle/fluid/operators/bilinear_tensor_product_op.h +++ b/paddle/fluid/operators/bilinear_tensor_product_op.h @@ -1,4 +1,4 @@ -/* Copyright (c) 2016 PaddlePaddle Authors. All Rights Reserve. +/* Copyright (c) 2016 PaddlePaddle Authors. All Rights Reserved. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/paddle/fluid/operators/bipartite_match_op.cc b/paddle/fluid/operators/bipartite_match_op.cc index d614bf70438..c536cf6b6b8 100644 --- a/paddle/fluid/operators/bipartite_match_op.cc +++ b/paddle/fluid/operators/bipartite_match_op.cc @@ -1,4 +1,4 @@ -/* Copyright (c) 2018 PaddlePaddle Authors. All Rights Reserve. +/* Copyright (c) 2018 PaddlePaddle Authors. All Rights Reserved. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/paddle/fluid/operators/box_coder_op.cc b/paddle/fluid/operators/box_coder_op.cc index 8e0fee22d8d..1fc201286f3 100644 --- a/paddle/fluid/operators/box_coder_op.cc +++ b/paddle/fluid/operators/box_coder_op.cc @@ -1,4 +1,4 @@ -/* Copyright (c) 2018 PaddlePaddle Authors. All Rights Reserve. +/* Copyright (c) 2018 PaddlePaddle Authors. All Rights Reserved. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at diff --git a/paddle/fluid/operators/box_coder_op.cu b/paddle/fluid/operators/box_coder_op.cu index dd9299ceacd..7ab242edfa3 100644 --- a/paddle/fluid/operators/box_coder_op.cu +++ b/paddle/fluid/operators/box_coder_op.cu @@ -1,4 +1,4 @@ -/* Copyright (c) 2018 PaddlePaddle Authors. All Rights Reserve. +/* Copyright (c) 2018 PaddlePaddle Authors. All Rights Reserved. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at diff --git a/paddle/fluid/operators/box_coder_op.h b/paddle/fluid/operators/box_coder_op.h index c41bcc212b8..5e105aff526 100644 --- a/paddle/fluid/operators/box_coder_op.h +++ b/paddle/fluid/operators/box_coder_op.h @@ -1,4 +1,4 @@ -/* Copyright (c) 2018 PaddlePaddle Authors. All Rights Reserve. +/* Copyright (c) 2018 PaddlePaddle Authors. All Rights Reserved. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at diff --git a/paddle/fluid/operators/cast_op.cc b/paddle/fluid/operators/cast_op.cc index 364c21f7619..a5ec47d84fe 100644 --- a/paddle/fluid/operators/cast_op.cc +++ b/paddle/fluid/operators/cast_op.cc @@ -1,4 +1,4 @@ -/* Copyright (c) 2016 PaddlePaddle Authors. All Rights Reserve. +/* Copyright (c) 2016 PaddlePaddle Authors. All Rights Reserved. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/paddle/fluid/operators/cast_op.cu b/paddle/fluid/operators/cast_op.cu index fb597be9d93..507e9a531aa 100644 --- a/paddle/fluid/operators/cast_op.cu +++ b/paddle/fluid/operators/cast_op.cu @@ -1,4 +1,4 @@ -/* Copyright (c) 2016 PaddlePaddle Authors. All Rights Reserve. +/* Copyright (c) 2016 PaddlePaddle Authors. All Rights Reserved. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/paddle/fluid/operators/cast_op.h b/paddle/fluid/operators/cast_op.h index 9ab4961cef4..ccfbd09a6b7 100644 --- a/paddle/fluid/operators/cast_op.h +++ b/paddle/fluid/operators/cast_op.h @@ -1,4 +1,4 @@ -/* Copyright (c) 2016 PaddlePaddle Authors. All Rights Reserve. +/* Copyright (c) 2016 PaddlePaddle Authors. All Rights Reserved. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/paddle/fluid/operators/chunk_eval_op.cc b/paddle/fluid/operators/chunk_eval_op.cc index 080e4d80da4..09d090e1877 100644 --- a/paddle/fluid/operators/chunk_eval_op.cc +++ b/paddle/fluid/operators/chunk_eval_op.cc @@ -1,4 +1,4 @@ -/* Copyright (c) 2016 PaddlePaddle Authors. All Rights Reserve. +/* Copyright (c) 2016 PaddlePaddle Authors. All Rights Reserved. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/paddle/fluid/operators/chunk_eval_op.h b/paddle/fluid/operators/chunk_eval_op.h index 3dca3d2c0f9..9e97f7c7762 100644 --- a/paddle/fluid/operators/chunk_eval_op.h +++ b/paddle/fluid/operators/chunk_eval_op.h @@ -1,4 +1,4 @@ -/* Copyright (c) 2016 PaddlePaddle Authors. All Rights Reserve. +/* Copyright (c) 2016 PaddlePaddle Authors. All Rights Reserved. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/paddle/fluid/operators/clip_by_norm_op.cc b/paddle/fluid/operators/clip_by_norm_op.cc index 89df118c06f..f43726b4793 100644 --- a/paddle/fluid/operators/clip_by_norm_op.cc +++ b/paddle/fluid/operators/clip_by_norm_op.cc @@ -1,4 +1,4 @@ -/* Copyright (c) 2016 PaddlePaddle Authors. All Rights Reserve. +/* Copyright (c) 2016 PaddlePaddle Authors. All Rights Reserved. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/paddle/fluid/operators/clip_by_norm_op.cu b/paddle/fluid/operators/clip_by_norm_op.cu index a466b335914..788eab7cb2b 100644 --- a/paddle/fluid/operators/clip_by_norm_op.cu +++ b/paddle/fluid/operators/clip_by_norm_op.cu @@ -1,4 +1,4 @@ -/* Copyright (c) 2016 PaddlePaddle Authors. All Rights Reserve. +/* Copyright (c) 2016 PaddlePaddle Authors. All Rights Reserved. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/paddle/fluid/operators/clip_by_norm_op.h b/paddle/fluid/operators/clip_by_norm_op.h index 82bcf07657b..5af0eb0b2ad 100644 --- a/paddle/fluid/operators/clip_by_norm_op.h +++ b/paddle/fluid/operators/clip_by_norm_op.h @@ -1,4 +1,4 @@ -/* Copyright (c) 2016 PaddlePaddle Authors. All Rights Reserve. +/* Copyright (c) 2016 PaddlePaddle Authors. All Rights Reserved. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/paddle/fluid/operators/clip_op.cc b/paddle/fluid/operators/clip_op.cc index 76b2cefbf9d..a3b67964c79 100644 --- a/paddle/fluid/operators/clip_op.cc +++ b/paddle/fluid/operators/clip_op.cc @@ -1,4 +1,4 @@ -/* Copyright (c) 2016 PaddlePaddle Authors. All Rights Reserve. +/* Copyright (c) 2016 PaddlePaddle Authors. All Rights Reserved. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/paddle/fluid/operators/clip_op.cu b/paddle/fluid/operators/clip_op.cu index 7b044d6e699..10bee444f6b 100644 --- a/paddle/fluid/operators/clip_op.cu +++ b/paddle/fluid/operators/clip_op.cu @@ -1,4 +1,4 @@ -/* Copyright (c) 2016 PaddlePaddle Authors. All Rights Reserve. +/* Copyright (c) 2016 PaddlePaddle Authors. All Rights Reserved. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/paddle/fluid/operators/clip_op.h b/paddle/fluid/operators/clip_op.h index aecd6f83bfa..85607a6b0e4 100644 --- a/paddle/fluid/operators/clip_op.h +++ b/paddle/fluid/operators/clip_op.h @@ -1,4 +1,4 @@ -/* Copyright (c) 2016 PaddlePaddle Authors. All Rights Reserve. +/* Copyright (c) 2016 PaddlePaddle Authors. All Rights Reserved. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/paddle/fluid/operators/compare_op.cc b/paddle/fluid/operators/compare_op.cc index b1f09fb0029..cdeb28cc1db 100644 --- a/paddle/fluid/operators/compare_op.cc +++ b/paddle/fluid/operators/compare_op.cc @@ -1,4 +1,4 @@ -/* Copyright (c) 2016 PaddlePaddle Authors. All Rights Reserve. +/* Copyright (c) 2016 PaddlePaddle Authors. All Rights Reserved. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/paddle/fluid/operators/compare_op.cu b/paddle/fluid/operators/compare_op.cu index 00263a2ade4..2cc0c7c5725 100644 --- a/paddle/fluid/operators/compare_op.cu +++ b/paddle/fluid/operators/compare_op.cu @@ -1,4 +1,4 @@ -/* Copyright (c) 2016 PaddlePaddle Authors. All Rights Reserve. +/* Copyright (c) 2016 PaddlePaddle Authors. All Rights Reserved. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/paddle/fluid/operators/compare_op.h b/paddle/fluid/operators/compare_op.h index c651335268f..d7b62782fc6 100644 --- a/paddle/fluid/operators/compare_op.h +++ b/paddle/fluid/operators/compare_op.h @@ -1,4 +1,4 @@ -/* Copyright (c) 2016 PaddlePaddle Authors. All Rights Reserve. +/* Copyright (c) 2016 PaddlePaddle Authors. All Rights Reserved. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/paddle/fluid/operators/concat_op.cc b/paddle/fluid/operators/concat_op.cc index 68eb5412beb..bdce8f0a6f5 100644 --- a/paddle/fluid/operators/concat_op.cc +++ b/paddle/fluid/operators/concat_op.cc @@ -1,4 +1,4 @@ -/* Copyright (c) 2016 PaddlePaddle Authors. All Rights Reserve. +/* Copyright (c) 2016 PaddlePaddle Authors. All Rights Reserved. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/paddle/fluid/operators/concat_op.cu.cc b/paddle/fluid/operators/concat_op.cu.cc index 143bda61167..590eca9d066 100644 --- a/paddle/fluid/operators/concat_op.cu.cc +++ b/paddle/fluid/operators/concat_op.cu.cc @@ -1,4 +1,4 @@ -/* Copyright (c) 2016 PaddlePaddle Authors. All Rights Reserve. +/* Copyright (c) 2016 PaddlePaddle Authors. All Rights Reserved. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/paddle/fluid/operators/concat_op.h b/paddle/fluid/operators/concat_op.h index c8a4292932d..eb0e43ad2d8 100644 --- a/paddle/fluid/operators/concat_op.h +++ b/paddle/fluid/operators/concat_op.h @@ -1,4 +1,4 @@ -/* Copyright (c) 2016 PaddlePaddle Authors. All Rights Reserve. +/* Copyright (c) 2016 PaddlePaddle Authors. All Rights Reserved. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/paddle/fluid/operators/cond_op.cc b/paddle/fluid/operators/cond_op.cc index d63748a61ce..15dce9e3e28 100644 --- a/paddle/fluid/operators/cond_op.cc +++ b/paddle/fluid/operators/cond_op.cc @@ -1,4 +1,4 @@ -/* Copyright (c) 2016 PaddlePaddle Authors. All Rights Reserve. +/* Copyright (c) 2016 PaddlePaddle Authors. All Rights Reserved. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/paddle/fluid/operators/cond_op.h b/paddle/fluid/operators/cond_op.h index 0bb14bc8c2c..a04fae21820 100644 --- a/paddle/fluid/operators/cond_op.h +++ b/paddle/fluid/operators/cond_op.h @@ -1,4 +1,4 @@ -/* Copyright (c) 2016 PaddlePaddle Authors. All Rights Reserve. +/* Copyright (c) 2016 PaddlePaddle Authors. All Rights Reserved. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/paddle/fluid/operators/conditional_block_op.cc b/paddle/fluid/operators/conditional_block_op.cc index 228b0998360..337b34e8f0b 100644 --- a/paddle/fluid/operators/conditional_block_op.cc +++ b/paddle/fluid/operators/conditional_block_op.cc @@ -1,4 +1,4 @@ -/* Copyright (c) 2016 PaddlePaddle Authors. All Rights Reserve. +/* Copyright (c) 2016 PaddlePaddle Authors. All Rights Reserved. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/paddle/fluid/operators/conv_cudnn_op.cu.cc b/paddle/fluid/operators/conv_cudnn_op.cu.cc index a729d376ac8..ff0fbf21f86 100644 --- a/paddle/fluid/operators/conv_cudnn_op.cu.cc +++ b/paddle/fluid/operators/conv_cudnn_op.cu.cc @@ -1,4 +1,4 @@ -/* Copyright (c) 2016 PaddlePaddle Authors. All Rights Reserve. +/* Copyright (c) 2016 PaddlePaddle Authors. All Rights Reserved. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/paddle/fluid/operators/conv_op.cc b/paddle/fluid/operators/conv_op.cc index a047e579163..6b378ec1bcb 100644 --- a/paddle/fluid/operators/conv_op.cc +++ b/paddle/fluid/operators/conv_op.cc @@ -1,4 +1,4 @@ -/* Copyright (c) 2016 PaddlePaddle Authors. All Rights Reserve. +/* Copyright (c) 2016 PaddlePaddle Authors. All Rights Reserved. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/paddle/fluid/operators/conv_op.cu.cc b/paddle/fluid/operators/conv_op.cu.cc index b2129d3b461..d07593f5c02 100644 --- a/paddle/fluid/operators/conv_op.cu.cc +++ b/paddle/fluid/operators/conv_op.cu.cc @@ -1,4 +1,4 @@ -/* Copyright (c) 2016 PaddlePaddle Authors. All Rights Reserve. +/* Copyright (c) 2016 PaddlePaddle Authors. All Rights Reserved. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/paddle/fluid/operators/conv_op.h b/paddle/fluid/operators/conv_op.h index 1156e6c8fe3..ecbe3d505ac 100644 --- a/paddle/fluid/operators/conv_op.h +++ b/paddle/fluid/operators/conv_op.h @@ -1,4 +1,4 @@ -/* Copyright (c) 2016 PaddlePaddle Authors. All Rights Reserve. +/* Copyright (c) 2016 PaddlePaddle Authors. All Rights Reserved. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/paddle/fluid/operators/conv_shift_op.cc b/paddle/fluid/operators/conv_shift_op.cc index a96aac63e09..a1a0b00208f 100644 --- a/paddle/fluid/operators/conv_shift_op.cc +++ b/paddle/fluid/operators/conv_shift_op.cc @@ -1,4 +1,4 @@ -/* Copyright (c) 2016 PaddlePaddle Authors. All Rights Reserve. +/* Copyright (c) 2016 PaddlePaddle Authors. All Rights Reserved. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/paddle/fluid/operators/conv_shift_op.cu b/paddle/fluid/operators/conv_shift_op.cu index 9818707ce3b..344bbade705 100644 --- a/paddle/fluid/operators/conv_shift_op.cu +++ b/paddle/fluid/operators/conv_shift_op.cu @@ -1,4 +1,4 @@ -/* Copyright (c) 2016 PaddlePaddle Authors. All Rights Reserve. +/* Copyright (c) 2016 PaddlePaddle Authors. All Rights Reserved. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/paddle/fluid/operators/conv_shift_op.h b/paddle/fluid/operators/conv_shift_op.h index 987a690895e..6d8ddd79373 100644 --- a/paddle/fluid/operators/conv_shift_op.h +++ b/paddle/fluid/operators/conv_shift_op.h @@ -1,4 +1,4 @@ -/* Copyright (c) 2016 PaddlePaddle Authors. All Rights Reserve. +/* Copyright (c) 2016 PaddlePaddle Authors. All Rights Reserved. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/paddle/fluid/operators/conv_transpose_cudnn_op.cu.cc b/paddle/fluid/operators/conv_transpose_cudnn_op.cu.cc index 0aed4ebeffa..901682edbb0 100644 --- a/paddle/fluid/operators/conv_transpose_cudnn_op.cu.cc +++ b/paddle/fluid/operators/conv_transpose_cudnn_op.cu.cc @@ -1,4 +1,4 @@ -/* Copyright (c) 2016 PaddlePaddle Authors. All Rights Reserve. +/* Copyright (c) 2016 PaddlePaddle Authors. All Rights Reserved. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/paddle/fluid/operators/conv_transpose_op.cc b/paddle/fluid/operators/conv_transpose_op.cc index 974cffad928..b2a3cfc89f1 100644 --- a/paddle/fluid/operators/conv_transpose_op.cc +++ b/paddle/fluid/operators/conv_transpose_op.cc @@ -1,4 +1,4 @@ -/* Copyright (c) 2016 PaddlePaddle Authors. All Rights Reserve. +/* Copyright (c) 2016 PaddlePaddle Authors. All Rights Reserved. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/paddle/fluid/operators/conv_transpose_op.cu.cc b/paddle/fluid/operators/conv_transpose_op.cu.cc index ed90c6ec626..640fa7d14a0 100644 --- a/paddle/fluid/operators/conv_transpose_op.cu.cc +++ b/paddle/fluid/operators/conv_transpose_op.cu.cc @@ -1,4 +1,4 @@ -/* Copyright (c) 2016 PaddlePaddle Authors. All Rights Reserve. +/* Copyright (c) 2016 PaddlePaddle Authors. All Rights Reserved. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/paddle/fluid/operators/conv_transpose_op.h b/paddle/fluid/operators/conv_transpose_op.h index f5125754686..d4e4b641ece 100644 --- a/paddle/fluid/operators/conv_transpose_op.h +++ b/paddle/fluid/operators/conv_transpose_op.h @@ -1,4 +1,4 @@ -/* Copyright (c) 2016 PaddlePaddle Authors. All Rights Reserve. +/* Copyright (c) 2016 PaddlePaddle Authors. All Rights Reserved. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/paddle/fluid/operators/cos_sim_op.cc b/paddle/fluid/operators/cos_sim_op.cc index 57c5a6025a0..4c8af408f62 100644 --- a/paddle/fluid/operators/cos_sim_op.cc +++ b/paddle/fluid/operators/cos_sim_op.cc @@ -1,4 +1,4 @@ -/* Copyright (c) 2016 PaddlePaddle Authors. All Rights Reserve. +/* Copyright (c) 2016 PaddlePaddle Authors. All Rights Reserved. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/paddle/fluid/operators/cos_sim_op.cu b/paddle/fluid/operators/cos_sim_op.cu index c8cf363cdc4..82205e9c754 100644 --- a/paddle/fluid/operators/cos_sim_op.cu +++ b/paddle/fluid/operators/cos_sim_op.cu @@ -1,4 +1,4 @@ -/* Copyright (c) 2016 PaddlePaddle Authors. All Rights Reserve. +/* Copyright (c) 2016 PaddlePaddle Authors. All Rights Reserved. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/paddle/fluid/operators/cos_sim_op.h b/paddle/fluid/operators/cos_sim_op.h index 9cd8b196daf..76cfc680518 100644 --- a/paddle/fluid/operators/cos_sim_op.h +++ b/paddle/fluid/operators/cos_sim_op.h @@ -1,4 +1,4 @@ -/* Copyright (c) 2016 PaddlePaddle Authors. All Rights Reserve. +/* Copyright (c) 2016 PaddlePaddle Authors. All Rights Reserved. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/paddle/fluid/operators/crf_decoding_op.cc b/paddle/fluid/operators/crf_decoding_op.cc index e3c1fc95a3b..a83013c428a 100644 --- a/paddle/fluid/operators/crf_decoding_op.cc +++ b/paddle/fluid/operators/crf_decoding_op.cc @@ -1,4 +1,4 @@ -/* Copyright (c) 2016 PaddlePaddle Authors. All Rights Reserve. +/* Copyright (c) 2016 PaddlePaddle Authors. All Rights Reserved. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/paddle/fluid/operators/crf_decoding_op.h b/paddle/fluid/operators/crf_decoding_op.h index c3c161eec5f..2b2a733fb9f 100644 --- a/paddle/fluid/operators/crf_decoding_op.h +++ b/paddle/fluid/operators/crf_decoding_op.h @@ -1,4 +1,4 @@ -/* Copyright (c) 2016 PaddlePaddle Authors. All Rights Reserve. +/* Copyright (c) 2016 PaddlePaddle Authors. All Rights Reserved. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/paddle/fluid/operators/crop_op.cc b/paddle/fluid/operators/crop_op.cc index 8e80f77e497..fd7ea70c64f 100644 --- a/paddle/fluid/operators/crop_op.cc +++ b/paddle/fluid/operators/crop_op.cc @@ -1,4 +1,4 @@ -/* Copyright (c) 2016 PaddlePaddle Authors. All Rights Reserve. +/* Copyright (c) 2016 PaddlePaddle Authors. All Rights Reserved. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/paddle/fluid/operators/crop_op.cu b/paddle/fluid/operators/crop_op.cu index f3610675aae..1a391860463 100644 --- a/paddle/fluid/operators/crop_op.cu +++ b/paddle/fluid/operators/crop_op.cu @@ -1,4 +1,4 @@ -/* Copyright (c) 2016 PaddlePaddle Authors. All Rights Reserve. +/* Copyright (c) 2016 PaddlePaddle Authors. All Rights Reserved. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/paddle/fluid/operators/crop_op.h b/paddle/fluid/operators/crop_op.h index 9c7c0446d4c..c5ac6849789 100644 --- a/paddle/fluid/operators/crop_op.h +++ b/paddle/fluid/operators/crop_op.h @@ -1,4 +1,4 @@ -/* Copyright (c) 2016 PaddlePaddle Authors. All Rights Reserve. +/* Copyright (c) 2016 PaddlePaddle Authors. All Rights Reserved. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/paddle/fluid/operators/cross_entropy_op.cc b/paddle/fluid/operators/cross_entropy_op.cc index 5e34b248b6a..55810371c8d 100644 --- a/paddle/fluid/operators/cross_entropy_op.cc +++ b/paddle/fluid/operators/cross_entropy_op.cc @@ -1,4 +1,4 @@ -/* Copyright (c) 2016 PaddlePaddle Authors. All Rights Reserve. +/* Copyright (c) 2016 PaddlePaddle Authors. All Rights Reserved. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/paddle/fluid/operators/cross_entropy_op.cu b/paddle/fluid/operators/cross_entropy_op.cu index de0976c69fc..6449149d4b5 100644 --- a/paddle/fluid/operators/cross_entropy_op.cu +++ b/paddle/fluid/operators/cross_entropy_op.cu @@ -1,4 +1,4 @@ -/* Copyright (c) 2016 PaddlePaddle Authors. All Rights Reserve. +/* Copyright (c) 2016 PaddlePaddle Authors. All Rights Reserved. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/paddle/fluid/operators/cross_entropy_op.h b/paddle/fluid/operators/cross_entropy_op.h index 4a5b20ecb70..ec315695a68 100644 --- a/paddle/fluid/operators/cross_entropy_op.h +++ b/paddle/fluid/operators/cross_entropy_op.h @@ -1,4 +1,4 @@ -/* Copyright (c) 2016 PaddlePaddle Authors. All Rights Reserve. +/* Copyright (c) 2016 PaddlePaddle Authors. All Rights Reserved. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/paddle/fluid/operators/ctc_align_op.cc b/paddle/fluid/operators/ctc_align_op.cc index 3c7db78813e..19e7649660e 100644 --- a/paddle/fluid/operators/ctc_align_op.cc +++ b/paddle/fluid/operators/ctc_align_op.cc @@ -1,4 +1,4 @@ -/* Copyright (c) 2016 PaddlePaddle Authors. All Rights Reserve. +/* Copyright (c) 2016 PaddlePaddle Authors. All Rights Reserved. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/paddle/fluid/operators/ctc_align_op.cu b/paddle/fluid/operators/ctc_align_op.cu index f629e0a9f15..54e0b1d9ad8 100644 --- a/paddle/fluid/operators/ctc_align_op.cu +++ b/paddle/fluid/operators/ctc_align_op.cu @@ -1,4 +1,4 @@ -/* Copyright (c) 2016 PaddlePaddle Authors. All Rights Reserve. +/* Copyright (c) 2016 PaddlePaddle Authors. All Rights Reserved. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/paddle/fluid/operators/ctc_align_op.h b/paddle/fluid/operators/ctc_align_op.h index 1ef034c2f5b..70698d99589 100644 --- a/paddle/fluid/operators/ctc_align_op.h +++ b/paddle/fluid/operators/ctc_align_op.h @@ -1,4 +1,4 @@ -/* Copyright (c) 2016 PaddlePaddle Authors. All Rights Reserve. +/* Copyright (c) 2016 PaddlePaddle Authors. All Rights Reserved. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/paddle/fluid/operators/cum_op.h b/paddle/fluid/operators/cum_op.h index 3b224914784..999fdcff907 100644 --- a/paddle/fluid/operators/cum_op.h +++ b/paddle/fluid/operators/cum_op.h @@ -1,4 +1,4 @@ -/* Copyright (c) 2018 PaddlePaddle Authors. All Rights Reserve. +/* Copyright (c) 2018 PaddlePaddle Authors. All Rights Reserved. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/paddle/fluid/operators/cumsum_op.cc b/paddle/fluid/operators/cumsum_op.cc index d15d4e3db35..0da6f188523 100644 --- a/paddle/fluid/operators/cumsum_op.cc +++ b/paddle/fluid/operators/cumsum_op.cc @@ -1,4 +1,4 @@ -/* Copyright (c) 2018 PaddlePaddle Authors. All Rights Reserve. +/* Copyright (c) 2018 PaddlePaddle Authors. All Rights Reserved. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/paddle/fluid/operators/cumsum_op.cu b/paddle/fluid/operators/cumsum_op.cu index e063cc0f65a..70e2a1de5e2 100644 --- a/paddle/fluid/operators/cumsum_op.cu +++ b/paddle/fluid/operators/cumsum_op.cu @@ -1,4 +1,4 @@ -/* Copyright (c) 2018 PaddlePaddle Authors. All Rights Reserve. +/* Copyright (c) 2018 PaddlePaddle Authors. All Rights Reserved. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/paddle/fluid/operators/decayed_adagrad_op.cc b/paddle/fluid/operators/decayed_adagrad_op.cc index d827155919e..5eeb3dee095 100644 --- a/paddle/fluid/operators/decayed_adagrad_op.cc +++ b/paddle/fluid/operators/decayed_adagrad_op.cc @@ -1,4 +1,4 @@ -/* Copyright (c) 2016 PaddlePaddle Authors. All Rights Reserve. +/* Copyright (c) 2016 PaddlePaddle Authors. All Rights Reserved. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/paddle/fluid/operators/decayed_adagrad_op.cu b/paddle/fluid/operators/decayed_adagrad_op.cu index 215d6dbc7d8..7da16acf05e 100644 --- a/paddle/fluid/operators/decayed_adagrad_op.cu +++ b/paddle/fluid/operators/decayed_adagrad_op.cu @@ -1,4 +1,4 @@ -/* Copyright (c) 2016 PaddlePaddle Authors. All Rights Reserve. +/* Copyright (c) 2016 PaddlePaddle Authors. All Rights Reserved. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/paddle/fluid/operators/decayed_adagrad_op.h b/paddle/fluid/operators/decayed_adagrad_op.h index 52b67586ea3..a46af078e0c 100644 --- a/paddle/fluid/operators/decayed_adagrad_op.h +++ b/paddle/fluid/operators/decayed_adagrad_op.h @@ -1,4 +1,4 @@ -/* Copyright (c) 2016 PaddlePaddle Authors. All Rights Reserve. +/* Copyright (c) 2016 PaddlePaddle Authors. All Rights Reserved. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/paddle/fluid/operators/detail/grpc_client.cc b/paddle/fluid/operators/detail/grpc_client.cc index 0d395d347ba..ee9044b1f5d 100644 --- a/paddle/fluid/operators/detail/grpc_client.cc +++ b/paddle/fluid/operators/detail/grpc_client.cc @@ -1,4 +1,4 @@ -/* Copyright (c) 2016 PaddlePaddle Authors. All Rights Reserve. +/* Copyright (c) 2016 PaddlePaddle Authors. All Rights Reserved. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/paddle/fluid/operators/detail/grpc_client.h b/paddle/fluid/operators/detail/grpc_client.h index 314fe8168f0..669838810de 100644 --- a/paddle/fluid/operators/detail/grpc_client.h +++ b/paddle/fluid/operators/detail/grpc_client.h @@ -1,4 +1,4 @@ -/* Copyright (c) 2016 PaddlePaddle Authors. All Rights Reserve. +/* Copyright (c) 2016 PaddlePaddle Authors. All Rights Reserved. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/paddle/fluid/operators/detail/grpc_server.cc b/paddle/fluid/operators/detail/grpc_server.cc index 96f4ea797b1..2a567516614 100644 --- a/paddle/fluid/operators/detail/grpc_server.cc +++ b/paddle/fluid/operators/detail/grpc_server.cc @@ -1,4 +1,4 @@ -/* Copyright (c) 2016 PaddlePaddle Authors. All Rights Reserve. +/* Copyright (c) 2016 PaddlePaddle Authors. All Rights Reserved. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/paddle/fluid/operators/detail/grpc_server.h b/paddle/fluid/operators/detail/grpc_server.h index 1382d173183..e9402ff6aaf 100644 --- a/paddle/fluid/operators/detail/grpc_server.h +++ b/paddle/fluid/operators/detail/grpc_server.h @@ -1,4 +1,4 @@ -/* Copyright (c) 2016 PaddlePaddle Authors. All Rights Reserve. +/* Copyright (c) 2016 PaddlePaddle Authors. All Rights Reserved. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/paddle/fluid/operators/detail/safe_ref.h b/paddle/fluid/operators/detail/safe_ref.h index ff2a156f3d0..9cb5851deba 100644 --- a/paddle/fluid/operators/detail/safe_ref.h +++ b/paddle/fluid/operators/detail/safe_ref.h @@ -1,4 +1,4 @@ -/* Copyright (c) 2016 PaddlePaddle Authors. All Rights Reserve. +/* Copyright (c) 2016 PaddlePaddle Authors. All Rights Reserved. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/paddle/fluid/operators/detail/sendrecvop_utils.cc b/paddle/fluid/operators/detail/sendrecvop_utils.cc index ba3ae6add60..5403dbc2a05 100644 --- a/paddle/fluid/operators/detail/sendrecvop_utils.cc +++ b/paddle/fluid/operators/detail/sendrecvop_utils.cc @@ -1,4 +1,4 @@ -/* Copyright (c) 2016 PaddlePaddle Authors. All Rights Reserve. +/* Copyright (c) 2016 PaddlePaddle Authors. All Rights Reserved. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/paddle/fluid/operators/detail/sendrecvop_utils.h b/paddle/fluid/operators/detail/sendrecvop_utils.h index fed887c0279..670d0e16247 100644 --- a/paddle/fluid/operators/detail/sendrecvop_utils.h +++ b/paddle/fluid/operators/detail/sendrecvop_utils.h @@ -1,4 +1,4 @@ -/* Copyright (c) 2016 PaddlePaddle Authors. All Rights Reserve. +/* Copyright (c) 2016 PaddlePaddle Authors. All Rights Reserved. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/paddle/fluid/operators/detail/simple_block_queue.h b/paddle/fluid/operators/detail/simple_block_queue.h index c7f5ff4b5f4..36b58b0c670 100644 --- a/paddle/fluid/operators/detail/simple_block_queue.h +++ b/paddle/fluid/operators/detail/simple_block_queue.h @@ -1,4 +1,4 @@ -/* Copyright (c) 2016 PaddlePaddle Authors. All Rights Reserve. +/* Copyright (c) 2016 PaddlePaddle Authors. All Rights Reserved. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/paddle/fluid/operators/detail/strided_memcpy.h b/paddle/fluid/operators/detail/strided_memcpy.h index d7a7eed50b9..bac5cdc99c0 100644 --- a/paddle/fluid/operators/detail/strided_memcpy.h +++ b/paddle/fluid/operators/detail/strided_memcpy.h @@ -1,4 +1,4 @@ -/* Copyright (c) 2016 PaddlePaddle Authors. All Rights Reserve. +/* Copyright (c) 2016 PaddlePaddle Authors. All Rights Reserved. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/paddle/fluid/operators/detection_map_op.cc b/paddle/fluid/operators/detection_map_op.cc index 48308a11b4b..0af3ba621aa 100644 --- a/paddle/fluid/operators/detection_map_op.cc +++ b/paddle/fluid/operators/detection_map_op.cc @@ -1,4 +1,4 @@ -/* Copyright (c) 2018 PaddlePaddle Authors. All Rights Reserve. +/* Copyright (c) 2018 PaddlePaddle Authors. All Rights Reserved. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/paddle/fluid/operators/detection_map_op.h b/paddle/fluid/operators/detection_map_op.h index 0f5f588e9c4..39d17a7cb3f 100644 --- a/paddle/fluid/operators/detection_map_op.h +++ b/paddle/fluid/operators/detection_map_op.h @@ -1,4 +1,4 @@ -/* Copyright (c) 2018 PaddlePaddle Authors. All Rights Reserve. +/* Copyright (c) 2018 PaddlePaddle Authors. All Rights Reserved. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/paddle/fluid/operators/detection_output_op.cc b/paddle/fluid/operators/detection_output_op.cc index 6dee5222959..f7520475917 100644 --- a/paddle/fluid/operators/detection_output_op.cc +++ b/paddle/fluid/operators/detection_output_op.cc @@ -1,4 +1,4 @@ -/* Copyright (c) 2016 PaddlePaddle Authors. All Rights Reserve. +/* Copyright (c) 2016 PaddlePaddle Authors. All Rights Reserved. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/paddle/fluid/operators/detection_output_op.cu.cc b/paddle/fluid/operators/detection_output_op.cu.cc index 309e03a25be..0f48765c9c6 100644 --- a/paddle/fluid/operators/detection_output_op.cu.cc +++ b/paddle/fluid/operators/detection_output_op.cu.cc @@ -1,4 +1,4 @@ -/* Copyright (c) 2016 PaddlePaddle Authors. All Rights Reserve. +/* Copyright (c) 2016 PaddlePaddle Authors. All Rights Reserved. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/paddle/fluid/operators/detection_output_op.h b/paddle/fluid/operators/detection_output_op.h index 05e5b72bd35..0aa5fc010de 100644 --- a/paddle/fluid/operators/detection_output_op.h +++ b/paddle/fluid/operators/detection_output_op.h @@ -1,4 +1,4 @@ -/* Copyright (c) 2016 PaddlePaddle Authors. All Rights Reserve. +/* Copyright (c) 2016 PaddlePaddle Authors. All Rights Reserved. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/paddle/fluid/operators/dropout_op.cc b/paddle/fluid/operators/dropout_op.cc index e1dc900512c..1074ed6acc2 100644 --- a/paddle/fluid/operators/dropout_op.cc +++ b/paddle/fluid/operators/dropout_op.cc @@ -1,4 +1,4 @@ -/* Copyright (c) 2016 PaddlePaddle Authors. All Rights Reserve. +/* Copyright (c) 2016 PaddlePaddle Authors. All Rights Reserved. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/paddle/fluid/operators/dropout_op.cu b/paddle/fluid/operators/dropout_op.cu index a4a96d48f99..d6f9c04359d 100644 --- a/paddle/fluid/operators/dropout_op.cu +++ b/paddle/fluid/operators/dropout_op.cu @@ -1,4 +1,4 @@ -/* Copyright (c) 2016 PaddlePaddle Authors. All Rights Reserve. +/* Copyright (c) 2016 PaddlePaddle Authors. All Rights Reserved. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/paddle/fluid/operators/dropout_op.h b/paddle/fluid/operators/dropout_op.h index 9dd1f33669c..209e4dec175 100644 --- a/paddle/fluid/operators/dropout_op.h +++ b/paddle/fluid/operators/dropout_op.h @@ -1,4 +1,4 @@ -/* Copyright (c) 2016 PaddlePaddle Authors. All Rights Reserve. +/* Copyright (c) 2016 PaddlePaddle Authors. All Rights Reserved. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/paddle/fluid/operators/edit_distance_op.cc b/paddle/fluid/operators/edit_distance_op.cc index ae82408da71..dbcbfec9718 100644 --- a/paddle/fluid/operators/edit_distance_op.cc +++ b/paddle/fluid/operators/edit_distance_op.cc @@ -1,4 +1,4 @@ -/* Copyright (c) 2016 PaddlePaddle Authors. All Rights Reserve. +/* Copyright (c) 2016 PaddlePaddle Authors. All Rights Reserved. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/paddle/fluid/operators/edit_distance_op.cu b/paddle/fluid/operators/edit_distance_op.cu index bdfead75e71..3b89ad5d49c 100644 --- a/paddle/fluid/operators/edit_distance_op.cu +++ b/paddle/fluid/operators/edit_distance_op.cu @@ -1,4 +1,4 @@ -/* Copyright (c) 2016 PaddlePaddle Authors. All Rights Reserve. +/* Copyright (c) 2016 PaddlePaddle Authors. All Rights Reserved. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/paddle/fluid/operators/edit_distance_op.h b/paddle/fluid/operators/edit_distance_op.h index 205e16e6bfe..73d0af490b3 100644 --- a/paddle/fluid/operators/edit_distance_op.h +++ b/paddle/fluid/operators/edit_distance_op.h @@ -1,4 +1,4 @@ -/* Copyright (c) 2016 PaddlePaddle Authors. All Rights Reserve. +/* Copyright (c) 2016 PaddlePaddle Authors. All Rights Reserved. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/paddle/fluid/operators/elementwise_add_op.cc b/paddle/fluid/operators/elementwise_add_op.cc index 5b9947b8c93..e9068fcd50b 100644 --- a/paddle/fluid/operators/elementwise_add_op.cc +++ b/paddle/fluid/operators/elementwise_add_op.cc @@ -1,4 +1,4 @@ -/* Copyright (c) 2016 PaddlePaddle Authors. All Rights Reserve. +/* Copyright (c) 2016 PaddlePaddle Authors. All Rights Reserved. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/paddle/fluid/operators/elementwise_add_op.cu b/paddle/fluid/operators/elementwise_add_op.cu index 2ac3a998ec4..19dc4a52152 100644 --- a/paddle/fluid/operators/elementwise_add_op.cu +++ b/paddle/fluid/operators/elementwise_add_op.cu @@ -1,4 +1,4 @@ -/* Copyright (c) 2016 PaddlePaddle Authors. All Rights Reserve. +/* Copyright (c) 2016 PaddlePaddle Authors. All Rights Reserved. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/paddle/fluid/operators/elementwise_add_op.h b/paddle/fluid/operators/elementwise_add_op.h index 248e3b9d617..3c546bf3e4c 100644 --- a/paddle/fluid/operators/elementwise_add_op.h +++ b/paddle/fluid/operators/elementwise_add_op.h @@ -1,4 +1,4 @@ -/* Copyright (c) 2016 PaddlePaddle Authors. All Rights Reserve. +/* Copyright (c) 2016 PaddlePaddle Authors. All Rights Reserved. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/paddle/fluid/operators/elementwise_div_op.cc b/paddle/fluid/operators/elementwise_div_op.cc index 818ae82f44c..6f9a090c8ea 100644 --- a/paddle/fluid/operators/elementwise_div_op.cc +++ b/paddle/fluid/operators/elementwise_div_op.cc @@ -1,4 +1,4 @@ -/* Copyright (c) 2016 PaddlePaddle Authors. All Rights Reserve. +/* Copyright (c) 2016 PaddlePaddle Authors. All Rights Reserved. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/paddle/fluid/operators/elementwise_div_op.cu b/paddle/fluid/operators/elementwise_div_op.cu index d1bb7a474c0..588d1f74202 100644 --- a/paddle/fluid/operators/elementwise_div_op.cu +++ b/paddle/fluid/operators/elementwise_div_op.cu @@ -1,4 +1,4 @@ -/* Copyright (c) 2016 PaddlePaddle Authors. All Rights Reserve. +/* Copyright (c) 2016 PaddlePaddle Authors. All Rights Reserved. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/paddle/fluid/operators/elementwise_div_op.h b/paddle/fluid/operators/elementwise_div_op.h index 8e0726d9465..6bcc577456b 100644 --- a/paddle/fluid/operators/elementwise_div_op.h +++ b/paddle/fluid/operators/elementwise_div_op.h @@ -1,4 +1,4 @@ -/* Copyright (c) 2016 PaddlePaddle Authors. All Rights Reserve. +/* Copyright (c) 2016 PaddlePaddle Authors. All Rights Reserved. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/paddle/fluid/operators/elementwise_max_op.cc b/paddle/fluid/operators/elementwise_max_op.cc index 1331bcadc8c..61da7c59441 100644 --- a/paddle/fluid/operators/elementwise_max_op.cc +++ b/paddle/fluid/operators/elementwise_max_op.cc @@ -1,4 +1,4 @@ -/* Copyright (c) 2016 PaddlePaddle Authors. All Rights Reserve. +/* Copyright (c) 2016 PaddlePaddle Authors. All Rights Reserved. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/paddle/fluid/operators/elementwise_max_op.cu b/paddle/fluid/operators/elementwise_max_op.cu index 7f0259ad002..32c99835d66 100644 --- a/paddle/fluid/operators/elementwise_max_op.cu +++ b/paddle/fluid/operators/elementwise_max_op.cu @@ -1,4 +1,4 @@ -/* Copyright (c) 2016 PaddlePaddle Authors. All Rights Reserve. +/* Copyright (c) 2016 PaddlePaddle Authors. All Rights Reserved. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/paddle/fluid/operators/elementwise_max_op.h b/paddle/fluid/operators/elementwise_max_op.h index e1db9bcc011..ab3a3d58275 100644 --- a/paddle/fluid/operators/elementwise_max_op.h +++ b/paddle/fluid/operators/elementwise_max_op.h @@ -1,4 +1,4 @@ -/* Copyright (c) 2016 PaddlePaddle Authors. All Rights Reserve. +/* Copyright (c) 2016 PaddlePaddle Authors. All Rights Reserved. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/paddle/fluid/operators/elementwise_min_op.cc b/paddle/fluid/operators/elementwise_min_op.cc index 1d69099c8e6..c74ff36db17 100644 --- a/paddle/fluid/operators/elementwise_min_op.cc +++ b/paddle/fluid/operators/elementwise_min_op.cc @@ -1,4 +1,4 @@ -/* Copyright (c) 2016 PaddlePaddle Authors. All Rights Reserve. +/* Copyright (c) 2016 PaddlePaddle Authors. All Rights Reserved. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/paddle/fluid/operators/elementwise_min_op.cu b/paddle/fluid/operators/elementwise_min_op.cu index ed532047350..a237c9c503e 100644 --- a/paddle/fluid/operators/elementwise_min_op.cu +++ b/paddle/fluid/operators/elementwise_min_op.cu @@ -1,4 +1,4 @@ -/* Copyright (c) 2016 PaddlePaddle Authors. All Rights Reserve. +/* Copyright (c) 2016 PaddlePaddle Authors. All Rights Reserved. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/paddle/fluid/operators/elementwise_min_op.h b/paddle/fluid/operators/elementwise_min_op.h index bfe213dd431..f0eec9d2468 100644 --- a/paddle/fluid/operators/elementwise_min_op.h +++ b/paddle/fluid/operators/elementwise_min_op.h @@ -1,4 +1,4 @@ -/* Copyright (c) 2016 PaddlePaddle Authors. All Rights Reserve. +/* Copyright (c) 2016 PaddlePaddle Authors. All Rights Reserved. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/paddle/fluid/operators/elementwise_mul_op.cc b/paddle/fluid/operators/elementwise_mul_op.cc index 0cb96f21d1b..5d7f2cdffd1 100644 --- a/paddle/fluid/operators/elementwise_mul_op.cc +++ b/paddle/fluid/operators/elementwise_mul_op.cc @@ -1,4 +1,4 @@ -/* Copyright (c) 2016 PaddlePaddle Authors. All Rights Reserve. +/* Copyright (c) 2016 PaddlePaddle Authors. All Rights Reserved. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/paddle/fluid/operators/elementwise_mul_op.cu b/paddle/fluid/operators/elementwise_mul_op.cu index d72b6250eed..2fb1b4bee68 100644 --- a/paddle/fluid/operators/elementwise_mul_op.cu +++ b/paddle/fluid/operators/elementwise_mul_op.cu @@ -1,4 +1,4 @@ -/* Copyright (c) 2016 PaddlePaddle Authors. All Rights Reserve. +/* Copyright (c) 2016 PaddlePaddle Authors. All Rights Reserved. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/paddle/fluid/operators/elementwise_mul_op.h b/paddle/fluid/operators/elementwise_mul_op.h index dc292eb1e72..46d69ed87d4 100644 --- a/paddle/fluid/operators/elementwise_mul_op.h +++ b/paddle/fluid/operators/elementwise_mul_op.h @@ -1,4 +1,4 @@ -/* Copyright (c) 2016 PaddlePaddle Authors. All Rights Reserve. +/* Copyright (c) 2016 PaddlePaddle Authors. All Rights Reserved. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/paddle/fluid/operators/elementwise_op.h b/paddle/fluid/operators/elementwise_op.h index 38f83d7ad36..06bcd0be646 100644 --- a/paddle/fluid/operators/elementwise_op.h +++ b/paddle/fluid/operators/elementwise_op.h @@ -1,4 +1,4 @@ -/* Copyright (c) 2016 PaddlePaddle Authors. All Rights Reserve. +/* Copyright (c) 2016 PaddlePaddle Authors. All Rights Reserved. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/paddle/fluid/operators/elementwise_op_function.h b/paddle/fluid/operators/elementwise_op_function.h index c1269382a44..0ee7291f04a 100644 --- a/paddle/fluid/operators/elementwise_op_function.h +++ b/paddle/fluid/operators/elementwise_op_function.h @@ -1,4 +1,4 @@ -/* Copyright (c) 2016 PaddlePaddle Authors. All Rights Reserve. +/* Copyright (c) 2016 PaddlePaddle Authors. All Rights Reserved. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/paddle/fluid/operators/elementwise_pow_op.cc b/paddle/fluid/operators/elementwise_pow_op.cc index 911b5dbd250..60302c5e59f 100644 --- a/paddle/fluid/operators/elementwise_pow_op.cc +++ b/paddle/fluid/operators/elementwise_pow_op.cc @@ -1,4 +1,4 @@ -/* Copyright (c) 2018 PaddlePaddle Authors. All Rights Reserve. +/* Copyright (c) 2018 PaddlePaddle Authors. All Rights Reserved. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/paddle/fluid/operators/elementwise_pow_op.cu b/paddle/fluid/operators/elementwise_pow_op.cu index 2996600738f..1f19ebd4709 100644 --- a/paddle/fluid/operators/elementwise_pow_op.cu +++ b/paddle/fluid/operators/elementwise_pow_op.cu @@ -1,4 +1,4 @@ -/* Copyright (c) 2018 PaddlePaddle Authors. All Rights Reserve. +/* Copyright (c) 2018 PaddlePaddle Authors. All Rights Reserved. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at diff --git a/paddle/fluid/operators/elementwise_pow_op.h b/paddle/fluid/operators/elementwise_pow_op.h index b793c1eae0e..8c1c5f9f980 100644 --- a/paddle/fluid/operators/elementwise_pow_op.h +++ b/paddle/fluid/operators/elementwise_pow_op.h @@ -1,4 +1,4 @@ -/* Copyright (c) 2018 PaddlePaddle Authors. All Rights Reserve. +/* Copyright (c) 2018 PaddlePaddle Authors. All Rights Reserved. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/paddle/fluid/operators/elementwise_sub_op.cc b/paddle/fluid/operators/elementwise_sub_op.cc index 46ce01c7cf5..6f770820c80 100644 --- a/paddle/fluid/operators/elementwise_sub_op.cc +++ b/paddle/fluid/operators/elementwise_sub_op.cc @@ -1,4 +1,4 @@ -/* Copyright (c) 2016 PaddlePaddle Authors. All Rights Reserve. +/* Copyright (c) 2016 PaddlePaddle Authors. All Rights Reserved. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/paddle/fluid/operators/elementwise_sub_op.cu b/paddle/fluid/operators/elementwise_sub_op.cu index eb09d6c5edc..8709f686f9a 100644 --- a/paddle/fluid/operators/elementwise_sub_op.cu +++ b/paddle/fluid/operators/elementwise_sub_op.cu @@ -1,4 +1,4 @@ -/* Copyright (c) 2016 PaddlePaddle Authors. All Rights Reserve. +/* Copyright (c) 2016 PaddlePaddle Authors. All Rights Reserved. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/paddle/fluid/operators/elementwise_sub_op.h b/paddle/fluid/operators/elementwise_sub_op.h index af2d497b9ae..a8fc242ed79 100644 --- a/paddle/fluid/operators/elementwise_sub_op.h +++ b/paddle/fluid/operators/elementwise_sub_op.h @@ -1,4 +1,4 @@ -/* Copyright (c) 2016 PaddlePaddle Authors. All Rights Reserve. +/* Copyright (c) 2016 PaddlePaddle Authors. All Rights Reserved. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/paddle/fluid/operators/expand_op.cc b/paddle/fluid/operators/expand_op.cc index ccb9a94856f..51a66bd832f 100644 --- a/paddle/fluid/operators/expand_op.cc +++ b/paddle/fluid/operators/expand_op.cc @@ -1,4 +1,4 @@ -/* Copyright (c) 2016 PaddlePaddle Authors. All Rights Reserve. +/* Copyright (c) 2016 PaddlePaddle Authors. All Rights Reserved. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/paddle/fluid/operators/expand_op.cu b/paddle/fluid/operators/expand_op.cu index 8a9f39708be..60363bfc86d 100644 --- a/paddle/fluid/operators/expand_op.cu +++ b/paddle/fluid/operators/expand_op.cu @@ -1,4 +1,4 @@ -/* Copyright (c) 2016 PaddlePaddle Authors. All Rights Reserve. +/* Copyright (c) 2016 PaddlePaddle Authors. All Rights Reserved. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/paddle/fluid/operators/expand_op.h b/paddle/fluid/operators/expand_op.h index 8df1cd34d7d..953d75adae5 100644 --- a/paddle/fluid/operators/expand_op.h +++ b/paddle/fluid/operators/expand_op.h @@ -1,4 +1,4 @@ -/* Copyright (c) 2016 PaddlePaddle Authors. All Rights Reserve. +/* Copyright (c) 2016 PaddlePaddle Authors. All Rights Reserved. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/paddle/fluid/operators/feed_op.cc b/paddle/fluid/operators/feed_op.cc index 41fa69a0972..438d9754298 100644 --- a/paddle/fluid/operators/feed_op.cc +++ b/paddle/fluid/operators/feed_op.cc @@ -1,4 +1,4 @@ -/* Copyright (c) 2016 PaddlePaddle Authors. All Rights Reserve. +/* Copyright (c) 2016 PaddlePaddle Authors. All Rights Reserved. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/paddle/fluid/operators/fetch_op.cc b/paddle/fluid/operators/fetch_op.cc index 6cb5565013d..2684e646340 100644 --- a/paddle/fluid/operators/fetch_op.cc +++ b/paddle/fluid/operators/fetch_op.cc @@ -1,4 +1,4 @@ -/* Copyright (c) 2016 PaddlePaddle Authors. All Rights Reserve. +/* Copyright (c) 2016 PaddlePaddle Authors. All Rights Reserved. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/paddle/fluid/operators/fill_constant_batch_size_like_op.cc b/paddle/fluid/operators/fill_constant_batch_size_like_op.cc index e6992ba371c..a36248531ef 100644 --- a/paddle/fluid/operators/fill_constant_batch_size_like_op.cc +++ b/paddle/fluid/operators/fill_constant_batch_size_like_op.cc @@ -1,4 +1,4 @@ -/* Copyright (c) 2016 PaddlePaddle Authors. All Rights Reserve. +/* Copyright (c) 2016 PaddlePaddle Authors. All Rights Reserved. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/paddle/fluid/operators/fill_constant_batch_size_like_op.cu.cc b/paddle/fluid/operators/fill_constant_batch_size_like_op.cu.cc index b4f4d2a5030..2cbbd05bfbb 100644 --- a/paddle/fluid/operators/fill_constant_batch_size_like_op.cu.cc +++ b/paddle/fluid/operators/fill_constant_batch_size_like_op.cu.cc @@ -1,4 +1,4 @@ -/* Copyright (c) 2016 PaddlePaddle Authors. All Rights Reserve. +/* Copyright (c) 2016 PaddlePaddle Authors. All Rights Reserved. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/paddle/fluid/operators/fill_constant_batch_size_like_op.h b/paddle/fluid/operators/fill_constant_batch_size_like_op.h index da4a20d99a1..2a7df149a9f 100644 --- a/paddle/fluid/operators/fill_constant_batch_size_like_op.h +++ b/paddle/fluid/operators/fill_constant_batch_size_like_op.h @@ -1,4 +1,4 @@ -/* Copyright (c) 2016 PaddlePaddle Authors. All Rights Reserve. +/* Copyright (c) 2016 PaddlePaddle Authors. All Rights Reserved. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/paddle/fluid/operators/fill_constant_op.cc b/paddle/fluid/operators/fill_constant_op.cc index 6dd58d28db2..0b65c83d3aa 100644 --- a/paddle/fluid/operators/fill_constant_op.cc +++ b/paddle/fluid/operators/fill_constant_op.cc @@ -1,4 +1,4 @@ -/* Copyright (c) 2016 PaddlePaddle Authors. All Rights Reserve. +/* Copyright (c) 2016 PaddlePaddle Authors. All Rights Reserved. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/paddle/fluid/operators/fill_op.cc b/paddle/fluid/operators/fill_op.cc index 0b97c9c2827..c505c739d46 100644 --- a/paddle/fluid/operators/fill_op.cc +++ b/paddle/fluid/operators/fill_op.cc @@ -1,4 +1,4 @@ -/* Copyright (c) 2016 PaddlePaddle Authors. All Rights Reserve. +/* Copyright (c) 2016 PaddlePaddle Authors. All Rights Reserved. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/paddle/fluid/operators/fill_zeros_like_op.cc b/paddle/fluid/operators/fill_zeros_like_op.cc index 958bfb1557d..58c814ba641 100644 --- a/paddle/fluid/operators/fill_zeros_like_op.cc +++ b/paddle/fluid/operators/fill_zeros_like_op.cc @@ -1,4 +1,4 @@ -/* Copyright (c) 2016 PaddlePaddle Authors. All Rights Reserve. +/* Copyright (c) 2016 PaddlePaddle Authors. All Rights Reserved. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/paddle/fluid/operators/fill_zeros_like_op.cu.cc b/paddle/fluid/operators/fill_zeros_like_op.cu.cc index 07078573d8a..95381774606 100644 --- a/paddle/fluid/operators/fill_zeros_like_op.cu.cc +++ b/paddle/fluid/operators/fill_zeros_like_op.cu.cc @@ -1,4 +1,4 @@ -/* Copyright (c) 2016 PaddlePaddle Authors. All Rights Reserve. +/* Copyright (c) 2016 PaddlePaddle Authors. All Rights Reserved. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/paddle/fluid/operators/fill_zeros_like_op.h b/paddle/fluid/operators/fill_zeros_like_op.h index 141c3809e9a..4bbe0df6b68 100644 --- a/paddle/fluid/operators/fill_zeros_like_op.h +++ b/paddle/fluid/operators/fill_zeros_like_op.h @@ -1,4 +1,4 @@ -/* Copyright (c) 2016 PaddlePaddle Authors. All Rights Reserve. +/* Copyright (c) 2016 PaddlePaddle Authors. All Rights Reserved. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/paddle/fluid/operators/ftrl_op.cc b/paddle/fluid/operators/ftrl_op.cc index e72a173751e..0a456f0981e 100644 --- a/paddle/fluid/operators/ftrl_op.cc +++ b/paddle/fluid/operators/ftrl_op.cc @@ -1,4 +1,4 @@ -/* Copyright (c) 2016 PaddlePaddle Authors. All Rights Reserve. +/* Copyright (c) 2016 PaddlePaddle Authors. All Rights Reserved. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/paddle/fluid/operators/ftrl_op.cu b/paddle/fluid/operators/ftrl_op.cu index dbdfcb927e0..e7371c80da1 100644 --- a/paddle/fluid/operators/ftrl_op.cu +++ b/paddle/fluid/operators/ftrl_op.cu @@ -1,4 +1,4 @@ -/* Copyright (c) 2016 PaddlePaddle Authors. All Rights Reserve. +/* Copyright (c) 2016 PaddlePaddle Authors. All Rights Reserved. Licensed under the Apache License, Version 2.0 (the "License"); You may not use this file except in compliance with the License. diff --git a/paddle/fluid/operators/ftrl_op.h b/paddle/fluid/operators/ftrl_op.h index 0a9405fcef1..6f821e7e994 100644 --- a/paddle/fluid/operators/ftrl_op.h +++ b/paddle/fluid/operators/ftrl_op.h @@ -1,4 +1,4 @@ -/* Copyright (c) 2016 PaddlePaddle Authors. All Rights Reserve. +/* Copyright (c) 2016 PaddlePaddle Authors. All Rights Reserved. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/paddle/fluid/operators/gather.cu.h b/paddle/fluid/operators/gather.cu.h index af5898e29ec..d74d4db9252 100644 --- a/paddle/fluid/operators/gather.cu.h +++ b/paddle/fluid/operators/gather.cu.h @@ -1,4 +1,4 @@ -/* Copyright (c) 2016 PaddlePaddle Authors. All Rights Reserve. +/* Copyright (c) 2016 PaddlePaddle Authors. All Rights Reserved. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/paddle/fluid/operators/gather.h b/paddle/fluid/operators/gather.h index 287732eeb6e..d15cb55647a 100644 --- a/paddle/fluid/operators/gather.h +++ b/paddle/fluid/operators/gather.h @@ -1,4 +1,4 @@ -/* Copyright (c) 2016 PaddlePaddle Authors. All Rights Reserve. +/* Copyright (c) 2016 PaddlePaddle Authors. All Rights Reserved. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/paddle/fluid/operators/gather_op.cc b/paddle/fluid/operators/gather_op.cc index dceeb71ee35..6be06b8816c 100644 --- a/paddle/fluid/operators/gather_op.cc +++ b/paddle/fluid/operators/gather_op.cc @@ -1,4 +1,4 @@ -/* Copyright (c) 2016 PaddlePaddle Authors. All Rights Reserve. +/* Copyright (c) 2016 PaddlePaddle Authors. All Rights Reserved. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/paddle/fluid/operators/gather_op.cu b/paddle/fluid/operators/gather_op.cu index 484f4232624..3819549c711 100644 --- a/paddle/fluid/operators/gather_op.cu +++ b/paddle/fluid/operators/gather_op.cu @@ -1,4 +1,4 @@ -/* Copyright (c) 2016 PaddlePaddle Authors. All Rights Reserve. +/* Copyright (c) 2016 PaddlePaddle Authors. All Rights Reserved. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/paddle/fluid/operators/gather_op.h b/paddle/fluid/operators/gather_op.h index 7ba4a31c81b..5a8b1ebbe3f 100644 --- a/paddle/fluid/operators/gather_op.h +++ b/paddle/fluid/operators/gather_op.h @@ -1,4 +1,4 @@ -/* Copyright (c) 2016 PaddlePaddle Authors. All Rights Reserve. +/* Copyright (c) 2016 PaddlePaddle Authors. All Rights Reserved. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/paddle/fluid/operators/gather_test.cc b/paddle/fluid/operators/gather_test.cc index 4d86cf5ce33..7625bd45d96 100644 --- a/paddle/fluid/operators/gather_test.cc +++ b/paddle/fluid/operators/gather_test.cc @@ -1,4 +1,4 @@ -/* Copyright (c) 2016 PaddlePaddle Authors. All Rights Reserve. +/* Copyright (c) 2016 PaddlePaddle Authors. All Rights Reserved. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/paddle/fluid/operators/gaussian_random_op.cc b/paddle/fluid/operators/gaussian_random_op.cc index b090f875976..cf3a528bdd0 100644 --- a/paddle/fluid/operators/gaussian_random_op.cc +++ b/paddle/fluid/operators/gaussian_random_op.cc @@ -1,4 +1,4 @@ -/* Copyright (c) 2016 PaddlePaddle Authors. All Rights Reserve. +/* Copyright (c) 2016 PaddlePaddle Authors. All Rights Reserved. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/paddle/fluid/operators/gaussian_random_op.cu b/paddle/fluid/operators/gaussian_random_op.cu index 70d655d4bb2..7340590c3ef 100644 --- a/paddle/fluid/operators/gaussian_random_op.cu +++ b/paddle/fluid/operators/gaussian_random_op.cu @@ -1,4 +1,4 @@ -/* Copyright (c) 2016 PaddlePaddle Authors. All Rights Reserve. +/* Copyright (c) 2016 PaddlePaddle Authors. All Rights Reserved. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/paddle/fluid/operators/get_places_op.cc b/paddle/fluid/operators/get_places_op.cc index ef635048bd4..8555b0778fa 100644 --- a/paddle/fluid/operators/get_places_op.cc +++ b/paddle/fluid/operators/get_places_op.cc @@ -1,4 +1,4 @@ -/* Copyright (c) 2016 PaddlePaddle Authors. All Rights Reserve. +/* Copyright (c) 2016 PaddlePaddle Authors. All Rights Reserved. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/paddle/fluid/operators/gru_op.cc b/paddle/fluid/operators/gru_op.cc index 1436e55b0e1..2a91dcbcd41 100644 --- a/paddle/fluid/operators/gru_op.cc +++ b/paddle/fluid/operators/gru_op.cc @@ -1,4 +1,4 @@ -/* Copyright (c) 2016 PaddlePaddle Authors. All Rights Reserve. +/* Copyright (c) 2016 PaddlePaddle Authors. All Rights Reserved. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/paddle/fluid/operators/gru_op.cu.cc b/paddle/fluid/operators/gru_op.cu.cc index e908d01d292..baf455a8403 100644 --- a/paddle/fluid/operators/gru_op.cu.cc +++ b/paddle/fluid/operators/gru_op.cu.cc @@ -1,4 +1,4 @@ -/* Copyright (c) 2016 PaddlePaddle Authors. All Rights Reserve. +/* Copyright (c) 2016 PaddlePaddle Authors. All Rights Reserved. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/paddle/fluid/operators/gru_op.h b/paddle/fluid/operators/gru_op.h index 37f3ae1a837..0886bebc41d 100644 --- a/paddle/fluid/operators/gru_op.h +++ b/paddle/fluid/operators/gru_op.h @@ -1,4 +1,4 @@ -/* Copyright (c) 2016 PaddlePaddle Authors. All Rights Reserve. +/* Copyright (c) 2016 PaddlePaddle Authors. All Rights Reserved. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/paddle/fluid/operators/gru_unit_op.cc b/paddle/fluid/operators/gru_unit_op.cc index 21ad3aeb492..f4c766db0a1 100644 --- a/paddle/fluid/operators/gru_unit_op.cc +++ b/paddle/fluid/operators/gru_unit_op.cc @@ -1,4 +1,4 @@ -/* Copyright (c) 2016 PaddlePaddle Authors. All Rights Reserve. +/* Copyright (c) 2016 PaddlePaddle Authors. All Rights Reserved. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/paddle/fluid/operators/gru_unit_op.cu b/paddle/fluid/operators/gru_unit_op.cu index 88b707fd131..fc92b3d4a7a 100644 --- a/paddle/fluid/operators/gru_unit_op.cu +++ b/paddle/fluid/operators/gru_unit_op.cu @@ -1,4 +1,4 @@ -/* Copyright (c) 2016 PaddlePaddle Authors. All Rights Reserve. +/* Copyright (c) 2016 PaddlePaddle Authors. All Rights Reserved. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/paddle/fluid/operators/gru_unit_op.h b/paddle/fluid/operators/gru_unit_op.h index c4031a5a575..15d91ca3059 100644 --- a/paddle/fluid/operators/gru_unit_op.h +++ b/paddle/fluid/operators/gru_unit_op.h @@ -1,4 +1,4 @@ -/* Copyright (c) 2016 PaddlePaddle Authors. All Rights Reserve. +/* Copyright (c) 2016 PaddlePaddle Authors. All Rights Reserved. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/paddle/fluid/operators/hinge_loss_op.cc b/paddle/fluid/operators/hinge_loss_op.cc index f644c22c9f1..efe84f14098 100644 --- a/paddle/fluid/operators/hinge_loss_op.cc +++ b/paddle/fluid/operators/hinge_loss_op.cc @@ -1,4 +1,4 @@ -/* Copyright (c) 2016 PaddlePaddle Authors. All Rights Reserve. +/* Copyright (c) 2016 PaddlePaddle Authors. All Rights Reserved. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/paddle/fluid/operators/hinge_loss_op.cu b/paddle/fluid/operators/hinge_loss_op.cu index cb53a9b7f4a..9c0a85bee6e 100644 --- a/paddle/fluid/operators/hinge_loss_op.cu +++ b/paddle/fluid/operators/hinge_loss_op.cu @@ -1,4 +1,4 @@ -/* Copyright (c) 2016 PaddlePaddle Authors. All Rights Reserve. +/* Copyright (c) 2016 PaddlePaddle Authors. All Rights Reserved. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/paddle/fluid/operators/hinge_loss_op.h b/paddle/fluid/operators/hinge_loss_op.h index 1e924d236ea..10c17a0982f 100644 --- a/paddle/fluid/operators/hinge_loss_op.h +++ b/paddle/fluid/operators/hinge_loss_op.h @@ -1,4 +1,4 @@ -/* Copyright (c) 2016 PaddlePaddle Authors. All Rights Reserve. +/* Copyright (c) 2016 PaddlePaddle Authors. All Rights Reserved. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/paddle/fluid/operators/huber_loss_op.cc b/paddle/fluid/operators/huber_loss_op.cc index dc1f609dcfa..134b23b4612 100644 --- a/paddle/fluid/operators/huber_loss_op.cc +++ b/paddle/fluid/operators/huber_loss_op.cc @@ -1,4 +1,4 @@ -/* Copyright (c) 2016 PaddlePaddle Authors. All Rights Reserve. +/* Copyright (c) 2016 PaddlePaddle Authors. All Rights Reserved. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/paddle/fluid/operators/huber_loss_op.cu b/paddle/fluid/operators/huber_loss_op.cu index ef5120c69d4..659464df9dc 100644 --- a/paddle/fluid/operators/huber_loss_op.cu +++ b/paddle/fluid/operators/huber_loss_op.cu @@ -1,4 +1,4 @@ -/* Copyright (c) 2016 PaddlePaddle Authors. All Rights Reserve. +/* Copyright (c) 2016 PaddlePaddle Authors. All Rights Reserved. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/paddle/fluid/operators/huber_loss_op.h b/paddle/fluid/operators/huber_loss_op.h index caca89fcf63..9efda3dfc98 100644 --- a/paddle/fluid/operators/huber_loss_op.h +++ b/paddle/fluid/operators/huber_loss_op.h @@ -1,4 +1,4 @@ -/* Copyright (c) 2016 PaddlePaddle Authors. All Rights Reserve. +/* Copyright (c) 2016 PaddlePaddle Authors. All Rights Reserved. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/paddle/fluid/operators/im2sequence_op.cc b/paddle/fluid/operators/im2sequence_op.cc index 936e5fe49ed..5bc28e0a520 100644 --- a/paddle/fluid/operators/im2sequence_op.cc +++ b/paddle/fluid/operators/im2sequence_op.cc @@ -1,4 +1,4 @@ -/* Copyright (c) 2016 PaddlePaddle Authors. All Rights Reserve. +/* Copyright (c) 2016 PaddlePaddle Authors. All Rights Reserved. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/paddle/fluid/operators/im2sequence_op.cu b/paddle/fluid/operators/im2sequence_op.cu index 1e7bf463122..e0a5a90c1c3 100644 --- a/paddle/fluid/operators/im2sequence_op.cu +++ b/paddle/fluid/operators/im2sequence_op.cu @@ -1,4 +1,4 @@ -/* Copyright (c) 2016 PaddlePaddle Authors. All Rights Reserve. +/* Copyright (c) 2016 PaddlePaddle Authors. All Rights Reserved. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/paddle/fluid/operators/im2sequence_op.h b/paddle/fluid/operators/im2sequence_op.h index 59456f0ea29..4193819b785 100644 --- a/paddle/fluid/operators/im2sequence_op.h +++ b/paddle/fluid/operators/im2sequence_op.h @@ -1,4 +1,4 @@ -/* Copyright (c) 2016 PaddlePaddle Authors. All Rights Reserve. +/* Copyright (c) 2016 PaddlePaddle Authors. All Rights Reserved. Licensed under the Apache License, Version 2.0 (the "License"); You may not use this file except in compliance with the License. diff --git a/paddle/fluid/operators/increment_op.cc b/paddle/fluid/operators/increment_op.cc index de4949584b7..6b5c3db13c0 100644 --- a/paddle/fluid/operators/increment_op.cc +++ b/paddle/fluid/operators/increment_op.cc @@ -1,4 +1,4 @@ -/* Copyright (c) 2016 PaddlePaddle Authors. All Rights Reserve. +/* Copyright (c) 2016 PaddlePaddle Authors. All Rights Reserved. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/paddle/fluid/operators/iou_similarity_op.cc b/paddle/fluid/operators/iou_similarity_op.cc index c2e452cdfaa..ffbd7c7814c 100755 --- a/paddle/fluid/operators/iou_similarity_op.cc +++ b/paddle/fluid/operators/iou_similarity_op.cc @@ -1,4 +1,4 @@ -/* Copyright (c) 2016 PaddlePaddle Authors. All Rights Reserve. +/* Copyright (c) 2016 PaddlePaddle Authors. All Rights Reserved. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/paddle/fluid/operators/iou_similarity_op.cu b/paddle/fluid/operators/iou_similarity_op.cu index f8df1f4aa4c..f40a388d62e 100755 --- a/paddle/fluid/operators/iou_similarity_op.cu +++ b/paddle/fluid/operators/iou_similarity_op.cu @@ -1,4 +1,4 @@ -/* Copyright (c) 2016 PaddlePaddle Authors. All Rights Reserve. +/* Copyright (c) 2016 PaddlePaddle Authors. All Rights Reserved. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/paddle/fluid/operators/iou_similarity_op.h b/paddle/fluid/operators/iou_similarity_op.h index 2fb1b5f7070..c76448c7368 100644 --- a/paddle/fluid/operators/iou_similarity_op.h +++ b/paddle/fluid/operators/iou_similarity_op.h @@ -1,4 +1,4 @@ -/* Copyright (c) 2016 PaddlePaddle Authors. All Rights Reserve. +/* Copyright (c) 2016 PaddlePaddle Authors. All Rights Reserved. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/paddle/fluid/operators/is_empty_op.cc b/paddle/fluid/operators/is_empty_op.cc index dac8505e3f2..2a7be90dab1 100644 --- a/paddle/fluid/operators/is_empty_op.cc +++ b/paddle/fluid/operators/is_empty_op.cc @@ -1,4 +1,4 @@ -/* Copyright (c) 2016 PaddlePaddle Authors. All Rights Reserve. +/* Copyright (c) 2016 PaddlePaddle Authors. All Rights Reserved. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/paddle/fluid/operators/l1_norm_op.cc b/paddle/fluid/operators/l1_norm_op.cc index 974ee404f83..963b0587c38 100644 --- a/paddle/fluid/operators/l1_norm_op.cc +++ b/paddle/fluid/operators/l1_norm_op.cc @@ -1,4 +1,4 @@ -/* Copyright (c) 2016 PaddlePaddle Authors. All Rights Reserve. +/* Copyright (c) 2016 PaddlePaddle Authors. All Rights Reserved. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/paddle/fluid/operators/l1_norm_op.cu b/paddle/fluid/operators/l1_norm_op.cu index 5e9e864a346..1b48571dd73 100644 --- a/paddle/fluid/operators/l1_norm_op.cu +++ b/paddle/fluid/operators/l1_norm_op.cu @@ -1,4 +1,4 @@ -/* Copyright (c) 2016 PaddlePaddle Authors. All Rights Reserve. +/* Copyright (c) 2016 PaddlePaddle Authors. All Rights Reserved. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/paddle/fluid/operators/l1_norm_op.h b/paddle/fluid/operators/l1_norm_op.h index 7ddf2ac6a90..7c6503bb215 100644 --- a/paddle/fluid/operators/l1_norm_op.h +++ b/paddle/fluid/operators/l1_norm_op.h @@ -1,4 +1,4 @@ -/* Copyright (c) 2016 PaddlePaddle Authors. All Rights Reserve. +/* Copyright (c) 2016 PaddlePaddle Authors. All Rights Reserved. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/paddle/fluid/operators/label_smooth_op.cc b/paddle/fluid/operators/label_smooth_op.cc index c018965beef..eef25f8a06d 100644 --- a/paddle/fluid/operators/label_smooth_op.cc +++ b/paddle/fluid/operators/label_smooth_op.cc @@ -1,4 +1,4 @@ -/* Copyright (c) 2016 PaddlePaddle Authors. All Rights Reserve. +/* Copyright (c) 2016 PaddlePaddle Authors. All Rights Reserved. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/paddle/fluid/operators/label_smooth_op.cu b/paddle/fluid/operators/label_smooth_op.cu index 4a40a4e9ec8..ab259b48e35 100644 --- a/paddle/fluid/operators/label_smooth_op.cu +++ b/paddle/fluid/operators/label_smooth_op.cu @@ -1,4 +1,4 @@ -/* Copyright (c) 2016 PaddlePaddle Authors. All Rights Reserve. +/* Copyright (c) 2016 PaddlePaddle Authors. All Rights Reserved. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/paddle/fluid/operators/label_smooth_op.h b/paddle/fluid/operators/label_smooth_op.h index 15752377f66..f56fd95e965 100644 --- a/paddle/fluid/operators/label_smooth_op.h +++ b/paddle/fluid/operators/label_smooth_op.h @@ -1,4 +1,4 @@ -/* Copyright (c) 2016 PaddlePaddle Authors. All Rights Reserve. +/* Copyright (c) 2016 PaddlePaddle Authors. All Rights Reserved. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/paddle/fluid/operators/layer_norm_op.cc b/paddle/fluid/operators/layer_norm_op.cc index 60e37ed01b3..88b3b08af57 100644 --- a/paddle/fluid/operators/layer_norm_op.cc +++ b/paddle/fluid/operators/layer_norm_op.cc @@ -1,4 +1,4 @@ -/* Copyright (c) 2016 PaddlePaddle Authors. All Rights Reserve. +/* Copyright (c) 2016 PaddlePaddle Authors. All Rights Reserved. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/paddle/fluid/operators/layer_norm_op.cu b/paddle/fluid/operators/layer_norm_op.cu index aa54fd54155..6840e1e08f3 100644 --- a/paddle/fluid/operators/layer_norm_op.cu +++ b/paddle/fluid/operators/layer_norm_op.cu @@ -1,4 +1,4 @@ -/* Copyright (c) 2016 PaddlePaddle Authors. All Rights Reserve. +/* Copyright (c) 2016 PaddlePaddle Authors. All Rights Reserved. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/paddle/fluid/operators/layer_norm_op.h b/paddle/fluid/operators/layer_norm_op.h index 60c0b07add1..84f5a40aacb 100644 --- a/paddle/fluid/operators/layer_norm_op.h +++ b/paddle/fluid/operators/layer_norm_op.h @@ -1,4 +1,4 @@ -/* Copyright (c) 2016 PaddlePaddle Authors. All Rights Reserve. +/* Copyright (c) 2016 PaddlePaddle Authors. All Rights Reserved. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/paddle/fluid/operators/linear_chain_crf_op.cc b/paddle/fluid/operators/linear_chain_crf_op.cc index 3e1dfa49487..ef568a578b0 100644 --- a/paddle/fluid/operators/linear_chain_crf_op.cc +++ b/paddle/fluid/operators/linear_chain_crf_op.cc @@ -1,4 +1,4 @@ -/* Copyright (c) 2016 PaddlePaddle Authors. All Rights Reserve. +/* Copyright (c) 2016 PaddlePaddle Authors. All Rights Reserved. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/paddle/fluid/operators/linear_chain_crf_op.cu b/paddle/fluid/operators/linear_chain_crf_op.cu index 6e04e76eebc..4f7738e8c36 100644 --- a/paddle/fluid/operators/linear_chain_crf_op.cu +++ b/paddle/fluid/operators/linear_chain_crf_op.cu @@ -1,4 +1,4 @@ -/* Copyright (c) 2016 PaddlePaddle Authors. All Rights Reserve. +/* Copyright (c) 2016 PaddlePaddle Authors. All Rights Reserved. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/paddle/fluid/operators/linear_chain_crf_op.h b/paddle/fluid/operators/linear_chain_crf_op.h index 15b64c09bf3..800a1303e1a 100644 --- a/paddle/fluid/operators/linear_chain_crf_op.h +++ b/paddle/fluid/operators/linear_chain_crf_op.h @@ -1,4 +1,4 @@ -/* Copyright (c) 2016 PaddlePaddle Authors. All Rights Reserve. +/* Copyright (c) 2016 PaddlePaddle Authors. All Rights Reserved. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/paddle/fluid/operators/listen_and_serv_op.cc b/paddle/fluid/operators/listen_and_serv_op.cc index 8e88a7dcf14..6c0292ecb24 100644 --- a/paddle/fluid/operators/listen_and_serv_op.cc +++ b/paddle/fluid/operators/listen_and_serv_op.cc @@ -1,4 +1,4 @@ -/* Copyright (c) 2016 PaddlePaddle Authors. All Rights Reserve. +/* Copyright (c) 2016 PaddlePaddle Authors. All Rights Reserved. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/paddle/fluid/operators/load_combine_op.cc b/paddle/fluid/operators/load_combine_op.cc index d043702ebae..ba8fc4a6836 100644 --- a/paddle/fluid/operators/load_combine_op.cc +++ b/paddle/fluid/operators/load_combine_op.cc @@ -1,4 +1,4 @@ -/* Copyright (c) 2018 PaddlePaddle Authors. All Rights Reserve. +/* Copyright (c) 2018 PaddlePaddle Authors. All Rights Reserved. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/paddle/fluid/operators/load_op.cc b/paddle/fluid/operators/load_op.cc index 9393cccfc66..d72b7a7eb96 100644 --- a/paddle/fluid/operators/load_op.cc +++ b/paddle/fluid/operators/load_op.cc @@ -1,4 +1,4 @@ -/* Copyright (c) 2016 PaddlePaddle Authors. All Rights Reserve. +/* Copyright (c) 2016 PaddlePaddle Authors. All Rights Reserved. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/paddle/fluid/operators/lod_array_length_op.cc b/paddle/fluid/operators/lod_array_length_op.cc index daa57c20450..e6212405770 100644 --- a/paddle/fluid/operators/lod_array_length_op.cc +++ b/paddle/fluid/operators/lod_array_length_op.cc @@ -1,4 +1,4 @@ -/* Copyright (c) 2016 PaddlePaddle Authors. All Rights Reserve. +/* Copyright (c) 2016 PaddlePaddle Authors. All Rights Reserved. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/paddle/fluid/operators/lod_rank_table_op.cc b/paddle/fluid/operators/lod_rank_table_op.cc index 3264766d6b6..2d01ed67376 100644 --- a/paddle/fluid/operators/lod_rank_table_op.cc +++ b/paddle/fluid/operators/lod_rank_table_op.cc @@ -1,4 +1,4 @@ -/* Copyright (c) 2016 PaddlePaddle Authors. All Rights Reserve. +/* Copyright (c) 2016 PaddlePaddle Authors. All Rights Reserved. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/paddle/fluid/operators/lod_reset_op.cc b/paddle/fluid/operators/lod_reset_op.cc index 55ae71c1815..6a66297cb84 100644 --- a/paddle/fluid/operators/lod_reset_op.cc +++ b/paddle/fluid/operators/lod_reset_op.cc @@ -1,4 +1,4 @@ -/* Copyright (c) 2016 PaddlePaddle Authors. All Rights Reserve. +/* Copyright (c) 2016 PaddlePaddle Authors. All Rights Reserved. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/paddle/fluid/operators/lod_reset_op.cu b/paddle/fluid/operators/lod_reset_op.cu index 8bfc8bd3bf0..b0e87a851a7 100644 --- a/paddle/fluid/operators/lod_reset_op.cu +++ b/paddle/fluid/operators/lod_reset_op.cu @@ -1,4 +1,4 @@ -/* Copyright (c) 2016 PaddlePaddle Authors. All Rights Reserve. +/* Copyright (c) 2016 PaddlePaddle Authors. All Rights Reserved. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/paddle/fluid/operators/lod_reset_op.h b/paddle/fluid/operators/lod_reset_op.h index a10efee0bdd..e612bc2d367 100644 --- a/paddle/fluid/operators/lod_reset_op.h +++ b/paddle/fluid/operators/lod_reset_op.h @@ -1,4 +1,4 @@ -/* Copyright (c) 2016 PaddlePaddle Authors. All Rights Reserve. +/* Copyright (c) 2016 PaddlePaddle Authors. All Rights Reserved. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/paddle/fluid/operators/lod_tensor_to_array_op.cc b/paddle/fluid/operators/lod_tensor_to_array_op.cc index d6e24dc976a..be47fdfd048 100644 --- a/paddle/fluid/operators/lod_tensor_to_array_op.cc +++ b/paddle/fluid/operators/lod_tensor_to_array_op.cc @@ -1,4 +1,4 @@ -/* Copyright (c) 2016 PaddlePaddle Authors. All Rights Reserve. +/* Copyright (c) 2016 PaddlePaddle Authors. All Rights Reserved. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/paddle/fluid/operators/log_loss_op.cc b/paddle/fluid/operators/log_loss_op.cc index 6c5cd295681..f44996d8ac7 100644 --- a/paddle/fluid/operators/log_loss_op.cc +++ b/paddle/fluid/operators/log_loss_op.cc @@ -1,4 +1,4 @@ -/* Copyright (c) 2016 PaddlePaddle Authors. All Rights Reserve. +/* Copyright (c) 2016 PaddlePaddle Authors. All Rights Reserved. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/paddle/fluid/operators/log_loss_op.cu b/paddle/fluid/operators/log_loss_op.cu index c164a6d0405..e8bf7d8159b 100644 --- a/paddle/fluid/operators/log_loss_op.cu +++ b/paddle/fluid/operators/log_loss_op.cu @@ -1,4 +1,4 @@ -/* Copyright (c) 2016 PaddlePaddle Authors. All Rights Reserve. +/* Copyright (c) 2016 PaddlePaddle Authors. All Rights Reserved. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/paddle/fluid/operators/log_loss_op.h b/paddle/fluid/operators/log_loss_op.h index 67fac7cfe55..e62de17a986 100644 --- a/paddle/fluid/operators/log_loss_op.h +++ b/paddle/fluid/operators/log_loss_op.h @@ -1,4 +1,4 @@ -/* Copyright (c) 2016 PaddlePaddle Authors. All Rights Reserve. +/* Copyright (c) 2016 PaddlePaddle Authors. All Rights Reserved. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/paddle/fluid/operators/logical_op.cc b/paddle/fluid/operators/logical_op.cc index ff49895df19..6a7db31cf36 100644 --- a/paddle/fluid/operators/logical_op.cc +++ b/paddle/fluid/operators/logical_op.cc @@ -1,4 +1,4 @@ -/* Copyright (c) 2016 PaddlePaddle Authors. All Rights Reserve. +/* Copyright (c) 2016 PaddlePaddle Authors. All Rights Reserved. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/paddle/fluid/operators/logical_op.cu b/paddle/fluid/operators/logical_op.cu index 2b174440612..7ffe4dfc268 100644 --- a/paddle/fluid/operators/logical_op.cu +++ b/paddle/fluid/operators/logical_op.cu @@ -1,4 +1,4 @@ -/* Copyright (c) 2016 PaddlePaddle Authors. All Rights Reserve. +/* Copyright (c) 2016 PaddlePaddle Authors. All Rights Reserved. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/paddle/fluid/operators/logical_op.h b/paddle/fluid/operators/logical_op.h index f6d5866c2c8..4a83e0fda6e 100644 --- a/paddle/fluid/operators/logical_op.h +++ b/paddle/fluid/operators/logical_op.h @@ -1,4 +1,4 @@ -/* Copyright (c) 2016 PaddlePaddle Authors. All Rights Reserve. +/* Copyright (c) 2016 PaddlePaddle Authors. All Rights Reserved. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/paddle/fluid/operators/lookup_table_op.cc b/paddle/fluid/operators/lookup_table_op.cc index 2c555f1a3fa..d338553f7c4 100644 --- a/paddle/fluid/operators/lookup_table_op.cc +++ b/paddle/fluid/operators/lookup_table_op.cc @@ -1,4 +1,4 @@ -/* Copyright (c) 2016 PaddlePaddle Authors. All Rights Reserve. +/* Copyright (c) 2016 PaddlePaddle Authors. All Rights Reserved. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/paddle/fluid/operators/lookup_table_op.cu b/paddle/fluid/operators/lookup_table_op.cu index 801adba5a44..923340f4610 100644 --- a/paddle/fluid/operators/lookup_table_op.cu +++ b/paddle/fluid/operators/lookup_table_op.cu @@ -1,4 +1,4 @@ -/* Copyright (c) 2016 PaddlePaddle Authors. All Rights Reserve. +/* Copyright (c) 2016 PaddlePaddle Authors. All Rights Reserved. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/paddle/fluid/operators/lookup_table_op.h b/paddle/fluid/operators/lookup_table_op.h index d264496882a..d88b034e919 100644 --- a/paddle/fluid/operators/lookup_table_op.h +++ b/paddle/fluid/operators/lookup_table_op.h @@ -1,4 +1,4 @@ -/* Copyright (c) 2016 PaddlePaddle Authors. All Rights Reserve. +/* Copyright (c) 2016 PaddlePaddle Authors. All Rights Reserved. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/paddle/fluid/operators/lrn_op.cc b/paddle/fluid/operators/lrn_op.cc index c84507f231c..b0c213d637c 100644 --- a/paddle/fluid/operators/lrn_op.cc +++ b/paddle/fluid/operators/lrn_op.cc @@ -1,4 +1,4 @@ -/* Copyright (c) 2016 PaddlePaddle Authors. All Rights Reserve. +/* Copyright (c) 2016 PaddlePaddle Authors. All Rights Reserved. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/paddle/fluid/operators/lrn_op.cu b/paddle/fluid/operators/lrn_op.cu index 03112bf3e03..64f3fea6be2 100644 --- a/paddle/fluid/operators/lrn_op.cu +++ b/paddle/fluid/operators/lrn_op.cu @@ -1,4 +1,4 @@ -/* Copyright (c) 2016 PaddlePaddle Authors. All Rights Reserve. +/* Copyright (c) 2016 PaddlePaddle Authors. All Rights Reserved. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/paddle/fluid/operators/lrn_op.h b/paddle/fluid/operators/lrn_op.h index b7b78b45914..95796f7eecd 100644 --- a/paddle/fluid/operators/lrn_op.h +++ b/paddle/fluid/operators/lrn_op.h @@ -1,4 +1,4 @@ -/* Copyright (c) 2016 PaddlePaddle Authors. All Rights Reserve. +/* Copyright (c) 2016 PaddlePaddle Authors. All Rights Reserved. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/paddle/fluid/operators/lstm_op.cc b/paddle/fluid/operators/lstm_op.cc index d1f1b5f235f..d75537741ef 100644 --- a/paddle/fluid/operators/lstm_op.cc +++ b/paddle/fluid/operators/lstm_op.cc @@ -1,4 +1,4 @@ -/* Copyright (c) 2016 PaddlePaddle Authors. All Rights Reserve. +/* Copyright (c) 2016 PaddlePaddle Authors. All Rights Reserved. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/paddle/fluid/operators/lstm_op.cu.cc b/paddle/fluid/operators/lstm_op.cu.cc index 679d02b1f9a..c1cbfada41d 100644 --- a/paddle/fluid/operators/lstm_op.cu.cc +++ b/paddle/fluid/operators/lstm_op.cu.cc @@ -1,4 +1,4 @@ -/* Copyright (c) 2016 PaddlePaddle Authors. All Rights Reserve. +/* Copyright (c) 2016 PaddlePaddle Authors. All Rights Reserved. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/paddle/fluid/operators/lstm_op.h b/paddle/fluid/operators/lstm_op.h index 1c48495533c..11f9f223b5d 100644 --- a/paddle/fluid/operators/lstm_op.h +++ b/paddle/fluid/operators/lstm_op.h @@ -1,4 +1,4 @@ -/* Copyright (c) 2016 PaddlePaddle Authors. All Rights Reserve. +/* Copyright (c) 2016 PaddlePaddle Authors. All Rights Reserved. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/paddle/fluid/operators/lstm_unit_op.cc b/paddle/fluid/operators/lstm_unit_op.cc index 3d33d47e0c3..b3c9d7c34d1 100644 --- a/paddle/fluid/operators/lstm_unit_op.cc +++ b/paddle/fluid/operators/lstm_unit_op.cc @@ -1,4 +1,4 @@ -/* Copyright (c) 2016 PaddlePaddle Authors. All Rights Reserve. +/* Copyright (c) 2016 PaddlePaddle Authors. All Rights Reserved. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/paddle/fluid/operators/lstm_unit_op.cu b/paddle/fluid/operators/lstm_unit_op.cu index 12ebffca37f..76245a1b5a9 100644 --- a/paddle/fluid/operators/lstm_unit_op.cu +++ b/paddle/fluid/operators/lstm_unit_op.cu @@ -1,4 +1,4 @@ -/* Copyright (c) 2016 PaddlePaddle Authors. All Rights Reserve. +/* Copyright (c) 2016 PaddlePaddle Authors. All Rights Reserved. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/paddle/fluid/operators/lstm_unit_op.h b/paddle/fluid/operators/lstm_unit_op.h index 9f2370fe690..4ead9c22934 100644 --- a/paddle/fluid/operators/lstm_unit_op.h +++ b/paddle/fluid/operators/lstm_unit_op.h @@ -1,4 +1,4 @@ -/* Copyright (c) 2016 PaddlePaddle Authors. All Rights Reserve. +/* Copyright (c) 2016 PaddlePaddle Authors. All Rights Reserved. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/paddle/fluid/operators/lstmp_op.cc b/paddle/fluid/operators/lstmp_op.cc index 2d30edf5c3c..a881ef82ec3 100644 --- a/paddle/fluid/operators/lstmp_op.cc +++ b/paddle/fluid/operators/lstmp_op.cc @@ -1,4 +1,4 @@ -/* Copyright (c) 2016 PaddlePaddle Authors. All Rights Reserve. +/* Copyright (c) 2016 PaddlePaddle Authors. All Rights Reserved. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/paddle/fluid/operators/lstmp_op.cu b/paddle/fluid/operators/lstmp_op.cu index bcefb94c75b..f601b897af6 100644 --- a/paddle/fluid/operators/lstmp_op.cu +++ b/paddle/fluid/operators/lstmp_op.cu @@ -1,4 +1,4 @@ -/* Copyright (c) 2016 PaddlePaddle Authors. All Rights Reserve. +/* Copyright (c) 2016 PaddlePaddle Authors. All Rights Reserved. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/paddle/fluid/operators/lstmp_op.h b/paddle/fluid/operators/lstmp_op.h index 22ef4721860..dfa7f74d511 100644 --- a/paddle/fluid/operators/lstmp_op.h +++ b/paddle/fluid/operators/lstmp_op.h @@ -1,4 +1,4 @@ -/* Copyright (c) 2016 PaddlePaddle Authors. All Rights Reserve. +/* Copyright (c) 2016 PaddlePaddle Authors. All Rights Reserved. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/paddle/fluid/operators/margin_rank_loss_op.cc b/paddle/fluid/operators/margin_rank_loss_op.cc index fc31befb205..b146b508832 100644 --- a/paddle/fluid/operators/margin_rank_loss_op.cc +++ b/paddle/fluid/operators/margin_rank_loss_op.cc @@ -1,4 +1,4 @@ -/* Copyright (c) 2016 PaddlePaddle Authors. All Rights Reserve. +/* Copyright (c) 2016 PaddlePaddle Authors. All Rights Reserved. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/paddle/fluid/operators/margin_rank_loss_op.cu b/paddle/fluid/operators/margin_rank_loss_op.cu index ca4593a48d6..d7e77e92302 100644 --- a/paddle/fluid/operators/margin_rank_loss_op.cu +++ b/paddle/fluid/operators/margin_rank_loss_op.cu @@ -1,4 +1,4 @@ -/* Copyright (c) 2016 PaddlePaddle Authors. All Rights Reserve. +/* Copyright (c) 2016 PaddlePaddle Authors. All Rights Reserved. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/paddle/fluid/operators/margin_rank_loss_op.h b/paddle/fluid/operators/margin_rank_loss_op.h index 934a5da0f80..c1bf4451076 100644 --- a/paddle/fluid/operators/margin_rank_loss_op.h +++ b/paddle/fluid/operators/margin_rank_loss_op.h @@ -1,4 +1,4 @@ -/* Copyright (c) 2016 PaddlePaddle Authors. All Rights Reserve. +/* Copyright (c) 2016 PaddlePaddle Authors. All Rights Reserved. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/paddle/fluid/operators/math/context_project.cc b/paddle/fluid/operators/math/context_project.cc index b73d976d1b3..537d0b47868 100644 --- a/paddle/fluid/operators/math/context_project.cc +++ b/paddle/fluid/operators/math/context_project.cc @@ -1,4 +1,4 @@ -/* Copyright (c) 2016 PaddlePaddle Authors. All Rights Reserve. +/* Copyright (c) 2016 PaddlePaddle Authors. All Rights Reserved. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/paddle/fluid/operators/math/context_project.cu b/paddle/fluid/operators/math/context_project.cu index bbd36a6e8f5..16205c0e145 100644 --- a/paddle/fluid/operators/math/context_project.cu +++ b/paddle/fluid/operators/math/context_project.cu @@ -1,4 +1,4 @@ -/* Copyright (c) 2016 PaddlePaddle Authors. All Rights Reserve. +/* Copyright (c) 2016 PaddlePaddle Authors. All Rights Reserved. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/paddle/fluid/operators/math/context_project.h b/paddle/fluid/operators/math/context_project.h index 2fe593ec3af..83f6ae45fca 100644 --- a/paddle/fluid/operators/math/context_project.h +++ b/paddle/fluid/operators/math/context_project.h @@ -1,4 +1,4 @@ -/* Copyright (c) 2016 PaddlePaddle Authors. All Rights Reserve. +/* Copyright (c) 2016 PaddlePaddle Authors. All Rights Reserved. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/paddle/fluid/operators/math/cos_sim_functor.cc b/paddle/fluid/operators/math/cos_sim_functor.cc index 701a9c23c0d..cbe16999124 100644 --- a/paddle/fluid/operators/math/cos_sim_functor.cc +++ b/paddle/fluid/operators/math/cos_sim_functor.cc @@ -1,4 +1,4 @@ -/* Copyright (c) 2016 PaddlePaddle Authors. All Rights Reserve. +/* Copyright (c) 2016 PaddlePaddle Authors. All Rights Reserved. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/paddle/fluid/operators/math/cos_sim_functor.cu b/paddle/fluid/operators/math/cos_sim_functor.cu index 0323680870a..55c1e726335 100644 --- a/paddle/fluid/operators/math/cos_sim_functor.cu +++ b/paddle/fluid/operators/math/cos_sim_functor.cu @@ -1,4 +1,4 @@ -/* Copyright (c) 2016 PaddlePaddle Authors. All Rights Reserve. +/* Copyright (c) 2016 PaddlePaddle Authors. All Rights Reserved. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/paddle/fluid/operators/math/cos_sim_functor.h b/paddle/fluid/operators/math/cos_sim_functor.h index 445d94f975f..30ea5e60e87 100644 --- a/paddle/fluid/operators/math/cos_sim_functor.h +++ b/paddle/fluid/operators/math/cos_sim_functor.h @@ -1,4 +1,4 @@ -/* Copyright (c) 2016 PaddlePaddle Authors. All Rights Reserve. +/* Copyright (c) 2016 PaddlePaddle Authors. All Rights Reserved. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/paddle/fluid/operators/math/cross_entropy.cc b/paddle/fluid/operators/math/cross_entropy.cc index 76abd03ff8b..fc0fca5ad33 100644 --- a/paddle/fluid/operators/math/cross_entropy.cc +++ b/paddle/fluid/operators/math/cross_entropy.cc @@ -1,4 +1,4 @@ -/* Copyright (c) 2016 PaddlePaddle Authors. All Rights Reserve. +/* Copyright (c) 2016 PaddlePaddle Authors. All Rights Reserved. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/paddle/fluid/operators/math/cross_entropy.cu b/paddle/fluid/operators/math/cross_entropy.cu index 39222c484c2..f4935c2813c 100644 --- a/paddle/fluid/operators/math/cross_entropy.cu +++ b/paddle/fluid/operators/math/cross_entropy.cu @@ -1,4 +1,4 @@ -/* Copyright (c) 2016 PaddlePaddle Authors. All Rights Reserve. +/* Copyright (c) 2016 PaddlePaddle Authors. All Rights Reserved. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/paddle/fluid/operators/math/cross_entropy.h b/paddle/fluid/operators/math/cross_entropy.h index 2fe216a8053..adc5b3fe47c 100644 --- a/paddle/fluid/operators/math/cross_entropy.h +++ b/paddle/fluid/operators/math/cross_entropy.h @@ -1,4 +1,4 @@ -/* Copyright (c) 2016 PaddlePaddle Authors. All Rights Reserve. +/* Copyright (c) 2016 PaddlePaddle Authors. All Rights Reserved. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/paddle/fluid/operators/math/depthwise_conv.cu b/paddle/fluid/operators/math/depthwise_conv.cu index 7b75e593071..a5e6e4031bb 100644 --- a/paddle/fluid/operators/math/depthwise_conv.cu +++ b/paddle/fluid/operators/math/depthwise_conv.cu @@ -1,4 +1,4 @@ -/* Copyright (c) 2016 paddlepaddle Authors. All Rights Reserve. +/* Copyright (c) 2016 paddlepaddle Authors. All Rights Reserved. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/paddle/fluid/operators/math/depthwise_conv.h b/paddle/fluid/operators/math/depthwise_conv.h index c3081e7a0de..081bda891d0 100644 --- a/paddle/fluid/operators/math/depthwise_conv.h +++ b/paddle/fluid/operators/math/depthwise_conv.h @@ -1,4 +1,4 @@ -/* Copyright (c) 2016 PaddlePaddle Authors. All Rights Reserve. +/* Copyright (c) 2016 PaddlePaddle Authors. All Rights Reserved. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/paddle/fluid/operators/math/detail/activation_functions.h b/paddle/fluid/operators/math/detail/activation_functions.h index 3af7ba790c4..d205ebf2108 100644 --- a/paddle/fluid/operators/math/detail/activation_functions.h +++ b/paddle/fluid/operators/math/detail/activation_functions.h @@ -1,4 +1,4 @@ -/* Copyright (c) 2016 PaddlePaddle Authors. All Rights Reserve. +/* Copyright (c) 2016 PaddlePaddle Authors. All Rights Reserved. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/paddle/fluid/operators/math/detail/avx_functions.cc b/paddle/fluid/operators/math/detail/avx_functions.cc index 838cd30e3d5..b95109d3f73 100644 --- a/paddle/fluid/operators/math/detail/avx_functions.cc +++ b/paddle/fluid/operators/math/detail/avx_functions.cc @@ -1,4 +1,4 @@ -/* Copyright (c) 2016 PaddlePaddle Authors. All Rights Reserve. +/* Copyright (c) 2016 PaddlePaddle Authors. All Rights Reserved. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/paddle/fluid/operators/math/detail/gru_cpu_kernel.h b/paddle/fluid/operators/math/detail/gru_cpu_kernel.h index 75c5c8eb29a..1e5ff8ef46d 100644 --- a/paddle/fluid/operators/math/detail/gru_cpu_kernel.h +++ b/paddle/fluid/operators/math/detail/gru_cpu_kernel.h @@ -1,4 +1,4 @@ -/* Copyright (c) 2016 PaddlePaddle Authors. All Rights Reserve. +/* Copyright (c) 2016 PaddlePaddle Authors. All Rights Reserved. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/paddle/fluid/operators/math/detail/gru_gpu_kernel.h b/paddle/fluid/operators/math/detail/gru_gpu_kernel.h index fbf69d4a858..65765256278 100644 --- a/paddle/fluid/operators/math/detail/gru_gpu_kernel.h +++ b/paddle/fluid/operators/math/detail/gru_gpu_kernel.h @@ -1,4 +1,4 @@ -/* Copyright (c) 2016 PaddlePaddle Authors. All Rights Reserve. +/* Copyright (c) 2016 PaddlePaddle Authors. All Rights Reserved. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/paddle/fluid/operators/math/detail/gru_kernel.h b/paddle/fluid/operators/math/detail/gru_kernel.h index 705787e2ff7..991f2e758c2 100644 --- a/paddle/fluid/operators/math/detail/gru_kernel.h +++ b/paddle/fluid/operators/math/detail/gru_kernel.h @@ -1,4 +1,4 @@ -/* Copyright (c) 2016 PaddlePaddle Authors. All Rights Reserve. +/* Copyright (c) 2016 PaddlePaddle Authors. All Rights Reserved. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/paddle/fluid/operators/math/detail/lstm_cpu_kernel.h b/paddle/fluid/operators/math/detail/lstm_cpu_kernel.h index bf26509ba17..6ad77830fd7 100644 --- a/paddle/fluid/operators/math/detail/lstm_cpu_kernel.h +++ b/paddle/fluid/operators/math/detail/lstm_cpu_kernel.h @@ -1,4 +1,4 @@ -/* Copyright (c) 2016 PaddlePaddle Authors. All Rights Reserve. +/* Copyright (c) 2016 PaddlePaddle Authors. All Rights Reserved. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/paddle/fluid/operators/math/detail/lstm_gpu_kernel.h b/paddle/fluid/operators/math/detail/lstm_gpu_kernel.h index 7865d0c0ba1..ee7b16da418 100644 --- a/paddle/fluid/operators/math/detail/lstm_gpu_kernel.h +++ b/paddle/fluid/operators/math/detail/lstm_gpu_kernel.h @@ -1,4 +1,4 @@ -/* Copyright (c) 2016 PaddlePaddle Authors. All Rights Reserve. +/* Copyright (c) 2016 PaddlePaddle Authors. All Rights Reserved. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/paddle/fluid/operators/math/detail/lstm_kernel.h b/paddle/fluid/operators/math/detail/lstm_kernel.h index 0679cc62ba9..9080634f2b3 100644 --- a/paddle/fluid/operators/math/detail/lstm_kernel.h +++ b/paddle/fluid/operators/math/detail/lstm_kernel.h @@ -1,4 +1,4 @@ -/* Copyright (c) 2016 PaddlePaddle Authors. All Rights Reserve. +/* Copyright (c) 2016 PaddlePaddle Authors. All Rights Reserved. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/paddle/fluid/operators/math/detection_util.h b/paddle/fluid/operators/math/detection_util.h index 13e5d406c11..c31764cfaf5 100644 --- a/paddle/fluid/operators/math/detection_util.h +++ b/paddle/fluid/operators/math/detection_util.h @@ -1,4 +1,4 @@ -/* Copyright (c) 2016 PaddlePaddle Authors. All Rights Reserve. +/* Copyright (c) 2016 PaddlePaddle Authors. All Rights Reserved. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/paddle/fluid/operators/math/gru_compute.cc b/paddle/fluid/operators/math/gru_compute.cc index 10031804167..3f044b77513 100644 --- a/paddle/fluid/operators/math/gru_compute.cc +++ b/paddle/fluid/operators/math/gru_compute.cc @@ -1,4 +1,4 @@ -/* Copyright (c) 2016 PaddlePaddle Authors. All Rights Reserve. +/* Copyright (c) 2016 PaddlePaddle Authors. All Rights Reserved. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at diff --git a/paddle/fluid/operators/math/gru_compute.cu b/paddle/fluid/operators/math/gru_compute.cu index 0d5d5d7a743..27caf3383dd 100644 --- a/paddle/fluid/operators/math/gru_compute.cu +++ b/paddle/fluid/operators/math/gru_compute.cu @@ -1,4 +1,4 @@ -/* Copyright (c) 2016 PaddlePaddle Authors. All Rights Reserve. +/* Copyright (c) 2016 PaddlePaddle Authors. All Rights Reserved. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at diff --git a/paddle/fluid/operators/math/gru_compute.h b/paddle/fluid/operators/math/gru_compute.h index 93e19cf5578..c5816b16cd9 100644 --- a/paddle/fluid/operators/math/gru_compute.h +++ b/paddle/fluid/operators/math/gru_compute.h @@ -1,4 +1,4 @@ -/* Copyright (c) 2016 PaddlePaddle Authors. All Rights Reserve. +/* Copyright (c) 2016 PaddlePaddle Authors. All Rights Reserved. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at diff --git a/paddle/fluid/operators/math/im2col.cc b/paddle/fluid/operators/math/im2col.cc index c298b00bb4c..123e10586f6 100644 --- a/paddle/fluid/operators/math/im2col.cc +++ b/paddle/fluid/operators/math/im2col.cc @@ -1,4 +1,4 @@ -/* Copyright (c) 2016 PaddlePaddle Authors. All Rights Reserve. +/* Copyright (c) 2016 PaddlePaddle Authors. All Rights Reserved. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/paddle/fluid/operators/math/im2col.cu b/paddle/fluid/operators/math/im2col.cu index c26343aacf5..f41c78140fb 100644 --- a/paddle/fluid/operators/math/im2col.cu +++ b/paddle/fluid/operators/math/im2col.cu @@ -1,4 +1,4 @@ -/* Copyright (c) 2016 PaddlePaddle Authors. All Rights Reserve. +/* Copyright (c) 2016 PaddlePaddle Authors. All Rights Reserved. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/paddle/fluid/operators/math/im2col.h b/paddle/fluid/operators/math/im2col.h index 525c0f5dda1..451ec9d5349 100644 --- a/paddle/fluid/operators/math/im2col.h +++ b/paddle/fluid/operators/math/im2col.h @@ -1,4 +1,4 @@ -/* Copyright (c) 2016 PaddlePaddle Authors. All Rights Reserve. +/* Copyright (c) 2016 PaddlePaddle Authors. All Rights Reserved. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/paddle/fluid/operators/math/im2col_test.cc b/paddle/fluid/operators/math/im2col_test.cc index 59d6a84b892..30519253154 100644 --- a/paddle/fluid/operators/math/im2col_test.cc +++ b/paddle/fluid/operators/math/im2col_test.cc @@ -1,4 +1,4 @@ -/* Copyright (c) 2016 PaddlePaddle Authors. All Rights Reserve. +/* Copyright (c) 2016 PaddlePaddle Authors. All Rights Reserved. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/paddle/fluid/operators/math/lstm_compute.cc b/paddle/fluid/operators/math/lstm_compute.cc index 09eb89ec58d..b6882b4fd8e 100644 --- a/paddle/fluid/operators/math/lstm_compute.cc +++ b/paddle/fluid/operators/math/lstm_compute.cc @@ -1,4 +1,4 @@ -/* Copyright (c) 2016 PaddlePaddle Authors. All Rights Reserve. +/* Copyright (c) 2016 PaddlePaddle Authors. All Rights Reserved. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/paddle/fluid/operators/math/lstm_compute.cu b/paddle/fluid/operators/math/lstm_compute.cu index adedee28bd0..1233000083d 100644 --- a/paddle/fluid/operators/math/lstm_compute.cu +++ b/paddle/fluid/operators/math/lstm_compute.cu @@ -1,4 +1,4 @@ -/* Copyright (c) 2016 PaddlePaddle Authors. All Rights Reserve. +/* Copyright (c) 2016 PaddlePaddle Authors. All Rights Reserved. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/paddle/fluid/operators/math/lstm_compute.h b/paddle/fluid/operators/math/lstm_compute.h index 8610e96cf1a..ca2f78e6f31 100644 --- a/paddle/fluid/operators/math/lstm_compute.h +++ b/paddle/fluid/operators/math/lstm_compute.h @@ -1,4 +1,4 @@ -/* Copyright (c) 2016 PaddlePaddle Authors. All Rights Reserve. +/* Copyright (c) 2016 PaddlePaddle Authors. All Rights Reserved. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/paddle/fluid/operators/math/math_function.cc b/paddle/fluid/operators/math/math_function.cc index 2636dbddde6..41eab3ade20 100644 --- a/paddle/fluid/operators/math/math_function.cc +++ b/paddle/fluid/operators/math/math_function.cc @@ -1,4 +1,4 @@ -/* Copyright (c) 2016 PaddlePaddle Authors. All Rights Reserve. +/* Copyright (c) 2016 PaddlePaddle Authors. All Rights Reserved. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/paddle/fluid/operators/math/math_function.cu b/paddle/fluid/operators/math/math_function.cu index 5764da71c84..f8d0349ac5c 100644 --- a/paddle/fluid/operators/math/math_function.cu +++ b/paddle/fluid/operators/math/math_function.cu @@ -1,4 +1,4 @@ -/* Copyright (c) 2016 PaddlePaddle Authors. All Rights Reserve. +/* Copyright (c) 2016 PaddlePaddle Authors. All Rights Reserved. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/paddle/fluid/operators/math/math_function.h b/paddle/fluid/operators/math/math_function.h index 84916af1f8e..47e2386d057 100644 --- a/paddle/fluid/operators/math/math_function.h +++ b/paddle/fluid/operators/math/math_function.h @@ -1,4 +1,4 @@ -/* Copyright (c) 2016 PaddlePaddle Authors. All Rights Reserve. +/* Copyright (c) 2016 PaddlePaddle Authors. All Rights Reserved. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/paddle/fluid/operators/math/math_function_impl.h b/paddle/fluid/operators/math/math_function_impl.h index a55ed6c58ba..f9d4e453242 100644 --- a/paddle/fluid/operators/math/math_function_impl.h +++ b/paddle/fluid/operators/math/math_function_impl.h @@ -1,4 +1,4 @@ -/* Copyright (c) 2016 PaddlePaddle Authors. All Rights Reserve. +/* Copyright (c) 2016 PaddlePaddle Authors. All Rights Reserved. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/paddle/fluid/operators/math/math_function_test.cc b/paddle/fluid/operators/math/math_function_test.cc index 6cd8e8b35ab..25a9d0111ee 100644 --- a/paddle/fluid/operators/math/math_function_test.cc +++ b/paddle/fluid/operators/math/math_function_test.cc @@ -1,4 +1,4 @@ -// Copyright (c) 2018 PaddlePaddle Authors. All Rights Reserve. +// Copyright (c) 2018 PaddlePaddle Authors. All Rights Reserved. // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. diff --git a/paddle/fluid/operators/math/math_function_test.cu b/paddle/fluid/operators/math/math_function_test.cu index 2ef53a82099..f333c6c98ed 100644 --- a/paddle/fluid/operators/math/math_function_test.cu +++ b/paddle/fluid/operators/math/math_function_test.cu @@ -1,4 +1,4 @@ -// Copyright (c) 2018 PaddlePaddle Authors. All Rights Reserve. +// Copyright (c) 2018 PaddlePaddle Authors. All Rights Reserved. // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. diff --git a/paddle/fluid/operators/math/matmul.h b/paddle/fluid/operators/math/matmul.h index 50f79979d99..6e2d35cd0f3 100644 --- a/paddle/fluid/operators/math/matmul.h +++ b/paddle/fluid/operators/math/matmul.h @@ -1,4 +1,4 @@ -/* Copyright (c) 2017 PaddlePaddle Authors. All Rights Reserve. +/* Copyright (c) 2017 PaddlePaddle Authors. All Rights Reserved. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/paddle/fluid/operators/math/maxouting.cc b/paddle/fluid/operators/math/maxouting.cc index 746328cd45a..730f71e96b6 100644 --- a/paddle/fluid/operators/math/maxouting.cc +++ b/paddle/fluid/operators/math/maxouting.cc @@ -1,4 +1,4 @@ -/* Copyright (c) 2016 PaddlePaddle Authors. All Rights Reserve. +/* Copyright (c) 2016 PaddlePaddle Authors. All Rights Reserved. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/paddle/fluid/operators/math/maxouting.cu b/paddle/fluid/operators/math/maxouting.cu index 68e5dfc3c55..1e1a6a221c7 100644 --- a/paddle/fluid/operators/math/maxouting.cu +++ b/paddle/fluid/operators/math/maxouting.cu @@ -1,4 +1,4 @@ -/* Copyright (c) 2016 paddlepaddle Authors. All Rights Reserve. +/* Copyright (c) 2016 paddlepaddle Authors. All Rights Reserved. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/paddle/fluid/operators/math/maxouting.h b/paddle/fluid/operators/math/maxouting.h index 0e81790f0ab..4166fb54946 100644 --- a/paddle/fluid/operators/math/maxouting.h +++ b/paddle/fluid/operators/math/maxouting.h @@ -1,4 +1,4 @@ -/* Copyright (c) 2016 PaddlePaddle Authors. All Rights Reserve. +/* Copyright (c) 2016 PaddlePaddle Authors. All Rights Reserved. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/paddle/fluid/operators/math/pooling.cc b/paddle/fluid/operators/math/pooling.cc index 9adb142f14e..97a2e81c84c 100644 --- a/paddle/fluid/operators/math/pooling.cc +++ b/paddle/fluid/operators/math/pooling.cc @@ -1,4 +1,4 @@ -/* Copyright (c) 2016 PaddlePaddle Authors. All Rights Reserve. +/* Copyright (c) 2016 PaddlePaddle Authors. All Rights Reserved. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/paddle/fluid/operators/math/pooling.cu b/paddle/fluid/operators/math/pooling.cu index c65632de906..274263c69c5 100644 --- a/paddle/fluid/operators/math/pooling.cu +++ b/paddle/fluid/operators/math/pooling.cu @@ -1,4 +1,4 @@ -/* Copyright (c) 2016 paddlepaddle Authors. All Rights Reserve. +/* Copyright (c) 2016 paddlepaddle Authors. All Rights Reserved. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/paddle/fluid/operators/math/pooling.h b/paddle/fluid/operators/math/pooling.h index 1195038f6a0..74cb42f0d02 100644 --- a/paddle/fluid/operators/math/pooling.h +++ b/paddle/fluid/operators/math/pooling.h @@ -1,4 +1,4 @@ -/* Copyright (c) 2016 PaddlePaddle Authors. All Rights Reserve. +/* Copyright (c) 2016 PaddlePaddle Authors. All Rights Reserved. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/paddle/fluid/operators/math/sampler.cc b/paddle/fluid/operators/math/sampler.cc index 4f1cbfe31ac..3ec6538d7fb 100644 --- a/paddle/fluid/operators/math/sampler.cc +++ b/paddle/fluid/operators/math/sampler.cc @@ -1,4 +1,4 @@ -/* Copyright (c) 2016 PaddlePaddle Authors. All Rights Reserve. +/* Copyright (c) 2016 PaddlePaddle Authors. All Rights Reserved. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/paddle/fluid/operators/math/sampler.h b/paddle/fluid/operators/math/sampler.h index 8f82089e7bd..9d6a6c28c43 100644 --- a/paddle/fluid/operators/math/sampler.h +++ b/paddle/fluid/operators/math/sampler.h @@ -1,4 +1,4 @@ -/* Copyright (c) 2016 PaddlePaddle Authors. All Rights Reserve. +/* Copyright (c) 2016 PaddlePaddle Authors. All Rights Reserved. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/paddle/fluid/operators/math/selected_rows_functor.cc b/paddle/fluid/operators/math/selected_rows_functor.cc index 01aa37ab35c..5da3d15277c 100644 --- a/paddle/fluid/operators/math/selected_rows_functor.cc +++ b/paddle/fluid/operators/math/selected_rows_functor.cc @@ -1,4 +1,4 @@ -/* Copyright (c) 2016 PaddlePaddle Authors. All Rights Reserve. +/* Copyright (c) 2016 PaddlePaddle Authors. All Rights Reserved. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/paddle/fluid/operators/math/selected_rows_functor.cu b/paddle/fluid/operators/math/selected_rows_functor.cu index ee3b5d52058..5d78fd9d213 100644 --- a/paddle/fluid/operators/math/selected_rows_functor.cu +++ b/paddle/fluid/operators/math/selected_rows_functor.cu @@ -1,4 +1,4 @@ -/* Copyright (c) 2016 PaddlePaddle Authors. All Rights Reserve. +/* Copyright (c) 2016 PaddlePaddle Authors. All Rights Reserved. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/paddle/fluid/operators/math/selected_rows_functor.h b/paddle/fluid/operators/math/selected_rows_functor.h index 510a9ed8be6..18304f83f87 100644 --- a/paddle/fluid/operators/math/selected_rows_functor.h +++ b/paddle/fluid/operators/math/selected_rows_functor.h @@ -1,4 +1,4 @@ -/* Copyright (c) 2016 PaddlePaddle Authors. All Rights Reserve. +/* Copyright (c) 2016 PaddlePaddle Authors. All Rights Reserved. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/paddle/fluid/operators/math/selected_rows_functor_test.cc b/paddle/fluid/operators/math/selected_rows_functor_test.cc index db6b41cd520..679b6568ad0 100644 --- a/paddle/fluid/operators/math/selected_rows_functor_test.cc +++ b/paddle/fluid/operators/math/selected_rows_functor_test.cc @@ -1,4 +1,4 @@ -/* Copyright (c) 2016 PaddlePaddle Authors. All Rights Reserve. +/* Copyright (c) 2016 PaddlePaddle Authors. All Rights Reserved. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/paddle/fluid/operators/math/selected_rows_functor_test.cu b/paddle/fluid/operators/math/selected_rows_functor_test.cu index b3c4bc9244f..cefe239bd28 100644 --- a/paddle/fluid/operators/math/selected_rows_functor_test.cu +++ b/paddle/fluid/operators/math/selected_rows_functor_test.cu @@ -1,4 +1,4 @@ -/* Copyright (c) 2016 PaddlePaddle Authors. All Rights Reserve. +/* Copyright (c) 2016 PaddlePaddle Authors. All Rights Reserved. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/paddle/fluid/operators/math/sequence2batch.cc b/paddle/fluid/operators/math/sequence2batch.cc index 0485070fd9b..72bf2ab1701 100644 --- a/paddle/fluid/operators/math/sequence2batch.cc +++ b/paddle/fluid/operators/math/sequence2batch.cc @@ -1,4 +1,4 @@ -/* Copyright (c) 2016 PaddlePaddle Authors. All Rights Reserve. +/* Copyright (c) 2016 PaddlePaddle Authors. All Rights Reserved. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/paddle/fluid/operators/math/sequence2batch.cu b/paddle/fluid/operators/math/sequence2batch.cu index 450be80ea2f..3185f10d418 100644 --- a/paddle/fluid/operators/math/sequence2batch.cu +++ b/paddle/fluid/operators/math/sequence2batch.cu @@ -1,4 +1,4 @@ -/* Copyright (c) 2016 PaddlePaddle Authors. All Rights Reserve. +/* Copyright (c) 2016 PaddlePaddle Authors. All Rights Reserved. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/paddle/fluid/operators/math/sequence2batch.h b/paddle/fluid/operators/math/sequence2batch.h index 00bd25ab613..e78aafd37d1 100644 --- a/paddle/fluid/operators/math/sequence2batch.h +++ b/paddle/fluid/operators/math/sequence2batch.h @@ -1,4 +1,4 @@ -/* Copyright (c) 2016 PaddlePaddle Authors. All Rights Reserve. +/* Copyright (c) 2016 PaddlePaddle Authors. All Rights Reserved. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/paddle/fluid/operators/math/sequence_padding.cc b/paddle/fluid/operators/math/sequence_padding.cc index ad8cd825676..38bd3b99758 100644 --- a/paddle/fluid/operators/math/sequence_padding.cc +++ b/paddle/fluid/operators/math/sequence_padding.cc @@ -1,4 +1,4 @@ -/* Copyright (c) 2016 PaddlePaddle Authors. All Rights Reserve. +/* Copyright (c) 2016 PaddlePaddle Authors. All Rights Reserved. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/paddle/fluid/operators/math/sequence_padding.cu b/paddle/fluid/operators/math/sequence_padding.cu index c1a39057784..9eb52f6fd92 100644 --- a/paddle/fluid/operators/math/sequence_padding.cu +++ b/paddle/fluid/operators/math/sequence_padding.cu @@ -1,4 +1,4 @@ -/* Copyright (c) 2016 PaddlePaddle Authors. All Rights Reserve. +/* Copyright (c) 2016 PaddlePaddle Authors. All Rights Reserved. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/paddle/fluid/operators/math/sequence_padding.h b/paddle/fluid/operators/math/sequence_padding.h index 0d84f9dcb38..17f044b9d66 100644 --- a/paddle/fluid/operators/math/sequence_padding.h +++ b/paddle/fluid/operators/math/sequence_padding.h @@ -1,4 +1,4 @@ -/* Copyright (c) 2016 PaddlePaddle Authors. All Rights Reserve. +/* Copyright (c) 2016 PaddlePaddle Authors. All Rights Reserved. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/paddle/fluid/operators/math/sequence_padding_test.cc b/paddle/fluid/operators/math/sequence_padding_test.cc index 147cb37da2b..e1177fb0d77 100644 --- a/paddle/fluid/operators/math/sequence_padding_test.cc +++ b/paddle/fluid/operators/math/sequence_padding_test.cc @@ -1,4 +1,4 @@ -/* Copyright (c) 2016 PaddlePaddle Authors. All Rights Reserve. +/* Copyright (c) 2016 PaddlePaddle Authors. All Rights Reserved. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/paddle/fluid/operators/math/sequence_pooling.cc b/paddle/fluid/operators/math/sequence_pooling.cc index b3b87ec93e1..f7a6f2bdf4e 100644 --- a/paddle/fluid/operators/math/sequence_pooling.cc +++ b/paddle/fluid/operators/math/sequence_pooling.cc @@ -1,4 +1,4 @@ -/* Copyright (c) 2016 PaddlePaddle Authors. All Rights Reserve. +/* Copyright (c) 2016 PaddlePaddle Authors. All Rights Reserved. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/paddle/fluid/operators/math/sequence_pooling.cu b/paddle/fluid/operators/math/sequence_pooling.cu index c4267e992a7..d61407c0201 100644 --- a/paddle/fluid/operators/math/sequence_pooling.cu +++ b/paddle/fluid/operators/math/sequence_pooling.cu @@ -1,4 +1,4 @@ -/* Copyright (c) 2016 PaddlePaddle Authors. All Rights Reserve. +/* Copyright (c) 2016 PaddlePaddle Authors. All Rights Reserved. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/paddle/fluid/operators/math/sequence_pooling.h b/paddle/fluid/operators/math/sequence_pooling.h index 9ba9cad74b5..ecb76884f67 100644 --- a/paddle/fluid/operators/math/sequence_pooling.h +++ b/paddle/fluid/operators/math/sequence_pooling.h @@ -1,4 +1,4 @@ -/* Copyright (c) 2016 PaddlePaddle Authors. All Rights Reserve. +/* Copyright (c) 2016 PaddlePaddle Authors. All Rights Reserved. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/paddle/fluid/operators/math/sequence_scale.cc b/paddle/fluid/operators/math/sequence_scale.cc index 427689b9718..2c46d4183b5 100644 --- a/paddle/fluid/operators/math/sequence_scale.cc +++ b/paddle/fluid/operators/math/sequence_scale.cc @@ -1,4 +1,4 @@ -/* Copyright (c) 2016 PaddlePaddle Authors. All Rights Reserve. +/* Copyright (c) 2016 PaddlePaddle Authors. All Rights Reserved. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/paddle/fluid/operators/math/sequence_scale.cu b/paddle/fluid/operators/math/sequence_scale.cu index 7c081ed7f45..74085153c62 100644 --- a/paddle/fluid/operators/math/sequence_scale.cu +++ b/paddle/fluid/operators/math/sequence_scale.cu @@ -1,4 +1,4 @@ -/* Copyright (c) 2016 PaddlePaddle Authors. All Rights Reserve. +/* Copyright (c) 2016 PaddlePaddle Authors. All Rights Reserved. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/paddle/fluid/operators/math/sequence_scale.h b/paddle/fluid/operators/math/sequence_scale.h index e8e07fd3156..6cdcbe21cbf 100644 --- a/paddle/fluid/operators/math/sequence_scale.h +++ b/paddle/fluid/operators/math/sequence_scale.h @@ -1,4 +1,4 @@ -/* Copyright (c) 2016 PaddlePaddle Authors. All Rights Reserve. +/* Copyright (c) 2016 PaddlePaddle Authors. All Rights Reserved. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/paddle/fluid/operators/math/softmax.cc b/paddle/fluid/operators/math/softmax.cc index eab31ec567d..78c65af24a8 100644 --- a/paddle/fluid/operators/math/softmax.cc +++ b/paddle/fluid/operators/math/softmax.cc @@ -1,4 +1,4 @@ -/* Copyright (c) 2016 PaddlePaddle Authors. All Rights Reserve. +/* Copyright (c) 2016 PaddlePaddle Authors. All Rights Reserved. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/paddle/fluid/operators/math/softmax.cu b/paddle/fluid/operators/math/softmax.cu index 733d7eeee6d..38e93fdf15d 100644 --- a/paddle/fluid/operators/math/softmax.cu +++ b/paddle/fluid/operators/math/softmax.cu @@ -1,4 +1,4 @@ -/* Copyright (c) 2016 PaddlePaddle Authors. All Rights Reserve. +/* Copyright (c) 2016 PaddlePaddle Authors. All Rights Reserved. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/paddle/fluid/operators/math/softmax.h b/paddle/fluid/operators/math/softmax.h index b7d67d5f12d..14b2690c2a4 100644 --- a/paddle/fluid/operators/math/softmax.h +++ b/paddle/fluid/operators/math/softmax.h @@ -1,4 +1,4 @@ -/* Copyright (c) 2016 PaddlePaddle Authors. All Rights Reserve. +/* Copyright (c) 2016 PaddlePaddle Authors. All Rights Reserved. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/paddle/fluid/operators/math/softmax_impl.h b/paddle/fluid/operators/math/softmax_impl.h index f7c61cb647e..3e123f7bf55 100644 --- a/paddle/fluid/operators/math/softmax_impl.h +++ b/paddle/fluid/operators/math/softmax_impl.h @@ -1,4 +1,4 @@ -/* Copyright (c) 2016 PaddlePaddle Authors. All Rights Reserve. +/* Copyright (c) 2016 PaddlePaddle Authors. All Rights Reserved. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/paddle/fluid/operators/math/unpooling.cc b/paddle/fluid/operators/math/unpooling.cc index e02bc02e002..13f0845bb85 100644 --- a/paddle/fluid/operators/math/unpooling.cc +++ b/paddle/fluid/operators/math/unpooling.cc @@ -1,4 +1,4 @@ -/* Copyright (c) 2016 PaddlePaddle Authors. All Rights Reserve. +/* Copyright (c) 2016 PaddlePaddle Authors. All Rights Reserved. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/paddle/fluid/operators/math/unpooling.cu b/paddle/fluid/operators/math/unpooling.cu index 2e74270fdf1..367f343d517 100644 --- a/paddle/fluid/operators/math/unpooling.cu +++ b/paddle/fluid/operators/math/unpooling.cu @@ -1,4 +1,4 @@ -/* Copyright (c) 2016 paddlepaddle Authors. All Rights Reserve. +/* Copyright (c) 2016 paddlepaddle Authors. All Rights Reserved. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/paddle/fluid/operators/math/unpooling.h b/paddle/fluid/operators/math/unpooling.h index f245ba7ba87..74ca39d114e 100644 --- a/paddle/fluid/operators/math/unpooling.h +++ b/paddle/fluid/operators/math/unpooling.h @@ -1,4 +1,4 @@ -/* Copyright (c) 2016 PaddlePaddle Authors. All Rights Reserve. +/* Copyright (c) 2016 PaddlePaddle Authors. All Rights Reserved. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/paddle/fluid/operators/math/vol2col.cc b/paddle/fluid/operators/math/vol2col.cc index ded0bbc7447..09e9f85cca3 100644 --- a/paddle/fluid/operators/math/vol2col.cc +++ b/paddle/fluid/operators/math/vol2col.cc @@ -1,4 +1,4 @@ -/* Copyright (c) 2016 PaddlePaddle Authors. All Rights Reserve. +/* Copyright (c) 2016 PaddlePaddle Authors. All Rights Reserved. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/paddle/fluid/operators/math/vol2col.cu b/paddle/fluid/operators/math/vol2col.cu index 35ef24c7f5f..619730d394d 100644 --- a/paddle/fluid/operators/math/vol2col.cu +++ b/paddle/fluid/operators/math/vol2col.cu @@ -1,4 +1,4 @@ -/* Copyright (c) 2016 PaddlePaddle Authors. All Rights Reserve. +/* Copyright (c) 2016 PaddlePaddle Authors. All Rights Reserved. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/paddle/fluid/operators/math/vol2col.h b/paddle/fluid/operators/math/vol2col.h index 3ce38b2d11f..dbc2ed7a693 100644 --- a/paddle/fluid/operators/math/vol2col.h +++ b/paddle/fluid/operators/math/vol2col.h @@ -1,4 +1,4 @@ -/* Copyright (c) 2016 PaddlePaddle Authors. All Rights Reserve. +/* Copyright (c) 2016 PaddlePaddle Authors. All Rights Reserved. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/paddle/fluid/operators/math/vol2col_test.cc b/paddle/fluid/operators/math/vol2col_test.cc index af0a900f80e..751d3ef19a2 100644 --- a/paddle/fluid/operators/math/vol2col_test.cc +++ b/paddle/fluid/operators/math/vol2col_test.cc @@ -1,4 +1,4 @@ -/* Copyright (c) 2016 PaddlePaddle Authors. All Rights Reserve. +/* Copyright (c) 2016 PaddlePaddle Authors. All Rights Reserved. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/paddle/fluid/operators/matmul_op.cc b/paddle/fluid/operators/matmul_op.cc index 267b0057bf4..85855928521 100644 --- a/paddle/fluid/operators/matmul_op.cc +++ b/paddle/fluid/operators/matmul_op.cc @@ -1,4 +1,4 @@ -/* Copyright (c) 2017 PaddlePaddle Authors. All Rights Reserve. +/* Copyright (c) 2017 PaddlePaddle Authors. All Rights Reserved. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/paddle/fluid/operators/matmul_op.cu.cc b/paddle/fluid/operators/matmul_op.cu.cc index 988787f0fe4..e021bbe6453 100644 --- a/paddle/fluid/operators/matmul_op.cu.cc +++ b/paddle/fluid/operators/matmul_op.cu.cc @@ -1,4 +1,4 @@ -/* Copyright (c) 2016 PaddlePaddle Authors. All Rights Reserve. +/* Copyright (c) 2016 PaddlePaddle Authors. All Rights Reserved. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/paddle/fluid/operators/matmul_op.h b/paddle/fluid/operators/matmul_op.h index f4cae3c91cb..1cd8fe55dcb 100644 --- a/paddle/fluid/operators/matmul_op.h +++ b/paddle/fluid/operators/matmul_op.h @@ -1,4 +1,4 @@ -/* Copyright (c) 2016 PaddlePaddle Authors. All Rights Reserve. +/* Copyright (c) 2016 PaddlePaddle Authors. All Rights Reserved. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/paddle/fluid/operators/max_sequence_len_op.cc b/paddle/fluid/operators/max_sequence_len_op.cc index cef0dc307db..4cd7c89b48a 100644 --- a/paddle/fluid/operators/max_sequence_len_op.cc +++ b/paddle/fluid/operators/max_sequence_len_op.cc @@ -1,4 +1,4 @@ -/* Copyright (c) 2016 PaddlePaddle Authors. All Rights Reserve. +/* Copyright (c) 2016 PaddlePaddle Authors. All Rights Reserved. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/paddle/fluid/operators/maxout_op.cc b/paddle/fluid/operators/maxout_op.cc index 8ce12cd4c4d..efaae7d5f2d 100644 --- a/paddle/fluid/operators/maxout_op.cc +++ b/paddle/fluid/operators/maxout_op.cc @@ -1,4 +1,4 @@ -/* Copyright (c) 2016 PaddlePaddle Authors. All Rights Reserve. +/* Copyright (c) 2016 PaddlePaddle Authors. All Rights Reserved. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/paddle/fluid/operators/maxout_op.cu.cc b/paddle/fluid/operators/maxout_op.cu.cc index f3f45c90cde..be1e81bb869 100644 --- a/paddle/fluid/operators/maxout_op.cu.cc +++ b/paddle/fluid/operators/maxout_op.cu.cc @@ -1,4 +1,4 @@ -/* Copyright (c) 2016 PaddlePaddle Authors. All Rights Reserve. +/* Copyright (c) 2016 PaddlePaddle Authors. All Rights Reserved. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/paddle/fluid/operators/maxout_op.h b/paddle/fluid/operators/maxout_op.h index e5de3e3760b..5b9e003cb09 100644 --- a/paddle/fluid/operators/maxout_op.h +++ b/paddle/fluid/operators/maxout_op.h @@ -1,4 +1,4 @@ -/* Copyright (c) 2016 PaddlePaddle Authors. All Rights Reserve. +/* Copyright (c) 2016 PaddlePaddle Authors. All Rights Reserved. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/paddle/fluid/operators/mean_op.cc b/paddle/fluid/operators/mean_op.cc index 1043820345a..a134796bfca 100644 --- a/paddle/fluid/operators/mean_op.cc +++ b/paddle/fluid/operators/mean_op.cc @@ -1,4 +1,4 @@ -/* Copyright (c) 2016 PaddlePaddle Authors. All Rights Reserve. +/* Copyright (c) 2016 PaddlePaddle Authors. All Rights Reserved. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/paddle/fluid/operators/mean_op.cu b/paddle/fluid/operators/mean_op.cu index ccf2248760a..91e0ab28efc 100644 --- a/paddle/fluid/operators/mean_op.cu +++ b/paddle/fluid/operators/mean_op.cu @@ -1,4 +1,4 @@ -/* Copyright (c) 2016 PaddlePaddle Authors. All Rights Reserve. +/* Copyright (c) 2016 PaddlePaddle Authors. All Rights Reserved. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/paddle/fluid/operators/mean_op.h b/paddle/fluid/operators/mean_op.h index ae162287da6..362e9f9ae8b 100644 --- a/paddle/fluid/operators/mean_op.h +++ b/paddle/fluid/operators/mean_op.h @@ -1,4 +1,4 @@ -/* Copyright (c) 2016 PaddlePaddle Authors. All Rights Reserve. +/* Copyright (c) 2016 PaddlePaddle Authors. All Rights Reserved. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/paddle/fluid/operators/merge_lod_tensor_op.cc b/paddle/fluid/operators/merge_lod_tensor_op.cc index 88e67b6b86a..42ebc8e471b 100644 --- a/paddle/fluid/operators/merge_lod_tensor_op.cc +++ b/paddle/fluid/operators/merge_lod_tensor_op.cc @@ -1,4 +1,4 @@ -/* Copyright (c) 2016 PaddlePaddle Authors. All Rights Reserve. +/* Copyright (c) 2016 PaddlePaddle Authors. All Rights Reserved. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/paddle/fluid/operators/mine_hard_examples_op.cc b/paddle/fluid/operators/mine_hard_examples_op.cc index 540cf867418..2128979faee 100644 --- a/paddle/fluid/operators/mine_hard_examples_op.cc +++ b/paddle/fluid/operators/mine_hard_examples_op.cc @@ -1,4 +1,4 @@ -/* Copyright (c) 2018 PaddlePaddle Authors. All Rights Reserve. +/* Copyright (c) 2018 PaddlePaddle Authors. All Rights Reserved. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/paddle/fluid/operators/minus_op.cc b/paddle/fluid/operators/minus_op.cc index 8a35d668ccf..7de9d94979f 100644 --- a/paddle/fluid/operators/minus_op.cc +++ b/paddle/fluid/operators/minus_op.cc @@ -1,4 +1,4 @@ -/* Copyright (c) 2016 PaddlePaddle Authors. All Rights Reserve. +/* Copyright (c) 2016 PaddlePaddle Authors. All Rights Reserved. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/paddle/fluid/operators/minus_op.cu b/paddle/fluid/operators/minus_op.cu index ce0b1fdc041..956d935da9b 100644 --- a/paddle/fluid/operators/minus_op.cu +++ b/paddle/fluid/operators/minus_op.cu @@ -1,4 +1,4 @@ -/* Copyright (c) 2016 PaddlePaddle Authors. All Rights Reserve. +/* Copyright (c) 2016 PaddlePaddle Authors. All Rights Reserved. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/paddle/fluid/operators/minus_op.h b/paddle/fluid/operators/minus_op.h index dc94cbbeca2..7791b1456a8 100644 --- a/paddle/fluid/operators/minus_op.h +++ b/paddle/fluid/operators/minus_op.h @@ -1,4 +1,4 @@ -/* Copyright (c) 2016 PaddlePaddle Authors. All Rights Reserve. +/* Copyright (c) 2016 PaddlePaddle Authors. All Rights Reserved. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/paddle/fluid/operators/modified_huber_loss_op.cc b/paddle/fluid/operators/modified_huber_loss_op.cc index f2d16531658..a8fbd48c4da 100644 --- a/paddle/fluid/operators/modified_huber_loss_op.cc +++ b/paddle/fluid/operators/modified_huber_loss_op.cc @@ -1,4 +1,4 @@ -/* Copyright (c) 2016 PaddlePaddle Authors. All Rights Reserve. +/* Copyright (c) 2016 PaddlePaddle Authors. All Rights Reserved. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/paddle/fluid/operators/modified_huber_loss_op.cu b/paddle/fluid/operators/modified_huber_loss_op.cu index 69ac2b1ed54..71bfacb9283 100644 --- a/paddle/fluid/operators/modified_huber_loss_op.cu +++ b/paddle/fluid/operators/modified_huber_loss_op.cu @@ -1,4 +1,4 @@ -/* Copyright (c) 2016 PaddlePaddle Authors. All Rights Reserve. +/* Copyright (c) 2016 PaddlePaddle Authors. All Rights Reserved. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/paddle/fluid/operators/modified_huber_loss_op.h b/paddle/fluid/operators/modified_huber_loss_op.h index a470a45e13b..d2b6d0c4bab 100644 --- a/paddle/fluid/operators/modified_huber_loss_op.h +++ b/paddle/fluid/operators/modified_huber_loss_op.h @@ -1,4 +1,4 @@ -/* Copyright (c) 2016 PaddlePaddle Authors. All Rights Reserve. +/* Copyright (c) 2016 PaddlePaddle Authors. All Rights Reserved. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/paddle/fluid/operators/momentum_op.cc b/paddle/fluid/operators/momentum_op.cc index a3950ac99da..6c70970e15f 100644 --- a/paddle/fluid/operators/momentum_op.cc +++ b/paddle/fluid/operators/momentum_op.cc @@ -1,4 +1,4 @@ -/* Copyright (c) 2016 PaddlePaddle Authors. All Rights Reserve. +/* Copyright (c) 2016 PaddlePaddle Authors. All Rights Reserved. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/paddle/fluid/operators/momentum_op.cu b/paddle/fluid/operators/momentum_op.cu index 28a14cd4b21..da4a6af298f 100644 --- a/paddle/fluid/operators/momentum_op.cu +++ b/paddle/fluid/operators/momentum_op.cu @@ -1,4 +1,4 @@ -/* Copyright (c) 2016 PaddlePaddle Authors. All Rights Reserve. +/* Copyright (c) 2016 PaddlePaddle Authors. All Rights Reserved. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/paddle/fluid/operators/momentum_op.h b/paddle/fluid/operators/momentum_op.h index fdab86b24ee..04a1929b84a 100644 --- a/paddle/fluid/operators/momentum_op.h +++ b/paddle/fluid/operators/momentum_op.h @@ -1,4 +1,4 @@ -/* Copyright (c) 2016 PaddlePaddle Authors. All Rights Reserve. +/* Copyright (c) 2016 PaddlePaddle Authors. All Rights Reserved. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/paddle/fluid/operators/mul_op.cc b/paddle/fluid/operators/mul_op.cc index c9375d8ea12..e7bed2c3973 100644 --- a/paddle/fluid/operators/mul_op.cc +++ b/paddle/fluid/operators/mul_op.cc @@ -1,4 +1,4 @@ -/* Copyright (c) 2016 PaddlePaddle Authors. All Rights Reserve. +/* Copyright (c) 2016 PaddlePaddle Authors. All Rights Reserved. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/paddle/fluid/operators/mul_op.cu.cc b/paddle/fluid/operators/mul_op.cu.cc index 6f605fd84fb..0667530e943 100644 --- a/paddle/fluid/operators/mul_op.cu.cc +++ b/paddle/fluid/operators/mul_op.cu.cc @@ -1,4 +1,4 @@ -/* Copyright (c) 2016 PaddlePaddle Authors. All Rights Reserve. +/* Copyright (c) 2016 PaddlePaddle Authors. All Rights Reserved. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/paddle/fluid/operators/mul_op.h b/paddle/fluid/operators/mul_op.h index 745989f07f3..38311cf8726 100644 --- a/paddle/fluid/operators/mul_op.h +++ b/paddle/fluid/operators/mul_op.h @@ -1,4 +1,4 @@ -/* Copyright (c) 2016 PaddlePaddle Authors. All Rights Reserve. +/* Copyright (c) 2016 PaddlePaddle Authors. All Rights Reserved. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/paddle/fluid/operators/multiclass_nms_op.cc b/paddle/fluid/operators/multiclass_nms_op.cc index 168e6f85d6a..2565e7e9efa 100644 --- a/paddle/fluid/operators/multiclass_nms_op.cc +++ b/paddle/fluid/operators/multiclass_nms_op.cc @@ -1,4 +1,4 @@ -/* Copyright (c) 2018 PaddlePaddle Authors. All Rights Reserve. +/* Copyright (c) 2018 PaddlePaddle Authors. All Rights Reserved. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/paddle/fluid/operators/multiplex_op.cc b/paddle/fluid/operators/multiplex_op.cc index f89b00376ba..b698c1bf8a0 100644 --- a/paddle/fluid/operators/multiplex_op.cc +++ b/paddle/fluid/operators/multiplex_op.cc @@ -1,4 +1,4 @@ -/* Copyright (c) 2016 PaddlePaddle Authors. All Rights Reserve. +/* Copyright (c) 2016 PaddlePaddle Authors. All Rights Reserved. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/paddle/fluid/operators/multiplex_op.cu b/paddle/fluid/operators/multiplex_op.cu index 3ef7ef1dfcd..cb89eeecfb2 100644 --- a/paddle/fluid/operators/multiplex_op.cu +++ b/paddle/fluid/operators/multiplex_op.cu @@ -1,4 +1,4 @@ -/* Copyright (c) 2016 PaddlePaddle Authors. All Rights Reserve. +/* Copyright (c) 2016 PaddlePaddle Authors. All Rights Reserved. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/paddle/fluid/operators/multiplex_op.h b/paddle/fluid/operators/multiplex_op.h index 682117cb1b4..87de0009719 100644 --- a/paddle/fluid/operators/multiplex_op.h +++ b/paddle/fluid/operators/multiplex_op.h @@ -1,4 +1,4 @@ -/* Copyright (c) 2016 PaddlePaddle Authors. All Rights Reserve. +/* Copyright (c) 2016 PaddlePaddle Authors. All Rights Reserved. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/paddle/fluid/operators/nccl/nccl_gpu_common.cc b/paddle/fluid/operators/nccl/nccl_gpu_common.cc index 2a8ce932ec5..fa6aafceb06 100644 --- a/paddle/fluid/operators/nccl/nccl_gpu_common.cc +++ b/paddle/fluid/operators/nccl/nccl_gpu_common.cc @@ -1,4 +1,4 @@ -/* Copyright (c) 2016 PaddlePaddle Authors. All Rights Reserve. +/* Copyright (c) 2016 PaddlePaddle Authors. All Rights Reserved. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/paddle/fluid/operators/nccl/nccl_gpu_common.h b/paddle/fluid/operators/nccl/nccl_gpu_common.h index 6e78613239e..be8c8a8f2c3 100644 --- a/paddle/fluid/operators/nccl/nccl_gpu_common.h +++ b/paddle/fluid/operators/nccl/nccl_gpu_common.h @@ -1,4 +1,4 @@ -/* Copyright (c) 2016 PaddlePaddle Authors. All Rights Reserve. +/* Copyright (c) 2016 PaddlePaddle Authors. All Rights Reserved. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/paddle/fluid/operators/nccl_op.cc b/paddle/fluid/operators/nccl_op.cc index 703e8dd00fc..7f1278f3a55 100644 --- a/paddle/fluid/operators/nccl_op.cc +++ b/paddle/fluid/operators/nccl_op.cc @@ -1,4 +1,4 @@ -/* Copyright (c) 2016 PaddlePaddle Authors. All Rights Reserve. +/* Copyright (c) 2016 PaddlePaddle Authors. All Rights Reserved. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/paddle/fluid/operators/nccl_op.cu.cc b/paddle/fluid/operators/nccl_op.cu.cc index 333aed2903e..fc83aa2ac22 100644 --- a/paddle/fluid/operators/nccl_op.cu.cc +++ b/paddle/fluid/operators/nccl_op.cu.cc @@ -1,4 +1,4 @@ -/* Copyright (c) 2016 PaddlePaddle Authors. All Rights Reserve. +/* Copyright (c) 2016 PaddlePaddle Authors. All Rights Reserved. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at diff --git a/paddle/fluid/operators/nccl_op_test.cu.cc b/paddle/fluid/operators/nccl_op_test.cu.cc index 212ed2f9b63..24e30f54a13 100644 --- a/paddle/fluid/operators/nccl_op_test.cu.cc +++ b/paddle/fluid/operators/nccl_op_test.cu.cc @@ -1,4 +1,4 @@ -/* Copyright (c) 2016 PaddlePaddle Authors. All Rights Reserve. +/* Copyright (c) 2016 PaddlePaddle Authors. All Rights Reserved. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/paddle/fluid/operators/nce_op.cc b/paddle/fluid/operators/nce_op.cc index 0841313a104..99f38529bbb 100644 --- a/paddle/fluid/operators/nce_op.cc +++ b/paddle/fluid/operators/nce_op.cc @@ -1,4 +1,4 @@ -/* Copyright (c) 2016 PaddlePaddle Authors. All Rights Reserve. +/* Copyright (c) 2016 PaddlePaddle Authors. All Rights Reserved. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/paddle/fluid/operators/nce_op.h b/paddle/fluid/operators/nce_op.h index 624c2d9bbd3..94207638473 100644 --- a/paddle/fluid/operators/nce_op.h +++ b/paddle/fluid/operators/nce_op.h @@ -1,4 +1,4 @@ -/* Copyright (c) 2016 PaddlePaddle Authors. All Rights Reserve. +/* Copyright (c) 2016 PaddlePaddle Authors. All Rights Reserved. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/paddle/fluid/operators/net_op.cc b/paddle/fluid/operators/net_op.cc index c0ca5873adc..0c2da744177 100644 --- a/paddle/fluid/operators/net_op.cc +++ b/paddle/fluid/operators/net_op.cc @@ -1,4 +1,4 @@ -// Copyright (c) 2018 PaddlePaddle Authors. All Rights Reserve. +// Copyright (c) 2018 PaddlePaddle Authors. All Rights Reserved. // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. diff --git a/paddle/fluid/operators/net_op.h b/paddle/fluid/operators/net_op.h index 479ba386a70..cbf8820cf49 100644 --- a/paddle/fluid/operators/net_op.h +++ b/paddle/fluid/operators/net_op.h @@ -1,4 +1,4 @@ -/* Copyright (c) 2016 PaddlePaddle Authors. All Rights Reserve. +/* Copyright (c) 2016 PaddlePaddle Authors. All Rights Reserved. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/paddle/fluid/operators/net_op_test.cc b/paddle/fluid/operators/net_op_test.cc index 265f15e82ed..3b5f5754858 100644 --- a/paddle/fluid/operators/net_op_test.cc +++ b/paddle/fluid/operators/net_op_test.cc @@ -1,4 +1,4 @@ -// Copyright (c) 2018 PaddlePaddle Authors. All Rights Reserve. +// Copyright (c) 2018 PaddlePaddle Authors. All Rights Reserved. // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. diff --git a/paddle/fluid/operators/norm_op.cc b/paddle/fluid/operators/norm_op.cc index ee85b1a90a8..5345c5bdb0f 100644 --- a/paddle/fluid/operators/norm_op.cc +++ b/paddle/fluid/operators/norm_op.cc @@ -1,4 +1,4 @@ -/* Copyright (c) 2016 PaddlePaddle Authors. All Rights Reserve. +/* Copyright (c) 2016 PaddlePaddle Authors. All Rights Reserved. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/paddle/fluid/operators/norm_op.cu b/paddle/fluid/operators/norm_op.cu index 438bb3b86e7..d1d9be50742 100644 --- a/paddle/fluid/operators/norm_op.cu +++ b/paddle/fluid/operators/norm_op.cu @@ -1,4 +1,4 @@ -/* Copyright (c) 2016 PaddlePaddle Authors. All Rights Reserve. +/* Copyright (c) 2016 PaddlePaddle Authors. All Rights Reserved. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/paddle/fluid/operators/norm_op.h b/paddle/fluid/operators/norm_op.h index db74c9b02a7..0ad29e8a038 100644 --- a/paddle/fluid/operators/norm_op.h +++ b/paddle/fluid/operators/norm_op.h @@ -1,4 +1,4 @@ -/* Copyright (c) 2016 PaddlePaddle Authors. All Rights Reserve. +/* Copyright (c) 2016 PaddlePaddle Authors. All Rights Reserved. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/paddle/fluid/operators/one_hot_op.cc b/paddle/fluid/operators/one_hot_op.cc index 2c3a60da729..21d3405b70d 100644 --- a/paddle/fluid/operators/one_hot_op.cc +++ b/paddle/fluid/operators/one_hot_op.cc @@ -1,4 +1,4 @@ -// Copyright (c) 2018 PaddlePaddle Authors. All Rights Reserve. +// Copyright (c) 2018 PaddlePaddle Authors. All Rights Reserved. // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. diff --git a/paddle/fluid/operators/one_hot_op.cu b/paddle/fluid/operators/one_hot_op.cu index 6a8061edaab..87c285df4e9 100644 --- a/paddle/fluid/operators/one_hot_op.cu +++ b/paddle/fluid/operators/one_hot_op.cu @@ -1,4 +1,4 @@ -// Copyright (c) 2018 PaddlePaddle Authors. All Rights Reserve. +// Copyright (c) 2018 PaddlePaddle Authors. All Rights Reserved. // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. diff --git a/paddle/fluid/operators/one_hot_op.h b/paddle/fluid/operators/one_hot_op.h index ddac6edd0ec..1409f8af624 100644 --- a/paddle/fluid/operators/one_hot_op.h +++ b/paddle/fluid/operators/one_hot_op.h @@ -1,4 +1,4 @@ -// Copyright (c) 2018 PaddlePaddle Authors. All Rights Reserve. +// Copyright (c) 2018 PaddlePaddle Authors. All Rights Reserved. // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. diff --git a/paddle/fluid/operators/pad_op.cc b/paddle/fluid/operators/pad_op.cc index 4b021fde7cb..d2a0106f801 100644 --- a/paddle/fluid/operators/pad_op.cc +++ b/paddle/fluid/operators/pad_op.cc @@ -1,4 +1,4 @@ -/* Copyright (c) 2016 PaddlePaddle Authors. All Rights Reserve. +/* Copyright (c) 2016 PaddlePaddle Authors. All Rights Reserved. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/paddle/fluid/operators/pad_op.cu b/paddle/fluid/operators/pad_op.cu index 203c3144037..9cddef9cf1d 100644 --- a/paddle/fluid/operators/pad_op.cu +++ b/paddle/fluid/operators/pad_op.cu @@ -1,4 +1,4 @@ -/* Copyright (c) 2016 PaddlePaddle Authors. All Rights Reserve. +/* Copyright (c) 2016 PaddlePaddle Authors. All Rights Reserved. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/paddle/fluid/operators/pad_op.h b/paddle/fluid/operators/pad_op.h index 244d8f9b6cf..a36abe37895 100644 --- a/paddle/fluid/operators/pad_op.h +++ b/paddle/fluid/operators/pad_op.h @@ -1,4 +1,4 @@ -/* Copyright (c) 2016 PaddlePaddle Authors. All Rights Reserve. +/* Copyright (c) 2016 PaddlePaddle Authors. All Rights Reserved. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/paddle/fluid/operators/parallel_do_op.cc b/paddle/fluid/operators/parallel_do_op.cc index d791d111728..88c83ee213f 100644 --- a/paddle/fluid/operators/parallel_do_op.cc +++ b/paddle/fluid/operators/parallel_do_op.cc @@ -1,4 +1,4 @@ -/* Copyright (c) 2016 PaddlePaddle Authors. All Rights Reserve. +/* Copyright (c) 2016 PaddlePaddle Authors. All Rights Reserved. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/paddle/fluid/operators/pool_cudnn_op.cu.cc b/paddle/fluid/operators/pool_cudnn_op.cu.cc index 75984b7721c..781d96981e4 100644 --- a/paddle/fluid/operators/pool_cudnn_op.cu.cc +++ b/paddle/fluid/operators/pool_cudnn_op.cu.cc @@ -1,4 +1,4 @@ -/* Copyright (c) 2016 PaddlePaddle Authors. All Rights Reserve. +/* Copyright (c) 2016 PaddlePaddle Authors. All Rights Reserved. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/paddle/fluid/operators/pool_op.cc b/paddle/fluid/operators/pool_op.cc index 9dd33eefc5f..a80b23b8ede 100644 --- a/paddle/fluid/operators/pool_op.cc +++ b/paddle/fluid/operators/pool_op.cc @@ -1,4 +1,4 @@ -/* Copyright (c) 2016 PaddlePaddle Authors. All Rights Reserve. +/* Copyright (c) 2016 PaddlePaddle Authors. All Rights Reserved. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/paddle/fluid/operators/pool_op.cu.cc b/paddle/fluid/operators/pool_op.cu.cc index 14486c07402..37bc14e2cbb 100644 --- a/paddle/fluid/operators/pool_op.cu.cc +++ b/paddle/fluid/operators/pool_op.cu.cc @@ -1,4 +1,4 @@ -/* Copyright (c) 2016 PaddlePaddle Authors. All Rights Reserve. +/* Copyright (c) 2016 PaddlePaddle Authors. All Rights Reserved. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/paddle/fluid/operators/pool_op.h b/paddle/fluid/operators/pool_op.h index 4cabd634d66..2fec50ef25e 100644 --- a/paddle/fluid/operators/pool_op.h +++ b/paddle/fluid/operators/pool_op.h @@ -1,4 +1,4 @@ -/* Copyright (c) 2016 PaddlePaddle Authors. All Rights Reserve. +/* Copyright (c) 2016 PaddlePaddle Authors. All Rights Reserved. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/paddle/fluid/operators/pool_with_index_op.cc b/paddle/fluid/operators/pool_with_index_op.cc index ef6d5d867b2..3a59365d17f 100644 --- a/paddle/fluid/operators/pool_with_index_op.cc +++ b/paddle/fluid/operators/pool_with_index_op.cc @@ -1,4 +1,4 @@ -/* Copyright (c) 2016 PaddlePaddle Authors. All Rights Reserve. +/* Copyright (c) 2016 PaddlePaddle Authors. All Rights Reserved. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/paddle/fluid/operators/pool_with_index_op.cu.cc b/paddle/fluid/operators/pool_with_index_op.cu.cc index 722a4d1e2a4..5fc418b6fdd 100644 --- a/paddle/fluid/operators/pool_with_index_op.cu.cc +++ b/paddle/fluid/operators/pool_with_index_op.cu.cc @@ -1,4 +1,4 @@ -/* Copyright (c) 2016 PaddlePaddle Authors. All Rights Reserve. +/* Copyright (c) 2016 PaddlePaddle Authors. All Rights Reserved. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/paddle/fluid/operators/pool_with_index_op.h b/paddle/fluid/operators/pool_with_index_op.h index da7ef9df73a..83e7bd138ae 100644 --- a/paddle/fluid/operators/pool_with_index_op.h +++ b/paddle/fluid/operators/pool_with_index_op.h @@ -1,4 +1,4 @@ -/* Copyright (c) 2016 PaddlePaddle Authors. All Rights Reserve. +/* Copyright (c) 2016 PaddlePaddle Authors. All Rights Reserved. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/paddle/fluid/operators/precision_recall_op.cc b/paddle/fluid/operators/precision_recall_op.cc index 30d594719c7..c34b0d072bd 100644 --- a/paddle/fluid/operators/precision_recall_op.cc +++ b/paddle/fluid/operators/precision_recall_op.cc @@ -1,4 +1,4 @@ -/* Copyright (c) 2016 PaddlePaddle Authors. All Rights Reserve. +/* Copyright (c) 2016 PaddlePaddle Authors. All Rights Reserved. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/paddle/fluid/operators/precision_recall_op.h b/paddle/fluid/operators/precision_recall_op.h index 7dae86b76fc..d6d4a5adc3e 100644 --- a/paddle/fluid/operators/precision_recall_op.h +++ b/paddle/fluid/operators/precision_recall_op.h @@ -1,4 +1,4 @@ -/* Copyright (c) 2016 PaddlePaddle Authors. All Rights Reserve. +/* Copyright (c) 2016 PaddlePaddle Authors. All Rights Reserved. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/paddle/fluid/operators/prelu_op.cc b/paddle/fluid/operators/prelu_op.cc index 22b970d9712..447b854544b 100644 --- a/paddle/fluid/operators/prelu_op.cc +++ b/paddle/fluid/operators/prelu_op.cc @@ -1,4 +1,4 @@ -/* Copyright (c) 2016 PaddlePaddle Authors. All Rights Reserve. +/* Copyright (c) 2016 PaddlePaddle Authors. All Rights Reserved. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/paddle/fluid/operators/prelu_op.cu b/paddle/fluid/operators/prelu_op.cu index 038b09a493c..37d934a2904 100644 --- a/paddle/fluid/operators/prelu_op.cu +++ b/paddle/fluid/operators/prelu_op.cu @@ -1,4 +1,4 @@ -/* Copyright (c) 2016 PaddlePaddle Authors. All Rights Reserve. +/* Copyright (c) 2016 PaddlePaddle Authors. All Rights Reserved. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/paddle/fluid/operators/prelu_op.h b/paddle/fluid/operators/prelu_op.h index 85ad75d4790..a6197d35483 100644 --- a/paddle/fluid/operators/prelu_op.h +++ b/paddle/fluid/operators/prelu_op.h @@ -1,4 +1,4 @@ -/* Copyright (c) 2016 PaddlePaddle Authors. All Rights Reserve. +/* Copyright (c) 2016 PaddlePaddle Authors. All Rights Reserved. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/paddle/fluid/operators/print_op.cc b/paddle/fluid/operators/print_op.cc index 4d12fdbb6b6..a76ba796fe4 100644 --- a/paddle/fluid/operators/print_op.cc +++ b/paddle/fluid/operators/print_op.cc @@ -1,4 +1,4 @@ -/* Copyright (c) 2016 PaddlePaddle Authors. All Rights Reserve. +/* Copyright (c) 2016 PaddlePaddle Authors. All Rights Reserved. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/paddle/fluid/operators/prior_box_op.cc b/paddle/fluid/operators/prior_box_op.cc index 1385a6cdce8..922b2bd237a 100644 --- a/paddle/fluid/operators/prior_box_op.cc +++ b/paddle/fluid/operators/prior_box_op.cc @@ -1,4 +1,4 @@ -/* Copyright (c) 2016 PaddlePaddle Authors. All Rights Reserve. +/* Copyright (c) 2016 PaddlePaddle Authors. All Rights Reserved. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/paddle/fluid/operators/prior_box_op.h b/paddle/fluid/operators/prior_box_op.h index e2c9514ed08..0113d2f09af 100644 --- a/paddle/fluid/operators/prior_box_op.h +++ b/paddle/fluid/operators/prior_box_op.h @@ -1,4 +1,4 @@ -/* Copyright (c) 2016 PaddlePaddle Authors. All Rights Reserve. +/* Copyright (c) 2016 PaddlePaddle Authors. All Rights Reserved. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/paddle/fluid/operators/proximal_adagrad_op.cc b/paddle/fluid/operators/proximal_adagrad_op.cc index d9e3894c576..38cd97c17b1 100644 --- a/paddle/fluid/operators/proximal_adagrad_op.cc +++ b/paddle/fluid/operators/proximal_adagrad_op.cc @@ -1,4 +1,4 @@ -/* Copyright (c) 2016 PaddlePaddle Authors. All Rights Reserve. +/* Copyright (c) 2016 PaddlePaddle Authors. All Rights Reserved. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/paddle/fluid/operators/proximal_adagrad_op.cu b/paddle/fluid/operators/proximal_adagrad_op.cu index 54c75b3abb8..7e0226c62bf 100644 --- a/paddle/fluid/operators/proximal_adagrad_op.cu +++ b/paddle/fluid/operators/proximal_adagrad_op.cu @@ -1,4 +1,4 @@ -/* Copyright (c) 2016 PaddlePaddle Authors. All Rights Reserve. +/* Copyright (c) 2016 PaddlePaddle Authors. All Rights Reserved. Licensed under the Apache License, Version 2.0 (the "License"); You may not use this file except in compliance with the License. diff --git a/paddle/fluid/operators/proximal_adagrad_op.h b/paddle/fluid/operators/proximal_adagrad_op.h index 70205a8d11f..91416450a60 100644 --- a/paddle/fluid/operators/proximal_adagrad_op.h +++ b/paddle/fluid/operators/proximal_adagrad_op.h @@ -1,4 +1,4 @@ -/* Copyright (c) 2016 PaddlePaddle Authors. All Rights Reserve. +/* Copyright (c) 2016 PaddlePaddle Authors. All Rights Reserved. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/paddle/fluid/operators/proximal_gd_op.cc b/paddle/fluid/operators/proximal_gd_op.cc index de7c6843c8b..efb4e1ac204 100644 --- a/paddle/fluid/operators/proximal_gd_op.cc +++ b/paddle/fluid/operators/proximal_gd_op.cc @@ -1,4 +1,4 @@ -/* Copyright (c) 2016 PaddlePaddle Authors. All Rights Reserve. +/* Copyright (c) 2016 PaddlePaddle Authors. All Rights Reserved. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/paddle/fluid/operators/proximal_gd_op.cu b/paddle/fluid/operators/proximal_gd_op.cu index 97b672e872c..32ee9ab74cd 100644 --- a/paddle/fluid/operators/proximal_gd_op.cu +++ b/paddle/fluid/operators/proximal_gd_op.cu @@ -1,4 +1,4 @@ -/* Copyright (c) 2016 PaddlePaddle Authors. All Rights Reserve. +/* Copyright (c) 2016 PaddlePaddle Authors. All Rights Reserved. Licensed under the Apache License, Version 2.0 (the "License"); You may not use this file except in compliance with the License. diff --git a/paddle/fluid/operators/proximal_gd_op.h b/paddle/fluid/operators/proximal_gd_op.h index 8372380f252..d49badf16d5 100644 --- a/paddle/fluid/operators/proximal_gd_op.h +++ b/paddle/fluid/operators/proximal_gd_op.h @@ -1,4 +1,4 @@ -/* Copyright (c) 2016 PaddlePaddle Authors. All Rights Reserve. +/* Copyright (c) 2016 PaddlePaddle Authors. All Rights Reserved. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/paddle/fluid/operators/rank_loss_op.cc b/paddle/fluid/operators/rank_loss_op.cc index 222ca73d2ac..767eef56861 100644 --- a/paddle/fluid/operators/rank_loss_op.cc +++ b/paddle/fluid/operators/rank_loss_op.cc @@ -1,4 +1,4 @@ -/* Copyright (c) 2016 PaddlePaddle Authors. All Rights Reserve. +/* Copyright (c) 2016 PaddlePaddle Authors. All Rights Reserved. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/paddle/fluid/operators/rank_loss_op.cu b/paddle/fluid/operators/rank_loss_op.cu index 1b182ced70d..ed805279892 100644 --- a/paddle/fluid/operators/rank_loss_op.cu +++ b/paddle/fluid/operators/rank_loss_op.cu @@ -1,4 +1,4 @@ -/* Copyright (c) 2016 PaddlePaddle Authors. All Rights Reserve. +/* Copyright (c) 2016 PaddlePaddle Authors. All Rights Reserved. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/paddle/fluid/operators/rank_loss_op.h b/paddle/fluid/operators/rank_loss_op.h index 08bb2c28218..28626c0e2e6 100644 --- a/paddle/fluid/operators/rank_loss_op.h +++ b/paddle/fluid/operators/rank_loss_op.h @@ -1,4 +1,4 @@ -/* Copyright (c) 2016 PaddlePaddle Authors. All Rights Reserve. +/* Copyright (c) 2016 PaddlePaddle Authors. All Rights Reserved. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/paddle/fluid/operators/recurrent_op.cc b/paddle/fluid/operators/recurrent_op.cc index 33a744a5b7f..8435d6bcf07 100644 --- a/paddle/fluid/operators/recurrent_op.cc +++ b/paddle/fluid/operators/recurrent_op.cc @@ -1,4 +1,4 @@ -/* Copyright (c) 2016 PaddlePaddle Authors. All Rights Reserve. +/* Copyright (c) 2016 PaddlePaddle Authors. All Rights Reserved. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/paddle/fluid/operators/recv_op.cc b/paddle/fluid/operators/recv_op.cc index 17b57b5d45a..083c1fae5e2 100644 --- a/paddle/fluid/operators/recv_op.cc +++ b/paddle/fluid/operators/recv_op.cc @@ -1,4 +1,4 @@ -/* Copyright (c) 2016 PaddlePaddle Authors. All Rights Reserve. +/* Copyright (c) 2016 PaddlePaddle Authors. All Rights Reserved. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/paddle/fluid/operators/reduce_op.cc b/paddle/fluid/operators/reduce_op.cc index f4d9d4cc07b..69e8f8081e9 100644 --- a/paddle/fluid/operators/reduce_op.cc +++ b/paddle/fluid/operators/reduce_op.cc @@ -1,4 +1,4 @@ -/* Copyright (c) 2016 PaddlePaddle Authors. All Rights Reserve. +/* Copyright (c) 2016 PaddlePaddle Authors. All Rights Reserved. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/paddle/fluid/operators/reduce_op.cu b/paddle/fluid/operators/reduce_op.cu index 1ca107ebfe9..ae29587f558 100644 --- a/paddle/fluid/operators/reduce_op.cu +++ b/paddle/fluid/operators/reduce_op.cu @@ -1,4 +1,4 @@ -/* Copyright (c) 2016 PaddlePaddle Authors. All Rights Reserve. +/* Copyright (c) 2016 PaddlePaddle Authors. All Rights Reserved. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/paddle/fluid/operators/reduce_op.h b/paddle/fluid/operators/reduce_op.h index a153cf272b5..ec23325e571 100644 --- a/paddle/fluid/operators/reduce_op.h +++ b/paddle/fluid/operators/reduce_op.h @@ -1,4 +1,4 @@ -/* Copyright (c) 2016 PaddlePaddle Authors. All Rights Reserve. +/* Copyright (c) 2016 PaddlePaddle Authors. All Rights Reserved. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/paddle/fluid/operators/reorder_lod_tensor_by_rank_op.cc b/paddle/fluid/operators/reorder_lod_tensor_by_rank_op.cc index 79ba9e543b8..b0df932f436 100644 --- a/paddle/fluid/operators/reorder_lod_tensor_by_rank_op.cc +++ b/paddle/fluid/operators/reorder_lod_tensor_by_rank_op.cc @@ -1,4 +1,4 @@ -/* Copyright (c) 2016 PaddlePaddle Authors. All Rights Reserve. +/* Copyright (c) 2016 PaddlePaddle Authors. All Rights Reserved. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/paddle/fluid/operators/reshape_op.cc b/paddle/fluid/operators/reshape_op.cc index b4f80cc06ab..a90ffb4ff3e 100644 --- a/paddle/fluid/operators/reshape_op.cc +++ b/paddle/fluid/operators/reshape_op.cc @@ -1,4 +1,4 @@ -/* Copyright (c) 2016 PaddlePaddle Authors. All Rights Reserve. +/* Copyright (c) 2016 PaddlePaddle Authors. All Rights Reserved. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/paddle/fluid/operators/reshape_op.cu b/paddle/fluid/operators/reshape_op.cu index f9ae6da29e5..d5ceaf784c0 100644 --- a/paddle/fluid/operators/reshape_op.cu +++ b/paddle/fluid/operators/reshape_op.cu @@ -1,4 +1,4 @@ -/* Copyright (c) 2016 PaddlePaddle Authors. All Rights Reserve. +/* Copyright (c) 2016 PaddlePaddle Authors. All Rights Reserved. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/paddle/fluid/operators/reshape_op.h b/paddle/fluid/operators/reshape_op.h index a17ba7c6194..c01100ef4df 100644 --- a/paddle/fluid/operators/reshape_op.h +++ b/paddle/fluid/operators/reshape_op.h @@ -1,4 +1,4 @@ -/* Copyright (c) 2016 PaddlePaddle Authors. All Rights Reserve. +/* Copyright (c) 2016 PaddlePaddle Authors. All Rights Reserved. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/paddle/fluid/operators/rmsprop_op.cc b/paddle/fluid/operators/rmsprop_op.cc index 06d3ccafefd..a8855b3ccd1 100644 --- a/paddle/fluid/operators/rmsprop_op.cc +++ b/paddle/fluid/operators/rmsprop_op.cc @@ -1,4 +1,4 @@ -/* Copyright (c) 2016 PaddlePaddle Authors. All Rights Reserve. +/* Copyright (c) 2016 PaddlePaddle Authors. All Rights Reserved. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/paddle/fluid/operators/rmsprop_op.cu b/paddle/fluid/operators/rmsprop_op.cu index a909c942791..cdc47376959 100644 --- a/paddle/fluid/operators/rmsprop_op.cu +++ b/paddle/fluid/operators/rmsprop_op.cu @@ -1,4 +1,4 @@ -/* Copyright (c) 2016 PaddlePaddle Authors. All Rights Reserve. +/* Copyright (c) 2016 PaddlePaddle Authors. All Rights Reserved. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/paddle/fluid/operators/rmsprop_op.h b/paddle/fluid/operators/rmsprop_op.h index 469c102a472..12836f43bde 100644 --- a/paddle/fluid/operators/rmsprop_op.h +++ b/paddle/fluid/operators/rmsprop_op.h @@ -1,4 +1,4 @@ -/* Copyright (c) 2016 PaddlePaddle Authors. All Rights Reserve. +/* Copyright (c) 2016 PaddlePaddle Authors. All Rights Reserved. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/paddle/fluid/operators/rnn_memory_helper_op.cc b/paddle/fluid/operators/rnn_memory_helper_op.cc index e9329a0e7e2..8ab9f010a22 100644 --- a/paddle/fluid/operators/rnn_memory_helper_op.cc +++ b/paddle/fluid/operators/rnn_memory_helper_op.cc @@ -1,4 +1,4 @@ -/* Copyright (c) 2016 PaddlePaddle Authors. All Rights Reserve. +/* Copyright (c) 2016 PaddlePaddle Authors. All Rights Reserved. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/paddle/fluid/operators/roi_pool_op.cc b/paddle/fluid/operators/roi_pool_op.cc index 09238f89a77..6d4861f0428 100644 --- a/paddle/fluid/operators/roi_pool_op.cc +++ b/paddle/fluid/operators/roi_pool_op.cc @@ -1,4 +1,4 @@ -/* Copyright (c) 2016 PaddlePaddle Authors. All Rights Reserve. +/* Copyright (c) 2016 PaddlePaddle Authors. All Rights Reserved. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/paddle/fluid/operators/roi_pool_op.cu b/paddle/fluid/operators/roi_pool_op.cu index 0e8fc9ec7a6..1931629d134 100644 --- a/paddle/fluid/operators/roi_pool_op.cu +++ b/paddle/fluid/operators/roi_pool_op.cu @@ -1,4 +1,4 @@ -/* Copyright (c) 2016 PaddlePaddle Authors. All Rights Reserve. +/* Copyright (c) 2016 PaddlePaddle Authors. All Rights Reserved. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/paddle/fluid/operators/roi_pool_op.h b/paddle/fluid/operators/roi_pool_op.h index 15f3b36fcd1..f38c5a3c0c9 100644 --- a/paddle/fluid/operators/roi_pool_op.h +++ b/paddle/fluid/operators/roi_pool_op.h @@ -1,4 +1,4 @@ -/* Copyright (c) 2016 PaddlePaddle Authors. All Rights Reserve. +/* Copyright (c) 2016 PaddlePaddle Authors. All Rights Reserved. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/paddle/fluid/operators/row_conv_op.cc b/paddle/fluid/operators/row_conv_op.cc index 92661ea9716..d34beeb6508 100644 --- a/paddle/fluid/operators/row_conv_op.cc +++ b/paddle/fluid/operators/row_conv_op.cc @@ -1,4 +1,4 @@ -/* Copyright (c) 2016 PaddlePaddle Authors. All Rights Reserve. +/* Copyright (c) 2016 PaddlePaddle Authors. All Rights Reserved. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/paddle/fluid/operators/row_conv_op.cu b/paddle/fluid/operators/row_conv_op.cu index 832072edf81..67083455a75 100644 --- a/paddle/fluid/operators/row_conv_op.cu +++ b/paddle/fluid/operators/row_conv_op.cu @@ -1,4 +1,4 @@ -/* Copyright (c) 2016 PaddlePaddle Authors. All Rights Reserve. +/* Copyright (c) 2016 PaddlePaddle Authors. All Rights Reserved. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/paddle/fluid/operators/row_conv_op.h b/paddle/fluid/operators/row_conv_op.h index 59164b52159..fb999568f81 100644 --- a/paddle/fluid/operators/row_conv_op.h +++ b/paddle/fluid/operators/row_conv_op.h @@ -1,4 +1,4 @@ -/* Copyright (c) 2016 PaddlePaddle Authors. All Rights Reserve. +/* Copyright (c) 2016 PaddlePaddle Authors. All Rights Reserved. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/paddle/fluid/operators/save_combine_op.cc b/paddle/fluid/operators/save_combine_op.cc index e3953e4b080..94703393bfa 100644 --- a/paddle/fluid/operators/save_combine_op.cc +++ b/paddle/fluid/operators/save_combine_op.cc @@ -1,4 +1,4 @@ -/* Copyright (c) 2018 PaddlePaddle Authors. All Rights Reserve. +/* Copyright (c) 2018 PaddlePaddle Authors. All Rights Reserved. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/paddle/fluid/operators/save_load_combine_op_test.cc b/paddle/fluid/operators/save_load_combine_op_test.cc index f8325bac6bc..286f75df4ca 100644 --- a/paddle/fluid/operators/save_load_combine_op_test.cc +++ b/paddle/fluid/operators/save_load_combine_op_test.cc @@ -1,4 +1,4 @@ -/* Copyright (c) 2018 PaddlePaddle Authors. All Rights Reserve. +/* Copyright (c) 2018 PaddlePaddle Authors. All Rights Reserved. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/paddle/fluid/operators/save_load_op_test.cc b/paddle/fluid/operators/save_load_op_test.cc index da4573a8ed9..a7ba1e0ae1d 100644 --- a/paddle/fluid/operators/save_load_op_test.cc +++ b/paddle/fluid/operators/save_load_op_test.cc @@ -1,4 +1,4 @@ -/* Copyright (c) 2016 PaddlePaddle Authors. All Rights Reserve. +/* Copyright (c) 2016 PaddlePaddle Authors. All Rights Reserved. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/paddle/fluid/operators/save_op.cc b/paddle/fluid/operators/save_op.cc index 85ba8e01182..4a715c4baab 100644 --- a/paddle/fluid/operators/save_op.cc +++ b/paddle/fluid/operators/save_op.cc @@ -1,4 +1,4 @@ -/* Copyright (c) 2016 PaddlePaddle Authors. All Rights Reserve. +/* Copyright (c) 2016 PaddlePaddle Authors. All Rights Reserved. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/paddle/fluid/operators/scale_op.cc b/paddle/fluid/operators/scale_op.cc index 017fc2c00e4..b16d06df8d0 100644 --- a/paddle/fluid/operators/scale_op.cc +++ b/paddle/fluid/operators/scale_op.cc @@ -1,4 +1,4 @@ -/* Copyright (c) 2016 PaddlePaddle Authors. All Rights Reserve. +/* Copyright (c) 2016 PaddlePaddle Authors. All Rights Reserved. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/paddle/fluid/operators/scale_op.cu b/paddle/fluid/operators/scale_op.cu index a9b46077aa0..04c802da129 100644 --- a/paddle/fluid/operators/scale_op.cu +++ b/paddle/fluid/operators/scale_op.cu @@ -1,4 +1,4 @@ -/* Copyright (c) 2016 PaddlePaddle Authors. All Rights Reserve. +/* Copyright (c) 2016 PaddlePaddle Authors. All Rights Reserved. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/paddle/fluid/operators/scale_op.h b/paddle/fluid/operators/scale_op.h index b1c2964ca63..c6a59b76adc 100644 --- a/paddle/fluid/operators/scale_op.h +++ b/paddle/fluid/operators/scale_op.h @@ -1,4 +1,4 @@ -/* Copyright (c) 2016 PaddlePaddle Authors. All Rights Reserve. +/* Copyright (c) 2016 PaddlePaddle Authors. All Rights Reserved. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/paddle/fluid/operators/scatter.cu.h b/paddle/fluid/operators/scatter.cu.h index 0f1b9426a74..ac7d69bfb54 100644 --- a/paddle/fluid/operators/scatter.cu.h +++ b/paddle/fluid/operators/scatter.cu.h @@ -1,4 +1,4 @@ -/* Copyright (c) 2016 PaddlePaddle Authors. All Rights Reserve. +/* Copyright (c) 2016 PaddlePaddle Authors. All Rights Reserved. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/paddle/fluid/operators/scatter.h b/paddle/fluid/operators/scatter.h index 70cae1286ca..39af717615c 100644 --- a/paddle/fluid/operators/scatter.h +++ b/paddle/fluid/operators/scatter.h @@ -1,4 +1,4 @@ -/* Copyright (c) 2016 PaddlePaddle Authors. All Rights Reserve. +/* Copyright (c) 2016 PaddlePaddle Authors. All Rights Reserved. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/paddle/fluid/operators/scatter_op.cc b/paddle/fluid/operators/scatter_op.cc index e35930af534..3fb8b56d267 100644 --- a/paddle/fluid/operators/scatter_op.cc +++ b/paddle/fluid/operators/scatter_op.cc @@ -1,4 +1,4 @@ -/* Copyright (c) 2016 PaddlePaddle Authors. All Rights Reserve. +/* Copyright (c) 2016 PaddlePaddle Authors. All Rights Reserved. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/paddle/fluid/operators/scatter_op.cu b/paddle/fluid/operators/scatter_op.cu index f9eaae33a80..bdabb29fa68 100644 --- a/paddle/fluid/operators/scatter_op.cu +++ b/paddle/fluid/operators/scatter_op.cu @@ -1,4 +1,4 @@ -/* Copyright (c) 2016 PaddlePaddle Authors. All Rights Reserve. +/* Copyright (c) 2016 PaddlePaddle Authors. All Rights Reserved. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/paddle/fluid/operators/scatter_op.h b/paddle/fluid/operators/scatter_op.h index 65d10546328..3c6e7ece320 100644 --- a/paddle/fluid/operators/scatter_op.h +++ b/paddle/fluid/operators/scatter_op.h @@ -1,4 +1,4 @@ -/* Copyright (c) 2016 PaddlePaddle Authors. All Rights Reserve. +/* Copyright (c) 2016 PaddlePaddle Authors. All Rights Reserved. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/paddle/fluid/operators/scatter_test.cc b/paddle/fluid/operators/scatter_test.cc index 8fb5ef96af3..b67af3c3710 100644 --- a/paddle/fluid/operators/scatter_test.cc +++ b/paddle/fluid/operators/scatter_test.cc @@ -1,4 +1,4 @@ -/* Copyright (c) 2016 PaddlePaddle Authors. All Rights Reserve. +/* Copyright (c) 2016 PaddlePaddle Authors. All Rights Reserved. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/paddle/fluid/operators/send_op.cc b/paddle/fluid/operators/send_op.cc index 39b6c0e8c51..58850bf566e 100644 --- a/paddle/fluid/operators/send_op.cc +++ b/paddle/fluid/operators/send_op.cc @@ -1,4 +1,4 @@ -/* Copyright (c) 2016 PaddlePaddle Authors. All Rights Reserve. +/* Copyright (c) 2016 PaddlePaddle Authors. All Rights Reserved. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/paddle/fluid/operators/send_recv_op_test.cc b/paddle/fluid/operators/send_recv_op_test.cc index 37a3d246d71..008c012a32e 100644 --- a/paddle/fluid/operators/send_recv_op_test.cc +++ b/paddle/fluid/operators/send_recv_op_test.cc @@ -1,4 +1,4 @@ -/* Copyright (c) 2016 PaddlePaddle Authors. All Rights Reserve. +/* Copyright (c) 2016 PaddlePaddle Authors. All Rights Reserved. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/paddle/fluid/operators/sequence_concat_op.cc b/paddle/fluid/operators/sequence_concat_op.cc index 4ddf800d85e..126753edd09 100644 --- a/paddle/fluid/operators/sequence_concat_op.cc +++ b/paddle/fluid/operators/sequence_concat_op.cc @@ -1,4 +1,4 @@ -/* Copyright (c) 2016 PaddlePaddle Authors. All Rights Reserve. +/* Copyright (c) 2016 PaddlePaddle Authors. All Rights Reserved. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/paddle/fluid/operators/sequence_concat_op.cu.cc b/paddle/fluid/operators/sequence_concat_op.cu.cc index c5a280ef9e2..43860b7c517 100644 --- a/paddle/fluid/operators/sequence_concat_op.cu.cc +++ b/paddle/fluid/operators/sequence_concat_op.cu.cc @@ -1,4 +1,4 @@ -/* Copyright (c) 2016 PaddlePaddle Authors. All Rights Reserve. +/* Copyright (c) 2016 PaddlePaddle Authors. All Rights Reserved. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/paddle/fluid/operators/sequence_concat_op.h b/paddle/fluid/operators/sequence_concat_op.h index 9121196369f..9f04c419913 100644 --- a/paddle/fluid/operators/sequence_concat_op.h +++ b/paddle/fluid/operators/sequence_concat_op.h @@ -1,4 +1,4 @@ -/* Copyright (c) 2016 PaddlePaddle Authors. All Rights Reserve. +/* Copyright (c) 2016 PaddlePaddle Authors. All Rights Reserved. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/paddle/fluid/operators/sequence_conv_op.cc b/paddle/fluid/operators/sequence_conv_op.cc index af9938b1806..ec1f3a5da8c 100644 --- a/paddle/fluid/operators/sequence_conv_op.cc +++ b/paddle/fluid/operators/sequence_conv_op.cc @@ -1,4 +1,4 @@ -/* Copyright (c) 2016 PaddlePaddle Authors. All Rights Reserve. +/* Copyright (c) 2016 PaddlePaddle Authors. All Rights Reserved. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/paddle/fluid/operators/sequence_conv_op.cu.cc b/paddle/fluid/operators/sequence_conv_op.cu.cc index 36f9e8da95d..de482b7f10b 100644 --- a/paddle/fluid/operators/sequence_conv_op.cu.cc +++ b/paddle/fluid/operators/sequence_conv_op.cu.cc @@ -1,4 +1,4 @@ -/* Copyright (c) 2016 PaddlePaddle Authors. All Rights Reserve. +/* Copyright (c) 2016 PaddlePaddle Authors. All Rights Reserved. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/paddle/fluid/operators/sequence_conv_op.h b/paddle/fluid/operators/sequence_conv_op.h index 1c81067fea2..ee48339c52e 100644 --- a/paddle/fluid/operators/sequence_conv_op.h +++ b/paddle/fluid/operators/sequence_conv_op.h @@ -1,4 +1,4 @@ -/* Copyright (c) 2016 PaddlePaddle Authors. All Rights Reserve. +/* Copyright (c) 2016 PaddlePaddle Authors. All Rights Reserved. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/paddle/fluid/operators/sequence_erase_op.cc b/paddle/fluid/operators/sequence_erase_op.cc index 2e0adf8b190..32b9d7f7c15 100644 --- a/paddle/fluid/operators/sequence_erase_op.cc +++ b/paddle/fluid/operators/sequence_erase_op.cc @@ -1,4 +1,4 @@ -/* Copyright (c) 2016 PaddlePaddle Authors. All Rights Reserve. +/* Copyright (c) 2016 PaddlePaddle Authors. All Rights Reserved. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/paddle/fluid/operators/sequence_erase_op.cu b/paddle/fluid/operators/sequence_erase_op.cu index 43fc352fe78..fc9b91c351d 100644 --- a/paddle/fluid/operators/sequence_erase_op.cu +++ b/paddle/fluid/operators/sequence_erase_op.cu @@ -1,4 +1,4 @@ -/* Copyright (c) 2016 PaddlePaddle Authors. All Rights Reserve. +/* Copyright (c) 2016 PaddlePaddle Authors. All Rights Reserved. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/paddle/fluid/operators/sequence_erase_op.h b/paddle/fluid/operators/sequence_erase_op.h index e151279c7fc..b490c34f543 100644 --- a/paddle/fluid/operators/sequence_erase_op.h +++ b/paddle/fluid/operators/sequence_erase_op.h @@ -1,4 +1,4 @@ -/* Copyright (c) 2016 PaddlePaddle Authors. All Rights Reserve. +/* Copyright (c) 2016 PaddlePaddle Authors. All Rights Reserved. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/paddle/fluid/operators/sequence_expand_op.cc b/paddle/fluid/operators/sequence_expand_op.cc index 28645e01b84..a5d84d629b2 100644 --- a/paddle/fluid/operators/sequence_expand_op.cc +++ b/paddle/fluid/operators/sequence_expand_op.cc @@ -1,4 +1,4 @@ -/* Copyright (c) 2016 PaddlePaddle Authors. All Rights Reserve. +/* Copyright (c) 2016 PaddlePaddle Authors. All Rights Reserved. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/paddle/fluid/operators/sequence_expand_op.cu b/paddle/fluid/operators/sequence_expand_op.cu index 5ac76d83da6..26622d23afa 100644 --- a/paddle/fluid/operators/sequence_expand_op.cu +++ b/paddle/fluid/operators/sequence_expand_op.cu @@ -1,4 +1,4 @@ -/* Copyright (c) 2016 PaddlePaddle Authors. All Rights Reserve. +/* Copyright (c) 2016 PaddlePaddle Authors. All Rights Reserved. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/paddle/fluid/operators/sequence_expand_op.h b/paddle/fluid/operators/sequence_expand_op.h index 8010627ff6f..76dde976db2 100644 --- a/paddle/fluid/operators/sequence_expand_op.h +++ b/paddle/fluid/operators/sequence_expand_op.h @@ -1,4 +1,4 @@ -/* Copyright (c) 2016 PaddlePaddle Authors. All Rights Reserve. +/* Copyright (c) 2016 PaddlePaddle Authors. All Rights Reserved. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/paddle/fluid/operators/sequence_pool_op.cc b/paddle/fluid/operators/sequence_pool_op.cc index 2cfb336b2e0..3d4d54a3a3f 100644 --- a/paddle/fluid/operators/sequence_pool_op.cc +++ b/paddle/fluid/operators/sequence_pool_op.cc @@ -1,4 +1,4 @@ -/* Copyright (c) 2016 PaddlePaddle Authors. All Rights Reserve. +/* Copyright (c) 2016 PaddlePaddle Authors. All Rights Reserved. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/paddle/fluid/operators/sequence_pool_op.cu b/paddle/fluid/operators/sequence_pool_op.cu index 364769c39bd..2bf0697af3c 100644 --- a/paddle/fluid/operators/sequence_pool_op.cu +++ b/paddle/fluid/operators/sequence_pool_op.cu @@ -1,4 +1,4 @@ -/* Copyright (c) 2016 PaddlePaddle Authors. All Rights Reserve. +/* Copyright (c) 2016 PaddlePaddle Authors. All Rights Reserved. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/paddle/fluid/operators/sequence_pool_op.h b/paddle/fluid/operators/sequence_pool_op.h index 7b67e6201eb..8706ff14aa2 100644 --- a/paddle/fluid/operators/sequence_pool_op.h +++ b/paddle/fluid/operators/sequence_pool_op.h @@ -1,4 +1,4 @@ -/* Copyright (c) 2016 PaddlePaddle Authors. All Rights Reserve. +/* Copyright (c) 2016 PaddlePaddle Authors. All Rights Reserved. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/paddle/fluid/operators/sequence_reshape_op.cc b/paddle/fluid/operators/sequence_reshape_op.cc index c4e42d3eeb5..a2999650b89 100644 --- a/paddle/fluid/operators/sequence_reshape_op.cc +++ b/paddle/fluid/operators/sequence_reshape_op.cc @@ -1,4 +1,4 @@ -// Copyright (c) 2018 PaddlePaddle Authors. All Rights Reserve. +// Copyright (c) 2018 PaddlePaddle Authors. All Rights Reserved. // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. diff --git a/paddle/fluid/operators/sequence_reshape_op.cu b/paddle/fluid/operators/sequence_reshape_op.cu index 5ca3497396e..232e031c0b0 100644 --- a/paddle/fluid/operators/sequence_reshape_op.cu +++ b/paddle/fluid/operators/sequence_reshape_op.cu @@ -1,4 +1,4 @@ -/* Copyright (c) 2018 PaddlePaddle Authors. All Rights Reserve. +/* Copyright (c) 2018 PaddlePaddle Authors. All Rights Reserved. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/paddle/fluid/operators/sequence_reshape_op.h b/paddle/fluid/operators/sequence_reshape_op.h index 7a5d1261da9..f0b5be0218c 100644 --- a/paddle/fluid/operators/sequence_reshape_op.h +++ b/paddle/fluid/operators/sequence_reshape_op.h @@ -1,4 +1,4 @@ -// Copyright (c) 2018 PaddlePaddle Authors. All Rights Reserve. +// Copyright (c) 2018 PaddlePaddle Authors. All Rights Reserved. // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. diff --git a/paddle/fluid/operators/sequence_slice_op.cc b/paddle/fluid/operators/sequence_slice_op.cc index 87b8eff6462..d09e5bca56b 100644 --- a/paddle/fluid/operators/sequence_slice_op.cc +++ b/paddle/fluid/operators/sequence_slice_op.cc @@ -1,4 +1,4 @@ -/* Copyright (c) 2016 PaddlePaddle Authors. All Rights Reserve. +/* Copyright (c) 2016 PaddlePaddle Authors. All Rights Reserved. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/paddle/fluid/operators/sequence_slice_op.cu b/paddle/fluid/operators/sequence_slice_op.cu index 041fabdf9a2..059e802df0e 100755 --- a/paddle/fluid/operators/sequence_slice_op.cu +++ b/paddle/fluid/operators/sequence_slice_op.cu @@ -1,4 +1,4 @@ -/* Copyright (c) 2016 PaddlePaddle Authors. All Rights Reserve. +/* Copyright (c) 2016 PaddlePaddle Authors. All Rights Reserved. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/paddle/fluid/operators/sequence_slice_op.h b/paddle/fluid/operators/sequence_slice_op.h index 65c36a32aa1..4f6d70483ec 100644 --- a/paddle/fluid/operators/sequence_slice_op.h +++ b/paddle/fluid/operators/sequence_slice_op.h @@ -1,4 +1,4 @@ -/* Copyright (c) 2016 PaddlePaddle Authors. All Rights Reserve. +/* Copyright (c) 2016 PaddlePaddle Authors. All Rights Reserved. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/paddle/fluid/operators/sequence_softmax_op.cc b/paddle/fluid/operators/sequence_softmax_op.cc index f966b716207..7e685eb3dc7 100644 --- a/paddle/fluid/operators/sequence_softmax_op.cc +++ b/paddle/fluid/operators/sequence_softmax_op.cc @@ -1,4 +1,4 @@ -/* Copyright (c) 2016 PaddlePaddle Authors. All Rights Reserve. +/* Copyright (c) 2016 PaddlePaddle Authors. All Rights Reserved. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/paddle/fluid/operators/sequence_softmax_op.cu.cc b/paddle/fluid/operators/sequence_softmax_op.cu.cc index c42dfd75409..295c68c5b93 100644 --- a/paddle/fluid/operators/sequence_softmax_op.cu.cc +++ b/paddle/fluid/operators/sequence_softmax_op.cu.cc @@ -1,4 +1,4 @@ -/* Copyright (c) 2016 PaddlePaddle Authors. All Rights Reserve. +/* Copyright (c) 2016 PaddlePaddle Authors. All Rights Reserved. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/paddle/fluid/operators/sequence_softmax_op.h b/paddle/fluid/operators/sequence_softmax_op.h index e6c21c67b33..cb93a02b838 100644 --- a/paddle/fluid/operators/sequence_softmax_op.h +++ b/paddle/fluid/operators/sequence_softmax_op.h @@ -1,4 +1,4 @@ -/* Copyright (c) 2016 PaddlePaddle Authors. All Rights Reserve. +/* Copyright (c) 2016 PaddlePaddle Authors. All Rights Reserved. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/paddle/fluid/operators/sgd_op.cc b/paddle/fluid/operators/sgd_op.cc index f1e23a62f4e..7cc73de8788 100644 --- a/paddle/fluid/operators/sgd_op.cc +++ b/paddle/fluid/operators/sgd_op.cc @@ -1,4 +1,4 @@ -/* Copyright (c) 2016 PaddlePaddle Authors. All Rights Reserve. +/* Copyright (c) 2016 PaddlePaddle Authors. All Rights Reserved. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/paddle/fluid/operators/sgd_op.cu b/paddle/fluid/operators/sgd_op.cu index 09374e20494..9d211541c0b 100644 --- a/paddle/fluid/operators/sgd_op.cu +++ b/paddle/fluid/operators/sgd_op.cu @@ -1,4 +1,4 @@ -/* Copyright (c) 2016 PaddlePaddle Authors. All Rights Reserve. +/* Copyright (c) 2016 PaddlePaddle Authors. All Rights Reserved. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/paddle/fluid/operators/sgd_op.h b/paddle/fluid/operators/sgd_op.h index f1eaaecdb1e..2fec84815a9 100644 --- a/paddle/fluid/operators/sgd_op.h +++ b/paddle/fluid/operators/sgd_op.h @@ -1,4 +1,4 @@ -/* Copyright (c) 2016 PaddlePaddle Authors. All Rights Reserve. +/* Copyright (c) 2016 PaddlePaddle Authors. All Rights Reserved. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/paddle/fluid/operators/shrink_rnn_memory_op.cc b/paddle/fluid/operators/shrink_rnn_memory_op.cc index 7fe0526381d..183982f90fb 100644 --- a/paddle/fluid/operators/shrink_rnn_memory_op.cc +++ b/paddle/fluid/operators/shrink_rnn_memory_op.cc @@ -1,4 +1,4 @@ -/* Copyright (c) 2016 PaddlePaddle Authors. All Rights Reserve. +/* Copyright (c) 2016 PaddlePaddle Authors. All Rights Reserved. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/paddle/fluid/operators/sigmoid_cross_entropy_with_logits_op.cc b/paddle/fluid/operators/sigmoid_cross_entropy_with_logits_op.cc index 3188415a2bd..7b93f19bb2f 100644 --- a/paddle/fluid/operators/sigmoid_cross_entropy_with_logits_op.cc +++ b/paddle/fluid/operators/sigmoid_cross_entropy_with_logits_op.cc @@ -1,4 +1,4 @@ -/* Copyright (c) 2016 PaddlePaddle Authors. All Rights Reserve. +/* Copyright (c) 2016 PaddlePaddle Authors. All Rights Reserved. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/paddle/fluid/operators/sigmoid_cross_entropy_with_logits_op.cu b/paddle/fluid/operators/sigmoid_cross_entropy_with_logits_op.cu index daa9d3e4fa5..9aadac1a416 100644 --- a/paddle/fluid/operators/sigmoid_cross_entropy_with_logits_op.cu +++ b/paddle/fluid/operators/sigmoid_cross_entropy_with_logits_op.cu @@ -1,4 +1,4 @@ -/* Copyright (c) 2016 PaddlePaddle Authors. All Rights Reserve. +/* Copyright (c) 2016 PaddlePaddle Authors. All Rights Reserved. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/paddle/fluid/operators/sigmoid_cross_entropy_with_logits_op.h b/paddle/fluid/operators/sigmoid_cross_entropy_with_logits_op.h index 977849f7627..faef72866eb 100644 --- a/paddle/fluid/operators/sigmoid_cross_entropy_with_logits_op.h +++ b/paddle/fluid/operators/sigmoid_cross_entropy_with_logits_op.h @@ -1,4 +1,4 @@ -/* Copyright (c) 2016 PaddlePaddle Authors. All Rights Reserve. +/* Copyright (c) 2016 PaddlePaddle Authors. All Rights Reserved. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/paddle/fluid/operators/sign_op.cc b/paddle/fluid/operators/sign_op.cc index 54b962538b8..8f8b7abd032 100644 --- a/paddle/fluid/operators/sign_op.cc +++ b/paddle/fluid/operators/sign_op.cc @@ -1,4 +1,4 @@ -/* Copyright (c) 2016 PaddlePaddle Authors. All Rights Reserve. +/* Copyright (c) 2016 PaddlePaddle Authors. All Rights Reserved. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/paddle/fluid/operators/sign_op.cu b/paddle/fluid/operators/sign_op.cu index 93cdb311eb4..e0d7a87e648 100644 --- a/paddle/fluid/operators/sign_op.cu +++ b/paddle/fluid/operators/sign_op.cu @@ -1,4 +1,4 @@ -/* Copyright (c) 2016 PaddlePaddle Authors. All Rights Reserve. +/* Copyright (c) 2016 PaddlePaddle Authors. All Rights Reserved. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/paddle/fluid/operators/sign_op.h b/paddle/fluid/operators/sign_op.h index 1c2ebebee40..b99934daee1 100644 --- a/paddle/fluid/operators/sign_op.h +++ b/paddle/fluid/operators/sign_op.h @@ -1,4 +1,4 @@ -/* Copyright (c) 2016 PaddlePaddle Authors. All Rights Reserve. +/* Copyright (c) 2016 PaddlePaddle Authors. All Rights Reserved. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/paddle/fluid/operators/smooth_l1_loss_op.cc b/paddle/fluid/operators/smooth_l1_loss_op.cc index e6eede23ee3..658eb019521 100644 --- a/paddle/fluid/operators/smooth_l1_loss_op.cc +++ b/paddle/fluid/operators/smooth_l1_loss_op.cc @@ -1,4 +1,4 @@ -/* Copyright (c) 2016 PaddlePaddle Authors. All Rights Reserve. +/* Copyright (c) 2016 PaddlePaddle Authors. All Rights Reserved. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/paddle/fluid/operators/smooth_l1_loss_op.cu b/paddle/fluid/operators/smooth_l1_loss_op.cu index 94c0d6cd299..dfbb5c90588 100644 --- a/paddle/fluid/operators/smooth_l1_loss_op.cu +++ b/paddle/fluid/operators/smooth_l1_loss_op.cu @@ -1,4 +1,4 @@ -/* Copyright (c) 2016 PaddlePaddle Authors. All Rights Reserve. +/* Copyright (c) 2016 PaddlePaddle Authors. All Rights Reserved. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/paddle/fluid/operators/smooth_l1_loss_op.h b/paddle/fluid/operators/smooth_l1_loss_op.h index 325ad824e18..efe3afba18e 100644 --- a/paddle/fluid/operators/smooth_l1_loss_op.h +++ b/paddle/fluid/operators/smooth_l1_loss_op.h @@ -1,4 +1,4 @@ -/* Copyright (c) 2016 PaddlePaddle Authors. All Rights Reserve. +/* Copyright (c) 2016 PaddlePaddle Authors. All Rights Reserved. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/paddle/fluid/operators/softmax_op.cc b/paddle/fluid/operators/softmax_op.cc index 1d9462d08b9..09275ef290e 100644 --- a/paddle/fluid/operators/softmax_op.cc +++ b/paddle/fluid/operators/softmax_op.cc @@ -1,4 +1,4 @@ -/* Copyright (c) 2016 PaddlePaddle Authors. All Rights Reserve. +/* Copyright (c) 2016 PaddlePaddle Authors. All Rights Reserved. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/paddle/fluid/operators/softmax_op.cu.cc b/paddle/fluid/operators/softmax_op.cu.cc index c53d8a2bc82..dbd13fd38a3 100644 --- a/paddle/fluid/operators/softmax_op.cu.cc +++ b/paddle/fluid/operators/softmax_op.cu.cc @@ -1,4 +1,4 @@ -/* Copyright (c) 2016 PaddlePaddle Authors. All Rights Reserve. +/* Copyright (c) 2016 PaddlePaddle Authors. All Rights Reserved. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/paddle/fluid/operators/softmax_op.h b/paddle/fluid/operators/softmax_op.h index 9287f023103..600da45a0bb 100644 --- a/paddle/fluid/operators/softmax_op.h +++ b/paddle/fluid/operators/softmax_op.h @@ -1,4 +1,4 @@ -/* Copyright (c) 2016 PaddlePaddle Authors. All Rights Reserve. +/* Copyright (c) 2016 PaddlePaddle Authors. All Rights Reserved. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/paddle/fluid/operators/softmax_with_cross_entropy_op.cc b/paddle/fluid/operators/softmax_with_cross_entropy_op.cc index 79d56cb97d3..857e5733573 100644 --- a/paddle/fluid/operators/softmax_with_cross_entropy_op.cc +++ b/paddle/fluid/operators/softmax_with_cross_entropy_op.cc @@ -1,4 +1,4 @@ -/* Copyright (c) 2016 PaddlePaddle Authors. All Rights Reserve. +/* Copyright (c) 2016 PaddlePaddle Authors. All Rights Reserved. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/paddle/fluid/operators/softmax_with_cross_entropy_op.cu b/paddle/fluid/operators/softmax_with_cross_entropy_op.cu index 410d9e8887c..39b246a5bed 100644 --- a/paddle/fluid/operators/softmax_with_cross_entropy_op.cu +++ b/paddle/fluid/operators/softmax_with_cross_entropy_op.cu @@ -1,4 +1,4 @@ -/* Copyright (c) 2016 PaddlePaddle Authors. All Rights Reserve. +/* Copyright (c) 2016 PaddlePaddle Authors. All Rights Reserved. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/paddle/fluid/operators/softmax_with_cross_entropy_op.h b/paddle/fluid/operators/softmax_with_cross_entropy_op.h index 0927efd42ce..dd6f6aca5ad 100644 --- a/paddle/fluid/operators/softmax_with_cross_entropy_op.h +++ b/paddle/fluid/operators/softmax_with_cross_entropy_op.h @@ -1,4 +1,4 @@ -/* Copyright (c) 2016 PaddlePaddle Authors. All Rights Reserve. +/* Copyright (c) 2016 PaddlePaddle Authors. All Rights Reserved. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/paddle/fluid/operators/split_lod_tensor_op.cc b/paddle/fluid/operators/split_lod_tensor_op.cc index f9600d99a36..1c5d647600d 100644 --- a/paddle/fluid/operators/split_lod_tensor_op.cc +++ b/paddle/fluid/operators/split_lod_tensor_op.cc @@ -1,4 +1,4 @@ -/* Copyright (c) 2016 PaddlePaddle Authors. All Rights Reserve. +/* Copyright (c) 2016 PaddlePaddle Authors. All Rights Reserved. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/paddle/fluid/operators/split_op.cc b/paddle/fluid/operators/split_op.cc index f8bc22fe1d3..dffac772f11 100644 --- a/paddle/fluid/operators/split_op.cc +++ b/paddle/fluid/operators/split_op.cc @@ -1,4 +1,4 @@ -/* Copyright (c) 2016 PaddlePaddle Authors. All Rights Reserve. +/* Copyright (c) 2016 PaddlePaddle Authors. All Rights Reserved. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/paddle/fluid/operators/split_op.cu.cc b/paddle/fluid/operators/split_op.cu.cc index 279691c759e..efa378af857 100644 --- a/paddle/fluid/operators/split_op.cu.cc +++ b/paddle/fluid/operators/split_op.cu.cc @@ -1,4 +1,4 @@ -/* Copyright (c) 2016 PaddlePaddle Authors. All Rights Reserve. +/* Copyright (c) 2016 PaddlePaddle Authors. All Rights Reserved. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/paddle/fluid/operators/split_op.h b/paddle/fluid/operators/split_op.h index 54420e1bf6e..ae8562c0c50 100644 --- a/paddle/fluid/operators/split_op.h +++ b/paddle/fluid/operators/split_op.h @@ -1,4 +1,4 @@ -/* Copyright (c) 2016 PaddlePaddle Authors. All Rights Reserve. +/* Copyright (c) 2016 PaddlePaddle Authors. All Rights Reserved. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/paddle/fluid/operators/split_selected_rows_op.cc b/paddle/fluid/operators/split_selected_rows_op.cc index c30280f6545..b0e21e01ecc 100644 --- a/paddle/fluid/operators/split_selected_rows_op.cc +++ b/paddle/fluid/operators/split_selected_rows_op.cc @@ -1,4 +1,4 @@ -/* Copyright (c) 2016 PaddlePaddle Authors. All Rights Reserve. +/* Copyright (c) 2016 PaddlePaddle Authors. All Rights Reserved. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/paddle/fluid/operators/split_selected_rows_op.cu b/paddle/fluid/operators/split_selected_rows_op.cu index 0bbf1ecfaef..7250917036f 100644 --- a/paddle/fluid/operators/split_selected_rows_op.cu +++ b/paddle/fluid/operators/split_selected_rows_op.cu @@ -1,4 +1,4 @@ -/* Copyright (c) 2016 PaddlePaddle Authors. All Rights Reserve. +/* Copyright (c) 2016 PaddlePaddle Authors. All Rights Reserved. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/paddle/fluid/operators/split_selected_rows_op.h b/paddle/fluid/operators/split_selected_rows_op.h index af44b09b700..23baf8e72ec 100644 --- a/paddle/fluid/operators/split_selected_rows_op.h +++ b/paddle/fluid/operators/split_selected_rows_op.h @@ -1,4 +1,4 @@ -/* Copyright (c) 2016 PaddlePaddle Authors. All Rights Reserve. +/* Copyright (c) 2016 PaddlePaddle Authors. All Rights Reserved. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/paddle/fluid/operators/spp_op.cc b/paddle/fluid/operators/spp_op.cc index e6755b12000..f1c4415f27d 100644 --- a/paddle/fluid/operators/spp_op.cc +++ b/paddle/fluid/operators/spp_op.cc @@ -1,4 +1,4 @@ -/* Copyright (c) 2016 PaddlePaddle Authors. All Rights Reserve. +/* Copyright (c) 2016 PaddlePaddle Authors. All Rights Reserved. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/paddle/fluid/operators/spp_op.cu.cc b/paddle/fluid/operators/spp_op.cu.cc index cad2ca5ef8e..7fe63d17c0d 100644 --- a/paddle/fluid/operators/spp_op.cu.cc +++ b/paddle/fluid/operators/spp_op.cu.cc @@ -1,4 +1,4 @@ -/* Copyright (c) 2016 PaddlePaddle Authors. All Rights Reserve. +/* Copyright (c) 2016 PaddlePaddle Authors. All Rights Reserved. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/paddle/fluid/operators/spp_op.h b/paddle/fluid/operators/spp_op.h index 1da1f805807..3d2f2263257 100644 --- a/paddle/fluid/operators/spp_op.h +++ b/paddle/fluid/operators/spp_op.h @@ -1,4 +1,4 @@ -/* Copyright (c) 2016 PaddlePaddle Authors. All Rights Reserve. +/* Copyright (c) 2016 PaddlePaddle Authors. All Rights Reserved. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/paddle/fluid/operators/squared_l2_distance_op.cc b/paddle/fluid/operators/squared_l2_distance_op.cc index c1d0c2c7f39..1c5e87040a8 100644 --- a/paddle/fluid/operators/squared_l2_distance_op.cc +++ b/paddle/fluid/operators/squared_l2_distance_op.cc @@ -1,4 +1,4 @@ -/* Copyright (c) 2016 PaddlePaddle Authors. All Rights Reserve. +/* Copyright (c) 2016 PaddlePaddle Authors. All Rights Reserved. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/paddle/fluid/operators/squared_l2_distance_op.cu b/paddle/fluid/operators/squared_l2_distance_op.cu index 959e7afac99..3e80ae8dd22 100644 --- a/paddle/fluid/operators/squared_l2_distance_op.cu +++ b/paddle/fluid/operators/squared_l2_distance_op.cu @@ -1,4 +1,4 @@ -/* Copyright (c) 2016 PaddlePaddle Authors. All Rights Reserve. +/* Copyright (c) 2016 PaddlePaddle Authors. All Rights Reserved. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/paddle/fluid/operators/squared_l2_distance_op.h b/paddle/fluid/operators/squared_l2_distance_op.h index aab241247e5..e0133d33e6a 100644 --- a/paddle/fluid/operators/squared_l2_distance_op.h +++ b/paddle/fluid/operators/squared_l2_distance_op.h @@ -1,4 +1,4 @@ -/* Copyright (c) 2016 PaddlePaddle Authors. All Rights Reserve. +/* Copyright (c) 2016 PaddlePaddle Authors. All Rights Reserved. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/paddle/fluid/operators/squared_l2_norm_op.cc b/paddle/fluid/operators/squared_l2_norm_op.cc index a43cc22994b..b64df2a2188 100644 --- a/paddle/fluid/operators/squared_l2_norm_op.cc +++ b/paddle/fluid/operators/squared_l2_norm_op.cc @@ -1,4 +1,4 @@ -/* Copyright (c) 2016 PaddlePaddle Authors. All Rights Reserve. +/* Copyright (c) 2016 PaddlePaddle Authors. All Rights Reserved. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/paddle/fluid/operators/squared_l2_norm_op.cu b/paddle/fluid/operators/squared_l2_norm_op.cu index 52f4ab79b21..87830413da3 100644 --- a/paddle/fluid/operators/squared_l2_norm_op.cu +++ b/paddle/fluid/operators/squared_l2_norm_op.cu @@ -1,4 +1,4 @@ -/* Copyright (c) 2016 PaddlePaddle Authors. All Rights Reserve. +/* Copyright (c) 2016 PaddlePaddle Authors. All Rights Reserved. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/paddle/fluid/operators/squared_l2_norm_op.h b/paddle/fluid/operators/squared_l2_norm_op.h index 56524636b8f..b32db4569e7 100644 --- a/paddle/fluid/operators/squared_l2_norm_op.h +++ b/paddle/fluid/operators/squared_l2_norm_op.h @@ -1,4 +1,4 @@ -/* Copyright (c) 2016 PaddlePaddle Authors. All Rights Reserve. +/* Copyright (c) 2016 PaddlePaddle Authors. All Rights Reserved. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/paddle/fluid/operators/strided_memcpy.h b/paddle/fluid/operators/strided_memcpy.h index 4c7b90693a2..22c1db82e9f 100644 --- a/paddle/fluid/operators/strided_memcpy.h +++ b/paddle/fluid/operators/strided_memcpy.h @@ -1,4 +1,4 @@ -/* Copyright (c) 2016 PaddlePaddle Authors. All Rights Reserve. +/* Copyright (c) 2016 PaddlePaddle Authors. All Rights Reserved. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/paddle/fluid/operators/strided_memcpy_test.cc b/paddle/fluid/operators/strided_memcpy_test.cc index a369941a993..a6ca82d16f2 100644 --- a/paddle/fluid/operators/strided_memcpy_test.cc +++ b/paddle/fluid/operators/strided_memcpy_test.cc @@ -1,4 +1,4 @@ -/* Copyright (c) 2016 PaddlePaddle Authors. All Rights Reserve. +/* Copyright (c) 2016 PaddlePaddle Authors. All Rights Reserved. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/paddle/fluid/operators/sum_op.cc b/paddle/fluid/operators/sum_op.cc index 96f851720ae..bfc5709c4b7 100644 --- a/paddle/fluid/operators/sum_op.cc +++ b/paddle/fluid/operators/sum_op.cc @@ -1,4 +1,4 @@ -/* Copyright (c) 2016 PaddlePaddle Authors. All Rights Reserve. +/* Copyright (c) 2016 PaddlePaddle Authors. All Rights Reserved. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at diff --git a/paddle/fluid/operators/sum_op.cu b/paddle/fluid/operators/sum_op.cu index 8d8f90d7510..89bcd1bbc86 100644 --- a/paddle/fluid/operators/sum_op.cu +++ b/paddle/fluid/operators/sum_op.cu @@ -1,4 +1,4 @@ -/* Copyright (c) 2016 PaddlePaddle Authors. All Rights Reserve. +/* Copyright (c) 2016 PaddlePaddle Authors. All Rights Reserved. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at diff --git a/paddle/fluid/operators/sum_op.h b/paddle/fluid/operators/sum_op.h index 08218b6836e..c9f22237d93 100644 --- a/paddle/fluid/operators/sum_op.h +++ b/paddle/fluid/operators/sum_op.h @@ -1,4 +1,4 @@ -/* Copyright (c) 2016 PaddlePaddle Authors. All Rights Reserve. +/* Copyright (c) 2016 PaddlePaddle Authors. All Rights Reserved. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at diff --git a/paddle/fluid/operators/target_assign_op.cc b/paddle/fluid/operators/target_assign_op.cc index bafb830df93..a894b12fa35 100644 --- a/paddle/fluid/operators/target_assign_op.cc +++ b/paddle/fluid/operators/target_assign_op.cc @@ -1,4 +1,4 @@ -/* Copyright (c) 2018 PaddlePaddle Authors. All Rights Reserve. +/* Copyright (c) 2018 PaddlePaddle Authors. All Rights Reserved. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/paddle/fluid/operators/target_assign_op.cu b/paddle/fluid/operators/target_assign_op.cu index fa02b8aac90..24664f99b20 100644 --- a/paddle/fluid/operators/target_assign_op.cu +++ b/paddle/fluid/operators/target_assign_op.cu @@ -1,4 +1,4 @@ -/* Copyright (c) 2018 PaddlePaddle Authors. All Rights Reserve. +/* Copyright (c) 2018 PaddlePaddle Authors. All Rights Reserved. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/paddle/fluid/operators/target_assign_op.h b/paddle/fluid/operators/target_assign_op.h index a1b2fe6f350..3d529737414 100644 --- a/paddle/fluid/operators/target_assign_op.h +++ b/paddle/fluid/operators/target_assign_op.h @@ -1,4 +1,4 @@ -/* Copyright (c) 2018 PaddlePaddle Authors. All Rights Reserve. +/* Copyright (c) 2018 PaddlePaddle Authors. All Rights Reserved. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/paddle/fluid/operators/tensor_array_read_write_op.cc b/paddle/fluid/operators/tensor_array_read_write_op.cc index 704ee964c90..278b3481176 100644 --- a/paddle/fluid/operators/tensor_array_read_write_op.cc +++ b/paddle/fluid/operators/tensor_array_read_write_op.cc @@ -1,4 +1,4 @@ -/* Copyright (c) 2016 PaddlePaddle Authors. All Rights Reserve. +/* Copyright (c) 2016 PaddlePaddle Authors. All Rights Reserved. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/paddle/fluid/operators/top_k_op.cc b/paddle/fluid/operators/top_k_op.cc index c81ea860d0c..2e4e8caed53 100644 --- a/paddle/fluid/operators/top_k_op.cc +++ b/paddle/fluid/operators/top_k_op.cc @@ -1,4 +1,4 @@ -/* Copyright (c) 2016 PaddlePaddle Authors. All Rights Reserve. +/* Copyright (c) 2016 PaddlePaddle Authors. All Rights Reserved. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/paddle/fluid/operators/top_k_op.cu b/paddle/fluid/operators/top_k_op.cu index 5390cb5063b..bfd26c2f229 100644 --- a/paddle/fluid/operators/top_k_op.cu +++ b/paddle/fluid/operators/top_k_op.cu @@ -1,4 +1,4 @@ -/* Copyright (c) 2016 PaddlePaddle Authors. All Rights Reserve. +/* Copyright (c) 2016 PaddlePaddle Authors. All Rights Reserved. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/paddle/fluid/operators/top_k_op.h b/paddle/fluid/operators/top_k_op.h index e32b3515007..42828b7e656 100644 --- a/paddle/fluid/operators/top_k_op.h +++ b/paddle/fluid/operators/top_k_op.h @@ -1,4 +1,4 @@ -/* Copyright (c) 2016 PaddlePaddle Authors. All Rights Reserve. +/* Copyright (c) 2016 PaddlePaddle Authors. All Rights Reserved. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/paddle/fluid/operators/transpose_op.cc b/paddle/fluid/operators/transpose_op.cc index a3d8acffc26..87b1f530e08 100644 --- a/paddle/fluid/operators/transpose_op.cc +++ b/paddle/fluid/operators/transpose_op.cc @@ -1,4 +1,4 @@ -/* Copyright (c) 2016 PaddlePaddle Authors. All Rights Reserve. +/* Copyright (c) 2016 PaddlePaddle Authors. All Rights Reserved. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/paddle/fluid/operators/transpose_op.cu.cc b/paddle/fluid/operators/transpose_op.cu.cc index f8667ab369e..bcd1fb63139 100644 --- a/paddle/fluid/operators/transpose_op.cu.cc +++ b/paddle/fluid/operators/transpose_op.cu.cc @@ -1,4 +1,4 @@ -/* Copyright (c) 2016 PaddlePaddle Authors. All Rights Reserve. +/* Copyright (c) 2016 PaddlePaddle Authors. All Rights Reserved. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/paddle/fluid/operators/transpose_op.h b/paddle/fluid/operators/transpose_op.h index 1fb419474ab..90f16499a6f 100644 --- a/paddle/fluid/operators/transpose_op.h +++ b/paddle/fluid/operators/transpose_op.h @@ -1,4 +1,4 @@ -/* Copyright (c) 2016 PaddlePaddle Authors. All Rights Reserve. +/* Copyright (c) 2016 PaddlePaddle Authors. All Rights Reserved. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/paddle/fluid/operators/uniform_random_op.cc b/paddle/fluid/operators/uniform_random_op.cc index b6fea1d4485..6c0167deab5 100644 --- a/paddle/fluid/operators/uniform_random_op.cc +++ b/paddle/fluid/operators/uniform_random_op.cc @@ -1,4 +1,4 @@ -/* Copyright (c) 2016 PaddlePaddle Authors. All Rights Reserve. +/* Copyright (c) 2016 PaddlePaddle Authors. All Rights Reserved. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/paddle/fluid/operators/uniform_random_op.cu b/paddle/fluid/operators/uniform_random_op.cu index 9afca68e59f..877d81d5c48 100644 --- a/paddle/fluid/operators/uniform_random_op.cu +++ b/paddle/fluid/operators/uniform_random_op.cu @@ -1,4 +1,4 @@ -/* Copyright (c) 2016 PaddlePaddle Authors. All Rights Reserve. +/* Copyright (c) 2016 PaddlePaddle Authors. All Rights Reserved. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/paddle/fluid/operators/unpool_op.cc b/paddle/fluid/operators/unpool_op.cc index 2e0b271fed6..d3bd7fda09c 100644 --- a/paddle/fluid/operators/unpool_op.cc +++ b/paddle/fluid/operators/unpool_op.cc @@ -1,4 +1,4 @@ -/* Copyright (c) 2016 PaddlePaddle Authors. All Rights Reserve. +/* Copyright (c) 2016 PaddlePaddle Authors. All Rights Reserved. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/paddle/fluid/operators/unpool_op.cu.cc b/paddle/fluid/operators/unpool_op.cu.cc index 15d81eb296b..7c59a0feaa4 100644 --- a/paddle/fluid/operators/unpool_op.cu.cc +++ b/paddle/fluid/operators/unpool_op.cu.cc @@ -1,4 +1,4 @@ -/* Copyright (c) 2016 PaddlePaddle Authors. All Rights Reserve. +/* Copyright (c) 2016 PaddlePaddle Authors. All Rights Reserved. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/paddle/fluid/operators/unpool_op.h b/paddle/fluid/operators/unpool_op.h index ceed5507391..a4421045756 100644 --- a/paddle/fluid/operators/unpool_op.h +++ b/paddle/fluid/operators/unpool_op.h @@ -1,4 +1,4 @@ -/* Copyright (c) 2016 PaddlePaddle Authors. All Rights Reserve. +/* Copyright (c) 2016 PaddlePaddle Authors. All Rights Reserved. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/paddle/fluid/operators/warpctc_op.cc b/paddle/fluid/operators/warpctc_op.cc index 1c05fed0b47..940bf4fe7ba 100644 --- a/paddle/fluid/operators/warpctc_op.cc +++ b/paddle/fluid/operators/warpctc_op.cc @@ -1,4 +1,4 @@ -/* Copyright (c) 2016 PaddlePaddle Authors. All Rights Reserve. +/* Copyright (c) 2016 PaddlePaddle Authors. All Rights Reserved. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/paddle/fluid/operators/warpctc_op.cu.cc b/paddle/fluid/operators/warpctc_op.cu.cc index 9ee7f970a9a..6f8559f542f 100644 --- a/paddle/fluid/operators/warpctc_op.cu.cc +++ b/paddle/fluid/operators/warpctc_op.cu.cc @@ -1,4 +1,4 @@ -/* Copyright (c) 2016 PaddlePaddle Authors. All Rights Reserve. +/* Copyright (c) 2016 PaddlePaddle Authors. All Rights Reserved. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/paddle/fluid/operators/warpctc_op.h b/paddle/fluid/operators/warpctc_op.h index a1de71627ee..aefb58bdcd1 100644 --- a/paddle/fluid/operators/warpctc_op.h +++ b/paddle/fluid/operators/warpctc_op.h @@ -1,4 +1,4 @@ -/* Copyright (c) 2016 PaddlePaddle Authors. All Rights Reserve. +/* Copyright (c) 2016 PaddlePaddle Authors. All Rights Reserved. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/paddle/fluid/operators/while_op.cc b/paddle/fluid/operators/while_op.cc index a7a05cc5f79..94a11eaf782 100644 --- a/paddle/fluid/operators/while_op.cc +++ b/paddle/fluid/operators/while_op.cc @@ -1,4 +1,4 @@ -/* Copyright (c) 2016 PaddlePaddle Authors. All Rights Reserve. +/* Copyright (c) 2016 PaddlePaddle Authors. All Rights Reserved. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/paddle/fluid/platform/assert.h b/paddle/fluid/platform/assert.h index 1f5a8f6a195..123d3598f4f 100644 --- a/paddle/fluid/platform/assert.h +++ b/paddle/fluid/platform/assert.h @@ -1,4 +1,4 @@ -/* Copyright (c) 2018 PaddlePaddle Authors. All Rights Reserve. +/* Copyright (c) 2018 PaddlePaddle Authors. All Rights Reserved. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/paddle/fluid/platform/call_once.h b/paddle/fluid/platform/call_once.h index 44a4d38f679..fa34972c38d 100644 --- a/paddle/fluid/platform/call_once.h +++ b/paddle/fluid/platform/call_once.h @@ -1,4 +1,4 @@ -/* Copyright (c) 2016 PaddlePaddle Authors. All Rights Reserve. +/* Copyright (c) 2016 PaddlePaddle Authors. All Rights Reserved. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/paddle/fluid/platform/cpu_info.cc b/paddle/fluid/platform/cpu_info.cc index 47473aead0e..8db08edba80 100644 --- a/paddle/fluid/platform/cpu_info.cc +++ b/paddle/fluid/platform/cpu_info.cc @@ -1,4 +1,4 @@ -/* Copyright (c) 2016 PaddlePaddle Authors. All Rights Reserve. +/* Copyright (c) 2016 PaddlePaddle Authors. All Rights Reserved. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/paddle/fluid/platform/cpu_info.h b/paddle/fluid/platform/cpu_info.h index 8df7c7b4bca..a930151bd15 100644 --- a/paddle/fluid/platform/cpu_info.h +++ b/paddle/fluid/platform/cpu_info.h @@ -1,4 +1,4 @@ -/* Copyright (c) 2016 PaddlePaddle Authors. All Rights Reserve. +/* Copyright (c) 2016 PaddlePaddle Authors. All Rights Reserved. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/paddle/fluid/platform/cpu_info_test.cc b/paddle/fluid/platform/cpu_info_test.cc index 046758c594f..78332f90cd9 100644 --- a/paddle/fluid/platform/cpu_info_test.cc +++ b/paddle/fluid/platform/cpu_info_test.cc @@ -1,4 +1,4 @@ -// Copyright (c) 2018 PaddlePaddle Authors. All Rights Reserve. +// Copyright (c) 2018 PaddlePaddle Authors. All Rights Reserved. // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. diff --git a/paddle/fluid/platform/cuda_helper.h b/paddle/fluid/platform/cuda_helper.h index 376bb0e6887..881d611d4ac 100644 --- a/paddle/fluid/platform/cuda_helper.h +++ b/paddle/fluid/platform/cuda_helper.h @@ -1,4 +1,4 @@ -/* Copyright (c) 2016 PaddlePaddle Authors. All Rights Reserve. +/* Copyright (c) 2016 PaddlePaddle Authors. All Rights Reserved. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/paddle/fluid/platform/cuda_profiler.h b/paddle/fluid/platform/cuda_profiler.h index 67d5f626d41..ebd6aebd768 100644 --- a/paddle/fluid/platform/cuda_profiler.h +++ b/paddle/fluid/platform/cuda_profiler.h @@ -1,4 +1,4 @@ -/* Copyright (c) 2016 PaddlePaddle Authors. All Rights Reserve. +/* Copyright (c) 2016 PaddlePaddle Authors. All Rights Reserved. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/paddle/fluid/platform/cudnn_helper.h b/paddle/fluid/platform/cudnn_helper.h index f2daa4f4fcc..48c967de115 100644 --- a/paddle/fluid/platform/cudnn_helper.h +++ b/paddle/fluid/platform/cudnn_helper.h @@ -1,4 +1,4 @@ -/* Copyright (c) 2016 PaddlePaddle Authors. All Rights Reserve. +/* Copyright (c) 2016 PaddlePaddle Authors. All Rights Reserved. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/paddle/fluid/platform/cudnn_helper_test.cc b/paddle/fluid/platform/cudnn_helper_test.cc index cd0bd3fe3ed..517df686349 100644 --- a/paddle/fluid/platform/cudnn_helper_test.cc +++ b/paddle/fluid/platform/cudnn_helper_test.cc @@ -1,4 +1,4 @@ -/* Copyright (c) 2016 PaddlePaddle Authors. All Rights Reserve. +/* Copyright (c) 2016 PaddlePaddle Authors. All Rights Reserved. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/paddle/fluid/platform/details/device_ptr_cast.h b/paddle/fluid/platform/details/device_ptr_cast.h index 4015491fcdc..1c502a19c05 100644 --- a/paddle/fluid/platform/details/device_ptr_cast.h +++ b/paddle/fluid/platform/details/device_ptr_cast.h @@ -1,4 +1,4 @@ -/* Copyright (c) 2016 PaddlePaddle Authors. All Rights Reserve. +/* Copyright (c) 2016 PaddlePaddle Authors. All Rights Reserved. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/paddle/fluid/platform/device_context.cc b/paddle/fluid/platform/device_context.cc index c4da846bb1c..7da6e04d0a8 100644 --- a/paddle/fluid/platform/device_context.cc +++ b/paddle/fluid/platform/device_context.cc @@ -1,4 +1,4 @@ -/* Copyright (c) 2016 PaddlePaddle Authors. All Rights Reserve. +/* Copyright (c) 2016 PaddlePaddle Authors. All Rights Reserved. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at diff --git a/paddle/fluid/platform/device_context.h b/paddle/fluid/platform/device_context.h index 10b581f41a1..a294ba51015 100644 --- a/paddle/fluid/platform/device_context.h +++ b/paddle/fluid/platform/device_context.h @@ -1,4 +1,4 @@ -/* Copyright (c) 2016 PaddlePaddle Authors. All Rights Reserve. +/* Copyright (c) 2016 PaddlePaddle Authors. All Rights Reserved. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at diff --git a/paddle/fluid/platform/device_context_test.cu b/paddle/fluid/platform/device_context_test.cu index f4dae6e90a8..9d8d07362ce 100644 --- a/paddle/fluid/platform/device_context_test.cu +++ b/paddle/fluid/platform/device_context_test.cu @@ -1,4 +1,4 @@ -/* Copyright (c) 2016 PaddlePaddle Authors. All Rights Reserve. +/* Copyright (c) 2016 PaddlePaddle Authors. All Rights Reserved. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/paddle/fluid/platform/dynload/cublas.cc b/paddle/fluid/platform/dynload/cublas.cc index c599712554b..e90e3105f08 100644 --- a/paddle/fluid/platform/dynload/cublas.cc +++ b/paddle/fluid/platform/dynload/cublas.cc @@ -1,4 +1,4 @@ -/* Copyright (c) 2016 PaddlePaddle Authors. All Rights Reserve. +/* Copyright (c) 2016 PaddlePaddle Authors. All Rights Reserved. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/paddle/fluid/platform/dynload/cublas.h b/paddle/fluid/platform/dynload/cublas.h index 05f69e50651..580ed9bb57f 100644 --- a/paddle/fluid/platform/dynload/cublas.h +++ b/paddle/fluid/platform/dynload/cublas.h @@ -1,4 +1,4 @@ -/* Copyright (c) 2016 PaddlePaddle Authors. All Rights Reserve. +/* Copyright (c) 2016 PaddlePaddle Authors. All Rights Reserved. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/paddle/fluid/platform/dynload/cudnn.cc b/paddle/fluid/platform/dynload/cudnn.cc index 0b1c4c4f960..c65b060ab46 100644 --- a/paddle/fluid/platform/dynload/cudnn.cc +++ b/paddle/fluid/platform/dynload/cudnn.cc @@ -1,4 +1,4 @@ -/* Copyright (c) 2016 PaddlePaddle Authors. All Rights Reserve. +/* Copyright (c) 2016 PaddlePaddle Authors. All Rights Reserved. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/paddle/fluid/platform/dynload/cudnn.h b/paddle/fluid/platform/dynload/cudnn.h index 00dfbc83872..81acc445bd3 100644 --- a/paddle/fluid/platform/dynload/cudnn.h +++ b/paddle/fluid/platform/dynload/cudnn.h @@ -1,4 +1,4 @@ -/* Copyright (c) 2016 PaddlePaddle Authors. All Rights Reserve. +/* Copyright (c) 2016 PaddlePaddle Authors. All Rights Reserved. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/paddle/fluid/platform/dynload/curand.cc b/paddle/fluid/platform/dynload/curand.cc index eac690b1458..ce83ebc84fe 100644 --- a/paddle/fluid/platform/dynload/curand.cc +++ b/paddle/fluid/platform/dynload/curand.cc @@ -1,4 +1,4 @@ -/* Copyright (c) 2016 PaddlePaddle Authors. All Rights Reserve. +/* Copyright (c) 2016 PaddlePaddle Authors. All Rights Reserved. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/paddle/fluid/platform/dynload/curand.h b/paddle/fluid/platform/dynload/curand.h index ce3115b3ce0..1b3ff962d6e 100644 --- a/paddle/fluid/platform/dynload/curand.h +++ b/paddle/fluid/platform/dynload/curand.h @@ -1,4 +1,4 @@ -/* Copyright (c) 2016 PaddlePaddle Authors. All Rights Reserve. +/* Copyright (c) 2016 PaddlePaddle Authors. All Rights Reserved. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/paddle/fluid/platform/dynload/dynamic_loader.cc b/paddle/fluid/platform/dynload/dynamic_loader.cc index eb00f93b7cd..db1eb41f28e 100644 --- a/paddle/fluid/platform/dynload/dynamic_loader.cc +++ b/paddle/fluid/platform/dynload/dynamic_loader.cc @@ -1,4 +1,4 @@ -/* Copyright (c) 2016 PaddlePaddle Authors. All Rights Reserve. +/* Copyright (c) 2016 PaddlePaddle Authors. All Rights Reserved. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/paddle/fluid/platform/dynload/dynamic_loader.h b/paddle/fluid/platform/dynload/dynamic_loader.h index 7b0c8c16d74..4ffc3353326 100644 --- a/paddle/fluid/platform/dynload/dynamic_loader.h +++ b/paddle/fluid/platform/dynload/dynamic_loader.h @@ -1,4 +1,4 @@ -/* Copyright (c) 2016 PaddlePaddle Authors. All Rights Reserve. +/* Copyright (c) 2016 PaddlePaddle Authors. All Rights Reserved. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/paddle/fluid/platform/dynload/nccl.cc b/paddle/fluid/platform/dynload/nccl.cc index 1dc3e96f04a..3edc70c46d0 100644 --- a/paddle/fluid/platform/dynload/nccl.cc +++ b/paddle/fluid/platform/dynload/nccl.cc @@ -1,4 +1,4 @@ -/* Copyright (c) 2016 PaddlePaddle Authors. All Rights Reserve. +/* Copyright (c) 2016 PaddlePaddle Authors. All Rights Reserved. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/paddle/fluid/platform/dynload/nccl.h b/paddle/fluid/platform/dynload/nccl.h index 349a4d0ba32..dc78bcb44d3 100644 --- a/paddle/fluid/platform/dynload/nccl.h +++ b/paddle/fluid/platform/dynload/nccl.h @@ -1,4 +1,4 @@ -/* Copyright (c) 2016 PaddlePaddle Authors. All Rights Reserve. +/* Copyright (c) 2016 PaddlePaddle Authors. All Rights Reserved. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/paddle/fluid/platform/dynload/warpctc.cc b/paddle/fluid/platform/dynload/warpctc.cc index 84de2cae947..4a150048959 100644 --- a/paddle/fluid/platform/dynload/warpctc.cc +++ b/paddle/fluid/platform/dynload/warpctc.cc @@ -1,4 +1,4 @@ -/* Copyright (c) 2016 PaddlePaddle Authors. All Rights Reserve. +/* Copyright (c) 2016 PaddlePaddle Authors. All Rights Reserved. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/paddle/fluid/platform/dynload/warpctc.h b/paddle/fluid/platform/dynload/warpctc.h index f1955818ded..f5ded0eb6b1 100644 --- a/paddle/fluid/platform/dynload/warpctc.h +++ b/paddle/fluid/platform/dynload/warpctc.h @@ -1,4 +1,4 @@ -/* Copyright (c) 2016 PaddlePaddle Authors. All Rights Reserve. +/* Copyright (c) 2016 PaddlePaddle Authors. All Rights Reserved. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/paddle/fluid/platform/enforce.cc b/paddle/fluid/platform/enforce.cc index 55cd80943cf..6d0c656781a 100644 --- a/paddle/fluid/platform/enforce.cc +++ b/paddle/fluid/platform/enforce.cc @@ -1,4 +1,4 @@ -/* Copyright (c) 2016 PaddlePaddle Authors. All Rights Reserve. +/* Copyright (c) 2016 PaddlePaddle Authors. All Rights Reserved. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/paddle/fluid/platform/enforce.h b/paddle/fluid/platform/enforce.h index 86e17928015..d303fd6d63f 100644 --- a/paddle/fluid/platform/enforce.h +++ b/paddle/fluid/platform/enforce.h @@ -1,4 +1,4 @@ -/* Copyright (c) 2016 PaddlePaddle Authors. All Rights Reserve. +/* Copyright (c) 2016 PaddlePaddle Authors. All Rights Reserved. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/paddle/fluid/platform/enforce_test.cc b/paddle/fluid/platform/enforce_test.cc index baa34a5c7b4..bb9a3543ff2 100644 --- a/paddle/fluid/platform/enforce_test.cc +++ b/paddle/fluid/platform/enforce_test.cc @@ -1,4 +1,4 @@ -/* Copyright (c) 2016 PaddlePaddle Authors. All Rights Reserve. +/* Copyright (c) 2016 PaddlePaddle Authors. All Rights Reserved. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at diff --git a/paddle/fluid/platform/for_range.h b/paddle/fluid/platform/for_range.h index 0e695328c39..c153e80fe42 100644 --- a/paddle/fluid/platform/for_range.h +++ b/paddle/fluid/platform/for_range.h @@ -1,4 +1,4 @@ -/* Copyright (c) 2016 PaddlePaddle Authors. All Rights Reserve. +/* Copyright (c) 2016 PaddlePaddle Authors. All Rights Reserved. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/paddle/fluid/platform/gpu_info.cc b/paddle/fluid/platform/gpu_info.cc index 1797f59a9c9..05e1eae853e 100644 --- a/paddle/fluid/platform/gpu_info.cc +++ b/paddle/fluid/platform/gpu_info.cc @@ -1,4 +1,4 @@ -/* Copyright (c) 2016 PaddlePaddle Authors. All Rights Reserve. +/* Copyright (c) 2016 PaddlePaddle Authors. All Rights Reserved. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/paddle/fluid/platform/gpu_info.h b/paddle/fluid/platform/gpu_info.h index d05131fa419..3d4883d8078 100644 --- a/paddle/fluid/platform/gpu_info.h +++ b/paddle/fluid/platform/gpu_info.h @@ -1,4 +1,4 @@ -/* Copyright (c) 2016 PaddlePaddle Authors. All Rights Reserve. +/* Copyright (c) 2016 PaddlePaddle Authors. All Rights Reserved. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/paddle/fluid/platform/hostdevice.h b/paddle/fluid/platform/hostdevice.h index fa4659ed298..c0dc92a5217 100644 --- a/paddle/fluid/platform/hostdevice.h +++ b/paddle/fluid/platform/hostdevice.h @@ -1,4 +1,4 @@ -// Copyright (c) 2018 PaddlePaddle Authors. All Rights Reserve. +// Copyright (c) 2018 PaddlePaddle Authors. All Rights Reserved. // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. diff --git a/paddle/fluid/platform/macros.h b/paddle/fluid/platform/macros.h index feae7bdd77e..02a2f53b49c 100644 --- a/paddle/fluid/platform/macros.h +++ b/paddle/fluid/platform/macros.h @@ -1,4 +1,4 @@ -/* Copyright (c) 2016 PaddlePaddle Authors. All Rights Reserve. +/* Copyright (c) 2016 PaddlePaddle Authors. All Rights Reserved. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/paddle/fluid/platform/mkldnn_helper.h b/paddle/fluid/platform/mkldnn_helper.h index cd52a8b4c43..6d71f352c6e 100644 --- a/paddle/fluid/platform/mkldnn_helper.h +++ b/paddle/fluid/platform/mkldnn_helper.h @@ -1,4 +1,4 @@ -/* Copyright (c) 2017 PaddlePaddle Authors. All Rights Reserve. +/* Copyright (c) 2017 PaddlePaddle Authors. All Rights Reserved. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/paddle/fluid/platform/nccl_test.cu b/paddle/fluid/platform/nccl_test.cu index 75b95aff1a4..71230353633 100644 --- a/paddle/fluid/platform/nccl_test.cu +++ b/paddle/fluid/platform/nccl_test.cu @@ -1,4 +1,4 @@ -/* Copyright (c) 2016 PaddlePaddle Authors. All Rights Reserve. +/* Copyright (c) 2016 PaddlePaddle Authors. All Rights Reserved. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/paddle/fluid/platform/place.cc b/paddle/fluid/platform/place.cc index e99b75d761a..de8f958eb01 100644 --- a/paddle/fluid/platform/place.cc +++ b/paddle/fluid/platform/place.cc @@ -1,4 +1,4 @@ -/* Copyright (c) 2016 PaddlePaddle Authors. All Rights Reserve. +/* Copyright (c) 2016 PaddlePaddle Authors. All Rights Reserved. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/paddle/fluid/platform/place.h b/paddle/fluid/platform/place.h index 2977a41036e..501bddfc6ec 100644 --- a/paddle/fluid/platform/place.h +++ b/paddle/fluid/platform/place.h @@ -1,4 +1,4 @@ -/* Copyright (c) 2016 PaddlePaddle Authors. All Rights Reserve. +/* Copyright (c) 2016 PaddlePaddle Authors. All Rights Reserved. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/paddle/fluid/platform/place_test.cc b/paddle/fluid/platform/place_test.cc index f248902d91c..6a919c56252 100644 --- a/paddle/fluid/platform/place_test.cc +++ b/paddle/fluid/platform/place_test.cc @@ -1,4 +1,4 @@ -// Copyright (c) 2018 PaddlePaddle Authors. All Rights Reserve. +// Copyright (c) 2018 PaddlePaddle Authors. All Rights Reserved. // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. diff --git a/paddle/fluid/platform/profiler.cc b/paddle/fluid/platform/profiler.cc index 28d2675f799..4804df7966d 100644 --- a/paddle/fluid/platform/profiler.cc +++ b/paddle/fluid/platform/profiler.cc @@ -1,4 +1,4 @@ -/* Copyright (c) 2016 PaddlePaddle Authors. All Rights Reserve. +/* Copyright (c) 2016 PaddlePaddle Authors. All Rights Reserved. licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/paddle/fluid/platform/profiler.h b/paddle/fluid/platform/profiler.h index 0bc5e666cb4..a3d22df7005 100644 --- a/paddle/fluid/platform/profiler.h +++ b/paddle/fluid/platform/profiler.h @@ -1,4 +1,4 @@ -/* Copyright (c) 2016 PaddlePaddle Authors. All Rights Reserve. +/* Copyright (c) 2016 PaddlePaddle Authors. All Rights Reserved. licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/paddle/fluid/platform/profiler_test.cc b/paddle/fluid/platform/profiler_test.cc index d2525c38b6f..dae4d2206e0 100644 --- a/paddle/fluid/platform/profiler_test.cc +++ b/paddle/fluid/platform/profiler_test.cc @@ -1,4 +1,4 @@ -/* Copyright (c) 2016 PaddlePaddle Authors. All Rights Reserve. +/* Copyright (c) 2016 PaddlePaddle Authors. All Rights Reserved. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/paddle/fluid/platform/transform.h b/paddle/fluid/platform/transform.h index 879daed1910..917c48b47f8 100644 --- a/paddle/fluid/platform/transform.h +++ b/paddle/fluid/platform/transform.h @@ -1,4 +1,4 @@ -/* Copyright (c) 2016 PaddlePaddle Authors. All Rights Reserve. +/* Copyright (c) 2016 PaddlePaddle Authors. All Rights Reserved. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/paddle/fluid/platform/transform_test.cu b/paddle/fluid/platform/transform_test.cu index 0e4b9edc2fd..7b5cfd8f434 100644 --- a/paddle/fluid/platform/transform_test.cu +++ b/paddle/fluid/platform/transform_test.cu @@ -1,4 +1,4 @@ -/* Copyright (c) 2016 PaddlePaddle Authors. All Rights Reserve. +/* Copyright (c) 2016 PaddlePaddle Authors. All Rights Reserved. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/paddle/fluid/platform/variant.h b/paddle/fluid/platform/variant.h index ea6ef8fddf5..05ca33137de 100644 --- a/paddle/fluid/platform/variant.h +++ b/paddle/fluid/platform/variant.h @@ -1,4 +1,4 @@ -/* Copyright (c) 2016 PaddlePaddle Authors. All Rights Reserve. +/* Copyright (c) 2016 PaddlePaddle Authors. All Rights Reserved. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/paddle/fluid/pybind/const_value.cc b/paddle/fluid/pybind/const_value.cc index 098252a83d3..6657b25ed24 100644 --- a/paddle/fluid/pybind/const_value.cc +++ b/paddle/fluid/pybind/const_value.cc @@ -1,4 +1,4 @@ -/* Copyright (c) 2016 PaddlePaddle Authors. All Rights Reserve. +/* Copyright (c) 2016 PaddlePaddle Authors. All Rights Reserved. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/paddle/fluid/pybind/const_value.h b/paddle/fluid/pybind/const_value.h index 67d14ac9ff0..79e71e039de 100644 --- a/paddle/fluid/pybind/const_value.h +++ b/paddle/fluid/pybind/const_value.h @@ -1,4 +1,4 @@ -/* Copyright (c) 2016 PaddlePaddle Authors. All Rights Reserve. +/* Copyright (c) 2016 PaddlePaddle Authors. All Rights Reserved. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/paddle/fluid/pybind/exception.cc b/paddle/fluid/pybind/exception.cc index 7398a88541b..4bd3ecf728d 100644 --- a/paddle/fluid/pybind/exception.cc +++ b/paddle/fluid/pybind/exception.cc @@ -1,4 +1,4 @@ -/* Copyright (c) 2016 PaddlePaddle Authors. All Rights Reserve. +/* Copyright (c) 2016 PaddlePaddle Authors. All Rights Reserved. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/paddle/fluid/pybind/exception.h b/paddle/fluid/pybind/exception.h index 43e91a70630..bc6b0c06797 100644 --- a/paddle/fluid/pybind/exception.h +++ b/paddle/fluid/pybind/exception.h @@ -1,4 +1,4 @@ -/* Copyright (c) 2016 PaddlePaddle Authors. All Rights Reserve. +/* Copyright (c) 2016 PaddlePaddle Authors. All Rights Reserved. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/paddle/fluid/pybind/protobuf.cc b/paddle/fluid/pybind/protobuf.cc index 4aefcf1a1cd..3341edb370f 100644 --- a/paddle/fluid/pybind/protobuf.cc +++ b/paddle/fluid/pybind/protobuf.cc @@ -1,4 +1,4 @@ -/* Copyright (c) 2016 PaddlePaddle Authors. All Rights Reserve. +/* Copyright (c) 2016 PaddlePaddle Authors. All Rights Reserved. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/paddle/fluid/pybind/protobuf.h b/paddle/fluid/pybind/protobuf.h index c828e4583d2..d0dc8936b3d 100644 --- a/paddle/fluid/pybind/protobuf.h +++ b/paddle/fluid/pybind/protobuf.h @@ -1,4 +1,4 @@ -/* Copyright (c) 2016 PaddlePaddle Authors. All Rights Reserve. +/* Copyright (c) 2016 PaddlePaddle Authors. All Rights Reserved. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/paddle/fluid/pybind/pybind.cc b/paddle/fluid/pybind/pybind.cc index 85a6700a614..56c1a935d98 100644 --- a/paddle/fluid/pybind/pybind.cc +++ b/paddle/fluid/pybind/pybind.cc @@ -1,4 +1,4 @@ -/* Copyright (c) 2016 PaddlePaddle Authors. All Rights Reserve. +/* Copyright (c) 2016 PaddlePaddle Authors. All Rights Reserved. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/paddle/fluid/pybind/tensor_py.h b/paddle/fluid/pybind/tensor_py.h index 0261709f1e4..7e7fb554ac1 100644 --- a/paddle/fluid/pybind/tensor_py.h +++ b/paddle/fluid/pybind/tensor_py.h @@ -1,4 +1,4 @@ -/* Copyright (c) 2016 PaddlePaddle Authors. All Rights Reserve. +/* Copyright (c) 2016 PaddlePaddle Authors. All Rights Reserved. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/paddle/fluid/string/piece.cc b/paddle/fluid/string/piece.cc index 560413dff1f..454f5d8d38c 100644 --- a/paddle/fluid/string/piece.cc +++ b/paddle/fluid/string/piece.cc @@ -1,4 +1,4 @@ -// Copyright (c) 2018 PaddlePaddle Authors. All Rights Reserve. +// Copyright (c) 2018 PaddlePaddle Authors. All Rights Reserved. // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. diff --git a/paddle/fluid/string/piece.h b/paddle/fluid/string/piece.h index f2bb6b2c761..8dda484eaac 100644 --- a/paddle/fluid/string/piece.h +++ b/paddle/fluid/string/piece.h @@ -1,4 +1,4 @@ -// Copyright (c) 2018 PaddlePaddle Authors. All Rights Reserve. +// Copyright (c) 2018 PaddlePaddle Authors. All Rights Reserved. // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. diff --git a/paddle/fluid/string/piece_test.cc b/paddle/fluid/string/piece_test.cc index fc17d315b9d..80b712b08cc 100644 --- a/paddle/fluid/string/piece_test.cc +++ b/paddle/fluid/string/piece_test.cc @@ -1,4 +1,4 @@ -// Copyright (c) 2018 PaddlePaddle Authors. All Rights Reserve. +// Copyright (c) 2018 PaddlePaddle Authors. All Rights Reserved. // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. diff --git a/paddle/fluid/string/printf.h b/paddle/fluid/string/printf.h index b55ae21b87e..693cf9d6dfe 100644 --- a/paddle/fluid/string/printf.h +++ b/paddle/fluid/string/printf.h @@ -1,4 +1,4 @@ -// Copyright (c) 2018 PaddlePaddle Authors. All Rights Reserve. +// Copyright (c) 2018 PaddlePaddle Authors. All Rights Reserved. // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. diff --git a/paddle/fluid/string/printf_test.cc b/paddle/fluid/string/printf_test.cc index 6ca59bdefdb..b6a60c8d6b7 100644 --- a/paddle/fluid/string/printf_test.cc +++ b/paddle/fluid/string/printf_test.cc @@ -1,4 +1,4 @@ -// Copyright (c) 2018 PaddlePaddle Authors. All Rights Reserve. +// Copyright (c) 2018 PaddlePaddle Authors. All Rights Reserved. // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. diff --git a/paddle/fluid/string/tinyformat/tinyformat.h b/paddle/fluid/string/tinyformat/tinyformat.h index d1a2c47f1a9..a5c1798e100 100644 --- a/paddle/fluid/string/tinyformat/tinyformat.h +++ b/paddle/fluid/string/tinyformat/tinyformat.h @@ -1,4 +1,4 @@ -// Copyright (c) 2018 PaddlePaddle Authors. All Rights Reserve. +// Copyright (c) 2018 PaddlePaddle Authors. All Rights Reserved. // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. diff --git a/paddle/fluid/string/to_string.h b/paddle/fluid/string/to_string.h index 178edc18951..8caf1494203 100644 --- a/paddle/fluid/string/to_string.h +++ b/paddle/fluid/string/to_string.h @@ -1,4 +1,4 @@ -/* Copyright (c) 2016 PaddlePaddle Authors. All Rights Reserve. +/* Copyright (c) 2016 PaddlePaddle Authors. All Rights Reserved. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/paddle/fluid/string/to_string_test.cc b/paddle/fluid/string/to_string_test.cc index 1e890f572eb..8fc293af0e4 100644 --- a/paddle/fluid/string/to_string_test.cc +++ b/paddle/fluid/string/to_string_test.cc @@ -1,4 +1,4 @@ -/* Copyright (c) 2016 PaddlePaddle Authors. All Rights Reserve. +/* Copyright (c) 2016 PaddlePaddle Authors. All Rights Reserved. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/paddle/function/BlockExpandOp.cpp b/paddle/function/BlockExpandOp.cpp index bd0fe119ce4..aa53853e087 100644 --- a/paddle/function/BlockExpandOp.cpp +++ b/paddle/function/BlockExpandOp.cpp @@ -1,4 +1,4 @@ -/* Copyright (c) 2016 PaddlePaddle Authors. All Rights Reserve. +/* Copyright (c) 2016 PaddlePaddle Authors. All Rights Reserved. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/paddle/function/BlockExpandOpTest.cpp b/paddle/function/BlockExpandOpTest.cpp index 59193a3ec3d..8fca4f6fdc8 100644 --- a/paddle/function/BlockExpandOpTest.cpp +++ b/paddle/function/BlockExpandOpTest.cpp @@ -1,4 +1,4 @@ -/* Copyright (c) 2016 PaddlePaddle Authors. All Rights Reserve. +/* Copyright (c) 2016 PaddlePaddle Authors. All Rights Reserved. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/paddle/function/BufferArg.cpp b/paddle/function/BufferArg.cpp index 2b70036e3ff..2dc931c5d7e 100644 --- a/paddle/function/BufferArg.cpp +++ b/paddle/function/BufferArg.cpp @@ -1,4 +1,4 @@ -/* Copyright (c) 2016 PaddlePaddle Authors. All Rights Reserve. +/* Copyright (c) 2016 PaddlePaddle Authors. All Rights Reserved. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/paddle/function/BufferArg.h b/paddle/function/BufferArg.h index 0dc7792f646..89ee09837db 100644 --- a/paddle/function/BufferArg.h +++ b/paddle/function/BufferArg.h @@ -1,4 +1,4 @@ -/* Copyright (c) 2016 PaddlePaddle Authors. All Rights Reserve. +/* Copyright (c) 2016 PaddlePaddle Authors. All Rights Reserved. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/paddle/function/BufferArgTest.cpp b/paddle/function/BufferArgTest.cpp index 6b8e1e2da97..1a6e0110afb 100644 --- a/paddle/function/BufferArgTest.cpp +++ b/paddle/function/BufferArgTest.cpp @@ -1,4 +1,4 @@ -/* Copyright (c) 2016 PaddlePaddle Authors. All Rights Reserve. +/* Copyright (c) 2016 PaddlePaddle Authors. All Rights Reserved. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/paddle/function/ContextProjectionOp.cpp b/paddle/function/ContextProjectionOp.cpp index 23916c0f4b6..904b0958e6f 100644 --- a/paddle/function/ContextProjectionOp.cpp +++ b/paddle/function/ContextProjectionOp.cpp @@ -1,4 +1,4 @@ -/* Copyright (c) 2016 PaddlePaddle Authors. All Rights Reserve. +/* Copyright (c) 2016 PaddlePaddle Authors. All Rights Reserved. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/paddle/function/ContextProjectionOp.h b/paddle/function/ContextProjectionOp.h index 6f7d936379a..822734a78e6 100644 --- a/paddle/function/ContextProjectionOp.h +++ b/paddle/function/ContextProjectionOp.h @@ -1,4 +1,4 @@ -/* Copyright (c) 2016 PaddlePaddle Authors. All Rights Reserve. +/* Copyright (c) 2016 PaddlePaddle Authors. All Rights Reserved. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/paddle/function/ContextProjectionOpGpu.cu b/paddle/function/ContextProjectionOpGpu.cu index 4492dea5d8a..0a4d865e2c4 100644 --- a/paddle/function/ContextProjectionOpGpu.cu +++ b/paddle/function/ContextProjectionOpGpu.cu @@ -1,4 +1,4 @@ -/* Copyright (c) 2016 PaddlePaddle Authors. All Rights Reserve. +/* Copyright (c) 2016 PaddlePaddle Authors. All Rights Reserved. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/paddle/function/ContextProjectionOpTest.cpp b/paddle/function/ContextProjectionOpTest.cpp index 9e9dd20e6f3..d805c3ae927 100644 --- a/paddle/function/ContextProjectionOpTest.cpp +++ b/paddle/function/ContextProjectionOpTest.cpp @@ -1,4 +1,4 @@ -/* Copyright (c) 2016 PaddlePaddle Authors. All Rights Reserve. +/* Copyright (c) 2016 PaddlePaddle Authors. All Rights Reserved. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/paddle/function/ConvOp.h b/paddle/function/ConvOp.h index 062ea25a114..7d23d0079c8 100644 --- a/paddle/function/ConvOp.h +++ b/paddle/function/ConvOp.h @@ -1,4 +1,4 @@ -/* Copyright (c) 2016 PaddlePaddle Authors. All Rights Reserve. +/* Copyright (c) 2016 PaddlePaddle Authors. All Rights Reserved. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/paddle/function/ConvOpTest.h b/paddle/function/ConvOpTest.h index d8d3c792df2..5eac6089786 100644 --- a/paddle/function/ConvOpTest.h +++ b/paddle/function/ConvOpTest.h @@ -1,4 +1,4 @@ -/* Copyright (c) 2016 PaddlePaddle Authors. All Rights Reserve. +/* Copyright (c) 2016 PaddlePaddle Authors. All Rights Reserved. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/paddle/function/CosSimOp.cpp b/paddle/function/CosSimOp.cpp index 2e5c281f37d..81bccc1a9c7 100644 --- a/paddle/function/CosSimOp.cpp +++ b/paddle/function/CosSimOp.cpp @@ -1,4 +1,4 @@ -/* Copyright (c) 2016 PaddlePaddle Authors. All Rights Reserve. +/* Copyright (c) 2016 PaddlePaddle Authors. All Rights Reserved. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/paddle/function/CosSimOp.h b/paddle/function/CosSimOp.h index be73064e637..2d377eb3bef 100644 --- a/paddle/function/CosSimOp.h +++ b/paddle/function/CosSimOp.h @@ -1,4 +1,4 @@ -/* Copyright (c) 2016 PaddlePaddle Authors. All Rights Reserve. +/* Copyright (c) 2016 PaddlePaddle Authors. All Rights Reserved. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/paddle/function/CosSimOpGpu.cu b/paddle/function/CosSimOpGpu.cu index a1f88f479b5..9fe50529ac4 100644 --- a/paddle/function/CosSimOpGpu.cu +++ b/paddle/function/CosSimOpGpu.cu @@ -1,4 +1,4 @@ -/* Copyright (c) 2016 PaddlePaddle Authors. All Rights Reserve. +/* Copyright (c) 2016 PaddlePaddle Authors. All Rights Reserved. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/paddle/function/CosSimOpTest.cpp b/paddle/function/CosSimOpTest.cpp index f6c0041101f..42b02da0cb0 100644 --- a/paddle/function/CosSimOpTest.cpp +++ b/paddle/function/CosSimOpTest.cpp @@ -1,4 +1,4 @@ -/* Copyright (c) 2016 PaddlePaddle Authors. All Rights Reserve. +/* Copyright (c) 2016 PaddlePaddle Authors. All Rights Reserved. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/paddle/function/CropOp.cpp b/paddle/function/CropOp.cpp index 46f98f12c1f..7aa527d2161 100644 --- a/paddle/function/CropOp.cpp +++ b/paddle/function/CropOp.cpp @@ -1,4 +1,4 @@ -/* Copyright (c) 2016 PaddlePaddle Authors. All Rights Reserve. +/* Copyright (c) 2016 PaddlePaddle Authors. All Rights Reserved. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/paddle/function/CropOp.h b/paddle/function/CropOp.h index 87986fbdc7e..05d4b163b37 100644 --- a/paddle/function/CropOp.h +++ b/paddle/function/CropOp.h @@ -1,4 +1,4 @@ -/* Copyright (c) 2016 PaddlePaddle Authors. All Rights Reserve. +/* Copyright (c) 2016 PaddlePaddle Authors. All Rights Reserved. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/paddle/function/CropOpGpu.cu b/paddle/function/CropOpGpu.cu index 241356a9ca0..56150624337 100644 --- a/paddle/function/CropOpGpu.cu +++ b/paddle/function/CropOpGpu.cu @@ -1,4 +1,4 @@ -/* Copyright (c) 2016 PaddlePaddle Authors. All Rights Reserve. +/* Copyright (c) 2016 PaddlePaddle Authors. All Rights Reserved. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/paddle/function/CropOpTest.cpp b/paddle/function/CropOpTest.cpp index 6f11abfdf6f..10c83a0321f 100644 --- a/paddle/function/CropOpTest.cpp +++ b/paddle/function/CropOpTest.cpp @@ -1,4 +1,4 @@ -/* Copyright (c) 2016 PaddlePaddle Authors. All Rights Reserve. +/* Copyright (c) 2016 PaddlePaddle Authors. All Rights Reserved. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/paddle/function/CrossMapNormalOp.cpp b/paddle/function/CrossMapNormalOp.cpp index 9e88669d37b..75c0fc2a3d0 100644 --- a/paddle/function/CrossMapNormalOp.cpp +++ b/paddle/function/CrossMapNormalOp.cpp @@ -1,4 +1,4 @@ -/* Copyright (c) 2016 PaddlePaddle Authors. All Rights Reserve. +/* Copyright (c) 2016 PaddlePaddle Authors. All Rights Reserved. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/paddle/function/CrossMapNormalOp.h b/paddle/function/CrossMapNormalOp.h index b1e401ad0a2..bb9cdf20216 100644 --- a/paddle/function/CrossMapNormalOp.h +++ b/paddle/function/CrossMapNormalOp.h @@ -1,4 +1,4 @@ -/* Copyright (c) 2016 PaddlePaddle Authors. All Rights Reserve. +/* Copyright (c) 2016 PaddlePaddle Authors. All Rights Reserved. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/paddle/function/CrossMapNormalOpGpu.cu b/paddle/function/CrossMapNormalOpGpu.cu index 88b991ff6a1..938827610af 100644 --- a/paddle/function/CrossMapNormalOpGpu.cu +++ b/paddle/function/CrossMapNormalOpGpu.cu @@ -1,4 +1,4 @@ -/* Copyright (c) 2016 PaddlePaddle Authors. All Rights Reserve. +/* Copyright (c) 2016 PaddlePaddle Authors. All Rights Reserved. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/paddle/function/CrossMapNormalOpTest.cpp b/paddle/function/CrossMapNormalOpTest.cpp index 3b390db77f0..dec52adde22 100644 --- a/paddle/function/CrossMapNormalOpTest.cpp +++ b/paddle/function/CrossMapNormalOpTest.cpp @@ -1,4 +1,4 @@ -/* Copyright (c) 2016 PaddlePaddle Authors. All Rights Reserve. +/* Copyright (c) 2016 PaddlePaddle Authors. All Rights Reserved. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/paddle/function/DepthwiseConvOp.cpp b/paddle/function/DepthwiseConvOp.cpp index 9863e3ae1d5..46651345b45 100644 --- a/paddle/function/DepthwiseConvOp.cpp +++ b/paddle/function/DepthwiseConvOp.cpp @@ -1,4 +1,4 @@ -/* Copyright (c) 2016 PaddlePaddle Authors. All Rights Reserve. +/* Copyright (c) 2016 PaddlePaddle Authors. All Rights Reserved. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/paddle/function/DepthwiseConvOp.h b/paddle/function/DepthwiseConvOp.h index 1bf70e52f34..6700747314f 100644 --- a/paddle/function/DepthwiseConvOp.h +++ b/paddle/function/DepthwiseConvOp.h @@ -1,4 +1,4 @@ -/* Copyright (c) 2016 PaddlePaddle Authors. All Rights Reserve. +/* Copyright (c) 2016 PaddlePaddle Authors. All Rights Reserved. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/paddle/function/DepthwiseConvOpGpu.cu b/paddle/function/DepthwiseConvOpGpu.cu index 2d722dfcfca..cd1d55a416c 100644 --- a/paddle/function/DepthwiseConvOpGpu.cu +++ b/paddle/function/DepthwiseConvOpGpu.cu @@ -1,4 +1,4 @@ -/* Copyright (c) 2016 PaddlePaddle Authors. All Rights Reserve. +/* Copyright (c) 2016 PaddlePaddle Authors. All Rights Reserved. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/paddle/function/DepthwiseConvOpTest.cpp b/paddle/function/DepthwiseConvOpTest.cpp index b1a90da7db2..caf8f3597ff 100644 --- a/paddle/function/DepthwiseConvOpTest.cpp +++ b/paddle/function/DepthwiseConvOpTest.cpp @@ -1,4 +1,4 @@ -/* Copyright (c) 2016 PaddlePaddle Authors. All Rights Reserve. +/* Copyright (c) 2016 PaddlePaddle Authors. All Rights Reserved. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/paddle/function/EigenGemm.cpp b/paddle/function/EigenGemm.cpp index 644098a9e78..bac4659e62b 100644 --- a/paddle/function/EigenGemm.cpp +++ b/paddle/function/EigenGemm.cpp @@ -1,4 +1,4 @@ -/* Copyright (c) 2016 PaddlePaddle Authors. All Rights Reserve. +/* Copyright (c) 2016 PaddlePaddle Authors. All Rights Reserved. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/paddle/function/Function.cpp b/paddle/function/Function.cpp index f71c0f681b3..344358fd3d3 100644 --- a/paddle/function/Function.cpp +++ b/paddle/function/Function.cpp @@ -1,4 +1,4 @@ -/* Copyright (c) 2016 PaddlePaddle Authors. All Rights Reserve. +/* Copyright (c) 2016 PaddlePaddle Authors. All Rights Reserved. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/paddle/function/Function.h b/paddle/function/Function.h index 15eb35b7f7d..01288ef92e7 100644 --- a/paddle/function/Function.h +++ b/paddle/function/Function.h @@ -1,4 +1,4 @@ -/* Copyright (c) 2016 PaddlePaddle Authors. All Rights Reserve. +/* Copyright (c) 2016 PaddlePaddle Authors. All Rights Reserved. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/paddle/function/FunctionTest.cpp b/paddle/function/FunctionTest.cpp index 7b0b1c6adbd..f5e6ca3f515 100644 --- a/paddle/function/FunctionTest.cpp +++ b/paddle/function/FunctionTest.cpp @@ -1,4 +1,4 @@ -/* Copyright (c) 2016 PaddlePaddle Authors. All Rights Reserve. +/* Copyright (c) 2016 PaddlePaddle Authors. All Rights Reserved. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/paddle/function/FunctionTest.h b/paddle/function/FunctionTest.h index 370940532ef..56c3537b6a9 100644 --- a/paddle/function/FunctionTest.h +++ b/paddle/function/FunctionTest.h @@ -1,4 +1,4 @@ -/* Copyright (c) 2016 PaddlePaddle Authors. All Rights Reserve. +/* Copyright (c) 2016 PaddlePaddle Authors. All Rights Reserved. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/paddle/function/GemmConvOp.cpp b/paddle/function/GemmConvOp.cpp index a9876cec2aa..2b7c6f9eab2 100644 --- a/paddle/function/GemmConvOp.cpp +++ b/paddle/function/GemmConvOp.cpp @@ -1,4 +1,4 @@ -/* Copyright (c) 2016 PaddlePaddle Authors. All Rights Reserve. +/* Copyright (c) 2016 PaddlePaddle Authors. All Rights Reserved. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/paddle/function/GemmConvOpTest.cpp b/paddle/function/GemmConvOpTest.cpp index b5b5e1f35b7..a30b7c90bb0 100644 --- a/paddle/function/GemmConvOpTest.cpp +++ b/paddle/function/GemmConvOpTest.cpp @@ -1,4 +1,4 @@ -/* Copyright (c) 2016 PaddlePaddle Authors. All Rights Reserve. +/* Copyright (c) 2016 PaddlePaddle Authors. All Rights Reserved. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/paddle/function/GemmFunctor.cpp b/paddle/function/GemmFunctor.cpp index 9e25ee58a12..0b1fe1b67d8 100644 --- a/paddle/function/GemmFunctor.cpp +++ b/paddle/function/GemmFunctor.cpp @@ -1,4 +1,4 @@ -/* Copyright (c) 2016 PaddlePaddle Authors. All Rights Reserve. +/* Copyright (c) 2016 PaddlePaddle Authors. All Rights Reserved. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/paddle/function/GemmFunctor.h b/paddle/function/GemmFunctor.h index 0809953b4eb..df63fc64f84 100644 --- a/paddle/function/GemmFunctor.h +++ b/paddle/function/GemmFunctor.h @@ -1,4 +1,4 @@ -/* Copyright (c) 2016 PaddlePaddle Authors. All Rights Reserve. +/* Copyright (c) 2016 PaddlePaddle Authors. All Rights Reserved. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/paddle/function/GruFunctor.h b/paddle/function/GruFunctor.h index 9f6392198ea..d5a30c33276 100644 --- a/paddle/function/GruFunctor.h +++ b/paddle/function/GruFunctor.h @@ -1,4 +1,4 @@ -/* Copyright (c) 2016 PaddlePaddle Authors. All Rights Reserve. +/* Copyright (c) 2016 PaddlePaddle Authors. All Rights Reserved. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/paddle/function/Im2Col.h b/paddle/function/Im2Col.h index 915119e291c..6a077870003 100644 --- a/paddle/function/Im2Col.h +++ b/paddle/function/Im2Col.h @@ -1,4 +1,4 @@ -/* Copyright (c) 2016 PaddlePaddle Authors. All Rights Reserve. +/* Copyright (c) 2016 PaddlePaddle Authors. All Rights Reserved. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/paddle/function/Im2ColOp.cpp b/paddle/function/Im2ColOp.cpp index f864d42f807..ad2aed8f3c2 100644 --- a/paddle/function/Im2ColOp.cpp +++ b/paddle/function/Im2ColOp.cpp @@ -1,4 +1,4 @@ -/* Copyright (c) 2016 PaddlePaddle Authors. All Rights Reserve. +/* Copyright (c) 2016 PaddlePaddle Authors. All Rights Reserved. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/paddle/function/Im2ColOpGpu.cu b/paddle/function/Im2ColOpGpu.cu index 71da11b9555..a944a0ee687 100644 --- a/paddle/function/Im2ColOpGpu.cu +++ b/paddle/function/Im2ColOpGpu.cu @@ -1,4 +1,4 @@ -/* Copyright (c) 2016 PaddlePaddle Authors. All Rights Reserve. +/* Copyright (c) 2016 PaddlePaddle Authors. All Rights Reserved. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/paddle/function/Im2ColTest.cpp b/paddle/function/Im2ColTest.cpp index fe44a8bf790..967c5b91536 100644 --- a/paddle/function/Im2ColTest.cpp +++ b/paddle/function/Im2ColTest.cpp @@ -1,4 +1,4 @@ -/* Copyright (c) 2016 PaddlePaddle Authors. All Rights Reserve. +/* Copyright (c) 2016 PaddlePaddle Authors. All Rights Reserved. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/paddle/function/MulOp.cpp b/paddle/function/MulOp.cpp index 704a8c41325..90cd4a2b6d1 100644 --- a/paddle/function/MulOp.cpp +++ b/paddle/function/MulOp.cpp @@ -1,4 +1,4 @@ -/* Copyright (c) 2016 PaddlePaddle Authors. All Rights Reserve. +/* Copyright (c) 2016 PaddlePaddle Authors. All Rights Reserved. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/paddle/function/MulOp.h b/paddle/function/MulOp.h index b6016a6ab6e..e6057be4e54 100644 --- a/paddle/function/MulOp.h +++ b/paddle/function/MulOp.h @@ -1,4 +1,4 @@ -/* Copyright (c) 2016 PaddlePaddle Authors. All Rights Reserve. +/* Copyright (c) 2016 PaddlePaddle Authors. All Rights Reserved. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/paddle/function/MulOpGpu.cu b/paddle/function/MulOpGpu.cu index 9449b89056b..d63416a8e45 100644 --- a/paddle/function/MulOpGpu.cu +++ b/paddle/function/MulOpGpu.cu @@ -1,4 +1,4 @@ -/* Copyright (c) 2016 PaddlePaddle Authors. All Rights Reserve. +/* Copyright (c) 2016 PaddlePaddle Authors. All Rights Reserved. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/paddle/function/MulOpTest.cpp b/paddle/function/MulOpTest.cpp index d31eb0c74f2..4e1ebd749c0 100644 --- a/paddle/function/MulOpTest.cpp +++ b/paddle/function/MulOpTest.cpp @@ -1,4 +1,4 @@ -/* Copyright (c) 2016 PaddlePaddle Authors. All Rights Reserve. +/* Copyright (c) 2016 PaddlePaddle Authors. All Rights Reserved. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/paddle/function/NaiveConvOp.cpp b/paddle/function/NaiveConvOp.cpp index e0692fa06d6..22d3b33d0f4 100644 --- a/paddle/function/NaiveConvOp.cpp +++ b/paddle/function/NaiveConvOp.cpp @@ -1,4 +1,4 @@ -/* Copyright (c) 2016 PaddlePaddle Authors. All Rights Reserve. +/* Copyright (c) 2016 PaddlePaddle Authors. All Rights Reserved. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/paddle/function/PadOp.cpp b/paddle/function/PadOp.cpp index eed2f2e3089..db6dd518ca5 100644 --- a/paddle/function/PadOp.cpp +++ b/paddle/function/PadOp.cpp @@ -1,4 +1,4 @@ -/* Copyright (c) 2016 PaddlePaddle Authors. All Rights Reserve. +/* Copyright (c) 2016 PaddlePaddle Authors. All Rights Reserved. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/paddle/function/PadOp.h b/paddle/function/PadOp.h index 0e226ec7370..4b0aa4014bb 100644 --- a/paddle/function/PadOp.h +++ b/paddle/function/PadOp.h @@ -1,4 +1,4 @@ -/* Copyright (c) 2016 PaddlePaddle Authors. All Rights Reserve. +/* Copyright (c) 2016 PaddlePaddle Authors. All Rights Reserved. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/paddle/function/PadOpGpu.cu b/paddle/function/PadOpGpu.cu index 5b6f4e6832a..01d9b5c3b2a 100644 --- a/paddle/function/PadOpGpu.cu +++ b/paddle/function/PadOpGpu.cu @@ -1,4 +1,4 @@ -/* Copyright (c) 2016 PaddlePaddle Authors. All Rights Reserve. +/* Copyright (c) 2016 PaddlePaddle Authors. All Rights Reserved. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/paddle/function/PadOpTest.cpp b/paddle/function/PadOpTest.cpp index e286f4e5b8a..a4474f85498 100644 --- a/paddle/function/PadOpTest.cpp +++ b/paddle/function/PadOpTest.cpp @@ -1,4 +1,4 @@ -/* Copyright (c) 2016 PaddlePaddle Authors. All Rights Reserve. +/* Copyright (c) 2016 PaddlePaddle Authors. All Rights Reserved. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/paddle/function/RowConvOp.cpp b/paddle/function/RowConvOp.cpp index 7c802d66273..925860346e1 100644 --- a/paddle/function/RowConvOp.cpp +++ b/paddle/function/RowConvOp.cpp @@ -1,4 +1,4 @@ -/* Copyright (c) 2016 PaddlePaddle Authors. All Rights Reserve. +/* Copyright (c) 2016 PaddlePaddle Authors. All Rights Reserved. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/paddle/function/RowConvOp.h b/paddle/function/RowConvOp.h index 2c5de6151aa..bfe775e014d 100644 --- a/paddle/function/RowConvOp.h +++ b/paddle/function/RowConvOp.h @@ -1,4 +1,4 @@ -/* Copyright (c) 2016 PaddlePaddle Authors. All Rights Reserve. +/* Copyright (c) 2016 PaddlePaddle Authors. All Rights Reserved. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/paddle/function/RowConvOpGpu.cu b/paddle/function/RowConvOpGpu.cu index b0cbd9fd1df..9d8a6d80bb2 100644 --- a/paddle/function/RowConvOpGpu.cu +++ b/paddle/function/RowConvOpGpu.cu @@ -1,4 +1,4 @@ -/* Copyright (c) 2016 PaddlePaddle Authors. All Rights Reserve. +/* Copyright (c) 2016 PaddlePaddle Authors. All Rights Reserved. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/paddle/function/RowConvOpTest.cpp b/paddle/function/RowConvOpTest.cpp index f52d18b0491..bbc29ad6a6b 100644 --- a/paddle/function/RowConvOpTest.cpp +++ b/paddle/function/RowConvOpTest.cpp @@ -1,4 +1,4 @@ -/* Copyright (c) 2016 PaddlePaddle Authors. All Rights Reserve. +/* Copyright (c) 2016 PaddlePaddle Authors. All Rights Reserved. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/paddle/function/ScaleSubRegionOp.cpp b/paddle/function/ScaleSubRegionOp.cpp index a080505d7df..6ed6eb2dba4 100644 --- a/paddle/function/ScaleSubRegionOp.cpp +++ b/paddle/function/ScaleSubRegionOp.cpp @@ -1,4 +1,4 @@ -/* Copyright (c) 2016 PaddlePaddle Authors. All Rights Reserve. +/* Copyright (c) 2016 PaddlePaddle Authors. All Rights Reserved. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/paddle/function/ScaleSubRegionOp.h b/paddle/function/ScaleSubRegionOp.h index 0480c8577f3..ed7d6b8ad3c 100644 --- a/paddle/function/ScaleSubRegionOp.h +++ b/paddle/function/ScaleSubRegionOp.h @@ -1,4 +1,4 @@ -/* Copyright (c) 2016 PaddlePaddle Authors. All Rights Reserve. +/* Copyright (c) 2016 PaddlePaddle Authors. All Rights Reserved. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/paddle/function/ScaleSubRegionOpGpu.cu b/paddle/function/ScaleSubRegionOpGpu.cu index 8aae2e44c3f..9784c51ae03 100644 --- a/paddle/function/ScaleSubRegionOpGpu.cu +++ b/paddle/function/ScaleSubRegionOpGpu.cu @@ -1,4 +1,4 @@ -/* Copyright (c) 2016 PaddlePaddle Authors. All Rights Reserve. +/* Copyright (c) 2016 PaddlePaddle Authors. All Rights Reserved. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/paddle/function/ScaleSubRegionOpTest.cpp b/paddle/function/ScaleSubRegionOpTest.cpp index 43331f258dd..dd6ee671089 100644 --- a/paddle/function/ScaleSubRegionOpTest.cpp +++ b/paddle/function/ScaleSubRegionOpTest.cpp @@ -1,4 +1,4 @@ -/* Copyright (c) 2016 PaddlePaddle Authors. All Rights Reserve. +/* Copyright (c) 2016 PaddlePaddle Authors. All Rights Reserved. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/paddle/function/SwitchOp.cpp b/paddle/function/SwitchOp.cpp index 597723a2dde..50e1d6c04c5 100644 --- a/paddle/function/SwitchOp.cpp +++ b/paddle/function/SwitchOp.cpp @@ -1,4 +1,4 @@ -/* Copyright (c) 2016 PaddlePaddle Authors. All Rights Reserve. +/* Copyright (c) 2016 PaddlePaddle Authors. All Rights Reserved. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/paddle/function/SwitchOp.h b/paddle/function/SwitchOp.h index e4c1c3ac922..b5eb0883cb6 100644 --- a/paddle/function/SwitchOp.h +++ b/paddle/function/SwitchOp.h @@ -1,4 +1,4 @@ -/* Copyright (c) 2016 PaddlePaddle Authors. All Rights Reserve. +/* Copyright (c) 2016 PaddlePaddle Authors. All Rights Reserved. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/paddle/function/SwitchOpTest.cpp b/paddle/function/SwitchOpTest.cpp index 03b0dd66ddc..08e5a613c06 100644 --- a/paddle/function/SwitchOpTest.cpp +++ b/paddle/function/SwitchOpTest.cpp @@ -1,4 +1,4 @@ -/* Copyright (c) 2016 PaddlePaddle Authors. All Rights Reserve. +/* Copyright (c) 2016 PaddlePaddle Authors. All Rights Reserved. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/paddle/function/TensorShape.h b/paddle/function/TensorShape.h index cda58f19dfa..02d38c32c00 100644 --- a/paddle/function/TensorShape.h +++ b/paddle/function/TensorShape.h @@ -1,4 +1,4 @@ -/* Copyright (c) 2016 PaddlePaddle Authors. All Rights Reserve. +/* Copyright (c) 2016 PaddlePaddle Authors. All Rights Reserved. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/paddle/function/TensorShapeTest.cpp b/paddle/function/TensorShapeTest.cpp index e55d516d4ac..4d692b9b97a 100644 --- a/paddle/function/TensorShapeTest.cpp +++ b/paddle/function/TensorShapeTest.cpp @@ -1,4 +1,4 @@ -/* Copyright (c) 2016 PaddlePaddle Authors. All Rights Reserve. +/* Copyright (c) 2016 PaddlePaddle Authors. All Rights Reserved. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/paddle/function/TensorType.h b/paddle/function/TensorType.h index 8308bbd8ad4..b384591bd88 100644 --- a/paddle/function/TensorType.h +++ b/paddle/function/TensorType.h @@ -1,4 +1,4 @@ -/* Copyright (c) 2016 PaddlePaddle Authors. All Rights Reserve. +/* Copyright (c) 2016 PaddlePaddle Authors. All Rights Reserved. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/paddle/function/TensorTypeTest.cpp b/paddle/function/TensorTypeTest.cpp index d1c559a91e2..d0cd63147a8 100644 --- a/paddle/function/TensorTypeTest.cpp +++ b/paddle/function/TensorTypeTest.cpp @@ -1,4 +1,4 @@ -/* Copyright (c) 2016 PaddlePaddle Authors. All Rights Reserve. +/* Copyright (c) 2016 PaddlePaddle Authors. All Rights Reserved. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/paddle/function/neon/NeonDepthwiseConv.cpp b/paddle/function/neon/NeonDepthwiseConv.cpp index 38aa6670612..d3298c75385 100644 --- a/paddle/function/neon/NeonDepthwiseConv.cpp +++ b/paddle/function/neon/NeonDepthwiseConv.cpp @@ -1,4 +1,4 @@ -/* Copyright (c) 2016 PaddlePaddle Authors. All Rights Reserve. +/* Copyright (c) 2016 PaddlePaddle Authors. All Rights Reserved. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/paddle/function/neon/NeonDepthwiseConv.h b/paddle/function/neon/NeonDepthwiseConv.h index 98a86d278f3..8b2cba263e7 100644 --- a/paddle/function/neon/NeonDepthwiseConv.h +++ b/paddle/function/neon/NeonDepthwiseConv.h @@ -1,4 +1,4 @@ -/* Copyright (c) 2016 PaddlePaddle Authors. All Rights Reserve. +/* Copyright (c) 2016 PaddlePaddle Authors. All Rights Reserved. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/paddle/function/neon/NeonDepthwiseConvTranspose.cpp b/paddle/function/neon/NeonDepthwiseConvTranspose.cpp index 49ca4bc8a09..d443d3fa490 100644 --- a/paddle/function/neon/NeonDepthwiseConvTranspose.cpp +++ b/paddle/function/neon/NeonDepthwiseConvTranspose.cpp @@ -1,4 +1,4 @@ -/* Copyright (c) 2016 PaddlePaddle Authors. All Rights Reserve. +/* Copyright (c) 2016 PaddlePaddle Authors. All Rights Reserved. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/paddle/function/neon/neon_util.h b/paddle/function/neon/neon_util.h index e2db0450675..95076b1387a 100644 --- a/paddle/function/neon/neon_util.h +++ b/paddle/function/neon/neon_util.h @@ -1,4 +1,4 @@ -/* Copyright (c) 2016 PaddlePaddle Authors. All Rights Reserve. +/* Copyright (c) 2016 PaddlePaddle Authors. All Rights Reserved. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/paddle/function/nnpack/NNPACKConvOp.cpp b/paddle/function/nnpack/NNPACKConvOp.cpp index 6ccc487cf1c..3cdba4f2ed0 100644 --- a/paddle/function/nnpack/NNPACKConvOp.cpp +++ b/paddle/function/nnpack/NNPACKConvOp.cpp @@ -1,4 +1,4 @@ -/* Copyright (c) 2016 PaddlePaddle Authors. All Rights Reserve. +/* Copyright (c) 2016 PaddlePaddle Authors. All Rights Reserved. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/paddle/function/nnpack/NNPACKConvOpTest.cpp b/paddle/function/nnpack/NNPACKConvOpTest.cpp index 4dd3982487f..c80ffb5d5d2 100644 --- a/paddle/function/nnpack/NNPACKConvOpTest.cpp +++ b/paddle/function/nnpack/NNPACKConvOpTest.cpp @@ -1,4 +1,4 @@ -/* Copyright (c) 2016 PaddlePaddle Authors. All Rights Reserve. +/* Copyright (c) 2016 PaddlePaddle Authors. All Rights Reserved. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/paddle/gserver/activations/ActivationFunction.cpp b/paddle/gserver/activations/ActivationFunction.cpp index 57c890e4884..8d8f01234fe 100644 --- a/paddle/gserver/activations/ActivationFunction.cpp +++ b/paddle/gserver/activations/ActivationFunction.cpp @@ -1,4 +1,4 @@ -/* Copyright (c) 2016 PaddlePaddle Authors. All Rights Reserve. +/* Copyright (c) 2016 PaddlePaddle Authors. All Rights Reserved. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/paddle/gserver/activations/ActivationFunction.h b/paddle/gserver/activations/ActivationFunction.h index f208224e304..0f4b0fe0abb 100644 --- a/paddle/gserver/activations/ActivationFunction.h +++ b/paddle/gserver/activations/ActivationFunction.h @@ -1,4 +1,4 @@ -/* Copyright (c) 2016 PaddlePaddle Authors. All Rights Reserve. +/* Copyright (c) 2016 PaddlePaddle Authors. All Rights Reserved. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/paddle/gserver/activations/MKLDNNActivation.cpp b/paddle/gserver/activations/MKLDNNActivation.cpp index f3ccd681608..56ffb839344 100644 --- a/paddle/gserver/activations/MKLDNNActivation.cpp +++ b/paddle/gserver/activations/MKLDNNActivation.cpp @@ -1,4 +1,4 @@ -/* Copyright (c) 2017 PaddlePaddle Authors. All Rights Reserve. +/* Copyright (c) 2017 PaddlePaddle Authors. All Rights Reserved. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/paddle/gserver/activations/MKLDNNActivation.h b/paddle/gserver/activations/MKLDNNActivation.h index dd16421fd6e..392b32c70da 100644 --- a/paddle/gserver/activations/MKLDNNActivation.h +++ b/paddle/gserver/activations/MKLDNNActivation.h @@ -1,4 +1,4 @@ -/* Copyright (c) 2017 PaddlePaddle Authors. All Rights Reserve. +/* Copyright (c) 2017 PaddlePaddle Authors. All Rights Reserved. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/paddle/gserver/dataproviders/DataProvider.cpp b/paddle/gserver/dataproviders/DataProvider.cpp index 106cf5b6228..580cf821c68 100644 --- a/paddle/gserver/dataproviders/DataProvider.cpp +++ b/paddle/gserver/dataproviders/DataProvider.cpp @@ -1,4 +1,4 @@ -/* Copyright (c) 2016 PaddlePaddle Authors. All Rights Reserve. +/* Copyright (c) 2016 PaddlePaddle Authors. All Rights Reserved. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/paddle/gserver/dataproviders/DataProvider.h b/paddle/gserver/dataproviders/DataProvider.h index 265dbb54933..4851168abab 100644 --- a/paddle/gserver/dataproviders/DataProvider.h +++ b/paddle/gserver/dataproviders/DataProvider.h @@ -1,4 +1,4 @@ -/* Copyright (c) 2016 PaddlePaddle Authors. All Rights Reserve. +/* Copyright (c) 2016 PaddlePaddle Authors. All Rights Reserved. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/paddle/gserver/dataproviders/DataProviderGroup.h b/paddle/gserver/dataproviders/DataProviderGroup.h index 69ac2590b9c..768e54fe82b 100644 --- a/paddle/gserver/dataproviders/DataProviderGroup.h +++ b/paddle/gserver/dataproviders/DataProviderGroup.h @@ -1,4 +1,4 @@ -/* Copyright (c) 2016 PaddlePaddle Authors. All Rights Reserve. +/* Copyright (c) 2016 PaddlePaddle Authors. All Rights Reserved. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/paddle/gserver/dataproviders/MultiDataProvider.cpp b/paddle/gserver/dataproviders/MultiDataProvider.cpp index 46fe053768e..f71947ef394 100644 --- a/paddle/gserver/dataproviders/MultiDataProvider.cpp +++ b/paddle/gserver/dataproviders/MultiDataProvider.cpp @@ -1,4 +1,4 @@ -/* Copyright (c) 2016 PaddlePaddle Authors. All Rights Reserve. +/* Copyright (c) 2016 PaddlePaddle Authors. All Rights Reserved. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/paddle/gserver/dataproviders/MultiDataProvider.h b/paddle/gserver/dataproviders/MultiDataProvider.h index 4c8fb2cd0dd..9a863c89677 100644 --- a/paddle/gserver/dataproviders/MultiDataProvider.h +++ b/paddle/gserver/dataproviders/MultiDataProvider.h @@ -1,4 +1,4 @@ -/* Copyright (c) 2016 PaddlePaddle Authors. All Rights Reserve. +/* Copyright (c) 2016 PaddlePaddle Authors. All Rights Reserved. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/paddle/gserver/dataproviders/ProtoReader.h b/paddle/gserver/dataproviders/ProtoReader.h index 4e6f58a5292..786703f4dee 100644 --- a/paddle/gserver/dataproviders/ProtoReader.h +++ b/paddle/gserver/dataproviders/ProtoReader.h @@ -1,4 +1,4 @@ -/* Copyright (c) 2016 PaddlePaddle Authors. All Rights Reserve. +/* Copyright (c) 2016 PaddlePaddle Authors. All Rights Reserved. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/paddle/gserver/dataproviders/PyDataProvider.cpp b/paddle/gserver/dataproviders/PyDataProvider.cpp index b53790e764b..dadf1b4cf27 100644 --- a/paddle/gserver/dataproviders/PyDataProvider.cpp +++ b/paddle/gserver/dataproviders/PyDataProvider.cpp @@ -1,4 +1,4 @@ -/* Copyright (c) 2016 PaddlePaddle Authors. All Rights Reserve. +/* Copyright (c) 2016 PaddlePaddle Authors. All Rights Reserved. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/paddle/gserver/dataproviders/PyDataProvider.h b/paddle/gserver/dataproviders/PyDataProvider.h index 1401c13a1e6..e53354c9e43 100644 --- a/paddle/gserver/dataproviders/PyDataProvider.h +++ b/paddle/gserver/dataproviders/PyDataProvider.h @@ -1,4 +1,4 @@ -/* Copyright (c) 2016 PaddlePaddle Authors. All Rights Reserve. +/* Copyright (c) 2016 PaddlePaddle Authors. All Rights Reserved. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/paddle/gserver/dataproviders/PyDataProvider2.cpp b/paddle/gserver/dataproviders/PyDataProvider2.cpp index b8079dc0796..e3e4457f9b7 100644 --- a/paddle/gserver/dataproviders/PyDataProvider2.cpp +++ b/paddle/gserver/dataproviders/PyDataProvider2.cpp @@ -1,4 +1,4 @@ -/* Copyright (c) 2016 PaddlePaddle Authors. All Rights Reserve. +/* Copyright (c) 2016 PaddlePaddle Authors. All Rights Reserved. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/paddle/gserver/evaluators/CTCErrorEvaluator.cpp b/paddle/gserver/evaluators/CTCErrorEvaluator.cpp index 92087fa32b1..0f680de776f 100644 --- a/paddle/gserver/evaluators/CTCErrorEvaluator.cpp +++ b/paddle/gserver/evaluators/CTCErrorEvaluator.cpp @@ -1,4 +1,4 @@ -/* Copyright (c) 2016 PaddlePaddle Authors. All Rights Reserve. +/* Copyright (c) 2016 PaddlePaddle Authors. All Rights Reserved. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/paddle/gserver/evaluators/ChunkEvaluator.cpp b/paddle/gserver/evaluators/ChunkEvaluator.cpp index a2ab15eedee..755b91d05ca 100644 --- a/paddle/gserver/evaluators/ChunkEvaluator.cpp +++ b/paddle/gserver/evaluators/ChunkEvaluator.cpp @@ -1,4 +1,4 @@ -/* Copyright (c) 2016 PaddlePaddle Authors. All Rights Reserve. +/* Copyright (c) 2016 PaddlePaddle Authors. All Rights Reserved. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/paddle/gserver/evaluators/DetectionMAPEvaluator.cpp b/paddle/gserver/evaluators/DetectionMAPEvaluator.cpp index 9b825db574c..f43ef5dd514 100644 --- a/paddle/gserver/evaluators/DetectionMAPEvaluator.cpp +++ b/paddle/gserver/evaluators/DetectionMAPEvaluator.cpp @@ -1,4 +1,4 @@ -/* Copyright (c) 2016 PaddlePaddle Authors. All Rights Reserve. +/* Copyright (c) 2016 PaddlePaddle Authors. All Rights Reserved. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/paddle/gserver/evaluators/Evaluator.cpp b/paddle/gserver/evaluators/Evaluator.cpp index 8e66b1f0db5..79478e7fac6 100644 --- a/paddle/gserver/evaluators/Evaluator.cpp +++ b/paddle/gserver/evaluators/Evaluator.cpp @@ -1,4 +1,4 @@ -/* Copyright (c) 2016 PaddlePaddle Authors. All Rights Reserve. +/* Copyright (c) 2016 PaddlePaddle Authors. All Rights Reserved. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/paddle/gserver/evaluators/Evaluator.h b/paddle/gserver/evaluators/Evaluator.h index 90203553e0a..be2032992c4 100644 --- a/paddle/gserver/evaluators/Evaluator.h +++ b/paddle/gserver/evaluators/Evaluator.h @@ -1,4 +1,4 @@ -/* Copyright (c) 2016 PaddlePaddle Authors. All Rights Reserve. +/* Copyright (c) 2016 PaddlePaddle Authors. All Rights Reserved. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/paddle/gserver/gradientmachines/GradientMachine.cpp b/paddle/gserver/gradientmachines/GradientMachine.cpp index de5faf5e1e2..654024e8a47 100644 --- a/paddle/gserver/gradientmachines/GradientMachine.cpp +++ b/paddle/gserver/gradientmachines/GradientMachine.cpp @@ -1,4 +1,4 @@ -/* Copyright (c) 2016 PaddlePaddle Authors. All Rights Reserve. +/* Copyright (c) 2016 PaddlePaddle Authors. All Rights Reserved. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/paddle/gserver/gradientmachines/GradientMachine.h b/paddle/gserver/gradientmachines/GradientMachine.h index 4ab54a5022a..60936c311d1 100644 --- a/paddle/gserver/gradientmachines/GradientMachine.h +++ b/paddle/gserver/gradientmachines/GradientMachine.h @@ -1,4 +1,4 @@ -/* Copyright (c) 2016 PaddlePaddle Authors. All Rights Reserve. +/* Copyright (c) 2016 PaddlePaddle Authors. All Rights Reserved. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/paddle/gserver/gradientmachines/GradientMachineMode.cpp b/paddle/gserver/gradientmachines/GradientMachineMode.cpp index 3583fb4de88..9a0b2643e03 100644 --- a/paddle/gserver/gradientmachines/GradientMachineMode.cpp +++ b/paddle/gserver/gradientmachines/GradientMachineMode.cpp @@ -1,4 +1,4 @@ -/* Copyright (c) 2016 PaddlePaddle Authors. All Rights Reserve. +/* Copyright (c) 2016 PaddlePaddle Authors. All Rights Reserved. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/paddle/gserver/gradientmachines/GradientMachineMode.h b/paddle/gserver/gradientmachines/GradientMachineMode.h index 7bc885fe99e..898b68fbbc3 100644 --- a/paddle/gserver/gradientmachines/GradientMachineMode.h +++ b/paddle/gserver/gradientmachines/GradientMachineMode.h @@ -1,4 +1,4 @@ -/* Copyright (c) 2016 PaddlePaddle Authors. All Rights Reserve. +/* Copyright (c) 2016 PaddlePaddle Authors. All Rights Reserved. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/paddle/gserver/gradientmachines/MultiGradientMachine.cpp b/paddle/gserver/gradientmachines/MultiGradientMachine.cpp index 018da6c76dc..3f46cc98cde 100644 --- a/paddle/gserver/gradientmachines/MultiGradientMachine.cpp +++ b/paddle/gserver/gradientmachines/MultiGradientMachine.cpp @@ -1,4 +1,4 @@ -/* Copyright (c) 2016 PaddlePaddle Authors. All Rights Reserve. +/* Copyright (c) 2016 PaddlePaddle Authors. All Rights Reserved. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/paddle/gserver/gradientmachines/MultiGradientMachine.h b/paddle/gserver/gradientmachines/MultiGradientMachine.h index 5e7622f929f..83d2651f34b 100644 --- a/paddle/gserver/gradientmachines/MultiGradientMachine.h +++ b/paddle/gserver/gradientmachines/MultiGradientMachine.h @@ -1,4 +1,4 @@ -/* Copyright (c) 2016 PaddlePaddle Authors. All Rights Reserve. +/* Copyright (c) 2016 PaddlePaddle Authors. All Rights Reserved. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/paddle/gserver/gradientmachines/MultiNetwork.cpp b/paddle/gserver/gradientmachines/MultiNetwork.cpp index 5f52a5f3d48..a1140402b8b 100644 --- a/paddle/gserver/gradientmachines/MultiNetwork.cpp +++ b/paddle/gserver/gradientmachines/MultiNetwork.cpp @@ -1,4 +1,4 @@ -/* Copyright (c) 2016 PaddlePaddle Authors. All Rights Reserve. +/* Copyright (c) 2016 PaddlePaddle Authors. All Rights Reserved. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/paddle/gserver/gradientmachines/MultiNetwork.h b/paddle/gserver/gradientmachines/MultiNetwork.h index 3ac2888c573..186a9ad0a39 100644 --- a/paddle/gserver/gradientmachines/MultiNetwork.h +++ b/paddle/gserver/gradientmachines/MultiNetwork.h @@ -1,4 +1,4 @@ -/* Copyright (c) 2016 PaddlePaddle Authors. All Rights Reserve. +/* Copyright (c) 2016 PaddlePaddle Authors. All Rights Reserved. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/paddle/gserver/gradientmachines/NeuralNetwork.cpp b/paddle/gserver/gradientmachines/NeuralNetwork.cpp index 1f2aa61b6f8..a3c13df3dba 100644 --- a/paddle/gserver/gradientmachines/NeuralNetwork.cpp +++ b/paddle/gserver/gradientmachines/NeuralNetwork.cpp @@ -1,4 +1,4 @@ -/* Copyright (c) 2016 PaddlePaddle Authors. All Rights Reserve. +/* Copyright (c) 2016 PaddlePaddle Authors. All Rights Reserved. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/paddle/gserver/gradientmachines/NeuralNetwork.h b/paddle/gserver/gradientmachines/NeuralNetwork.h index 968e198cf66..5b32f844f74 100644 --- a/paddle/gserver/gradientmachines/NeuralNetwork.h +++ b/paddle/gserver/gradientmachines/NeuralNetwork.h @@ -1,4 +1,4 @@ -/* Copyright (c) 2016 PaddlePaddle Authors. All Rights Reserve. +/* Copyright (c) 2016 PaddlePaddle Authors. All Rights Reserved. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/paddle/gserver/gradientmachines/ParallelNeuralNetwork.cpp b/paddle/gserver/gradientmachines/ParallelNeuralNetwork.cpp index c6e3a3b321e..85cfc59fbef 100644 --- a/paddle/gserver/gradientmachines/ParallelNeuralNetwork.cpp +++ b/paddle/gserver/gradientmachines/ParallelNeuralNetwork.cpp @@ -1,4 +1,4 @@ -/* Copyright (c) 2016 PaddlePaddle Authors. All Rights Reserve. +/* Copyright (c) 2016 PaddlePaddle Authors. All Rights Reserved. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/paddle/gserver/gradientmachines/ParallelNeuralNetwork.h b/paddle/gserver/gradientmachines/ParallelNeuralNetwork.h index 39f5682a58e..e3b68121231 100644 --- a/paddle/gserver/gradientmachines/ParallelNeuralNetwork.h +++ b/paddle/gserver/gradientmachines/ParallelNeuralNetwork.h @@ -1,4 +1,4 @@ -/* Copyright (c) 2016 PaddlePaddle Authors. All Rights Reserve. +/* Copyright (c) 2016 PaddlePaddle Authors. All Rights Reserved. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/paddle/gserver/gradientmachines/RecurrentGradientMachine.cpp b/paddle/gserver/gradientmachines/RecurrentGradientMachine.cpp index 9f29b974669..2429b5d1a0a 100644 --- a/paddle/gserver/gradientmachines/RecurrentGradientMachine.cpp +++ b/paddle/gserver/gradientmachines/RecurrentGradientMachine.cpp @@ -1,4 +1,4 @@ -/* Copyright (c) 2016 PaddlePaddle Authors. All Rights Reserve. +/* Copyright (c) 2016 PaddlePaddle Authors. All Rights Reserved. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/paddle/gserver/gradientmachines/RecurrentGradientMachine.h b/paddle/gserver/gradientmachines/RecurrentGradientMachine.h index c16fae6d177..0032b72cdae 100644 --- a/paddle/gserver/gradientmachines/RecurrentGradientMachine.h +++ b/paddle/gserver/gradientmachines/RecurrentGradientMachine.h @@ -1,4 +1,4 @@ -/* Copyright (c) 2016 PaddlePaddle Authors. All Rights Reserve. +/* Copyright (c) 2016 PaddlePaddle Authors. All Rights Reserved. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/paddle/gserver/layers/AddtoLayer.cpp b/paddle/gserver/layers/AddtoLayer.cpp index 5338530113e..75e17f52df6 100644 --- a/paddle/gserver/layers/AddtoLayer.cpp +++ b/paddle/gserver/layers/AddtoLayer.cpp @@ -1,4 +1,4 @@ -/* Copyright (c) 2016 PaddlePaddle Authors. All Rights Reserve. +/* Copyright (c) 2016 PaddlePaddle Authors. All Rights Reserved. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/paddle/gserver/layers/AddtoLayer.h b/paddle/gserver/layers/AddtoLayer.h index 4e98c174b46..1d000630567 100644 --- a/paddle/gserver/layers/AddtoLayer.h +++ b/paddle/gserver/layers/AddtoLayer.h @@ -1,4 +1,4 @@ -/* Copyright (c) 2016 PaddlePaddle Authors. All Rights Reserve. +/* Copyright (c) 2016 PaddlePaddle Authors. All Rights Reserved. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/paddle/gserver/layers/AgentLayer.cpp b/paddle/gserver/layers/AgentLayer.cpp index bdae7e623ae..e2f73f88f59 100644 --- a/paddle/gserver/layers/AgentLayer.cpp +++ b/paddle/gserver/layers/AgentLayer.cpp @@ -1,4 +1,4 @@ -/* Copyright (c) 2016 PaddlePaddle Authors. All Rights Reserve. +/* Copyright (c) 2016 PaddlePaddle Authors. All Rights Reserved. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/paddle/gserver/layers/AgentLayer.h b/paddle/gserver/layers/AgentLayer.h index 29681b29c6a..da0ac453083 100644 --- a/paddle/gserver/layers/AgentLayer.h +++ b/paddle/gserver/layers/AgentLayer.h @@ -1,4 +1,4 @@ -/* Copyright (c) 2016 PaddlePaddle Authors. All Rights Reserve. +/* Copyright (c) 2016 PaddlePaddle Authors. All Rights Reserved. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/paddle/gserver/layers/AverageLayer.cpp b/paddle/gserver/layers/AverageLayer.cpp index 96cc4288c6f..b3787b1448a 100644 --- a/paddle/gserver/layers/AverageLayer.cpp +++ b/paddle/gserver/layers/AverageLayer.cpp @@ -1,4 +1,4 @@ -/* Copyright (c) 2016 PaddlePaddle Authors. All Rights Reserve. +/* Copyright (c) 2016 PaddlePaddle Authors. All Rights Reserved. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/paddle/gserver/layers/AverageLayer.h b/paddle/gserver/layers/AverageLayer.h index db4a17bfb07..24602d2a9c3 100644 --- a/paddle/gserver/layers/AverageLayer.h +++ b/paddle/gserver/layers/AverageLayer.h @@ -1,4 +1,4 @@ -/* Copyright (c) 2016 PaddlePaddle Authors. All Rights Reserve. +/* Copyright (c) 2016 PaddlePaddle Authors. All Rights Reserved. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/paddle/gserver/layers/BatchNormBaseLayer.cpp b/paddle/gserver/layers/BatchNormBaseLayer.cpp index 925af31289d..a3516f9423e 100644 --- a/paddle/gserver/layers/BatchNormBaseLayer.cpp +++ b/paddle/gserver/layers/BatchNormBaseLayer.cpp @@ -1,4 +1,4 @@ -/* Copyright (c) 2016 PaddlePaddle Authors. All Rights Reserve. +/* Copyright (c) 2016 PaddlePaddle Authors. All Rights Reserved. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/paddle/gserver/layers/BatchNormBaseLayer.h b/paddle/gserver/layers/BatchNormBaseLayer.h index 2ac3cd9d670..69d642af4f1 100644 --- a/paddle/gserver/layers/BatchNormBaseLayer.h +++ b/paddle/gserver/layers/BatchNormBaseLayer.h @@ -1,4 +1,4 @@ -/* Copyright (c) 2016 PaddlePaddle Authors. All Rights Reserve. +/* Copyright (c) 2016 PaddlePaddle Authors. All Rights Reserved. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/paddle/gserver/layers/BatchNormalizationLayer.cpp b/paddle/gserver/layers/BatchNormalizationLayer.cpp index 25ab5cd9277..59831dd9049 100644 --- a/paddle/gserver/layers/BatchNormalizationLayer.cpp +++ b/paddle/gserver/layers/BatchNormalizationLayer.cpp @@ -1,4 +1,4 @@ -/* Copyright (c) 2016 PaddlePaddle Authors. All Rights Reserve. +/* Copyright (c) 2016 PaddlePaddle Authors. All Rights Reserved. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/paddle/gserver/layers/BatchNormalizationLayer.h b/paddle/gserver/layers/BatchNormalizationLayer.h index 1fdb5e20702..95add69215e 100644 --- a/paddle/gserver/layers/BatchNormalizationLayer.h +++ b/paddle/gserver/layers/BatchNormalizationLayer.h @@ -1,4 +1,4 @@ -/* Copyright (c) 2016 PaddlePaddle Authors. All Rights Reserve. +/* Copyright (c) 2016 PaddlePaddle Authors. All Rights Reserved. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/paddle/gserver/layers/BilinearInterpLayer.cpp b/paddle/gserver/layers/BilinearInterpLayer.cpp index 1976cb00175..9775914596c 100644 --- a/paddle/gserver/layers/BilinearInterpLayer.cpp +++ b/paddle/gserver/layers/BilinearInterpLayer.cpp @@ -1,4 +1,4 @@ -/* Copyright (c) 2016 PaddlePaddle Authors. All Rights Reserve. +/* Copyright (c) 2016 PaddlePaddle Authors. All Rights Reserved. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/paddle/gserver/layers/BilinearInterpLayer.h b/paddle/gserver/layers/BilinearInterpLayer.h index 27c269f2781..acd320420f4 100644 --- a/paddle/gserver/layers/BilinearInterpLayer.h +++ b/paddle/gserver/layers/BilinearInterpLayer.h @@ -1,4 +1,4 @@ -/* Copyright (c) 2016 PaddlePaddle Authors. All Rights Reserve. +/* Copyright (c) 2016 PaddlePaddle Authors. All Rights Reserved. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/paddle/gserver/layers/BlockExpandLayer.cpp b/paddle/gserver/layers/BlockExpandLayer.cpp index 3b1f3463591..793d24e884a 100644 --- a/paddle/gserver/layers/BlockExpandLayer.cpp +++ b/paddle/gserver/layers/BlockExpandLayer.cpp @@ -1,4 +1,4 @@ -/* Copyright (c) 2016 PaddlePaddle Authors. All Rights Reserve. +/* Copyright (c) 2016 PaddlePaddle Authors. All Rights Reserved. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/paddle/gserver/layers/BlockExpandLayer.h b/paddle/gserver/layers/BlockExpandLayer.h index 15ce73ab8b2..1797b64036b 100644 --- a/paddle/gserver/layers/BlockExpandLayer.h +++ b/paddle/gserver/layers/BlockExpandLayer.h @@ -1,4 +1,4 @@ -/* Copyright (c) 2016 PaddlePaddle Authors. All Rights Reserve. +/* Copyright (c) 2016 PaddlePaddle Authors. All Rights Reserved. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/paddle/gserver/layers/CRFDecodingLayer.cpp b/paddle/gserver/layers/CRFDecodingLayer.cpp index 191176ce985..4afed7e2956 100644 --- a/paddle/gserver/layers/CRFDecodingLayer.cpp +++ b/paddle/gserver/layers/CRFDecodingLayer.cpp @@ -1,4 +1,4 @@ -/* Copyright (c) 2016 PaddlePaddle Authors. All Rights Reserve. +/* Copyright (c) 2016 PaddlePaddle Authors. All Rights Reserved. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/paddle/gserver/layers/CRFDecodingLayer.h b/paddle/gserver/layers/CRFDecodingLayer.h index 3cbcac6cf62..fba3cebac1a 100644 --- a/paddle/gserver/layers/CRFDecodingLayer.h +++ b/paddle/gserver/layers/CRFDecodingLayer.h @@ -1,4 +1,4 @@ -/* Copyright (c) 2016 PaddlePaddle Authors. All Rights Reserve. +/* Copyright (c) 2016 PaddlePaddle Authors. All Rights Reserved. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/paddle/gserver/layers/CRFLayer.cpp b/paddle/gserver/layers/CRFLayer.cpp index 867303b4fa0..8b87a533a2b 100644 --- a/paddle/gserver/layers/CRFLayer.cpp +++ b/paddle/gserver/layers/CRFLayer.cpp @@ -1,4 +1,4 @@ -/* Copyright (c) 2016 PaddlePaddle Authors. All Rights Reserve. +/* Copyright (c) 2016 PaddlePaddle Authors. All Rights Reserved. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/paddle/gserver/layers/CRFLayer.h b/paddle/gserver/layers/CRFLayer.h index 00ec13cede9..cb5bd05568c 100644 --- a/paddle/gserver/layers/CRFLayer.h +++ b/paddle/gserver/layers/CRFLayer.h @@ -1,4 +1,4 @@ -/* Copyright (c) 2016 PaddlePaddle Authors. All Rights Reserve. +/* Copyright (c) 2016 PaddlePaddle Authors. All Rights Reserved. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/paddle/gserver/layers/CTCLayer.cpp b/paddle/gserver/layers/CTCLayer.cpp index 14ec8515518..64eb15cd0dd 100644 --- a/paddle/gserver/layers/CTCLayer.cpp +++ b/paddle/gserver/layers/CTCLayer.cpp @@ -1,4 +1,4 @@ -/* Copyright (c) 2016 PaddlePaddle Authors. All Rights Reserve. +/* Copyright (c) 2016 PaddlePaddle Authors. All Rights Reserved. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/paddle/gserver/layers/CTCLayer.h b/paddle/gserver/layers/CTCLayer.h index f7a515f312d..fcbc42565e9 100644 --- a/paddle/gserver/layers/CTCLayer.h +++ b/paddle/gserver/layers/CTCLayer.h @@ -1,4 +1,4 @@ -/* Copyright (c) 2016 PaddlePaddle Authors. All Rights Reserve. +/* Copyright (c) 2016 PaddlePaddle Authors. All Rights Reserved. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/paddle/gserver/layers/ClipLayer.cpp b/paddle/gserver/layers/ClipLayer.cpp index 13f16c95379..dbc33374997 100644 --- a/paddle/gserver/layers/ClipLayer.cpp +++ b/paddle/gserver/layers/ClipLayer.cpp @@ -1,4 +1,4 @@ -/* Copyright (c) 2016 PaddlePaddle Authors. All Rights Reserve. +/* Copyright (c) 2016 PaddlePaddle Authors. All Rights Reserved. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/paddle/gserver/layers/ConcatenateLayer.cpp b/paddle/gserver/layers/ConcatenateLayer.cpp index c5fc4cf4f81..f5ab29a509e 100644 --- a/paddle/gserver/layers/ConcatenateLayer.cpp +++ b/paddle/gserver/layers/ConcatenateLayer.cpp @@ -1,4 +1,4 @@ -/* Copyright (c) 2016 PaddlePaddle Authors. All Rights Reserve. +/* Copyright (c) 2016 PaddlePaddle Authors. All Rights Reserved. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/paddle/gserver/layers/ContextProjection.cpp b/paddle/gserver/layers/ContextProjection.cpp index d7042af1c25..10c3cef0da6 100644 --- a/paddle/gserver/layers/ContextProjection.cpp +++ b/paddle/gserver/layers/ContextProjection.cpp @@ -1,4 +1,4 @@ -/* Copyright (c) 2016 PaddlePaddle Authors. All Rights Reserve. +/* Copyright (c) 2016 PaddlePaddle Authors. All Rights Reserved. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/paddle/gserver/layers/ContextProjection.h b/paddle/gserver/layers/ContextProjection.h index c87d6ed1d6d..e30f98f58d2 100644 --- a/paddle/gserver/layers/ContextProjection.h +++ b/paddle/gserver/layers/ContextProjection.h @@ -1,4 +1,4 @@ -/* Copyright (c) 2016 PaddlePaddle Authors. All Rights Reserve. +/* Copyright (c) 2016 PaddlePaddle Authors. All Rights Reserved. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/paddle/gserver/layers/Conv3DLayer.cpp b/paddle/gserver/layers/Conv3DLayer.cpp index 9deda2de989..b38de86b159 100644 --- a/paddle/gserver/layers/Conv3DLayer.cpp +++ b/paddle/gserver/layers/Conv3DLayer.cpp @@ -1,4 +1,4 @@ -/* Copyright (c) 2016 Baidu, Inc. All Rights Reserve. +/* Copyright (c) 2016 Baidu, Inc. All Rights Reserved. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/paddle/gserver/layers/Conv3DLayer.h b/paddle/gserver/layers/Conv3DLayer.h index b622508d0ce..5ab5ff3d4af 100644 --- a/paddle/gserver/layers/Conv3DLayer.h +++ b/paddle/gserver/layers/Conv3DLayer.h @@ -1,4 +1,4 @@ -/* Copyright (c) 2016 Baidu, Inc. All Rights Reserve. +/* Copyright (c) 2016 Baidu, Inc. All Rights Reserved. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/paddle/gserver/layers/ConvBaseLayer.cpp b/paddle/gserver/layers/ConvBaseLayer.cpp index b848ab6bdd4..56bf4f9fcb1 100644 --- a/paddle/gserver/layers/ConvBaseLayer.cpp +++ b/paddle/gserver/layers/ConvBaseLayer.cpp @@ -1,4 +1,4 @@ -/* Copyright (c) 2016 PaddlePaddle Authors. All Rights Reserve. +/* Copyright (c) 2016 PaddlePaddle Authors. All Rights Reserved. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/paddle/gserver/layers/ConvBaseLayer.h b/paddle/gserver/layers/ConvBaseLayer.h index ccd170d9d85..93869fe68d1 100644 --- a/paddle/gserver/layers/ConvBaseLayer.h +++ b/paddle/gserver/layers/ConvBaseLayer.h @@ -1,4 +1,4 @@ -/* Copyright (c) 2016 PaddlePaddle Authors. All Rights Reserve. +/* Copyright (c) 2016 PaddlePaddle Authors. All Rights Reserved. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/paddle/gserver/layers/ConvBaseOperator.cpp b/paddle/gserver/layers/ConvBaseOperator.cpp index 5469c41c874..317e7d5c607 100644 --- a/paddle/gserver/layers/ConvBaseOperator.cpp +++ b/paddle/gserver/layers/ConvBaseOperator.cpp @@ -1,4 +1,4 @@ -/* Copyright (c) 2016 PaddlePaddle Authors. All Rights Reserve. +/* Copyright (c) 2016 PaddlePaddle Authors. All Rights Reserved. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/paddle/gserver/layers/ConvBaseOperator.h b/paddle/gserver/layers/ConvBaseOperator.h index 2d42169cde2..27fb0362d3c 100644 --- a/paddle/gserver/layers/ConvBaseOperator.h +++ b/paddle/gserver/layers/ConvBaseOperator.h @@ -1,4 +1,4 @@ -/* Copyright (c) 2016 PaddlePaddle Authors. All Rights Reserve. +/* Copyright (c) 2016 PaddlePaddle Authors. All Rights Reserved. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/paddle/gserver/layers/ConvBaseProjection.cpp b/paddle/gserver/layers/ConvBaseProjection.cpp index 19efed7b52e..39f433b78fe 100644 --- a/paddle/gserver/layers/ConvBaseProjection.cpp +++ b/paddle/gserver/layers/ConvBaseProjection.cpp @@ -1,4 +1,4 @@ -/* Copyright (c) 2016 PaddlePaddle Authors. All Rights Reserve. +/* Copyright (c) 2016 PaddlePaddle Authors. All Rights Reserved. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/paddle/gserver/layers/ConvBaseProjection.h b/paddle/gserver/layers/ConvBaseProjection.h index bb7ffa627b7..ba76d236d90 100644 --- a/paddle/gserver/layers/ConvBaseProjection.h +++ b/paddle/gserver/layers/ConvBaseProjection.h @@ -1,4 +1,4 @@ -/* Copyright (c) 2016 PaddlePaddle Authors. All Rights Reserve. +/* Copyright (c) 2016 PaddlePaddle Authors. All Rights Reserved. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/paddle/gserver/layers/ConvOperator.cpp b/paddle/gserver/layers/ConvOperator.cpp index 80932c8c509..45498b92d32 100644 --- a/paddle/gserver/layers/ConvOperator.cpp +++ b/paddle/gserver/layers/ConvOperator.cpp @@ -1,4 +1,4 @@ -/* Copyright (c) 2016 PaddlePaddle Authors. All Rights Reserve. +/* Copyright (c) 2016 PaddlePaddle Authors. All Rights Reserved. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/paddle/gserver/layers/ConvOperator.h b/paddle/gserver/layers/ConvOperator.h index 0f3546c67ac..fbdb7bb1cd2 100644 --- a/paddle/gserver/layers/ConvOperator.h +++ b/paddle/gserver/layers/ConvOperator.h @@ -1,4 +1,4 @@ -/* Copyright (c) 2016 PaddlePaddle Authors. All Rights Reserve. +/* Copyright (c) 2016 PaddlePaddle Authors. All Rights Reserved. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/paddle/gserver/layers/ConvProjection.cpp b/paddle/gserver/layers/ConvProjection.cpp index 6f0106b713d..f382e6cab12 100644 --- a/paddle/gserver/layers/ConvProjection.cpp +++ b/paddle/gserver/layers/ConvProjection.cpp @@ -1,4 +1,4 @@ -/* Copyright (c) 2016 PaddlePaddle Authors. All Rights Reserve. +/* Copyright (c) 2016 PaddlePaddle Authors. All Rights Reserved. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/paddle/gserver/layers/ConvProjection.h b/paddle/gserver/layers/ConvProjection.h index b7d7cc9a275..e8ecb99431a 100644 --- a/paddle/gserver/layers/ConvProjection.h +++ b/paddle/gserver/layers/ConvProjection.h @@ -1,4 +1,4 @@ -/* Copyright (c) 2016 PaddlePaddle Authors. All Rights Reserve. +/* Copyright (c) 2016 PaddlePaddle Authors. All Rights Reserved. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/paddle/gserver/layers/ConvShiftLayer.cpp b/paddle/gserver/layers/ConvShiftLayer.cpp index 002be415691..fb877710196 100644 --- a/paddle/gserver/layers/ConvShiftLayer.cpp +++ b/paddle/gserver/layers/ConvShiftLayer.cpp @@ -1,4 +1,4 @@ -/* Copyright (c) 2016 PaddlePaddle Authors. All Rights Reserve. +/* Copyright (c) 2016 PaddlePaddle Authors. All Rights Reserved. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/paddle/gserver/layers/ConvTransOperator.cpp b/paddle/gserver/layers/ConvTransOperator.cpp index db026337a47..ac41d6f9a4f 100644 --- a/paddle/gserver/layers/ConvTransOperator.cpp +++ b/paddle/gserver/layers/ConvTransOperator.cpp @@ -1,4 +1,4 @@ -/* Copyright (c) 2016 PaddlePaddle Authors. All Rights Reserve. +/* Copyright (c) 2016 PaddlePaddle Authors. All Rights Reserved. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/paddle/gserver/layers/ConvTransOperator.h b/paddle/gserver/layers/ConvTransOperator.h index ca08dc9aa77..1bf58f2bfb7 100644 --- a/paddle/gserver/layers/ConvTransOperator.h +++ b/paddle/gserver/layers/ConvTransOperator.h @@ -1,4 +1,4 @@ -/* Copyright (c) 2016 PaddlePaddle Authors. All Rights Reserve. +/* Copyright (c) 2016 PaddlePaddle Authors. All Rights Reserved. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/paddle/gserver/layers/ConvTransProjection.cpp b/paddle/gserver/layers/ConvTransProjection.cpp index e7f081c0232..242ce34a607 100644 --- a/paddle/gserver/layers/ConvTransProjection.cpp +++ b/paddle/gserver/layers/ConvTransProjection.cpp @@ -1,4 +1,4 @@ -/* Copyright (c) 2016 PaddlePaddle Authors. All Rights Reserve. +/* Copyright (c) 2016 PaddlePaddle Authors. All Rights Reserved. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/paddle/gserver/layers/ConvTransProjection.h b/paddle/gserver/layers/ConvTransProjection.h index 6508d17b240..269b2694c82 100644 --- a/paddle/gserver/layers/ConvTransProjection.h +++ b/paddle/gserver/layers/ConvTransProjection.h @@ -1,4 +1,4 @@ -/* Copyright (c) 2016 PaddlePaddle Authors. All Rights Reserve. +/* Copyright (c) 2016 PaddlePaddle Authors. All Rights Reserved. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/paddle/gserver/layers/ConvexCombinationLayer.cpp b/paddle/gserver/layers/ConvexCombinationLayer.cpp index 32eb3bf604a..dce751940c1 100644 --- a/paddle/gserver/layers/ConvexCombinationLayer.cpp +++ b/paddle/gserver/layers/ConvexCombinationLayer.cpp @@ -1,4 +1,4 @@ -/* Copyright (c) 2016 PaddlePaddle Authors. All Rights Reserve. +/* Copyright (c) 2016 PaddlePaddle Authors. All Rights Reserved. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/paddle/gserver/layers/CosSimLayer.cpp b/paddle/gserver/layers/CosSimLayer.cpp index 57ba124e40c..4e44a5e8dfd 100644 --- a/paddle/gserver/layers/CosSimLayer.cpp +++ b/paddle/gserver/layers/CosSimLayer.cpp @@ -1,4 +1,4 @@ -/* Copyright (c) 2016 PaddlePaddle Authors. All Rights Reserve. +/* Copyright (c) 2016 PaddlePaddle Authors. All Rights Reserved. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/paddle/gserver/layers/CosSimLayer.h b/paddle/gserver/layers/CosSimLayer.h index 8afaee62c2d..675cdb16b56 100644 --- a/paddle/gserver/layers/CosSimLayer.h +++ b/paddle/gserver/layers/CosSimLayer.h @@ -1,4 +1,4 @@ -/* Copyright (c) 2016 PaddlePaddle Authors. All Rights Reserve. +/* Copyright (c) 2016 PaddlePaddle Authors. All Rights Reserved. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/paddle/gserver/layers/CosSimVecMatLayer.cpp b/paddle/gserver/layers/CosSimVecMatLayer.cpp index 0f887d8adfa..685b4e8ef37 100644 --- a/paddle/gserver/layers/CosSimVecMatLayer.cpp +++ b/paddle/gserver/layers/CosSimVecMatLayer.cpp @@ -1,4 +1,4 @@ -/* Copyright (c) 2016 PaddlePaddle Authors. All Rights Reserve. +/* Copyright (c) 2016 PaddlePaddle Authors. All Rights Reserved. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/paddle/gserver/layers/CostLayer.cpp b/paddle/gserver/layers/CostLayer.cpp index 0bb6f84c22e..484f803a838 100644 --- a/paddle/gserver/layers/CostLayer.cpp +++ b/paddle/gserver/layers/CostLayer.cpp @@ -1,4 +1,4 @@ -/* Copyright (c) 2016 PaddlePaddle Authors. All Rights Reserve. +/* Copyright (c) 2016 PaddlePaddle Authors. All Rights Reserved. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/paddle/gserver/layers/CostLayer.h b/paddle/gserver/layers/CostLayer.h index 0f655b48eea..306c067ed1c 100644 --- a/paddle/gserver/layers/CostLayer.h +++ b/paddle/gserver/layers/CostLayer.h @@ -1,4 +1,4 @@ -/* Copyright (c) 2016 PaddlePaddle Authors. All Rights Reserve. +/* Copyright (c) 2016 PaddlePaddle Authors. All Rights Reserved. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/paddle/gserver/layers/CropLayer.cpp b/paddle/gserver/layers/CropLayer.cpp index 69ad913420b..bc97ca2f9e0 100644 --- a/paddle/gserver/layers/CropLayer.cpp +++ b/paddle/gserver/layers/CropLayer.cpp @@ -1,4 +1,4 @@ -/* Copyright (c) 2016 PaddlePaddle Authors. All Rights Reserve. +/* Copyright (c) 2016 PaddlePaddle Authors. All Rights Reserved. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/paddle/gserver/layers/CropLayer.h b/paddle/gserver/layers/CropLayer.h index 6b620262102..1a85911ef75 100644 --- a/paddle/gserver/layers/CropLayer.h +++ b/paddle/gserver/layers/CropLayer.h @@ -1,4 +1,4 @@ -/* Copyright (c) 2016 PaddlePaddle Authors. All Rights Reserve. +/* Copyright (c) 2016 PaddlePaddle Authors. All Rights Reserved. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/paddle/gserver/layers/CrossChannelNormLayer.cpp b/paddle/gserver/layers/CrossChannelNormLayer.cpp index d72503217f1..644450291ee 100644 --- a/paddle/gserver/layers/CrossChannelNormLayer.cpp +++ b/paddle/gserver/layers/CrossChannelNormLayer.cpp @@ -1,4 +1,4 @@ -/* Copyright (c) 2016 PaddlePaddle Authors. All Rights Reserve. +/* Copyright (c) 2016 PaddlePaddle Authors. All Rights Reserved. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/paddle/gserver/layers/CrossEntropyOverBeam.cpp b/paddle/gserver/layers/CrossEntropyOverBeam.cpp index 578bdbbe721..f3bf2148587 100644 --- a/paddle/gserver/layers/CrossEntropyOverBeam.cpp +++ b/paddle/gserver/layers/CrossEntropyOverBeam.cpp @@ -1,4 +1,4 @@ -/* Copyright (c) 2016 PaddlePaddle Authors. All Rights Reserve. +/* Copyright (c) 2016 PaddlePaddle Authors. All Rights Reserved. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/paddle/gserver/layers/CrossEntropyOverBeam.h b/paddle/gserver/layers/CrossEntropyOverBeam.h index 5643556f433..b47a2933c25 100644 --- a/paddle/gserver/layers/CrossEntropyOverBeam.h +++ b/paddle/gserver/layers/CrossEntropyOverBeam.h @@ -1,4 +1,4 @@ -/* Copyright (c) 2016 PaddlePaddle Authors. All Rights Reserve. +/* Copyright (c) 2016 PaddlePaddle Authors. All Rights Reserved. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/paddle/gserver/layers/CudnnBatchNormLayer.cpp b/paddle/gserver/layers/CudnnBatchNormLayer.cpp index 8390b55026c..9a29e6a55e9 100644 --- a/paddle/gserver/layers/CudnnBatchNormLayer.cpp +++ b/paddle/gserver/layers/CudnnBatchNormLayer.cpp @@ -1,4 +1,4 @@ -/* Copyright (c) 2016 PaddlePaddle Authors. All Rights Reserve. +/* Copyright (c) 2016 PaddlePaddle Authors. All Rights Reserved. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/paddle/gserver/layers/CudnnBatchNormLayer.h b/paddle/gserver/layers/CudnnBatchNormLayer.h index 1a3f0c0cbf8..aa279f73d66 100644 --- a/paddle/gserver/layers/CudnnBatchNormLayer.h +++ b/paddle/gserver/layers/CudnnBatchNormLayer.h @@ -1,4 +1,4 @@ -/* Copyright (c) 2016 PaddlePaddle Authors. All Rights Reserve. +/* Copyright (c) 2016 PaddlePaddle Authors. All Rights Reserved. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/paddle/gserver/layers/CudnnConvBaseLayer.cpp b/paddle/gserver/layers/CudnnConvBaseLayer.cpp index 9e954615cdd..6d0a40a6071 100644 --- a/paddle/gserver/layers/CudnnConvBaseLayer.cpp +++ b/paddle/gserver/layers/CudnnConvBaseLayer.cpp @@ -1,4 +1,4 @@ -/* Copyright (c) 2016 PaddlePaddle Authors. All Rights Reserve. +/* Copyright (c) 2016 PaddlePaddle Authors. All Rights Reserved. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/paddle/gserver/layers/CudnnConvBaseLayer.h b/paddle/gserver/layers/CudnnConvBaseLayer.h index 93a05f94c77..698104e4fbd 100644 --- a/paddle/gserver/layers/CudnnConvBaseLayer.h +++ b/paddle/gserver/layers/CudnnConvBaseLayer.h @@ -1,4 +1,4 @@ -/* Copyright (c) 2016 PaddlePaddle Authors. All Rights Reserve. +/* Copyright (c) 2016 PaddlePaddle Authors. All Rights Reserved. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/paddle/gserver/layers/CudnnPoolLayer.cpp b/paddle/gserver/layers/CudnnPoolLayer.cpp index 810a1af2d09..ac6d2168f43 100644 --- a/paddle/gserver/layers/CudnnPoolLayer.cpp +++ b/paddle/gserver/layers/CudnnPoolLayer.cpp @@ -1,4 +1,4 @@ -/* Copyright (c) 2016 PaddlePaddle Authors. All Rights Reserve. +/* Copyright (c) 2016 PaddlePaddle Authors. All Rights Reserved. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/paddle/gserver/layers/CudnnPoolLayer.h b/paddle/gserver/layers/CudnnPoolLayer.h index f0aa22fe3af..9eb4fc6138b 100644 --- a/paddle/gserver/layers/CudnnPoolLayer.h +++ b/paddle/gserver/layers/CudnnPoolLayer.h @@ -1,4 +1,4 @@ -/* Copyright (c) 2016 PaddlePaddle Authors. All Rights Reserve. +/* Copyright (c) 2016 PaddlePaddle Authors. All Rights Reserved. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/paddle/gserver/layers/DataLayer.cpp b/paddle/gserver/layers/DataLayer.cpp index 3551df4e172..4cadaa76631 100644 --- a/paddle/gserver/layers/DataLayer.cpp +++ b/paddle/gserver/layers/DataLayer.cpp @@ -1,4 +1,4 @@ -/* Copyright (c) 2016 PaddlePaddle Authors. All Rights Reserve. +/* Copyright (c) 2016 PaddlePaddle Authors. All Rights Reserved. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/paddle/gserver/layers/DataLayer.h b/paddle/gserver/layers/DataLayer.h index a9cf1f943c2..4b12afe0efe 100644 --- a/paddle/gserver/layers/DataLayer.h +++ b/paddle/gserver/layers/DataLayer.h @@ -1,4 +1,4 @@ -/* Copyright (c) 2016 PaddlePaddle Authors. All Rights Reserve. +/* Copyright (c) 2016 PaddlePaddle Authors. All Rights Reserved. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/paddle/gserver/layers/DataNormLayer.cpp b/paddle/gserver/layers/DataNormLayer.cpp index afd532c949f..86da4d6f957 100644 --- a/paddle/gserver/layers/DataNormLayer.cpp +++ b/paddle/gserver/layers/DataNormLayer.cpp @@ -1,4 +1,4 @@ -/* Copyright (c) 2016 PaddlePaddle Authors. All Rights Reserve. +/* Copyright (c) 2016 PaddlePaddle Authors. All Rights Reserved. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/paddle/gserver/layers/DataNormLayer.h b/paddle/gserver/layers/DataNormLayer.h index f0fd044e5b8..2a2a2a4aa76 100644 --- a/paddle/gserver/layers/DataNormLayer.h +++ b/paddle/gserver/layers/DataNormLayer.h @@ -1,4 +1,4 @@ -/* Copyright (c) 2016 PaddlePaddle Authors. All Rights Reserve. +/* Copyright (c) 2016 PaddlePaddle Authors. All Rights Reserved. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/paddle/gserver/layers/DeConv3DLayer.cpp b/paddle/gserver/layers/DeConv3DLayer.cpp index 3eea638649e..db6d6e073c0 100644 --- a/paddle/gserver/layers/DeConv3DLayer.cpp +++ b/paddle/gserver/layers/DeConv3DLayer.cpp @@ -1,4 +1,4 @@ -/* Copyright (c) 2016 Baidu, Inc. All Rights Reserve. +/* Copyright (c) 2016 Baidu, Inc. All Rights Reserved. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/paddle/gserver/layers/DeConv3DLayer.h b/paddle/gserver/layers/DeConv3DLayer.h index a2a3d3f8273..57d51cdec66 100644 --- a/paddle/gserver/layers/DeConv3DLayer.h +++ b/paddle/gserver/layers/DeConv3DLayer.h @@ -1,4 +1,4 @@ -/* Copyright (c) 2016 Baidu, Inc. All Rights Reserve. +/* Copyright (c) 2016 Baidu, Inc. All Rights Reserved. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/paddle/gserver/layers/DetectionOutputLayer.cpp b/paddle/gserver/layers/DetectionOutputLayer.cpp index f9040f7ae74..93fe046c6a8 100644 --- a/paddle/gserver/layers/DetectionOutputLayer.cpp +++ b/paddle/gserver/layers/DetectionOutputLayer.cpp @@ -1,4 +1,4 @@ -/* Copyright (c) 2016 PaddlePaddle Authors. All Rights Reserve. +/* Copyright (c) 2016 PaddlePaddle Authors. All Rights Reserved. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/paddle/gserver/layers/DetectionOutputLayer.h b/paddle/gserver/layers/DetectionOutputLayer.h index a232af0a691..174a6e5d9ac 100644 --- a/paddle/gserver/layers/DetectionOutputLayer.h +++ b/paddle/gserver/layers/DetectionOutputLayer.h @@ -1,4 +1,4 @@ -/* Copyright (c) 2016 PaddlePaddle Authors. All Rights Reserve. +/* Copyright (c) 2016 PaddlePaddle Authors. All Rights Reserved. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/paddle/gserver/layers/DetectionUtil.cpp b/paddle/gserver/layers/DetectionUtil.cpp index d83674f45a7..0dc45e5a751 100644 --- a/paddle/gserver/layers/DetectionUtil.cpp +++ b/paddle/gserver/layers/DetectionUtil.cpp @@ -1,4 +1,4 @@ -/* Copyright (c) 2016 PaddlePaddle Authors. All Rights Reserve. +/* Copyright (c) 2016 PaddlePaddle Authors. All Rights Reserved. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/paddle/gserver/layers/DetectionUtil.h b/paddle/gserver/layers/DetectionUtil.h index 641ed873b4c..d6502fcf8fb 100644 --- a/paddle/gserver/layers/DetectionUtil.h +++ b/paddle/gserver/layers/DetectionUtil.h @@ -1,4 +1,4 @@ -/* Copyright (c) 2016 PaddlePaddle Authors. All Rights Reserve. +/* Copyright (c) 2016 PaddlePaddle Authors. All Rights Reserved. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/paddle/gserver/layers/DotMulOperator.cpp b/paddle/gserver/layers/DotMulOperator.cpp index 55dabd79d01..68db2929ade 100644 --- a/paddle/gserver/layers/DotMulOperator.cpp +++ b/paddle/gserver/layers/DotMulOperator.cpp @@ -1,4 +1,4 @@ -/* Copyright (c) 2016 PaddlePaddle Authors. All Rights Reserve. +/* Copyright (c) 2016 PaddlePaddle Authors. All Rights Reserved. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/paddle/gserver/layers/DotMulProjection.cpp b/paddle/gserver/layers/DotMulProjection.cpp index 0a1ede3618c..86453aae841 100644 --- a/paddle/gserver/layers/DotMulProjection.cpp +++ b/paddle/gserver/layers/DotMulProjection.cpp @@ -1,4 +1,4 @@ -/* Copyright (c) 2016 PaddlePaddle Authors. All Rights Reserve. +/* Copyright (c) 2016 PaddlePaddle Authors. All Rights Reserved. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/paddle/gserver/layers/DotProdLayer.cpp b/paddle/gserver/layers/DotProdLayer.cpp index 9e2dbe3c3c4..5148d93e27d 100644 --- a/paddle/gserver/layers/DotProdLayer.cpp +++ b/paddle/gserver/layers/DotProdLayer.cpp @@ -1,4 +1,4 @@ -/* Copyright (c) 2016 PaddlePaddle Authors. All Rights Reserve. +/* Copyright (c) 2016 PaddlePaddle Authors. All Rights Reserved. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/paddle/gserver/layers/EosIdCheckLayer.cpp b/paddle/gserver/layers/EosIdCheckLayer.cpp index 686f1fa0543..470a5b8ea20 100644 --- a/paddle/gserver/layers/EosIdCheckLayer.cpp +++ b/paddle/gserver/layers/EosIdCheckLayer.cpp @@ -1,4 +1,4 @@ -/* Copyright (c) 2016 PaddlePaddle Authors. All Rights Reserve. +/* Copyright (c) 2016 PaddlePaddle Authors. All Rights Reserved. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/paddle/gserver/layers/ExpandConvLayer.cpp b/paddle/gserver/layers/ExpandConvLayer.cpp index 7ff0c73721d..3a847865824 100644 --- a/paddle/gserver/layers/ExpandConvLayer.cpp +++ b/paddle/gserver/layers/ExpandConvLayer.cpp @@ -1,4 +1,4 @@ -/* Copyright (c) 2016 PaddlePaddle Authors. All Rights Reserve. +/* Copyright (c) 2016 PaddlePaddle Authors. All Rights Reserved. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/paddle/gserver/layers/ExpandConvLayer.h b/paddle/gserver/layers/ExpandConvLayer.h index a0873de1925..be968155efd 100644 --- a/paddle/gserver/layers/ExpandConvLayer.h +++ b/paddle/gserver/layers/ExpandConvLayer.h @@ -1,4 +1,4 @@ -/* Copyright (c) 2016 PaddlePaddle Authors. All Rights Reserve. +/* Copyright (c) 2016 PaddlePaddle Authors. All Rights Reserved. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/paddle/gserver/layers/ExpandLayer.cpp b/paddle/gserver/layers/ExpandLayer.cpp index de5acfde05a..6b577675401 100644 --- a/paddle/gserver/layers/ExpandLayer.cpp +++ b/paddle/gserver/layers/ExpandLayer.cpp @@ -1,4 +1,4 @@ -/* Copyright (c) 2016 PaddlePaddle Authors. All Rights Reserve. +/* Copyright (c) 2016 PaddlePaddle Authors. All Rights Reserved. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/paddle/gserver/layers/ExpandLayer.h b/paddle/gserver/layers/ExpandLayer.h index c21b3350e2b..04bbfcbd049 100644 --- a/paddle/gserver/layers/ExpandLayer.h +++ b/paddle/gserver/layers/ExpandLayer.h @@ -1,4 +1,4 @@ -/* Copyright (c) 2016 PaddlePaddle Authors. All Rights Reserve. +/* Copyright (c) 2016 PaddlePaddle Authors. All Rights Reserved. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/paddle/gserver/layers/FactorizationMachineLayer.cpp b/paddle/gserver/layers/FactorizationMachineLayer.cpp index be26b9ba88c..1744faada2e 100644 --- a/paddle/gserver/layers/FactorizationMachineLayer.cpp +++ b/paddle/gserver/layers/FactorizationMachineLayer.cpp @@ -1,4 +1,4 @@ -/* Copyright (c) 2016 PaddlePaddle Authors. All Rights Reserve. +/* Copyright (c) 2016 PaddlePaddle Authors. All Rights Reserved. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/paddle/gserver/layers/FactorizationMachineLayer.h b/paddle/gserver/layers/FactorizationMachineLayer.h index df20a49934d..684da4e65a4 100644 --- a/paddle/gserver/layers/FactorizationMachineLayer.h +++ b/paddle/gserver/layers/FactorizationMachineLayer.h @@ -1,4 +1,4 @@ -/* Copyright (c) 2016 PaddlePaddle Authors. All Rights Reserve. +/* Copyright (c) 2016 PaddlePaddle Authors. All Rights Reserved. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/paddle/gserver/layers/FeatureMapExpandLayer.cpp b/paddle/gserver/layers/FeatureMapExpandLayer.cpp index 8a2ae6b49fc..81b98da45bc 100644 --- a/paddle/gserver/layers/FeatureMapExpandLayer.cpp +++ b/paddle/gserver/layers/FeatureMapExpandLayer.cpp @@ -1,4 +1,4 @@ -/* Copyright (c) 2016 PaddlePaddle Authors. All Rights Reserve. +/* Copyright (c) 2016 PaddlePaddle Authors. All Rights Reserved. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/paddle/gserver/layers/FullMatrixProjection.cpp b/paddle/gserver/layers/FullMatrixProjection.cpp index b8b6f403d6a..b9f1bc99fab 100644 --- a/paddle/gserver/layers/FullMatrixProjection.cpp +++ b/paddle/gserver/layers/FullMatrixProjection.cpp @@ -1,4 +1,4 @@ -/* Copyright (c) 2016 PaddlePaddle Authors. All Rights Reserve. +/* Copyright (c) 2016 PaddlePaddle Authors. All Rights Reserved. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/paddle/gserver/layers/FullMatrixProjection.h b/paddle/gserver/layers/FullMatrixProjection.h index 58499f2e1ee..7c4cd1a7066 100644 --- a/paddle/gserver/layers/FullMatrixProjection.h +++ b/paddle/gserver/layers/FullMatrixProjection.h @@ -1,4 +1,4 @@ -/* Copyright (c) 2016 PaddlePaddle Authors. All Rights Reserve. +/* Copyright (c) 2016 PaddlePaddle Authors. All Rights Reserved. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/paddle/gserver/layers/FullyConnectedLayer.cpp b/paddle/gserver/layers/FullyConnectedLayer.cpp index d8a667ff8dc..21ffa01d95a 100644 --- a/paddle/gserver/layers/FullyConnectedLayer.cpp +++ b/paddle/gserver/layers/FullyConnectedLayer.cpp @@ -1,4 +1,4 @@ -/* Copyright (c) 2016 PaddlePaddle Authors. All Rights Reserve. +/* Copyright (c) 2016 PaddlePaddle Authors. All Rights Reserved. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/paddle/gserver/layers/FullyConnectedLayer.h b/paddle/gserver/layers/FullyConnectedLayer.h index 64e7a050125..e66aeeb7334 100644 --- a/paddle/gserver/layers/FullyConnectedLayer.h +++ b/paddle/gserver/layers/FullyConnectedLayer.h @@ -1,4 +1,4 @@ -/* Copyright (c) 2016 PaddlePaddle Authors. All Rights Reserve. +/* Copyright (c) 2016 PaddlePaddle Authors. All Rights Reserved. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/paddle/gserver/layers/GatedRecurrentLayer.cpp b/paddle/gserver/layers/GatedRecurrentLayer.cpp index d3aeea92180..9d38849fdf9 100644 --- a/paddle/gserver/layers/GatedRecurrentLayer.cpp +++ b/paddle/gserver/layers/GatedRecurrentLayer.cpp @@ -1,4 +1,4 @@ -/* Copyright (c) 2016 PaddlePaddle Authors. All Rights Reserve. +/* Copyright (c) 2016 PaddlePaddle Authors. All Rights Reserved. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/paddle/gserver/layers/GatedRecurrentLayer.h b/paddle/gserver/layers/GatedRecurrentLayer.h index 58dd760eb87..f0a3a823018 100644 --- a/paddle/gserver/layers/GatedRecurrentLayer.h +++ b/paddle/gserver/layers/GatedRecurrentLayer.h @@ -1,4 +1,4 @@ -/* Copyright (c) 2016 PaddlePaddle Authors. All Rights Reserve. +/* Copyright (c) 2016 PaddlePaddle Authors. All Rights Reserved. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/paddle/gserver/layers/GetOutputLayer.cpp b/paddle/gserver/layers/GetOutputLayer.cpp index 4e29efd4612..f255681f3e6 100644 --- a/paddle/gserver/layers/GetOutputLayer.cpp +++ b/paddle/gserver/layers/GetOutputLayer.cpp @@ -1,4 +1,4 @@ -/* Copyright (c) 2016 PaddlePaddle Authors. All Rights Reserve. +/* Copyright (c) 2016 PaddlePaddle Authors. All Rights Reserved. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/paddle/gserver/layers/GruCompute.cpp b/paddle/gserver/layers/GruCompute.cpp index 148516391c6..48ddbc413e6 100644 --- a/paddle/gserver/layers/GruCompute.cpp +++ b/paddle/gserver/layers/GruCompute.cpp @@ -1,4 +1,4 @@ -/* Copyright (c) 2016 PaddlePaddle Authors. All Rights Reserve. +/* Copyright (c) 2016 PaddlePaddle Authors. All Rights Reserved. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/paddle/gserver/layers/GruCompute.cu b/paddle/gserver/layers/GruCompute.cu index b4f5c54b147..54be6b80475 100644 --- a/paddle/gserver/layers/GruCompute.cu +++ b/paddle/gserver/layers/GruCompute.cu @@ -1,4 +1,4 @@ -/* Copyright (c) 2016 PaddlePaddle Authors. All Rights Reserve. +/* Copyright (c) 2016 PaddlePaddle Authors. All Rights Reserved. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/paddle/gserver/layers/GruCompute.h b/paddle/gserver/layers/GruCompute.h index 3340e38e62c..fb6bc564220 100644 --- a/paddle/gserver/layers/GruCompute.h +++ b/paddle/gserver/layers/GruCompute.h @@ -1,4 +1,4 @@ -/* Copyright (c) 2016 PaddlePaddle Authors. All Rights Reserve. +/* Copyright (c) 2016 PaddlePaddle Authors. All Rights Reserved. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/paddle/gserver/layers/GruStepLayer.cpp b/paddle/gserver/layers/GruStepLayer.cpp index 5b5cb25f926..917c50250c1 100644 --- a/paddle/gserver/layers/GruStepLayer.cpp +++ b/paddle/gserver/layers/GruStepLayer.cpp @@ -1,4 +1,4 @@ -/* Copyright (c) 2016 PaddlePaddle Authors. All Rights Reserve. +/* Copyright (c) 2016 PaddlePaddle Authors. All Rights Reserved. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/paddle/gserver/layers/HierarchicalSigmoidLayer.cpp b/paddle/gserver/layers/HierarchicalSigmoidLayer.cpp index 236f8096bdb..3e720f179ee 100644 --- a/paddle/gserver/layers/HierarchicalSigmoidLayer.cpp +++ b/paddle/gserver/layers/HierarchicalSigmoidLayer.cpp @@ -1,4 +1,4 @@ -/* Copyright (c) 2016 PaddlePaddle Authors. All Rights Reserve. +/* Copyright (c) 2016 PaddlePaddle Authors. All Rights Reserved. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/paddle/gserver/layers/HierarchicalSigmoidLayer.h b/paddle/gserver/layers/HierarchicalSigmoidLayer.h index 7f896e61ca2..10e501f1807 100644 --- a/paddle/gserver/layers/HierarchicalSigmoidLayer.h +++ b/paddle/gserver/layers/HierarchicalSigmoidLayer.h @@ -1,4 +1,4 @@ -/* Copyright (c) 2016 PaddlePaddle Authors. All Rights Reserve. +/* Copyright (c) 2016 PaddlePaddle Authors. All Rights Reserved. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/paddle/gserver/layers/IdentityProjection.cpp b/paddle/gserver/layers/IdentityProjection.cpp index f1d41a33d40..6c70f77acc0 100644 --- a/paddle/gserver/layers/IdentityProjection.cpp +++ b/paddle/gserver/layers/IdentityProjection.cpp @@ -1,4 +1,4 @@ -/* Copyright (c) 2016 PaddlePaddle Authors. All Rights Reserve. +/* Copyright (c) 2016 PaddlePaddle Authors. All Rights Reserved. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/paddle/gserver/layers/InterpolationLayer.cpp b/paddle/gserver/layers/InterpolationLayer.cpp index eac74285719..0ac92024bc7 100644 --- a/paddle/gserver/layers/InterpolationLayer.cpp +++ b/paddle/gserver/layers/InterpolationLayer.cpp @@ -1,4 +1,4 @@ -/* Copyright (c) 2016 PaddlePaddle Authors. All Rights Reserve. +/* Copyright (c) 2016 PaddlePaddle Authors. All Rights Reserved. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/paddle/gserver/layers/KmaxSeqScoreLayer.cpp b/paddle/gserver/layers/KmaxSeqScoreLayer.cpp index d5407555b24..0ea960902ef 100644 --- a/paddle/gserver/layers/KmaxSeqScoreLayer.cpp +++ b/paddle/gserver/layers/KmaxSeqScoreLayer.cpp @@ -1,4 +1,4 @@ -/* Copyright (c) 2016 PaddlePaddle Authors. All Rights Reserve. +/* Copyright (c) 2016 PaddlePaddle Authors. All Rights Reserved. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/paddle/gserver/layers/L2DistanceLayer.cpp b/paddle/gserver/layers/L2DistanceLayer.cpp index c71df1b92ce..c8cca3762cc 100644 --- a/paddle/gserver/layers/L2DistanceLayer.cpp +++ b/paddle/gserver/layers/L2DistanceLayer.cpp @@ -1,4 +1,4 @@ -/* Copyright (c) 2016 PaddlePaddle Authors. All Rights Reserve. +/* Copyright (c) 2016 PaddlePaddle Authors. All Rights Reserved. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/paddle/gserver/layers/L2DistanceLayer.h b/paddle/gserver/layers/L2DistanceLayer.h index 9b12847a10e..97f35daf786 100644 --- a/paddle/gserver/layers/L2DistanceLayer.h +++ b/paddle/gserver/layers/L2DistanceLayer.h @@ -1,4 +1,4 @@ -/* Copyright (c) 2016 PaddlePaddle Authors. All Rights Reserve. +/* Copyright (c) 2016 PaddlePaddle Authors. All Rights Reserved. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/paddle/gserver/layers/Layer.cpp b/paddle/gserver/layers/Layer.cpp index b55b86221cd..32e2f4c9dd0 100644 --- a/paddle/gserver/layers/Layer.cpp +++ b/paddle/gserver/layers/Layer.cpp @@ -1,4 +1,4 @@ -/* Copyright (c) 2016 PaddlePaddle Authors. All Rights Reserve. +/* Copyright (c) 2016 PaddlePaddle Authors. All Rights Reserved. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/paddle/gserver/layers/Layer.h b/paddle/gserver/layers/Layer.h index 9813a556076..8da342a00f7 100644 --- a/paddle/gserver/layers/Layer.h +++ b/paddle/gserver/layers/Layer.h @@ -1,4 +1,4 @@ -/* Copyright (c) 2016 PaddlePaddle Authors. All Rights Reserve. +/* Copyright (c) 2016 PaddlePaddle Authors. All Rights Reserved. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/paddle/gserver/layers/LinearChainCRF.cpp b/paddle/gserver/layers/LinearChainCRF.cpp index abaa1802b76..315fc25fab3 100644 --- a/paddle/gserver/layers/LinearChainCRF.cpp +++ b/paddle/gserver/layers/LinearChainCRF.cpp @@ -1,4 +1,4 @@ -/* Copyright (c) 2016 PaddlePaddle Authors. All Rights Reserve. +/* Copyright (c) 2016 PaddlePaddle Authors. All Rights Reserved. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/paddle/gserver/layers/LinearChainCRF.h b/paddle/gserver/layers/LinearChainCRF.h index 8daf1e14a6f..1ea4c7e1057 100644 --- a/paddle/gserver/layers/LinearChainCRF.h +++ b/paddle/gserver/layers/LinearChainCRF.h @@ -1,4 +1,4 @@ -/* Copyright (c) 2016 PaddlePaddle Authors. All Rights Reserve. +/* Copyright (c) 2016 PaddlePaddle Authors. All Rights Reserved. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/paddle/gserver/layers/LinearChainCTC.cpp b/paddle/gserver/layers/LinearChainCTC.cpp index cb2b249110d..1fad545b7a5 100644 --- a/paddle/gserver/layers/LinearChainCTC.cpp +++ b/paddle/gserver/layers/LinearChainCTC.cpp @@ -1,4 +1,4 @@ -/* Copyright (c) 2016 PaddlePaddle Authors. All Rights Reserve. +/* Copyright (c) 2016 PaddlePaddle Authors. All Rights Reserved. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/paddle/gserver/layers/LinearChainCTC.h b/paddle/gserver/layers/LinearChainCTC.h index 737c9d5c318..0b774277dc8 100644 --- a/paddle/gserver/layers/LinearChainCTC.h +++ b/paddle/gserver/layers/LinearChainCTC.h @@ -1,4 +1,4 @@ -/* Copyright (c) 2016 PaddlePaddle Authors. All Rights Reserve. +/* Copyright (c) 2016 PaddlePaddle Authors. All Rights Reserved. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/paddle/gserver/layers/LstmCompute.cpp b/paddle/gserver/layers/LstmCompute.cpp index 4c429709642..ea30f6d6b1b 100644 --- a/paddle/gserver/layers/LstmCompute.cpp +++ b/paddle/gserver/layers/LstmCompute.cpp @@ -1,4 +1,4 @@ -/* Copyright (c) 2016 PaddlePaddle Authors. All Rights Reserve. +/* Copyright (c) 2016 PaddlePaddle Authors. All Rights Reserved. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/paddle/gserver/layers/LstmCompute.cu b/paddle/gserver/layers/LstmCompute.cu index d3f59b52a4b..3f15edcacab 100644 --- a/paddle/gserver/layers/LstmCompute.cu +++ b/paddle/gserver/layers/LstmCompute.cu @@ -1,4 +1,4 @@ -/* Copyright (c) 2016 PaddlePaddle Authors. All Rights Reserve. +/* Copyright (c) 2016 PaddlePaddle Authors. All Rights Reserved. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/paddle/gserver/layers/LstmCompute.h b/paddle/gserver/layers/LstmCompute.h index 2588fad2793..b7d55eb1f98 100644 --- a/paddle/gserver/layers/LstmCompute.h +++ b/paddle/gserver/layers/LstmCompute.h @@ -1,4 +1,4 @@ -/* Copyright (c) 2016 PaddlePaddle Authors. All Rights Reserve. +/* Copyright (c) 2016 PaddlePaddle Authors. All Rights Reserved. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/paddle/gserver/layers/LstmLayer.cpp b/paddle/gserver/layers/LstmLayer.cpp index 01cc5fec8b9..f65ae6a3e69 100644 --- a/paddle/gserver/layers/LstmLayer.cpp +++ b/paddle/gserver/layers/LstmLayer.cpp @@ -1,4 +1,4 @@ -/* Copyright (c) 2016 PaddlePaddle Authors. All Rights Reserve. +/* Copyright (c) 2016 PaddlePaddle Authors. All Rights Reserved. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/paddle/gserver/layers/LstmLayer.h b/paddle/gserver/layers/LstmLayer.h index c45a52d2e9a..4568b13ade5 100644 --- a/paddle/gserver/layers/LstmLayer.h +++ b/paddle/gserver/layers/LstmLayer.h @@ -1,4 +1,4 @@ -/* Copyright (c) 2016 PaddlePaddle Authors. All Rights Reserve. +/* Copyright (c) 2016 PaddlePaddle Authors. All Rights Reserved. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/paddle/gserver/layers/LstmStepLayer.cpp b/paddle/gserver/layers/LstmStepLayer.cpp index 568277a90c6..8faaa1c4e13 100644 --- a/paddle/gserver/layers/LstmStepLayer.cpp +++ b/paddle/gserver/layers/LstmStepLayer.cpp @@ -1,4 +1,4 @@ -/* Copyright (c) 2016 PaddlePaddle Authors. All Rights Reserve. +/* Copyright (c) 2016 PaddlePaddle Authors. All Rights Reserved. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/paddle/gserver/layers/MDLstmLayer.cpp b/paddle/gserver/layers/MDLstmLayer.cpp index be0f2a07d4a..7cfdb3ff250 100644 --- a/paddle/gserver/layers/MDLstmLayer.cpp +++ b/paddle/gserver/layers/MDLstmLayer.cpp @@ -1,4 +1,4 @@ -/* Copyright (c) 2016 PaddlePaddle Authors. All Rights Reserve. +/* Copyright (c) 2016 PaddlePaddle Authors. All Rights Reserved. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/paddle/gserver/layers/MKLDNNAddtoLayer.cpp b/paddle/gserver/layers/MKLDNNAddtoLayer.cpp index 39bffc26f7d..544b4082fa0 100644 --- a/paddle/gserver/layers/MKLDNNAddtoLayer.cpp +++ b/paddle/gserver/layers/MKLDNNAddtoLayer.cpp @@ -1,4 +1,4 @@ -/* Copyright (c) 2017 PaddlePaddle Authors. All Rights Reserve. +/* Copyright (c) 2017 PaddlePaddle Authors. All Rights Reserved. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/paddle/gserver/layers/MKLDNNAddtoLayer.h b/paddle/gserver/layers/MKLDNNAddtoLayer.h index 0ea3e208e5f..e40e2f2251a 100644 --- a/paddle/gserver/layers/MKLDNNAddtoLayer.h +++ b/paddle/gserver/layers/MKLDNNAddtoLayer.h @@ -1,4 +1,4 @@ -/* Copyright (c) 2017 PaddlePaddle Authors. All Rights Reserve. +/* Copyright (c) 2017 PaddlePaddle Authors. All Rights Reserved. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/paddle/gserver/layers/MKLDNNBase.h b/paddle/gserver/layers/MKLDNNBase.h index af02a37cad6..d84e2859407 100644 --- a/paddle/gserver/layers/MKLDNNBase.h +++ b/paddle/gserver/layers/MKLDNNBase.h @@ -1,4 +1,4 @@ -/* Copyright (c) 2017 PaddlePaddle Authors. All Rights Reserve. +/* Copyright (c) 2017 PaddlePaddle Authors. All Rights Reserved. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/paddle/gserver/layers/MKLDNNBatchNormLayer.cpp b/paddle/gserver/layers/MKLDNNBatchNormLayer.cpp index 7faca0f8b7f..dbdfaff32f7 100644 --- a/paddle/gserver/layers/MKLDNNBatchNormLayer.cpp +++ b/paddle/gserver/layers/MKLDNNBatchNormLayer.cpp @@ -1,4 +1,4 @@ -/* Copyright (c) 2017 PaddlePaddle Authors. All Rights Reserve. +/* Copyright (c) 2017 PaddlePaddle Authors. All Rights Reserved. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/paddle/gserver/layers/MKLDNNBatchNormLayer.h b/paddle/gserver/layers/MKLDNNBatchNormLayer.h index 1cf33cb34fa..93e182206a1 100644 --- a/paddle/gserver/layers/MKLDNNBatchNormLayer.h +++ b/paddle/gserver/layers/MKLDNNBatchNormLayer.h @@ -1,4 +1,4 @@ -/* Copyright (c) 2017 PaddlePaddle Authors. All Rights Reserve. +/* Copyright (c) 2017 PaddlePaddle Authors. All Rights Reserved. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/paddle/gserver/layers/MKLDNNConcatLayer.cpp b/paddle/gserver/layers/MKLDNNConcatLayer.cpp index 520ccc1a995..beed6176e11 100644 --- a/paddle/gserver/layers/MKLDNNConcatLayer.cpp +++ b/paddle/gserver/layers/MKLDNNConcatLayer.cpp @@ -1,4 +1,4 @@ -/* Copyright (c) 2017 PaddlePaddle Authors. All Rights Reserve. +/* Copyright (c) 2017 PaddlePaddle Authors. All Rights Reserved. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/paddle/gserver/layers/MKLDNNConcatLayer.h b/paddle/gserver/layers/MKLDNNConcatLayer.h index 37f3a26c5ed..f7abdabfb51 100644 --- a/paddle/gserver/layers/MKLDNNConcatLayer.h +++ b/paddle/gserver/layers/MKLDNNConcatLayer.h @@ -1,4 +1,4 @@ -/* Copyright (c) 2017 PaddlePaddle Authors. All Rights Reserve. +/* Copyright (c) 2017 PaddlePaddle Authors. All Rights Reserved. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/paddle/gserver/layers/MKLDNNConvLayer.cpp b/paddle/gserver/layers/MKLDNNConvLayer.cpp index ab1d0f7b049..a442a0a0136 100644 --- a/paddle/gserver/layers/MKLDNNConvLayer.cpp +++ b/paddle/gserver/layers/MKLDNNConvLayer.cpp @@ -1,4 +1,4 @@ -/* Copyright (c) 2017 PaddlePaddle Authors. All Rights Reserve. +/* Copyright (c) 2017 PaddlePaddle Authors. All Rights Reserved. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/paddle/gserver/layers/MKLDNNConvLayer.h b/paddle/gserver/layers/MKLDNNConvLayer.h index 3e754a0e657..29c8735fbb9 100644 --- a/paddle/gserver/layers/MKLDNNConvLayer.h +++ b/paddle/gserver/layers/MKLDNNConvLayer.h @@ -1,4 +1,4 @@ -/* Copyright (c) 2017 PaddlePaddle Authors. All Rights Reserve. +/* Copyright (c) 2017 PaddlePaddle Authors. All Rights Reserved. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/paddle/gserver/layers/MKLDNNFcLayer.cpp b/paddle/gserver/layers/MKLDNNFcLayer.cpp index c8778bdd077..0c7e6f16e24 100644 --- a/paddle/gserver/layers/MKLDNNFcLayer.cpp +++ b/paddle/gserver/layers/MKLDNNFcLayer.cpp @@ -1,4 +1,4 @@ -/* Copyright (c) 2017 PaddlePaddle Authors. All Rights Reserve. +/* Copyright (c) 2017 PaddlePaddle Authors. All Rights Reserved. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/paddle/gserver/layers/MKLDNNFcLayer.h b/paddle/gserver/layers/MKLDNNFcLayer.h index 283dc9b5405..0d41a4379d6 100644 --- a/paddle/gserver/layers/MKLDNNFcLayer.h +++ b/paddle/gserver/layers/MKLDNNFcLayer.h @@ -1,4 +1,4 @@ -/* Copyright (c) 2017 PaddlePaddle Authors. All Rights Reserve. +/* Copyright (c) 2017 PaddlePaddle Authors. All Rights Reserved. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/paddle/gserver/layers/MKLDNNLRNLayer.cpp b/paddle/gserver/layers/MKLDNNLRNLayer.cpp index ac217f1363d..88513ab8bca 100644 --- a/paddle/gserver/layers/MKLDNNLRNLayer.cpp +++ b/paddle/gserver/layers/MKLDNNLRNLayer.cpp @@ -1,4 +1,4 @@ -/* Copyright (c) 2017 PaddlePaddle Authors. All Rights Reserve. +/* Copyright (c) 2017 PaddlePaddle Authors. All Rights Reserved. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/paddle/gserver/layers/MKLDNNLRNLayer.h b/paddle/gserver/layers/MKLDNNLRNLayer.h index cfe5621252c..b503ee55947 100644 --- a/paddle/gserver/layers/MKLDNNLRNLayer.h +++ b/paddle/gserver/layers/MKLDNNLRNLayer.h @@ -1,4 +1,4 @@ -/* Copyright (c) 2017 PaddlePaddle Authors. All Rights Reserve. +/* Copyright (c) 2017 PaddlePaddle Authors. All Rights Reserved. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/paddle/gserver/layers/MKLDNNLayer.cpp b/paddle/gserver/layers/MKLDNNLayer.cpp index 2d0fff608c3..f0acffe8716 100644 --- a/paddle/gserver/layers/MKLDNNLayer.cpp +++ b/paddle/gserver/layers/MKLDNNLayer.cpp @@ -1,4 +1,4 @@ -/* Copyright (c) 2017 PaddlePaddle Authors. All Rights Reserve. +/* Copyright (c) 2017 PaddlePaddle Authors. All Rights Reserved. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/paddle/gserver/layers/MKLDNNLayer.h b/paddle/gserver/layers/MKLDNNLayer.h index 3ba39f18b6a..4a7eb74ce3a 100644 --- a/paddle/gserver/layers/MKLDNNLayer.h +++ b/paddle/gserver/layers/MKLDNNLayer.h @@ -1,4 +1,4 @@ -/* Copyright (c) 2017 PaddlePaddle Authors. All Rights Reserve. +/* Copyright (c) 2017 PaddlePaddle Authors. All Rights Reserved. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/paddle/gserver/layers/MKLDNNPoolLayer.cpp b/paddle/gserver/layers/MKLDNNPoolLayer.cpp index a8252593c8f..3be848c7496 100644 --- a/paddle/gserver/layers/MKLDNNPoolLayer.cpp +++ b/paddle/gserver/layers/MKLDNNPoolLayer.cpp @@ -1,4 +1,4 @@ -/* Copyright (c) 2017 PaddlePaddle Authors. All Rights Reserve. +/* Copyright (c) 2017 PaddlePaddle Authors. All Rights Reserved. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/paddle/gserver/layers/MKLDNNPoolLayer.h b/paddle/gserver/layers/MKLDNNPoolLayer.h index dad60156f0e..12821cda730 100644 --- a/paddle/gserver/layers/MKLDNNPoolLayer.h +++ b/paddle/gserver/layers/MKLDNNPoolLayer.h @@ -1,4 +1,4 @@ -/* Copyright (c) 2017 PaddlePaddle Authors. All Rights Reserve. +/* Copyright (c) 2017 PaddlePaddle Authors. All Rights Reserved. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/paddle/gserver/layers/MKLPackedRecurrentLayer.cpp b/paddle/gserver/layers/MKLPackedRecurrentLayer.cpp index dd75555fae1..d928ebc3248 100644 --- a/paddle/gserver/layers/MKLPackedRecurrentLayer.cpp +++ b/paddle/gserver/layers/MKLPackedRecurrentLayer.cpp @@ -1,4 +1,4 @@ -/* Copyright (c) 2016 PaddlePaddle Authors. All Rights Reserve. +/* Copyright (c) 2016 PaddlePaddle Authors. All Rights Reserved. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/paddle/gserver/layers/MKLPackedRecurrentLayer.h b/paddle/gserver/layers/MKLPackedRecurrentLayer.h index bded523a8fb..37eb362d452 100644 --- a/paddle/gserver/layers/MKLPackedRecurrentLayer.h +++ b/paddle/gserver/layers/MKLPackedRecurrentLayer.h @@ -1,4 +1,4 @@ -/* Copyright (c) 2016 PaddlePaddle Authors. All Rights Reserve. +/* Copyright (c) 2016 PaddlePaddle Authors. All Rights Reserved. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/paddle/gserver/layers/MKLPackedWeight.h b/paddle/gserver/layers/MKLPackedWeight.h index 15d5093beb4..28b8a7db7cc 100644 --- a/paddle/gserver/layers/MKLPackedWeight.h +++ b/paddle/gserver/layers/MKLPackedWeight.h @@ -1,4 +1,4 @@ -/* Copyright (c) 2016 PaddlePaddle Authors. All Rights Reserve. +/* Copyright (c) 2016 PaddlePaddle Authors. All Rights Reserved. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/paddle/gserver/layers/MaxIdLayer.cpp b/paddle/gserver/layers/MaxIdLayer.cpp index 9e72b167cd9..84e375d7441 100644 --- a/paddle/gserver/layers/MaxIdLayer.cpp +++ b/paddle/gserver/layers/MaxIdLayer.cpp @@ -1,4 +1,4 @@ -/* Copyright (c) 2016 PaddlePaddle Authors. All Rights Reserve. +/* Copyright (c) 2016 PaddlePaddle Authors. All Rights Reserved. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/paddle/gserver/layers/MaxLayer.cpp b/paddle/gserver/layers/MaxLayer.cpp index 23629e19868..7ee2e0dd946 100644 --- a/paddle/gserver/layers/MaxLayer.cpp +++ b/paddle/gserver/layers/MaxLayer.cpp @@ -1,4 +1,4 @@ -/* Copyright (c) 2016 PaddlePaddle Authors. All Rights Reserve. +/* Copyright (c) 2016 PaddlePaddle Authors. All Rights Reserved. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/paddle/gserver/layers/MaxLayer.h b/paddle/gserver/layers/MaxLayer.h index fa536fce2b4..9dbc672652d 100644 --- a/paddle/gserver/layers/MaxLayer.h +++ b/paddle/gserver/layers/MaxLayer.h @@ -1,4 +1,4 @@ -/* Copyright (c) 2016 PaddlePaddle Authors. All Rights Reserve. +/* Copyright (c) 2016 PaddlePaddle Authors. All Rights Reserved. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/paddle/gserver/layers/MaxOutLayer.cpp b/paddle/gserver/layers/MaxOutLayer.cpp index 3a86a95321d..919f62a45ba 100644 --- a/paddle/gserver/layers/MaxOutLayer.cpp +++ b/paddle/gserver/layers/MaxOutLayer.cpp @@ -1,4 +1,4 @@ -/* Copyright (c) 2016 PaddlePaddle Authors. All Rights Reserve. +/* Copyright (c) 2016 PaddlePaddle Authors. All Rights Reserved. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/paddle/gserver/layers/MaxOutLayer.h b/paddle/gserver/layers/MaxOutLayer.h index 73fd8536be5..1fb371836ba 100644 --- a/paddle/gserver/layers/MaxOutLayer.h +++ b/paddle/gserver/layers/MaxOutLayer.h @@ -1,4 +1,4 @@ -/* Copyright (c) 2016 PaddlePaddle Authors. All Rights Reserve. +/* Copyright (c) 2016 PaddlePaddle Authors. All Rights Reserved. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/paddle/gserver/layers/MaxPoolWithMaskLayer.cpp b/paddle/gserver/layers/MaxPoolWithMaskLayer.cpp index d810a58d9a3..e594e22b5ea 100644 --- a/paddle/gserver/layers/MaxPoolWithMaskLayer.cpp +++ b/paddle/gserver/layers/MaxPoolWithMaskLayer.cpp @@ -1,4 +1,4 @@ -/* Copyright (c) 2016 PaddlePaddle Authors. All Rights Reserve. +/* Copyright (c) 2016 PaddlePaddle Authors. All Rights Reserved. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/paddle/gserver/layers/MaxPoolWithMaskLayer.h b/paddle/gserver/layers/MaxPoolWithMaskLayer.h index e0174add9d9..74cc8acf351 100644 --- a/paddle/gserver/layers/MaxPoolWithMaskLayer.h +++ b/paddle/gserver/layers/MaxPoolWithMaskLayer.h @@ -1,4 +1,4 @@ -/* Copyright (c) 2016 PaddlePaddle Authors. All Rights Reserve. +/* Copyright (c) 2016 PaddlePaddle Authors. All Rights Reserved. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/paddle/gserver/layers/MixedLayer.cpp b/paddle/gserver/layers/MixedLayer.cpp index 2525b1984b8..7dcb30b98d6 100644 --- a/paddle/gserver/layers/MixedLayer.cpp +++ b/paddle/gserver/layers/MixedLayer.cpp @@ -1,4 +1,4 @@ -/* Copyright (c) 2016 PaddlePaddle Authors. All Rights Reserve. +/* Copyright (c) 2016 PaddlePaddle Authors. All Rights Reserved. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/paddle/gserver/layers/MixedLayer.h b/paddle/gserver/layers/MixedLayer.h index 755c9deb8b1..a1a43c52e4f 100644 --- a/paddle/gserver/layers/MixedLayer.h +++ b/paddle/gserver/layers/MixedLayer.h @@ -1,4 +1,4 @@ -/* Copyright (c) 2016 PaddlePaddle Authors. All Rights Reserve. +/* Copyright (c) 2016 PaddlePaddle Authors. All Rights Reserved. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/paddle/gserver/layers/MultiBoxLossLayer.cpp b/paddle/gserver/layers/MultiBoxLossLayer.cpp index bbf1166dced..335e9a6ac47 100644 --- a/paddle/gserver/layers/MultiBoxLossLayer.cpp +++ b/paddle/gserver/layers/MultiBoxLossLayer.cpp @@ -1,4 +1,4 @@ -/* Copyright (c) 2016 PaddlePaddle Authors. All Rights Reserve. +/* Copyright (c) 2016 PaddlePaddle Authors. All Rights Reserved. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/paddle/gserver/layers/MultinomialSampler.cpp b/paddle/gserver/layers/MultinomialSampler.cpp index 0b285ed20f7..e74ed795a15 100644 --- a/paddle/gserver/layers/MultinomialSampler.cpp +++ b/paddle/gserver/layers/MultinomialSampler.cpp @@ -1,4 +1,4 @@ -/* Copyright (c) 2016 PaddlePaddle Authors. All Rights Reserve. +/* Copyright (c) 2016 PaddlePaddle Authors. All Rights Reserved. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/paddle/gserver/layers/MultinomialSampler.h b/paddle/gserver/layers/MultinomialSampler.h index 546ef9c1f24..1f9e818ee5d 100644 --- a/paddle/gserver/layers/MultinomialSampler.h +++ b/paddle/gserver/layers/MultinomialSampler.h @@ -1,4 +1,4 @@ -/* Copyright (c) 2016 PaddlePaddle Authors. All Rights Reserve. +/* Copyright (c) 2016 PaddlePaddle Authors. All Rights Reserved. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/paddle/gserver/layers/MultiplexLayer.cpp b/paddle/gserver/layers/MultiplexLayer.cpp index 297972b3cd9..82857f8c3ef 100644 --- a/paddle/gserver/layers/MultiplexLayer.cpp +++ b/paddle/gserver/layers/MultiplexLayer.cpp @@ -1,4 +1,4 @@ -/* Copyright (c) 2016 PaddlePaddle Authors. All Rights Reserve. +/* Copyright (c) 2016 PaddlePaddle Authors. All Rights Reserved. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/paddle/gserver/layers/NCELayer.cpp b/paddle/gserver/layers/NCELayer.cpp index 0bc2ef11829..d3d7b1fd9ac 100644 --- a/paddle/gserver/layers/NCELayer.cpp +++ b/paddle/gserver/layers/NCELayer.cpp @@ -1,4 +1,4 @@ -/* Copyright (c) 2016 PaddlePaddle Authors. All Rights Reserve. +/* Copyright (c) 2016 PaddlePaddle Authors. All Rights Reserved. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/paddle/gserver/layers/NormLayer.cpp b/paddle/gserver/layers/NormLayer.cpp index caef7100929..4678f6fa9ab 100644 --- a/paddle/gserver/layers/NormLayer.cpp +++ b/paddle/gserver/layers/NormLayer.cpp @@ -1,4 +1,4 @@ -/* Copyright (c) 2016 PaddlePaddle Authors. All Rights Reserve. +/* Copyright (c) 2016 PaddlePaddle Authors. All Rights Reserved. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/paddle/gserver/layers/NormLayer.h b/paddle/gserver/layers/NormLayer.h index 7c238ac944e..c89cbbfce9d 100644 --- a/paddle/gserver/layers/NormLayer.h +++ b/paddle/gserver/layers/NormLayer.h @@ -1,4 +1,4 @@ -/* Copyright (c) 2016 PaddlePaddle Authors. All Rights Reserve. +/* Copyright (c) 2016 PaddlePaddle Authors. All Rights Reserved. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/paddle/gserver/layers/NormProjectionLayer.cpp b/paddle/gserver/layers/NormProjectionLayer.cpp index 4331009de7e..3013bbdbc79 100644 --- a/paddle/gserver/layers/NormProjectionLayer.cpp +++ b/paddle/gserver/layers/NormProjectionLayer.cpp @@ -1,4 +1,4 @@ -/* Copyright (c) 2016 PaddlePaddle Authors. All Rights Reserve. +/* Copyright (c) 2016 PaddlePaddle Authors. All Rights Reserved. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/paddle/gserver/layers/NormProjectionLayer.h b/paddle/gserver/layers/NormProjectionLayer.h index 2997ae8848c..898b5823a90 100644 --- a/paddle/gserver/layers/NormProjectionLayer.h +++ b/paddle/gserver/layers/NormProjectionLayer.h @@ -1,4 +1,4 @@ -/* Copyright (c) 2016 PaddlePaddle Authors. All Rights Reserve. +/* Copyright (c) 2016 PaddlePaddle Authors. All Rights Reserved. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/paddle/gserver/layers/Operator.cpp b/paddle/gserver/layers/Operator.cpp index a638933914f..5b9cf8d15d6 100644 --- a/paddle/gserver/layers/Operator.cpp +++ b/paddle/gserver/layers/Operator.cpp @@ -1,4 +1,4 @@ -/* Copyright (c) 2016 PaddlePaddle Authors. All Rights Reserve. +/* Copyright (c) 2016 PaddlePaddle Authors. All Rights Reserved. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/paddle/gserver/layers/Operator.h b/paddle/gserver/layers/Operator.h index 6fd331382f2..a620926cccd 100644 --- a/paddle/gserver/layers/Operator.h +++ b/paddle/gserver/layers/Operator.h @@ -1,4 +1,4 @@ -/* Copyright (c) 2016 PaddlePaddle Authors. All Rights Reserve. +/* Copyright (c) 2016 PaddlePaddle Authors. All Rights Reserved. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/paddle/gserver/layers/OuterProdLayer.cpp b/paddle/gserver/layers/OuterProdLayer.cpp index 283fdb003a2..75f4abf93e5 100644 --- a/paddle/gserver/layers/OuterProdLayer.cpp +++ b/paddle/gserver/layers/OuterProdLayer.cpp @@ -1,4 +1,4 @@ -/* Copyright (c) 2016 PaddlePaddle Authors. All Rights Reserve. +/* Copyright (c) 2016 PaddlePaddle Authors. All Rights Reserved. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/paddle/gserver/layers/PadLayer.cpp b/paddle/gserver/layers/PadLayer.cpp index a5ed7e057ae..b1910e108b5 100644 --- a/paddle/gserver/layers/PadLayer.cpp +++ b/paddle/gserver/layers/PadLayer.cpp @@ -1,4 +1,4 @@ -/* Copyright (c) 2016 PaddlePaddle Authors. All Rights Reserve. +/* Copyright (c) 2016 PaddlePaddle Authors. All Rights Reserved. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/paddle/gserver/layers/PadLayer.h b/paddle/gserver/layers/PadLayer.h index fe9388d8cc2..7e09d7f8a0d 100644 --- a/paddle/gserver/layers/PadLayer.h +++ b/paddle/gserver/layers/PadLayer.h @@ -1,4 +1,4 @@ -/* Copyright (c) 2016 PaddlePaddle Authors. All Rights Reserve. +/* Copyright (c) 2016 PaddlePaddle Authors. All Rights Reserved. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/paddle/gserver/layers/ParameterReluLayer.cpp b/paddle/gserver/layers/ParameterReluLayer.cpp index 836c1981ba1..12d04fc1c3c 100644 --- a/paddle/gserver/layers/ParameterReluLayer.cpp +++ b/paddle/gserver/layers/ParameterReluLayer.cpp @@ -1,4 +1,4 @@ -/* Copyright (c) 2016 PaddlePaddle Authors. All Rights Reserve. +/* Copyright (c) 2016 PaddlePaddle Authors. All Rights Reserved. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/paddle/gserver/layers/ParameterReluLayer.h b/paddle/gserver/layers/ParameterReluLayer.h index 9a11b81ebf1..3725fa4a119 100644 --- a/paddle/gserver/layers/ParameterReluLayer.h +++ b/paddle/gserver/layers/ParameterReluLayer.h @@ -1,4 +1,4 @@ -/* Copyright (c) 2016 PaddlePaddle Authors. All Rights Reserve. +/* Copyright (c) 2016 PaddlePaddle Authors. All Rights Reserved. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/paddle/gserver/layers/Pool3DLayer.cpp b/paddle/gserver/layers/Pool3DLayer.cpp index 199f21adb1a..3ac9eb0d819 100644 --- a/paddle/gserver/layers/Pool3DLayer.cpp +++ b/paddle/gserver/layers/Pool3DLayer.cpp @@ -1,4 +1,4 @@ -/* Copyright (c) 2016 PaddlePaddle Authors. All Rights Reserve. +/* Copyright (c) 2016 PaddlePaddle Authors. All Rights Reserved. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/paddle/gserver/layers/Pool3DLayer.h b/paddle/gserver/layers/Pool3DLayer.h index 8329a02f571..59ee73f7cb9 100644 --- a/paddle/gserver/layers/Pool3DLayer.h +++ b/paddle/gserver/layers/Pool3DLayer.h @@ -1,4 +1,4 @@ -/* Copyright (c) 2016 PaddlePaddle Authors. All Rights Reserve. +/* Copyright (c) 2016 PaddlePaddle Authors. All Rights Reserved. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/paddle/gserver/layers/PoolLayer.cpp b/paddle/gserver/layers/PoolLayer.cpp index fceb389d06d..ee589e6be51 100644 --- a/paddle/gserver/layers/PoolLayer.cpp +++ b/paddle/gserver/layers/PoolLayer.cpp @@ -1,4 +1,4 @@ -/* Copyright (c) 2016 PaddlePaddle Authors. All Rights Reserve. +/* Copyright (c) 2016 PaddlePaddle Authors. All Rights Reserved. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/paddle/gserver/layers/PoolLayer.h b/paddle/gserver/layers/PoolLayer.h index 9df672a9358..58d5fb0a095 100644 --- a/paddle/gserver/layers/PoolLayer.h +++ b/paddle/gserver/layers/PoolLayer.h @@ -1,4 +1,4 @@ -/* Copyright (c) 2016 PaddlePaddle Authors. All Rights Reserve. +/* Copyright (c) 2016 PaddlePaddle Authors. All Rights Reserved. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/paddle/gserver/layers/PoolProjection.cpp b/paddle/gserver/layers/PoolProjection.cpp index 6a9de394cee..73ce88adf25 100644 --- a/paddle/gserver/layers/PoolProjection.cpp +++ b/paddle/gserver/layers/PoolProjection.cpp @@ -1,4 +1,4 @@ -/* Copyright (c) 2016 PaddlePaddle Authors. All Rights Reserve. +/* Copyright (c) 2016 PaddlePaddle Authors. All Rights Reserved. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/paddle/gserver/layers/PoolProjection.h b/paddle/gserver/layers/PoolProjection.h index a0412714bca..c99287dbf0f 100644 --- a/paddle/gserver/layers/PoolProjection.h +++ b/paddle/gserver/layers/PoolProjection.h @@ -1,4 +1,4 @@ -/* Copyright (c) 2016 PaddlePaddle Authors. All Rights Reserve. +/* Copyright (c) 2016 PaddlePaddle Authors. All Rights Reserved. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/paddle/gserver/layers/PoolProjectionLayer.cpp b/paddle/gserver/layers/PoolProjectionLayer.cpp index ed5011ab899..73d320e67ec 100644 --- a/paddle/gserver/layers/PoolProjectionLayer.cpp +++ b/paddle/gserver/layers/PoolProjectionLayer.cpp @@ -1,4 +1,4 @@ -/* Copyright (c) 2016 PaddlePaddle Authors. All Rights Reserve. +/* Copyright (c) 2016 PaddlePaddle Authors. All Rights Reserved. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/paddle/gserver/layers/PoolProjectionLayer.h b/paddle/gserver/layers/PoolProjectionLayer.h index e31116de8cc..5a97a7769aa 100644 --- a/paddle/gserver/layers/PoolProjectionLayer.h +++ b/paddle/gserver/layers/PoolProjectionLayer.h @@ -1,4 +1,4 @@ -/* Copyright (c) 2016 PaddlePaddle Authors. All Rights Reserve. +/* Copyright (c) 2016 PaddlePaddle Authors. All Rights Reserved. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/paddle/gserver/layers/PowerLayer.cpp b/paddle/gserver/layers/PowerLayer.cpp index 31c34b43e29..18f650fcdad 100644 --- a/paddle/gserver/layers/PowerLayer.cpp +++ b/paddle/gserver/layers/PowerLayer.cpp @@ -1,4 +1,4 @@ -/* Copyright (c) 2016 PaddlePaddle Authors. All Rights Reserve. +/* Copyright (c) 2016 PaddlePaddle Authors. All Rights Reserved. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/paddle/gserver/layers/PrintLayer.cpp b/paddle/gserver/layers/PrintLayer.cpp index e83ae34bbe7..5a527d598dd 100644 --- a/paddle/gserver/layers/PrintLayer.cpp +++ b/paddle/gserver/layers/PrintLayer.cpp @@ -1,4 +1,4 @@ -/* Copyright (c) 2016 PaddlePaddle Authors. All Rights Reserve. +/* Copyright (c) 2016 PaddlePaddle Authors. All Rights Reserved. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/paddle/gserver/layers/PriorBox.cpp b/paddle/gserver/layers/PriorBox.cpp index 8faf032f550..af2cc05a954 100644 --- a/paddle/gserver/layers/PriorBox.cpp +++ b/paddle/gserver/layers/PriorBox.cpp @@ -1,4 +1,4 @@ -/* Copyright (c) 2016 PaddlePaddle Authors. All Rights Reserve. +/* Copyright (c) 2016 PaddlePaddle Authors. All Rights Reserved. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/paddle/gserver/layers/Projection.cpp b/paddle/gserver/layers/Projection.cpp index 974b3cf059f..96d61e7f67b 100644 --- a/paddle/gserver/layers/Projection.cpp +++ b/paddle/gserver/layers/Projection.cpp @@ -1,4 +1,4 @@ -/* Copyright (c) 2016 PaddlePaddle Authors. All Rights Reserve. +/* Copyright (c) 2016 PaddlePaddle Authors. All Rights Reserved. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/paddle/gserver/layers/Projection.h b/paddle/gserver/layers/Projection.h index 778a7fe13d8..1f0b96c79ec 100644 --- a/paddle/gserver/layers/Projection.h +++ b/paddle/gserver/layers/Projection.h @@ -1,4 +1,4 @@ -/* Copyright (c) 2016 PaddlePaddle Authors. All Rights Reserve. +/* Copyright (c) 2016 PaddlePaddle Authors. All Rights Reserved. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/paddle/gserver/layers/ROIPoolLayer.cpp b/paddle/gserver/layers/ROIPoolLayer.cpp index 7d7c30b4d89..b5cbc0c704a 100644 --- a/paddle/gserver/layers/ROIPoolLayer.cpp +++ b/paddle/gserver/layers/ROIPoolLayer.cpp @@ -1,4 +1,4 @@ -/* Copyright (c) 2016 PaddlePaddle Authors. All Rights Reserve. +/* Copyright (c) 2016 PaddlePaddle Authors. All Rights Reserved. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/paddle/gserver/layers/ROIPoolLayer.h b/paddle/gserver/layers/ROIPoolLayer.h index 4f07e49d6fd..b1735e9748d 100644 --- a/paddle/gserver/layers/ROIPoolLayer.h +++ b/paddle/gserver/layers/ROIPoolLayer.h @@ -1,4 +1,4 @@ -/* Copyright (c) 2016 PaddlePaddle Authors. All Rights Reserve. +/* Copyright (c) 2016 PaddlePaddle Authors. All Rights Reserved. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/paddle/gserver/layers/RecurrentLayer.cpp b/paddle/gserver/layers/RecurrentLayer.cpp index 6bd42c06cad..3fc5bd15edd 100644 --- a/paddle/gserver/layers/RecurrentLayer.cpp +++ b/paddle/gserver/layers/RecurrentLayer.cpp @@ -1,4 +1,4 @@ -/* Copyright (c) 2016 PaddlePaddle Authors. All Rights Reserve. +/* Copyright (c) 2016 PaddlePaddle Authors. All Rights Reserved. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/paddle/gserver/layers/RecurrentLayer.h b/paddle/gserver/layers/RecurrentLayer.h index f40dbe150fa..8fd4fe6b78a 100644 --- a/paddle/gserver/layers/RecurrentLayer.h +++ b/paddle/gserver/layers/RecurrentLayer.h @@ -1,4 +1,4 @@ -/* Copyright (c) 2016 PaddlePaddle Authors. All Rights Reserve. +/* Copyright (c) 2016 PaddlePaddle Authors. All Rights Reserved. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/paddle/gserver/layers/RecurrentLayerGroup.cpp b/paddle/gserver/layers/RecurrentLayerGroup.cpp index 78a74ff19a3..27e8b5868e6 100644 --- a/paddle/gserver/layers/RecurrentLayerGroup.cpp +++ b/paddle/gserver/layers/RecurrentLayerGroup.cpp @@ -1,4 +1,4 @@ -/* Copyright (c) 2016 PaddlePaddle Authors. All Rights Reserve. +/* Copyright (c) 2016 PaddlePaddle Authors. All Rights Reserved. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/paddle/gserver/layers/ResizeLayer.cpp b/paddle/gserver/layers/ResizeLayer.cpp index eb3b63c1069..831f4c3b7e1 100644 --- a/paddle/gserver/layers/ResizeLayer.cpp +++ b/paddle/gserver/layers/ResizeLayer.cpp @@ -1,4 +1,4 @@ -/* Copyright (c) 2016 PaddlePaddle Authors. All Rights Reserve. +/* Copyright (c) 2016 PaddlePaddle Authors. All Rights Reserved. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/paddle/gserver/layers/RotateLayer.cpp b/paddle/gserver/layers/RotateLayer.cpp index 7c71088d786..f205d1a9194 100644 --- a/paddle/gserver/layers/RotateLayer.cpp +++ b/paddle/gserver/layers/RotateLayer.cpp @@ -1,4 +1,4 @@ -/* Copyright (c) 2016 Baidu, Inc. All Rights Reserve. +/* Copyright (c) 2016 Baidu, Inc. All Rights Reserved. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/paddle/gserver/layers/RotateLayer.h b/paddle/gserver/layers/RotateLayer.h index d05c2065cb1..3b619921ab7 100644 --- a/paddle/gserver/layers/RotateLayer.h +++ b/paddle/gserver/layers/RotateLayer.h @@ -1,4 +1,4 @@ -/* Copyright (c) 2016 Baidu, Inc. All Rights Reserve. +/* Copyright (c) 2016 Baidu, Inc. All Rights Reserved. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/paddle/gserver/layers/RowConvLayer.cpp b/paddle/gserver/layers/RowConvLayer.cpp index 54d77999ad5..63b499e486f 100644 --- a/paddle/gserver/layers/RowConvLayer.cpp +++ b/paddle/gserver/layers/RowConvLayer.cpp @@ -1,4 +1,4 @@ -/* Copyright (c) 2016 PaddlePaddle Authors. All Rights Reserve. +/* Copyright (c) 2016 PaddlePaddle Authors. All Rights Reserved. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/paddle/gserver/layers/RowConvLayer.h b/paddle/gserver/layers/RowConvLayer.h index b3bdda2f354..ba0af1de68a 100644 --- a/paddle/gserver/layers/RowConvLayer.h +++ b/paddle/gserver/layers/RowConvLayer.h @@ -1,4 +1,4 @@ -/* Copyright (c) 2016 PaddlePaddle Authors. All Rights Reserve. +/* Copyright (c) 2016 PaddlePaddle Authors. All Rights Reserved. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/paddle/gserver/layers/RowL2NormLayer.cpp b/paddle/gserver/layers/RowL2NormLayer.cpp index 0d609be43b7..7ff0c9bae92 100644 --- a/paddle/gserver/layers/RowL2NormLayer.cpp +++ b/paddle/gserver/layers/RowL2NormLayer.cpp @@ -1,4 +1,4 @@ -/* Copyright (c) 2016 PaddlePaddle Authors. All Rights Reserve. +/* Copyright (c) 2016 PaddlePaddle Authors. All Rights Reserved. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/paddle/gserver/layers/SamplingIdLayer.cpp b/paddle/gserver/layers/SamplingIdLayer.cpp index 2538d99bb71..2edd915d226 100644 --- a/paddle/gserver/layers/SamplingIdLayer.cpp +++ b/paddle/gserver/layers/SamplingIdLayer.cpp @@ -1,4 +1,4 @@ -/* Copyright (c) 2016 PaddlePaddle Authors. All Rights Reserve. +/* Copyright (c) 2016 PaddlePaddle Authors. All Rights Reserved. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/paddle/gserver/layers/ScaleShiftLayer.cpp b/paddle/gserver/layers/ScaleShiftLayer.cpp index 35fd038ab43..799d1fe51a6 100644 --- a/paddle/gserver/layers/ScaleShiftLayer.cpp +++ b/paddle/gserver/layers/ScaleShiftLayer.cpp @@ -1,4 +1,4 @@ -/* Copyright (c) 2016 PaddlePaddle Authors. All Rights Reserve. +/* Copyright (c) 2016 PaddlePaddle Authors. All Rights Reserved. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/paddle/gserver/layers/ScaleSubRegionLayer.cpp b/paddle/gserver/layers/ScaleSubRegionLayer.cpp index aa6778aef4e..68a0ff73584 100644 --- a/paddle/gserver/layers/ScaleSubRegionLayer.cpp +++ b/paddle/gserver/layers/ScaleSubRegionLayer.cpp @@ -1,4 +1,4 @@ -/* Copyright (c) 2016 PaddlePaddle Authors. All Rights Reserve. +/* Copyright (c) 2016 PaddlePaddle Authors. All Rights Reserved. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/paddle/gserver/layers/ScaleSubRegionLayer.h b/paddle/gserver/layers/ScaleSubRegionLayer.h index a27c56de93b..6e861be4858 100644 --- a/paddle/gserver/layers/ScaleSubRegionLayer.h +++ b/paddle/gserver/layers/ScaleSubRegionLayer.h @@ -1,4 +1,4 @@ -/* Copyright (c) 2016 PaddlePaddle Authors. All Rights Reserve. +/* Copyright (c) 2016 PaddlePaddle Authors. All Rights Reserved. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/paddle/gserver/layers/ScalingLayer.cpp b/paddle/gserver/layers/ScalingLayer.cpp index a38ee0857a7..1d98a7373d1 100644 --- a/paddle/gserver/layers/ScalingLayer.cpp +++ b/paddle/gserver/layers/ScalingLayer.cpp @@ -1,4 +1,4 @@ -/* Copyright (c) 2016 PaddlePaddle Authors. All Rights Reserve. +/* Copyright (c) 2016 PaddlePaddle Authors. All Rights Reserved. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/paddle/gserver/layers/ScalingProjection.cpp b/paddle/gserver/layers/ScalingProjection.cpp index ddb8c871101..99b5b68f543 100644 --- a/paddle/gserver/layers/ScalingProjection.cpp +++ b/paddle/gserver/layers/ScalingProjection.cpp @@ -1,4 +1,4 @@ -/* Copyright (c) 2016 PaddlePaddle Authors. All Rights Reserve. +/* Copyright (c) 2016 PaddlePaddle Authors. All Rights Reserved. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/paddle/gserver/layers/SelectiveFullyConnectedLayer.cpp b/paddle/gserver/layers/SelectiveFullyConnectedLayer.cpp index d9a91de8a6f..43c98993f3f 100644 --- a/paddle/gserver/layers/SelectiveFullyConnectedLayer.cpp +++ b/paddle/gserver/layers/SelectiveFullyConnectedLayer.cpp @@ -1,4 +1,4 @@ -/* Copyright (c) 2016 PaddlePaddle Authors. All Rights Reserve. +/* Copyright (c) 2016 PaddlePaddle Authors. All Rights Reserved. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/paddle/gserver/layers/SelectiveFullyConnectedLayer.h b/paddle/gserver/layers/SelectiveFullyConnectedLayer.h index 99126fdba54..81564074185 100644 --- a/paddle/gserver/layers/SelectiveFullyConnectedLayer.h +++ b/paddle/gserver/layers/SelectiveFullyConnectedLayer.h @@ -1,4 +1,4 @@ -/* Copyright (c) 2016 PaddlePaddle Authors. All Rights Reserve. +/* Copyright (c) 2016 PaddlePaddle Authors. All Rights Reserved. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/paddle/gserver/layers/SequenceConcatLayer.cpp b/paddle/gserver/layers/SequenceConcatLayer.cpp index 4b24d8f0c85..cf573f3f33f 100644 --- a/paddle/gserver/layers/SequenceConcatLayer.cpp +++ b/paddle/gserver/layers/SequenceConcatLayer.cpp @@ -1,4 +1,4 @@ -/* Copyright (c) 2016 PaddlePaddle Authors. All Rights Reserve. +/* Copyright (c) 2016 PaddlePaddle Authors. All Rights Reserved. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/paddle/gserver/layers/SequenceLastInstanceLayer.cpp b/paddle/gserver/layers/SequenceLastInstanceLayer.cpp index 323cc47df19..6c4ae775c16 100644 --- a/paddle/gserver/layers/SequenceLastInstanceLayer.cpp +++ b/paddle/gserver/layers/SequenceLastInstanceLayer.cpp @@ -1,4 +1,4 @@ -/* Copyright (c) 2016 PaddlePaddle Authors. All Rights Reserve. +/* Copyright (c) 2016 PaddlePaddle Authors. All Rights Reserved. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/paddle/gserver/layers/SequencePoolLayer.cpp b/paddle/gserver/layers/SequencePoolLayer.cpp index 2a693b110a5..650ab425d1f 100644 --- a/paddle/gserver/layers/SequencePoolLayer.cpp +++ b/paddle/gserver/layers/SequencePoolLayer.cpp @@ -1,4 +1,4 @@ -/* Copyright (c) 2016 PaddlePaddle Authors. All Rights Reserve. +/* Copyright (c) 2016 PaddlePaddle Authors. All Rights Reserved. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/paddle/gserver/layers/SequencePoolLayer.h b/paddle/gserver/layers/SequencePoolLayer.h index e207afd1dce..254e4cc6b3a 100644 --- a/paddle/gserver/layers/SequencePoolLayer.h +++ b/paddle/gserver/layers/SequencePoolLayer.h @@ -1,4 +1,4 @@ -/* Copyright (c) 2016 PaddlePaddle Authors. All Rights Reserve. +/* Copyright (c) 2016 PaddlePaddle Authors. All Rights Reserved. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/paddle/gserver/layers/SequenceReshapeLayer.cpp b/paddle/gserver/layers/SequenceReshapeLayer.cpp index 82297440728..fb966699172 100644 --- a/paddle/gserver/layers/SequenceReshapeLayer.cpp +++ b/paddle/gserver/layers/SequenceReshapeLayer.cpp @@ -1,4 +1,4 @@ -/* Copyright (c) 2016 PaddlePaddle Authors. All Rights Reserve. +/* Copyright (c) 2016 PaddlePaddle Authors. All Rights Reserved. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/paddle/gserver/layers/SequenceSliceLayer.cpp b/paddle/gserver/layers/SequenceSliceLayer.cpp index ce68ca44942..1b7c33477ea 100644 --- a/paddle/gserver/layers/SequenceSliceLayer.cpp +++ b/paddle/gserver/layers/SequenceSliceLayer.cpp @@ -1,4 +1,4 @@ -/* Copyright (c) 2016 PaddlePaddle Authors. All Rights Reserve. +/* Copyright (c) 2016 PaddlePaddle Authors. All Rights Reserved. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/paddle/gserver/layers/SequenceToBatch.cpp b/paddle/gserver/layers/SequenceToBatch.cpp index 6b769378d24..5d0d588e67a 100644 --- a/paddle/gserver/layers/SequenceToBatch.cpp +++ b/paddle/gserver/layers/SequenceToBatch.cpp @@ -1,4 +1,4 @@ -/* Copyright (c) 2016 PaddlePaddle Authors. All Rights Reserve. +/* Copyright (c) 2016 PaddlePaddle Authors. All Rights Reserved. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/paddle/gserver/layers/SequenceToBatch.h b/paddle/gserver/layers/SequenceToBatch.h index 17e735a135c..8743a5ef10f 100644 --- a/paddle/gserver/layers/SequenceToBatch.h +++ b/paddle/gserver/layers/SequenceToBatch.h @@ -1,4 +1,4 @@ -/* Copyright (c) 2016 PaddlePaddle Authors. All Rights Reserve. +/* Copyright (c) 2016 PaddlePaddle Authors. All Rights Reserved. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/paddle/gserver/layers/SliceProjection.cpp b/paddle/gserver/layers/SliceProjection.cpp index 267dd6154b1..5627ad1eb3a 100644 --- a/paddle/gserver/layers/SliceProjection.cpp +++ b/paddle/gserver/layers/SliceProjection.cpp @@ -1,4 +1,4 @@ -/* Copyright (c) 2016 PaddlePaddle Authors. All Rights Reserve. +/* Copyright (c) 2016 PaddlePaddle Authors. All Rights Reserved. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/paddle/gserver/layers/SlopeInterceptLayer.cpp b/paddle/gserver/layers/SlopeInterceptLayer.cpp index faf98744a7f..c94a07e5da7 100644 --- a/paddle/gserver/layers/SlopeInterceptLayer.cpp +++ b/paddle/gserver/layers/SlopeInterceptLayer.cpp @@ -1,4 +1,4 @@ -/* Copyright (c) 2016 PaddlePaddle Authors. All Rights Reserve. +/* Copyright (c) 2016 PaddlePaddle Authors. All Rights Reserved. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/paddle/gserver/layers/SpatialPyramidPoolLayer.cpp b/paddle/gserver/layers/SpatialPyramidPoolLayer.cpp index 14fe88ff8a5..b445a399ef6 100644 --- a/paddle/gserver/layers/SpatialPyramidPoolLayer.cpp +++ b/paddle/gserver/layers/SpatialPyramidPoolLayer.cpp @@ -1,4 +1,4 @@ -/* Copyright (c) 2016 PaddlePaddle Authors. All Rights Reserve. +/* Copyright (c) 2016 PaddlePaddle Authors. All Rights Reserved. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/paddle/gserver/layers/SpatialPyramidPoolLayer.h b/paddle/gserver/layers/SpatialPyramidPoolLayer.h index 7d3cb804438..6cb5fdf83e2 100644 --- a/paddle/gserver/layers/SpatialPyramidPoolLayer.h +++ b/paddle/gserver/layers/SpatialPyramidPoolLayer.h @@ -1,4 +1,4 @@ -/* Copyright (c) 2016 PaddlePaddle Authors. All Rights Reserve. +/* Copyright (c) 2016 PaddlePaddle Authors. All Rights Reserved. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/paddle/gserver/layers/SubNestedSequenceLayer.cpp b/paddle/gserver/layers/SubNestedSequenceLayer.cpp index e9bee772120..db240ab0c96 100644 --- a/paddle/gserver/layers/SubNestedSequenceLayer.cpp +++ b/paddle/gserver/layers/SubNestedSequenceLayer.cpp @@ -1,4 +1,4 @@ -/* Copyright (c) 2016 PaddlePaddle Authors. All Rights Reserve. +/* Copyright (c) 2016 PaddlePaddle Authors. All Rights Reserved. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/paddle/gserver/layers/SubSequenceLayer.cpp b/paddle/gserver/layers/SubSequenceLayer.cpp index 00d8ce017aa..808627f0927 100644 --- a/paddle/gserver/layers/SubSequenceLayer.cpp +++ b/paddle/gserver/layers/SubSequenceLayer.cpp @@ -1,4 +1,4 @@ -/* Copyright (c) 2016 PaddlePaddle Authors. All Rights Reserve. +/* Copyright (c) 2016 PaddlePaddle Authors. All Rights Reserved. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/paddle/gserver/layers/SumToOneNormLayer.cpp b/paddle/gserver/layers/SumToOneNormLayer.cpp index 00f8519550b..ffbe1492530 100644 --- a/paddle/gserver/layers/SumToOneNormLayer.cpp +++ b/paddle/gserver/layers/SumToOneNormLayer.cpp @@ -1,4 +1,4 @@ -/* Copyright (c) 2016 PaddlePaddle Authors. All Rights Reserve. +/* Copyright (c) 2016 PaddlePaddle Authors. All Rights Reserved. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/paddle/gserver/layers/SwitchOrderLayer.cpp b/paddle/gserver/layers/SwitchOrderLayer.cpp index e97809141a9..704735de38b 100644 --- a/paddle/gserver/layers/SwitchOrderLayer.cpp +++ b/paddle/gserver/layers/SwitchOrderLayer.cpp @@ -1,4 +1,4 @@ -/* Copyright (c) 2016 PaddlePaddle Authors. All Rights Reserve. +/* Copyright (c) 2016 PaddlePaddle Authors. All Rights Reserved. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/paddle/gserver/layers/SwitchOrderLayer.h b/paddle/gserver/layers/SwitchOrderLayer.h index 47b1f7f73ee..882437f4434 100644 --- a/paddle/gserver/layers/SwitchOrderLayer.h +++ b/paddle/gserver/layers/SwitchOrderLayer.h @@ -1,4 +1,4 @@ -/* Copyright (c) 2016 PaddlePaddle Authors. All Rights Reserve. +/* Copyright (c) 2016 PaddlePaddle Authors. All Rights Reserved. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/paddle/gserver/layers/TableProjection.cpp b/paddle/gserver/layers/TableProjection.cpp index 270acdd34ba..326e241d075 100644 --- a/paddle/gserver/layers/TableProjection.cpp +++ b/paddle/gserver/layers/TableProjection.cpp @@ -1,4 +1,4 @@ -/* Copyright (c) 2016 PaddlePaddle Authors. All Rights Reserve. +/* Copyright (c) 2016 PaddlePaddle Authors. All Rights Reserved. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/paddle/gserver/layers/TableProjection.h b/paddle/gserver/layers/TableProjection.h index fb6c0e17c2d..ffb05e68f06 100644 --- a/paddle/gserver/layers/TableProjection.h +++ b/paddle/gserver/layers/TableProjection.h @@ -1,4 +1,4 @@ -/* Copyright (c) 2016 PaddlePaddle Authors. All Rights Reserve. +/* Copyright (c) 2016 PaddlePaddle Authors. All Rights Reserved. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/paddle/gserver/layers/TensorLayer.cpp b/paddle/gserver/layers/TensorLayer.cpp index 5be88d7c05d..b2271c63ef7 100644 --- a/paddle/gserver/layers/TensorLayer.cpp +++ b/paddle/gserver/layers/TensorLayer.cpp @@ -1,4 +1,4 @@ -/* Copyright (c) 2016 PaddlePaddle Authors. All Rights Reserve. +/* Copyright (c) 2016 PaddlePaddle Authors. All Rights Reserved. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/paddle/gserver/layers/TensorLayer.h b/paddle/gserver/layers/TensorLayer.h index 43992f692d3..8a323aa15f6 100644 --- a/paddle/gserver/layers/TensorLayer.h +++ b/paddle/gserver/layers/TensorLayer.h @@ -1,4 +1,4 @@ -/* Copyright (c) 2016 PaddlePaddle Authors. All Rights Reserve. +/* Copyright (c) 2016 PaddlePaddle Authors. All Rights Reserved. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/paddle/gserver/layers/TransLayer.cpp b/paddle/gserver/layers/TransLayer.cpp index 4150f1727d8..cf87ca53d1d 100644 --- a/paddle/gserver/layers/TransLayer.cpp +++ b/paddle/gserver/layers/TransLayer.cpp @@ -1,4 +1,4 @@ -/* Copyright (c) 2016 PaddlePaddle Authors. All Rights Reserve. +/* Copyright (c) 2016 PaddlePaddle Authors. All Rights Reserved. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/paddle/gserver/layers/TransLayer.h b/paddle/gserver/layers/TransLayer.h index be10bb74f6b..03d09486245 100644 --- a/paddle/gserver/layers/TransLayer.h +++ b/paddle/gserver/layers/TransLayer.h @@ -1,4 +1,4 @@ -/* Copyright (c) 2016 PaddlePaddle Authors. All Rights Reserve. +/* Copyright (c) 2016 PaddlePaddle Authors. All Rights Reserved. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/paddle/gserver/layers/TransposedFullMatrixProjection.cpp b/paddle/gserver/layers/TransposedFullMatrixProjection.cpp index 2a12499e5b5..755389f7074 100644 --- a/paddle/gserver/layers/TransposedFullMatrixProjection.cpp +++ b/paddle/gserver/layers/TransposedFullMatrixProjection.cpp @@ -1,4 +1,4 @@ -/* Copyright (c) 2016 PaddlePaddle Authors. All Rights Reserve. +/* Copyright (c) 2016 PaddlePaddle Authors. All Rights Reserved. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/paddle/gserver/layers/ValidationLayer.cpp b/paddle/gserver/layers/ValidationLayer.cpp index 5127bcaba33..b626825a7b4 100644 --- a/paddle/gserver/layers/ValidationLayer.cpp +++ b/paddle/gserver/layers/ValidationLayer.cpp @@ -1,4 +1,4 @@ -/* Copyright (c) 2016 PaddlePaddle Authors. All Rights Reserve. +/* Copyright (c) 2016 PaddlePaddle Authors. All Rights Reserved. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/paddle/gserver/layers/ValidationLayer.h b/paddle/gserver/layers/ValidationLayer.h index c8b2634a136..f412d685c05 100644 --- a/paddle/gserver/layers/ValidationLayer.h +++ b/paddle/gserver/layers/ValidationLayer.h @@ -1,4 +1,4 @@ -/* Copyright (c) 2016 PaddlePaddle Authors. All Rights Reserve. +/* Copyright (c) 2016 PaddlePaddle Authors. All Rights Reserved. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/paddle/gserver/layers/WarpCTCLayer.cpp b/paddle/gserver/layers/WarpCTCLayer.cpp index 94e926a8d8f..6b1656a523d 100644 --- a/paddle/gserver/layers/WarpCTCLayer.cpp +++ b/paddle/gserver/layers/WarpCTCLayer.cpp @@ -1,4 +1,4 @@ -/* Copyright (c) 2016 PaddlePaddle Authors. All Rights Reserve. +/* Copyright (c) 2016 PaddlePaddle Authors. All Rights Reserved. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/paddle/gserver/layers/WarpCTCLayer.h b/paddle/gserver/layers/WarpCTCLayer.h index 7e8d7379d26..6f6be359c0a 100644 --- a/paddle/gserver/layers/WarpCTCLayer.h +++ b/paddle/gserver/layers/WarpCTCLayer.h @@ -1,4 +1,4 @@ -/* Copyright (c) 2016 PaddlePaddle Authors. All Rights Reserve. +/* Copyright (c) 2016 PaddlePaddle Authors. All Rights Reserved. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/paddle/gserver/tests/LayerGradUtil.cpp b/paddle/gserver/tests/LayerGradUtil.cpp index cd957c7c0bc..f08c1cd1d50 100644 --- a/paddle/gserver/tests/LayerGradUtil.cpp +++ b/paddle/gserver/tests/LayerGradUtil.cpp @@ -1,4 +1,4 @@ -/* Copyright (c) 2016 PaddlePaddle Authors. All Rights Reserve. +/* Copyright (c) 2016 PaddlePaddle Authors. All Rights Reserved. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/paddle/gserver/tests/LayerGradUtil.h b/paddle/gserver/tests/LayerGradUtil.h index e10a27eedfa..1999b2204b1 100644 --- a/paddle/gserver/tests/LayerGradUtil.h +++ b/paddle/gserver/tests/LayerGradUtil.h @@ -1,4 +1,4 @@ -/* Copyright (c) 2016 PaddlePaddle Authors. All Rights Reserve. +/* Copyright (c) 2016 PaddlePaddle Authors. All Rights Reserved. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/paddle/gserver/tests/MKLDNNTester.cpp b/paddle/gserver/tests/MKLDNNTester.cpp index afe1608eab8..d2a9761a4e1 100644 --- a/paddle/gserver/tests/MKLDNNTester.cpp +++ b/paddle/gserver/tests/MKLDNNTester.cpp @@ -1,4 +1,4 @@ -/* Copyright (c) 2017 PaddlePaddle Authors. All Rights Reserve. +/* Copyright (c) 2017 PaddlePaddle Authors. All Rights Reserved. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/paddle/gserver/tests/MKLDNNTester.h b/paddle/gserver/tests/MKLDNNTester.h index 9d61533c0b6..c1faa6fd90e 100644 --- a/paddle/gserver/tests/MKLDNNTester.h +++ b/paddle/gserver/tests/MKLDNNTester.h @@ -1,4 +1,4 @@ -/* Copyright (c) 2017 PaddlePaddle Authors. All Rights Reserve. +/* Copyright (c) 2017 PaddlePaddle Authors. All Rights Reserved. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/paddle/gserver/tests/img_conv_cudnn.py b/paddle/gserver/tests/img_conv_cudnn.py index 0ea6d6bae66..fd889ee1ce8 100644 --- a/paddle/gserver/tests/img_conv_cudnn.py +++ b/paddle/gserver/tests/img_conv_cudnn.py @@ -1,4 +1,4 @@ -# Copyright (c) 2016 PaddlePaddle Authors. All Rights Reserve. +# Copyright (c) 2016 PaddlePaddle Authors. All Rights Reserved. # #Licensed under the Apache License, Version 2.0 (the "License"); #you may not use this file except in compliance with the License. diff --git a/paddle/gserver/tests/img_conv_exconv.py b/paddle/gserver/tests/img_conv_exconv.py index c618cdab27c..5aca6da5acf 100644 --- a/paddle/gserver/tests/img_conv_exconv.py +++ b/paddle/gserver/tests/img_conv_exconv.py @@ -1,4 +1,4 @@ -# Copyright (c) 2016 PaddlePaddle Authors. All Rights Reserve. +# Copyright (c) 2016 PaddlePaddle Authors. All Rights Reserved. # #Licensed under the Apache License, Version 2.0 (the "License"); #you may not use this file except in compliance with the License. diff --git a/paddle/gserver/tests/pyDataProvider.py b/paddle/gserver/tests/pyDataProvider.py index d2ad5888b5a..85ea90d6eec 100644 --- a/paddle/gserver/tests/pyDataProvider.py +++ b/paddle/gserver/tests/pyDataProvider.py @@ -1,4 +1,4 @@ -# Copyright (c) 2016 PaddlePaddle Authors. All Rights Reserve. +# Copyright (c) 2016 PaddlePaddle Authors. All Rights Reserved. # #Licensed under the Apache License, Version 2.0 (the "License"); #you may not use this file except in compliance with the License. diff --git a/paddle/gserver/tests/rnn_data_provider.py b/paddle/gserver/tests/rnn_data_provider.py index 063a4127e54..18b2191f44e 100644 --- a/paddle/gserver/tests/rnn_data_provider.py +++ b/paddle/gserver/tests/rnn_data_provider.py @@ -1,4 +1,4 @@ -# Copyright (c) 2016 PaddlePaddle Authors. All Rights Reserve. +# Copyright (c) 2016 PaddlePaddle Authors. All Rights Reserved. # #Licensed under the Apache License, Version 2.0 (the "License"); #you may not use this file except in compliance with the License. diff --git a/paddle/gserver/tests/sequenceGen.py b/paddle/gserver/tests/sequenceGen.py index 04a1732d61c..d5ec8ac23f1 100644 --- a/paddle/gserver/tests/sequenceGen.py +++ b/paddle/gserver/tests/sequenceGen.py @@ -1,4 +1,4 @@ -# Copyright (c) 2016 PaddlePaddle Authors. All Rights Reserve. +# Copyright (c) 2016 PaddlePaddle Authors. All Rights Reserved. # #Licensed under the Apache License, Version 2.0 (the "License"); #you may not use this file except in compliance with the License. diff --git a/paddle/gserver/tests/sequence_nest_rnn_multi_unequalength_inputs.py b/paddle/gserver/tests/sequence_nest_rnn_multi_unequalength_inputs.py index aeaaa221f9f..569d3c094b6 100644 --- a/paddle/gserver/tests/sequence_nest_rnn_multi_unequalength_inputs.py +++ b/paddle/gserver/tests/sequence_nest_rnn_multi_unequalength_inputs.py @@ -1,4 +1,4 @@ -# Copyright (c) 2016 PaddlePaddle Authors. All Rights Reserve. +# Copyright (c) 2016 PaddlePaddle Authors. All Rights Reserved. # #Licensed under the Apache License, Version 2.0 (the "License"); #you may not use this file except in compliance with the License. diff --git a/paddle/gserver/tests/sequence_recurrent.py b/paddle/gserver/tests/sequence_recurrent.py index 8786a5465db..b88c09084e1 100644 --- a/paddle/gserver/tests/sequence_recurrent.py +++ b/paddle/gserver/tests/sequence_recurrent.py @@ -1,4 +1,4 @@ -# Copyright (c) 2016 PaddlePaddle Authors. All Rights Reserve. +# Copyright (c) 2016 PaddlePaddle Authors. All Rights Reserved. # #Licensed under the Apache License, Version 2.0 (the "License"); #you may not use this file except in compliance with the License. diff --git a/paddle/gserver/tests/sequence_recurrent_group.py b/paddle/gserver/tests/sequence_recurrent_group.py index 8b5a3d49838..0daf7467002 100644 --- a/paddle/gserver/tests/sequence_recurrent_group.py +++ b/paddle/gserver/tests/sequence_recurrent_group.py @@ -1,4 +1,4 @@ -# Copyright (c) 2016 PaddlePaddle Authors. All Rights Reserve. +# Copyright (c) 2016 PaddlePaddle Authors. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/paddle/gserver/tests/sequence_rnn_matched_inputs.py b/paddle/gserver/tests/sequence_rnn_matched_inputs.py index 0c55f2cf9d0..41a581e0ccd 100644 --- a/paddle/gserver/tests/sequence_rnn_matched_inputs.py +++ b/paddle/gserver/tests/sequence_rnn_matched_inputs.py @@ -1,4 +1,4 @@ -# Copyright (c) 2016 PaddlePaddle Authors. All Rights Reserve. +# Copyright (c) 2016 PaddlePaddle Authors. All Rights Reserved. # #Licensed under the Apache License, Version 2.0 (the "License"); #you may not use this file except in compliance with the License. diff --git a/paddle/gserver/tests/sequence_rnn_mixed_inputs.py b/paddle/gserver/tests/sequence_rnn_mixed_inputs.py index 22b376b91aa..ae89d8e2bb6 100644 --- a/paddle/gserver/tests/sequence_rnn_mixed_inputs.py +++ b/paddle/gserver/tests/sequence_rnn_mixed_inputs.py @@ -1,4 +1,4 @@ -# Copyright (c) 2016 PaddlePaddle Authors. All Rights Reserve. +# Copyright (c) 2016 PaddlePaddle Authors. All Rights Reserved. # #Licensed under the Apache License, Version 2.0 (the "License"); #you may not use this file except in compliance with the License. diff --git a/paddle/gserver/tests/sequence_rnn_multi_unequalength_inputs.py b/paddle/gserver/tests/sequence_rnn_multi_unequalength_inputs.py index 3ce87490bbd..6473fb3f3ed 100644 --- a/paddle/gserver/tests/sequence_rnn_multi_unequalength_inputs.py +++ b/paddle/gserver/tests/sequence_rnn_multi_unequalength_inputs.py @@ -1,4 +1,4 @@ -# Copyright (c) 2016 PaddlePaddle Authors. All Rights Reserve. +# Copyright (c) 2016 PaddlePaddle Authors. All Rights Reserved. # #Licensed under the Apache License, Version 2.0 (the "License"); #you may not use this file except in compliance with the License. diff --git a/paddle/gserver/tests/test_ActivationGrad.cpp b/paddle/gserver/tests/test_ActivationGrad.cpp index f4c2a07c442..b5e4af26dc1 100644 --- a/paddle/gserver/tests/test_ActivationGrad.cpp +++ b/paddle/gserver/tests/test_ActivationGrad.cpp @@ -1,4 +1,4 @@ -/* Copyright (c) 2016 PaddlePaddle Authors. All Rights Reserve. +/* Copyright (c) 2016 PaddlePaddle Authors. All Rights Reserved. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/paddle/gserver/tests/test_BatchNorm.cpp b/paddle/gserver/tests/test_BatchNorm.cpp index 41116f48095..a3ec66c7582 100644 --- a/paddle/gserver/tests/test_BatchNorm.cpp +++ b/paddle/gserver/tests/test_BatchNorm.cpp @@ -1,4 +1,4 @@ -/* Copyright (c) 2016 PaddlePaddle Authors. All Rights Reserve. +/* Copyright (c) 2016 PaddlePaddle Authors. All Rights Reserved. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/paddle/gserver/tests/test_CRFLayerGrad.cpp b/paddle/gserver/tests/test_CRFLayerGrad.cpp index f010066ebc6..9f3d2936569 100644 --- a/paddle/gserver/tests/test_CRFLayerGrad.cpp +++ b/paddle/gserver/tests/test_CRFLayerGrad.cpp @@ -1,4 +1,4 @@ -/* Copyright (c) 2016 Baidu, Inc. All Rights Reserve. +/* Copyright (c) 2016 Baidu, Inc. All Rights Reserved. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/paddle/gserver/tests/test_CompareSparse.cpp b/paddle/gserver/tests/test_CompareSparse.cpp index 2495d8b60a5..2fbc404125a 100644 --- a/paddle/gserver/tests/test_CompareSparse.cpp +++ b/paddle/gserver/tests/test_CompareSparse.cpp @@ -1,4 +1,4 @@ -/* Copyright (c) 2016 PaddlePaddle Authors. All Rights Reserve. +/* Copyright (c) 2016 PaddlePaddle Authors. All Rights Reserved. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/paddle/gserver/tests/test_CompareTwoNets.cpp b/paddle/gserver/tests/test_CompareTwoNets.cpp index 801d9607565..1c9b4002a34 100644 --- a/paddle/gserver/tests/test_CompareTwoNets.cpp +++ b/paddle/gserver/tests/test_CompareTwoNets.cpp @@ -1,4 +1,4 @@ -/* Copyright (c) 2016 PaddlePaddle Authors. All Rights Reserve. +/* Copyright (c) 2016 PaddlePaddle Authors. All Rights Reserved. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/paddle/gserver/tests/test_ConvTrans.cpp b/paddle/gserver/tests/test_ConvTrans.cpp index 5f2f9665478..2e394a74b7d 100644 --- a/paddle/gserver/tests/test_ConvTrans.cpp +++ b/paddle/gserver/tests/test_ConvTrans.cpp @@ -1,4 +1,4 @@ -/* Copyright (c) 2016 PaddlePaddle Authors. All Rights Reserve. +/* Copyright (c) 2016 PaddlePaddle Authors. All Rights Reserved. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/paddle/gserver/tests/test_ConvUnify.cpp b/paddle/gserver/tests/test_ConvUnify.cpp index 8634355b520..ba820d9a2ac 100644 --- a/paddle/gserver/tests/test_ConvUnify.cpp +++ b/paddle/gserver/tests/test_ConvUnify.cpp @@ -1,4 +1,4 @@ -/* Copyright (c) 2016 PaddlePaddle Authors. All Rights Reserve. +/* Copyright (c) 2016 PaddlePaddle Authors. All Rights Reserved. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/paddle/gserver/tests/test_CrossEntropyOverBeamGrad.cpp b/paddle/gserver/tests/test_CrossEntropyOverBeamGrad.cpp index 477638426fe..0041ed30939 100644 --- a/paddle/gserver/tests/test_CrossEntropyOverBeamGrad.cpp +++ b/paddle/gserver/tests/test_CrossEntropyOverBeamGrad.cpp @@ -1,4 +1,4 @@ -/* Copyright (c) 2016 Baidu, Inc. All Rights Reserve. +/* Copyright (c) 2016 Baidu, Inc. All Rights Reserved. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/paddle/gserver/tests/test_DetectionOutput.cpp b/paddle/gserver/tests/test_DetectionOutput.cpp index dc39c97a87f..48652142655 100644 --- a/paddle/gserver/tests/test_DetectionOutput.cpp +++ b/paddle/gserver/tests/test_DetectionOutput.cpp @@ -1,4 +1,4 @@ -/* Copyright (c) 2016 PaddlePaddle Authors. All Rights Reserve. +/* Copyright (c) 2016 PaddlePaddle Authors. All Rights Reserved. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/paddle/gserver/tests/test_Evaluator.cpp b/paddle/gserver/tests/test_Evaluator.cpp index 62a131171fa..4a8843f3aff 100644 --- a/paddle/gserver/tests/test_Evaluator.cpp +++ b/paddle/gserver/tests/test_Evaluator.cpp @@ -1,4 +1,4 @@ -/* Copyright (c) 2016 PaddlePaddle Authors. All Rights Reserve. +/* Copyright (c) 2016 PaddlePaddle Authors. All Rights Reserved. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/paddle/gserver/tests/test_Expand.cpp b/paddle/gserver/tests/test_Expand.cpp index d32bf0152f7..fa1c86d13f4 100644 --- a/paddle/gserver/tests/test_Expand.cpp +++ b/paddle/gserver/tests/test_Expand.cpp @@ -1,4 +1,4 @@ -/* Copyright (c) 2016 PaddlePaddle Authors. All Rights Reserve. +/* Copyright (c) 2016 PaddlePaddle Authors. All Rights Reserved. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/paddle/gserver/tests/test_KmaxSeqScore.cpp b/paddle/gserver/tests/test_KmaxSeqScore.cpp index ffe5cfb8dbb..168ffbdac8c 100644 --- a/paddle/gserver/tests/test_KmaxSeqScore.cpp +++ b/paddle/gserver/tests/test_KmaxSeqScore.cpp @@ -1,4 +1,4 @@ -/* Copyright (c) 2016 PaddlePaddle Authors. All Rights Reserve. +/* Copyright (c) 2016 PaddlePaddle Authors. All Rights Reserved. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/paddle/gserver/tests/test_LayerGrad.cpp b/paddle/gserver/tests/test_LayerGrad.cpp index aab02f16849..1254d580505 100644 --- a/paddle/gserver/tests/test_LayerGrad.cpp +++ b/paddle/gserver/tests/test_LayerGrad.cpp @@ -1,4 +1,4 @@ -/* Copyright (c) 2016 PaddlePaddle Authors. All Rights Reserve. +/* Copyright (c) 2016 PaddlePaddle Authors. All Rights Reserved. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/paddle/gserver/tests/test_LinearChainCRF.cpp b/paddle/gserver/tests/test_LinearChainCRF.cpp index b37277054c5..423c31e27d7 100644 --- a/paddle/gserver/tests/test_LinearChainCRF.cpp +++ b/paddle/gserver/tests/test_LinearChainCRF.cpp @@ -1,4 +1,4 @@ -/* Copyright (c) 2016 PaddlePaddle Authors. All Rights Reserve. +/* Copyright (c) 2016 PaddlePaddle Authors. All Rights Reserved. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/paddle/gserver/tests/test_MKLDNN.cpp b/paddle/gserver/tests/test_MKLDNN.cpp index ad1dbc3ee2b..a34a3f62061 100644 --- a/paddle/gserver/tests/test_MKLDNN.cpp +++ b/paddle/gserver/tests/test_MKLDNN.cpp @@ -1,4 +1,4 @@ -/* Copyright (c) 2017 PaddlePaddle Authors. All Rights Reserve. +/* Copyright (c) 2017 PaddlePaddle Authors. All Rights Reserved. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/paddle/gserver/tests/test_MaxPoolingWithMaskOutput.cpp b/paddle/gserver/tests/test_MaxPoolingWithMaskOutput.cpp index 16438886df9..5188d2abed8 100644 --- a/paddle/gserver/tests/test_MaxPoolingWithMaskOutput.cpp +++ b/paddle/gserver/tests/test_MaxPoolingWithMaskOutput.cpp @@ -1,4 +1,4 @@ -/* Copyright (c) 2016 PaddlePaddle Authors. All Rights Reserve. +/* Copyright (c) 2016 PaddlePaddle Authors. All Rights Reserved. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/paddle/gserver/tests/test_MultinomialSampler.cpp b/paddle/gserver/tests/test_MultinomialSampler.cpp index eadf40ade09..4a295ea9d51 100644 --- a/paddle/gserver/tests/test_MultinomialSampler.cpp +++ b/paddle/gserver/tests/test_MultinomialSampler.cpp @@ -1,4 +1,4 @@ -/* Copyright (c) 2016 PaddlePaddle Authors. All Rights Reserve. +/* Copyright (c) 2016 PaddlePaddle Authors. All Rights Reserved. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/paddle/gserver/tests/test_NetworkCompare.cpp b/paddle/gserver/tests/test_NetworkCompare.cpp index 2b92211936a..fda3f2f7934 100644 --- a/paddle/gserver/tests/test_NetworkCompare.cpp +++ b/paddle/gserver/tests/test_NetworkCompare.cpp @@ -1,4 +1,4 @@ -/* Copyright (c) 2016 PaddlePaddle Authors. All Rights Reserve. +/* Copyright (c) 2016 PaddlePaddle Authors. All Rights Reserved. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/paddle/gserver/tests/test_PriorBox.cpp b/paddle/gserver/tests/test_PriorBox.cpp index 8dc55687842..10d512ec45f 100644 --- a/paddle/gserver/tests/test_PriorBox.cpp +++ b/paddle/gserver/tests/test_PriorBox.cpp @@ -1,4 +1,4 @@ -/* Copyright (c) 2016 PaddlePaddle Authors. All Rights Reserve. +/* Copyright (c) 2016 PaddlePaddle Authors. All Rights Reserved. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/paddle/gserver/tests/test_PyDataProvider.cpp b/paddle/gserver/tests/test_PyDataProvider.cpp index fe54799259d..a1dee979507 100644 --- a/paddle/gserver/tests/test_PyDataProvider.cpp +++ b/paddle/gserver/tests/test_PyDataProvider.cpp @@ -1,4 +1,4 @@ -/* Copyright (c) 2016 PaddlePaddle Authors. All Rights Reserve. +/* Copyright (c) 2016 PaddlePaddle Authors. All Rights Reserved. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/paddle/gserver/tests/test_PyDataProvider2.cpp b/paddle/gserver/tests/test_PyDataProvider2.cpp index 7e193eb31a0..b39fb353450 100644 --- a/paddle/gserver/tests/test_PyDataProvider2.cpp +++ b/paddle/gserver/tests/test_PyDataProvider2.cpp @@ -1,4 +1,4 @@ -/* Copyright (c) 2016 PaddlePaddle Authors. All Rights Reserve. +/* Copyright (c) 2016 PaddlePaddle Authors. All Rights Reserved. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/paddle/gserver/tests/test_PyDataProvider2.py b/paddle/gserver/tests/test_PyDataProvider2.py index 044aede98e6..461d80b9e68 100644 --- a/paddle/gserver/tests/test_PyDataProvider2.py +++ b/paddle/gserver/tests/test_PyDataProvider2.py @@ -1,4 +1,4 @@ -# Copyright (c) 2016 PaddlePaddle Authors. All Rights Reserve. +# Copyright (c) 2016 PaddlePaddle Authors. All Rights Reserved. # #Licensed under the Apache License, Version 2.0 (the "License"); #you may not use this file except in compliance with the License. diff --git a/paddle/gserver/tests/test_RecurrentGradientMachine.cpp b/paddle/gserver/tests/test_RecurrentGradientMachine.cpp index 6b19eb0ce52..72324fcf29c 100644 --- a/paddle/gserver/tests/test_RecurrentGradientMachine.cpp +++ b/paddle/gserver/tests/test_RecurrentGradientMachine.cpp @@ -1,4 +1,4 @@ -/* Copyright (c) 2016 PaddlePaddle Authors. All Rights Reserve. +/* Copyright (c) 2016 PaddlePaddle Authors. All Rights Reserved. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/paddle/gserver/tests/test_RecurrentLayer.cpp b/paddle/gserver/tests/test_RecurrentLayer.cpp index 0e130843339..e5ce922f157 100644 --- a/paddle/gserver/tests/test_RecurrentLayer.cpp +++ b/paddle/gserver/tests/test_RecurrentLayer.cpp @@ -1,4 +1,4 @@ -/* Copyright (c) 2016 PaddlePaddle Authors. All Rights Reserve. +/* Copyright (c) 2016 PaddlePaddle Authors. All Rights Reserved. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/paddle/gserver/tests/test_SelectiveFCLayer.cpp b/paddle/gserver/tests/test_SelectiveFCLayer.cpp index d164e382c4a..583e3bc545a 100644 --- a/paddle/gserver/tests/test_SelectiveFCLayer.cpp +++ b/paddle/gserver/tests/test_SelectiveFCLayer.cpp @@ -1,4 +1,4 @@ -/* Copyright (c) 2016 PaddlePaddle Authors. All Rights Reserve. +/* Copyright (c) 2016 PaddlePaddle Authors. All Rights Reserved. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/paddle/gserver/tests/test_SeqSliceLayerGrad.cpp b/paddle/gserver/tests/test_SeqSliceLayerGrad.cpp index 3dbffc56346..406ca63b6ee 100644 --- a/paddle/gserver/tests/test_SeqSliceLayerGrad.cpp +++ b/paddle/gserver/tests/test_SeqSliceLayerGrad.cpp @@ -1,4 +1,4 @@ -/* Copyright (c) 2016 Baidu, Inc. All Rights Reserve. +/* Copyright (c) 2016 Baidu, Inc. All Rights Reserved. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/paddle/gserver/tests/test_WarpCTCLayer.cpp b/paddle/gserver/tests/test_WarpCTCLayer.cpp index da829460061..f2299d7da2a 100644 --- a/paddle/gserver/tests/test_WarpCTCLayer.cpp +++ b/paddle/gserver/tests/test_WarpCTCLayer.cpp @@ -1,4 +1,4 @@ -/* Copyright (c) 2016 PaddlePaddle Authors. All Rights Reserve. +/* Copyright (c) 2016 PaddlePaddle Authors. All Rights Reserved. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/paddle/math/Allocator.h b/paddle/math/Allocator.h index 17563bf5e16..ae60f6fe5fa 100644 --- a/paddle/math/Allocator.h +++ b/paddle/math/Allocator.h @@ -1,4 +1,4 @@ -/* Copyright (c) 2016 PaddlePaddle Authors. All Rights Reserve. +/* Copyright (c) 2016 PaddlePaddle Authors. All Rights Reserved. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/paddle/math/BaseMatrix.cu b/paddle/math/BaseMatrix.cu index e3eff59dc57..7b57419e5a5 100644 --- a/paddle/math/BaseMatrix.cu +++ b/paddle/math/BaseMatrix.cu @@ -1,4 +1,4 @@ -/* Copyright (c) 2016 PaddlePaddle Authors. All Rights Reserve. +/* Copyright (c) 2016 PaddlePaddle Authors. All Rights Reserved. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/paddle/math/BaseMatrix.h b/paddle/math/BaseMatrix.h index 12ad2d45a0b..00ce5a19491 100644 --- a/paddle/math/BaseMatrix.h +++ b/paddle/math/BaseMatrix.h @@ -1,4 +1,4 @@ -/* Copyright (c) 2016 PaddlePaddle Authors. All Rights Reserve. +/* Copyright (c) 2016 PaddlePaddle Authors. All Rights Reserved. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/paddle/math/CpuSparseMatrix.cpp b/paddle/math/CpuSparseMatrix.cpp index dc6979cf5a5..023450ffb79 100644 --- a/paddle/math/CpuSparseMatrix.cpp +++ b/paddle/math/CpuSparseMatrix.cpp @@ -1,4 +1,4 @@ -/* Copyright (c) 2016 PaddlePaddle Authors. All Rights Reserve. +/* Copyright (c) 2016 PaddlePaddle Authors. All Rights Reserved. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/paddle/math/CpuSparseMatrix.h b/paddle/math/CpuSparseMatrix.h index 522b436a2a6..22b6b71688b 100644 --- a/paddle/math/CpuSparseMatrix.h +++ b/paddle/math/CpuSparseMatrix.h @@ -1,4 +1,4 @@ -/* Copyright (c) 2016 PaddlePaddle Authors. All Rights Reserve. +/* Copyright (c) 2016 PaddlePaddle Authors. All Rights Reserved. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/paddle/math/ExecViaCpu.h b/paddle/math/ExecViaCpu.h index 1e03cc5f45a..9b2a3c2b8ac 100644 --- a/paddle/math/ExecViaCpu.h +++ b/paddle/math/ExecViaCpu.h @@ -1,4 +1,4 @@ -/* Copyright (c) 2016 PaddlePaddle Authors. All Rights Reserve. +/* Copyright (c) 2016 PaddlePaddle Authors. All Rights Reserved. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/paddle/math/MKLDNNMatrix.cpp b/paddle/math/MKLDNNMatrix.cpp index a710479bab8..52036c5f803 100644 --- a/paddle/math/MKLDNNMatrix.cpp +++ b/paddle/math/MKLDNNMatrix.cpp @@ -1,4 +1,4 @@ -/* Copyright (c) 2017 PaddlePaddle Authors. All Rights Reserve. +/* Copyright (c) 2017 PaddlePaddle Authors. All Rights Reserved. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/paddle/math/MKLDNNMatrix.h b/paddle/math/MKLDNNMatrix.h index 39d40a1f616..e1fb81679ad 100644 --- a/paddle/math/MKLDNNMatrix.h +++ b/paddle/math/MKLDNNMatrix.h @@ -1,4 +1,4 @@ -/* Copyright (c) 2017 PaddlePaddle Authors. All Rights Reserve. +/* Copyright (c) 2017 PaddlePaddle Authors. All Rights Reserved. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/paddle/math/MathFunctions.cpp b/paddle/math/MathFunctions.cpp index 28ab54b450c..b2ff4bc3232 100644 --- a/paddle/math/MathFunctions.cpp +++ b/paddle/math/MathFunctions.cpp @@ -1,4 +1,4 @@ -/* Copyright (c) 2016 PaddlePaddle Authors. All Rights Reserve. +/* Copyright (c) 2016 PaddlePaddle Authors. All Rights Reserved. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/paddle/math/MathFunctions.h b/paddle/math/MathFunctions.h index 29fe36e3a4b..f4cf6bd6c2c 100644 --- a/paddle/math/MathFunctions.h +++ b/paddle/math/MathFunctions.h @@ -1,4 +1,4 @@ -/* Copyright (c) 2016 PaddlePaddle Authors. All Rights Reserve. +/* Copyright (c) 2016 PaddlePaddle Authors. All Rights Reserved. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/paddle/math/MathUtils.cpp b/paddle/math/MathUtils.cpp index 980b6e13887..b2afdbcd51a 100644 --- a/paddle/math/MathUtils.cpp +++ b/paddle/math/MathUtils.cpp @@ -1,4 +1,4 @@ -/* Copyright (c) 2016 PaddlePaddle Authors. All Rights Reserve. +/* Copyright (c) 2016 PaddlePaddle Authors. All Rights Reserved. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/paddle/math/MathUtils.h b/paddle/math/MathUtils.h index f2b29801387..597485d9c54 100644 --- a/paddle/math/MathUtils.h +++ b/paddle/math/MathUtils.h @@ -1,4 +1,4 @@ -/* Copyright (c) 2016 PaddlePaddle Authors. All Rights Reserve. +/* Copyright (c) 2016 PaddlePaddle Authors. All Rights Reserved. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/paddle/math/Matrix.cpp b/paddle/math/Matrix.cpp index cc86b12be08..35359d4b5a8 100644 --- a/paddle/math/Matrix.cpp +++ b/paddle/math/Matrix.cpp @@ -1,4 +1,4 @@ -/* Copyright (c) 2016 PaddlePaddle Authors. All Rights Reserve. +/* Copyright (c) 2016 PaddlePaddle Authors. All Rights Reserved. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/paddle/math/Matrix.h b/paddle/math/Matrix.h index c8e690e6421..631e69edc1b 100644 --- a/paddle/math/Matrix.h +++ b/paddle/math/Matrix.h @@ -1,4 +1,4 @@ -/* Copyright (c) 2016 PaddlePaddle Authors. All Rights Reserve. +/* Copyright (c) 2016 PaddlePaddle Authors. All Rights Reserved. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/paddle/math/MatrixBitCode.cpp b/paddle/math/MatrixBitCode.cpp index cea912d3ca0..61a9923bc2e 100644 --- a/paddle/math/MatrixBitCode.cpp +++ b/paddle/math/MatrixBitCode.cpp @@ -1,4 +1,4 @@ -/* Copyright (c) 2016 PaddlePaddle Authors. All Rights Reserve. +/* Copyright (c) 2016 PaddlePaddle Authors. All Rights Reserved. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/paddle/math/MemoryHandle.cpp b/paddle/math/MemoryHandle.cpp index 84afb5944c3..1563314e921 100644 --- a/paddle/math/MemoryHandle.cpp +++ b/paddle/math/MemoryHandle.cpp @@ -1,4 +1,4 @@ -/* Copyright (c) 2016 PaddlePaddle Authors. All Rights Reserve. +/* Copyright (c) 2016 PaddlePaddle Authors. All Rights Reserved. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/paddle/math/MemoryHandle.h b/paddle/math/MemoryHandle.h index 0828d377c90..03ee413c121 100644 --- a/paddle/math/MemoryHandle.h +++ b/paddle/math/MemoryHandle.h @@ -1,4 +1,4 @@ -/* Copyright (c) 2016 PaddlePaddle Authors. All Rights Reserve. +/* Copyright (c) 2016 PaddlePaddle Authors. All Rights Reserved. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/paddle/math/NEONFunctions.cpp b/paddle/math/NEONFunctions.cpp index 0f831494229..953d5bb8c81 100644 --- a/paddle/math/NEONFunctions.cpp +++ b/paddle/math/NEONFunctions.cpp @@ -1,4 +1,4 @@ -/* Copyright (c) 2016 PaddlePaddle Authors. All Rights Reserve. +/* Copyright (c) 2016 PaddlePaddle Authors. All Rights Reserved. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/paddle/math/NEONFunctions.h b/paddle/math/NEONFunctions.h index d67b2f47a85..33edd9d518d 100644 --- a/paddle/math/NEONFunctions.h +++ b/paddle/math/NEONFunctions.h @@ -1,4 +1,4 @@ -/* Copyright (c) 2016 PaddlePaddle Authors. All Rights Reserve. +/* Copyright (c) 2016 PaddlePaddle Authors. All Rights Reserved. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/paddle/math/PoolAllocator.cpp b/paddle/math/PoolAllocator.cpp index 4282c7243a8..b6ad168856a 100644 --- a/paddle/math/PoolAllocator.cpp +++ b/paddle/math/PoolAllocator.cpp @@ -1,4 +1,4 @@ -/* Copyright (c) 2016 PaddlePaddle Authors. All Rights Reserve. +/* Copyright (c) 2016 PaddlePaddle Authors. All Rights Reserved. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/paddle/math/PoolAllocator.h b/paddle/math/PoolAllocator.h index c06efa9ac77..90141fef3fd 100644 --- a/paddle/math/PoolAllocator.h +++ b/paddle/math/PoolAllocator.h @@ -1,4 +1,4 @@ -/* Copyright (c) 2016 PaddlePaddle Authors. All Rights Reserve. +/* Copyright (c) 2016 PaddlePaddle Authors. All Rights Reserved. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/paddle/math/RowBuffer.h b/paddle/math/RowBuffer.h index e457d71f1b3..2e4d11a86bf 100644 --- a/paddle/math/RowBuffer.h +++ b/paddle/math/RowBuffer.h @@ -1,4 +1,4 @@ -/* Copyright (c) 2016 PaddlePaddle Authors. All Rights Reserve. +/* Copyright (c) 2016 PaddlePaddle Authors. All Rights Reserved. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/paddle/math/SIMDFunctions.cpp b/paddle/math/SIMDFunctions.cpp index d66d543a614..3cfc5d6f1e0 100644 --- a/paddle/math/SIMDFunctions.cpp +++ b/paddle/math/SIMDFunctions.cpp @@ -1,4 +1,4 @@ -/* Copyright (c) 2016 PaddlePaddle Authors. All Rights Reserve. +/* Copyright (c) 2016 PaddlePaddle Authors. All Rights Reserved. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/paddle/math/SIMDFunctions.h b/paddle/math/SIMDFunctions.h index 76909720f6a..5b1dfea9d3c 100644 --- a/paddle/math/SIMDFunctions.h +++ b/paddle/math/SIMDFunctions.h @@ -1,4 +1,4 @@ -/* Copyright (c) 2016 PaddlePaddle Authors. All Rights Reserve. +/* Copyright (c) 2016 PaddlePaddle Authors. All Rights Reserved. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/paddle/math/SparseMatrix.cpp b/paddle/math/SparseMatrix.cpp index 284b68d590b..1faa343dbce 100644 --- a/paddle/math/SparseMatrix.cpp +++ b/paddle/math/SparseMatrix.cpp @@ -1,4 +1,4 @@ -/* Copyright (c) 2016 PaddlePaddle Authors. All Rights Reserve. +/* Copyright (c) 2016 PaddlePaddle Authors. All Rights Reserved. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/paddle/math/SparseMatrix.h b/paddle/math/SparseMatrix.h index e0a3c6d2286..7c525f4edf3 100644 --- a/paddle/math/SparseMatrix.h +++ b/paddle/math/SparseMatrix.h @@ -1,4 +1,4 @@ -/* Copyright (c) 2016 PaddlePaddle Authors. All Rights Reserve. +/* Copyright (c) 2016 PaddlePaddle Authors. All Rights Reserved. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/paddle/math/SparseRowMatrix.cpp b/paddle/math/SparseRowMatrix.cpp index b086433fe53..4254175aabc 100644 --- a/paddle/math/SparseRowMatrix.cpp +++ b/paddle/math/SparseRowMatrix.cpp @@ -1,4 +1,4 @@ -/* Copyright (c) 2016 PaddlePaddle Authors. All Rights Reserve. +/* Copyright (c) 2016 PaddlePaddle Authors. All Rights Reserved. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/paddle/math/SparseRowMatrix.h b/paddle/math/SparseRowMatrix.h index ca7a6806da3..3920de32df7 100644 --- a/paddle/math/SparseRowMatrix.h +++ b/paddle/math/SparseRowMatrix.h @@ -1,4 +1,4 @@ -/* Copyright (c) 2016 PaddlePaddle Authors. All Rights Reserve. +/* Copyright (c) 2016 PaddlePaddle Authors. All Rights Reserved. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/paddle/math/Storage.cpp b/paddle/math/Storage.cpp index a2ef731ecbc..5982bf2e563 100644 --- a/paddle/math/Storage.cpp +++ b/paddle/math/Storage.cpp @@ -1,4 +1,4 @@ -/* Copyright (c) 2016 PaddlePaddle Authors. All Rights Reserve. +/* Copyright (c) 2016 PaddlePaddle Authors. All Rights Reserved. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/paddle/math/Storage.h b/paddle/math/Storage.h index 06a66b5f146..ba8f4689a1e 100644 --- a/paddle/math/Storage.h +++ b/paddle/math/Storage.h @@ -1,4 +1,4 @@ -/* Copyright (c) 2016 PaddlePaddle Authors. All Rights Reserve. +/* Copyright (c) 2016 PaddlePaddle Authors. All Rights Reserved. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/paddle/math/TensorApply.h b/paddle/math/TensorApply.h index 11c7acb4412..7d79cae5a11 100644 --- a/paddle/math/TensorApply.h +++ b/paddle/math/TensorApply.h @@ -1,4 +1,4 @@ -/* Copyright (c) 2016 PaddlePaddle Authors. All Rights Reserve. +/* Copyright (c) 2016 PaddlePaddle Authors. All Rights Reserved. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/paddle/math/TensorAssign.h b/paddle/math/TensorAssign.h index 943fb5649e4..113d98c16b2 100644 --- a/paddle/math/TensorAssign.h +++ b/paddle/math/TensorAssign.h @@ -1,4 +1,4 @@ -/* Copyright (c) 2016 PaddlePaddle Authors. All Rights Reserve. +/* Copyright (c) 2016 PaddlePaddle Authors. All Rights Reserved. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/paddle/math/TensorEvaluate.h b/paddle/math/TensorEvaluate.h index 687bad37113..2a722016e77 100644 --- a/paddle/math/TensorEvaluate.h +++ b/paddle/math/TensorEvaluate.h @@ -1,4 +1,4 @@ -/* Copyright (c) 2016 PaddlePaddle Authors. All Rights Reserve. +/* Copyright (c) 2016 PaddlePaddle Authors. All Rights Reserved. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/paddle/math/TensorExpression.h b/paddle/math/TensorExpression.h index 6fd60e7f3c6..83229ae65dd 100644 --- a/paddle/math/TensorExpression.h +++ b/paddle/math/TensorExpression.h @@ -1,4 +1,4 @@ -/* Copyright (c) 2016 PaddlePaddle Authors. All Rights Reserve. +/* Copyright (c) 2016 PaddlePaddle Authors. All Rights Reserved. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/paddle/math/TrainingAlgorithmOp.cu b/paddle/math/TrainingAlgorithmOp.cu index fc746b85339..b844768d3b9 100644 --- a/paddle/math/TrainingAlgorithmOp.cu +++ b/paddle/math/TrainingAlgorithmOp.cu @@ -1,4 +1,4 @@ -/* Copyright (c) 2016 PaddlePaddle Authors. All Rights Reserve. +/* Copyright (c) 2016 PaddlePaddle Authors. All Rights Reserved. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/paddle/math/TrainingAlgorithmOp.h b/paddle/math/TrainingAlgorithmOp.h index 881a8d72d88..fe40fc2d36e 100644 --- a/paddle/math/TrainingAlgorithmOp.h +++ b/paddle/math/TrainingAlgorithmOp.h @@ -1,4 +1,4 @@ -/* Copyright (c) 2016 PaddlePaddle Authors. All Rights Reserve. +/* Copyright (c) 2016 PaddlePaddle Authors. All Rights Reserved. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/paddle/math/Vector.cpp b/paddle/math/Vector.cpp index 346008439c3..2a47ed7ef81 100644 --- a/paddle/math/Vector.cpp +++ b/paddle/math/Vector.cpp @@ -1,4 +1,4 @@ -/* Copyright (c) 2016 PaddlePaddle Authors. All Rights Reserve. +/* Copyright (c) 2016 PaddlePaddle Authors. All Rights Reserved. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/paddle/math/Vector.h b/paddle/math/Vector.h index f965a580920..3efbc769dff 100644 --- a/paddle/math/Vector.h +++ b/paddle/math/Vector.h @@ -1,4 +1,4 @@ -/* Copyright (c) 2016 PaddlePaddle Authors. All Rights Reserve. +/* Copyright (c) 2016 PaddlePaddle Authors. All Rights Reserved. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/paddle/math/float16.h b/paddle/math/float16.h index 63248d36f9d..b00a85b082c 100644 --- a/paddle/math/float16.h +++ b/paddle/math/float16.h @@ -1,4 +1,4 @@ -/* Copyright (c) 2016 PaddlePaddle Authors. All Rights Reserve. +/* Copyright (c) 2016 PaddlePaddle Authors. All Rights Reserved. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/paddle/math/tests/OriginalOptimizerApi.h b/paddle/math/tests/OriginalOptimizerApi.h index 0188372771d..e30d784b232 100644 --- a/paddle/math/tests/OriginalOptimizerApi.h +++ b/paddle/math/tests/OriginalOptimizerApi.h @@ -1,4 +1,4 @@ -/* Copyright (c) 2016 PaddlePaddle Authors. All Rights Reserve. +/* Copyright (c) 2016 PaddlePaddle Authors. All Rights Reserved. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/paddle/math/tests/PerfUtils.h b/paddle/math/tests/PerfUtils.h index 9c6a63ce6c0..bee2351e2fb 100644 --- a/paddle/math/tests/PerfUtils.h +++ b/paddle/math/tests/PerfUtils.h @@ -1,4 +1,4 @@ -/* Copyright (c) 2016 PaddlePaddle Authors. All Rights Reserve. +/* Copyright (c) 2016 PaddlePaddle Authors. All Rights Reserved. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/paddle/math/tests/TensorCheck.h b/paddle/math/tests/TensorCheck.h index b998e5772e7..f4332ede363 100644 --- a/paddle/math/tests/TensorCheck.h +++ b/paddle/math/tests/TensorCheck.h @@ -1,4 +1,4 @@ -/* Copyright (c) 2016 PaddlePaddle Authors. All Rights Reserve. +/* Copyright (c) 2016 PaddlePaddle Authors. All Rights Reserved. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/paddle/math/tests/TestUtils.h b/paddle/math/tests/TestUtils.h index 713f407f496..d2b9706432f 100644 --- a/paddle/math/tests/TestUtils.h +++ b/paddle/math/tests/TestUtils.h @@ -1,4 +1,4 @@ -/* Copyright (c) 2016 PaddlePaddle Authors. All Rights Reserve. +/* Copyright (c) 2016 PaddlePaddle Authors. All Rights Reserved. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/paddle/math/tests/test_Allocator.cpp b/paddle/math/tests/test_Allocator.cpp index 1fecf659e50..84bc1c1d9e0 100644 --- a/paddle/math/tests/test_Allocator.cpp +++ b/paddle/math/tests/test_Allocator.cpp @@ -1,4 +1,4 @@ -/* Copyright (c) 2016 PaddlePaddle Authors. All Rights Reserve. +/* Copyright (c) 2016 PaddlePaddle Authors. All Rights Reserved. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/paddle/math/tests/test_BaseMatrix.cpp b/paddle/math/tests/test_BaseMatrix.cpp index 1766257860b..6f7beb60c8f 100644 --- a/paddle/math/tests/test_BaseMatrix.cpp +++ b/paddle/math/tests/test_BaseMatrix.cpp @@ -1,4 +1,4 @@ -/* Copyright (c) 2016 PaddlePaddle Authors. All Rights Reserve. +/* Copyright (c) 2016 PaddlePaddle Authors. All Rights Reserved. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/paddle/math/tests/test_CpuGpuVector.cpp b/paddle/math/tests/test_CpuGpuVector.cpp index c72f89c8244..395541a76ae 100644 --- a/paddle/math/tests/test_CpuGpuVector.cpp +++ b/paddle/math/tests/test_CpuGpuVector.cpp @@ -1,4 +1,4 @@ -/* Copyright (c) 2016 PaddlePaddle Authors. All Rights Reserve. +/* Copyright (c) 2016 PaddlePaddle Authors. All Rights Reserved. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/paddle/math/tests/test_ExecViaCpu.cpp b/paddle/math/tests/test_ExecViaCpu.cpp index 25e0ba11ded..513c7b440e0 100644 --- a/paddle/math/tests/test_ExecViaCpu.cpp +++ b/paddle/math/tests/test_ExecViaCpu.cpp @@ -1,4 +1,4 @@ -/* Copyright (c) 2016 PaddlePaddle Authors. All Rights Reserve. +/* Copyright (c) 2016 PaddlePaddle Authors. All Rights Reserved. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/paddle/math/tests/test_FPException.cpp b/paddle/math/tests/test_FPException.cpp index 3836f7fc0fe..d87fdcda9ed 100644 --- a/paddle/math/tests/test_FPException.cpp +++ b/paddle/math/tests/test_FPException.cpp @@ -1,4 +1,4 @@ -/* Copyright (c) 2016 PaddlePaddle Authors. All Rights Reserve. +/* Copyright (c) 2016 PaddlePaddle Authors. All Rights Reserved. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/paddle/math/tests/test_GpuProfiler.cpp b/paddle/math/tests/test_GpuProfiler.cpp index d9f146f0d1f..828159660ba 100644 --- a/paddle/math/tests/test_GpuProfiler.cpp +++ b/paddle/math/tests/test_GpuProfiler.cpp @@ -1,4 +1,4 @@ -/* Copyright (c) 2016 PaddlePaddle Authors. All Rights Reserve. +/* Copyright (c) 2016 PaddlePaddle Authors. All Rights Reserved. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/paddle/math/tests/test_Matrix.cpp b/paddle/math/tests/test_Matrix.cpp index 2f99fa3581e..a9407a31f33 100644 --- a/paddle/math/tests/test_Matrix.cpp +++ b/paddle/math/tests/test_Matrix.cpp @@ -1,4 +1,4 @@ -/* Copyright (c) 2016 PaddlePaddle Authors. All Rights Reserve. +/* Copyright (c) 2016 PaddlePaddle Authors. All Rights Reserved. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/paddle/math/tests/test_RowBuffer.cpp b/paddle/math/tests/test_RowBuffer.cpp index 8cc4c69a1a4..e38de853e03 100644 --- a/paddle/math/tests/test_RowBuffer.cpp +++ b/paddle/math/tests/test_RowBuffer.cpp @@ -1,4 +1,4 @@ -/* Copyright (c) 2016 PaddlePaddle Authors. All Rights Reserve. +/* Copyright (c) 2016 PaddlePaddle Authors. All Rights Reserved. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/paddle/math/tests/test_SIMDFunctions.cpp b/paddle/math/tests/test_SIMDFunctions.cpp index e8f9b26ff24..b692679436e 100644 --- a/paddle/math/tests/test_SIMDFunctions.cpp +++ b/paddle/math/tests/test_SIMDFunctions.cpp @@ -1,4 +1,4 @@ -/* Copyright (c) 2016 PaddlePaddle Authors. All Rights Reserve. +/* Copyright (c) 2016 PaddlePaddle Authors. All Rights Reserved. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/paddle/math/tests/test_SparseMatrix.cpp b/paddle/math/tests/test_SparseMatrix.cpp index 8abbe8d82e0..dbcbeb8d506 100644 --- a/paddle/math/tests/test_SparseMatrix.cpp +++ b/paddle/math/tests/test_SparseMatrix.cpp @@ -1,4 +1,4 @@ -/* Copyright (c) 2016 PaddlePaddle Authors. All Rights Reserve. +/* Copyright (c) 2016 PaddlePaddle Authors. All Rights Reserved. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/paddle/math/tests/test_Tensor.cu b/paddle/math/tests/test_Tensor.cu index d03698dee25..acb2da86d0f 100644 --- a/paddle/math/tests/test_Tensor.cu +++ b/paddle/math/tests/test_Tensor.cu @@ -1,4 +1,4 @@ -/* Copyright (c) 2016 PaddlePaddle Authors. All Rights Reserve. +/* Copyright (c) 2016 PaddlePaddle Authors. All Rights Reserved. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/paddle/math/tests/test_TrainingAlgorithm.cpp b/paddle/math/tests/test_TrainingAlgorithm.cpp index 5ae0aa036f6..fb146176ca8 100644 --- a/paddle/math/tests/test_TrainingAlgorithm.cpp +++ b/paddle/math/tests/test_TrainingAlgorithm.cpp @@ -1,4 +1,4 @@ -/* Copyright (c) 2016 PaddlePaddle Authors. All Rights Reserve. +/* Copyright (c) 2016 PaddlePaddle Authors. All Rights Reserved. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/paddle/math/tests/test_batchTranspose.cpp b/paddle/math/tests/test_batchTranspose.cpp index b70a6197640..ccfd6d5aae2 100644 --- a/paddle/math/tests/test_batchTranspose.cpp +++ b/paddle/math/tests/test_batchTranspose.cpp @@ -1,4 +1,4 @@ -/* Copyright (c) 2016 PaddlePaddle Authors. All Rights Reserve. +/* Copyright (c) 2016 PaddlePaddle Authors. All Rights Reserved. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/paddle/math/tests/test_float16.cpp b/paddle/math/tests/test_float16.cpp index 74cc55aa379..64cc43f9727 100644 --- a/paddle/math/tests/test_float16.cpp +++ b/paddle/math/tests/test_float16.cpp @@ -1,4 +1,4 @@ -/* Copyright (c) 2016 PaddlePaddle Authors. All Rights Reserve. +/* Copyright (c) 2016 PaddlePaddle Authors. All Rights Reserved. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at diff --git a/paddle/math/tests/test_float16.cu b/paddle/math/tests/test_float16.cu index 4b520feaaf5..3b2d8cfcece 100644 --- a/paddle/math/tests/test_float16.cu +++ b/paddle/math/tests/test_float16.cu @@ -1,4 +1,4 @@ -/* Copyright (c) 2016 PaddlePaddle Authors. All Rights Reserve. +/* Copyright (c) 2016 PaddlePaddle Authors. All Rights Reserved. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at diff --git a/paddle/math/tests/test_lazyAssign.cu b/paddle/math/tests/test_lazyAssign.cu index 04f23cff55d..cbd74bbfe33 100644 --- a/paddle/math/tests/test_lazyAssign.cu +++ b/paddle/math/tests/test_lazyAssign.cu @@ -1,4 +1,4 @@ -/* Copyright (c) 2016 PaddlePaddle Authors. All Rights Reserve. +/* Copyright (c) 2016 PaddlePaddle Authors. All Rights Reserved. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/paddle/math/tests/test_matrixCompare.cpp b/paddle/math/tests/test_matrixCompare.cpp index afb8d9d599b..e45ddd433fa 100644 --- a/paddle/math/tests/test_matrixCompare.cpp +++ b/paddle/math/tests/test_matrixCompare.cpp @@ -1,4 +1,4 @@ -/* Copyright (c) 2016 PaddlePaddle Authors. All Rights Reserve. +/* Copyright (c) 2016 PaddlePaddle Authors. All Rights Reserved. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/paddle/math/tests/test_matrixUtil.h b/paddle/math/tests/test_matrixUtil.h index 47f46147462..86297547dcd 100644 --- a/paddle/math/tests/test_matrixUtil.h +++ b/paddle/math/tests/test_matrixUtil.h @@ -1,4 +1,4 @@ -/* Copyright (c) 2016 PaddlePaddle Authors. All Rights Reserve. +/* Copyright (c) 2016 PaddlePaddle Authors. All Rights Reserved. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/paddle/math/tests/test_perturbation.cpp b/paddle/math/tests/test_perturbation.cpp index c7c07c817a0..ef99dab60a8 100644 --- a/paddle/math/tests/test_perturbation.cpp +++ b/paddle/math/tests/test_perturbation.cpp @@ -1,4 +1,4 @@ -/* Copyright (c) 2016 PaddlePaddle Authors. All Rights Reserve. +/* Copyright (c) 2016 PaddlePaddle Authors. All Rights Reserved. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/paddle/math/tests/test_sparseMatrixCompare.cpp b/paddle/math/tests/test_sparseMatrixCompare.cpp index 2b2a391b9d0..12647d21a29 100644 --- a/paddle/math/tests/test_sparseMatrixCompare.cpp +++ b/paddle/math/tests/test_sparseMatrixCompare.cpp @@ -1,4 +1,4 @@ -/* Copyright (c) 2016 PaddlePaddle Authors. All Rights Reserve. +/* Copyright (c) 2016 PaddlePaddle Authors. All Rights Reserved. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/paddle/optimizer/adadelta_optimizer.cc b/paddle/optimizer/adadelta_optimizer.cc index 8ca048257e5..1faeb0cd31e 100644 --- a/paddle/optimizer/adadelta_optimizer.cc +++ b/paddle/optimizer/adadelta_optimizer.cc @@ -1,4 +1,4 @@ -/* Copyright (c) 2016 PaddlePaddle Authors. All Rights Reserve. +/* Copyright (c) 2016 PaddlePaddle Authors. All Rights Reserved. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/paddle/optimizer/adadelta_optimizer.h b/paddle/optimizer/adadelta_optimizer.h index 48f1ae17504..74df9d54be7 100644 --- a/paddle/optimizer/adadelta_optimizer.h +++ b/paddle/optimizer/adadelta_optimizer.h @@ -1,4 +1,4 @@ -/* Copyright (c) 2016 PaddlePaddle Authors. All Rights Reserve. +/* Copyright (c) 2016 PaddlePaddle Authors. All Rights Reserved. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/paddle/optimizer/adagrad_optimizer.cc b/paddle/optimizer/adagrad_optimizer.cc index c6d39a366ad..5ac65dbd720 100644 --- a/paddle/optimizer/adagrad_optimizer.cc +++ b/paddle/optimizer/adagrad_optimizer.cc @@ -1,4 +1,4 @@ -/* Copyright (c) 2016 PaddlePaddle Authors. All Rights Reserve. +/* Copyright (c) 2016 PaddlePaddle Authors. All Rights Reserved. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/paddle/optimizer/adagrad_optimizer.h b/paddle/optimizer/adagrad_optimizer.h index b0cff061f5c..1d58402d78f 100644 --- a/paddle/optimizer/adagrad_optimizer.h +++ b/paddle/optimizer/adagrad_optimizer.h @@ -1,4 +1,4 @@ -/* Copyright (c) 2016 PaddlePaddle Authors. All Rights Reserve. +/* Copyright (c) 2016 PaddlePaddle Authors. All Rights Reserved. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/paddle/optimizer/adam_optimizer.cc b/paddle/optimizer/adam_optimizer.cc index 8a384b59c47..9a4ff5ecc0f 100644 --- a/paddle/optimizer/adam_optimizer.cc +++ b/paddle/optimizer/adam_optimizer.cc @@ -1,4 +1,4 @@ -/* Copyright (c) 2016 PaddlePaddle Authors. All Rights Reserve. +/* Copyright (c) 2016 PaddlePaddle Authors. All Rights Reserved. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/paddle/optimizer/adam_optimizer.h b/paddle/optimizer/adam_optimizer.h index 7df40064df3..7977226c860 100644 --- a/paddle/optimizer/adam_optimizer.h +++ b/paddle/optimizer/adam_optimizer.h @@ -1,4 +1,4 @@ -/* Copyright (c) 2016 PaddlePaddle Authors. All Rights Reserve. +/* Copyright (c) 2016 PaddlePaddle Authors. All Rights Reserved. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/paddle/optimizer/lr_policy.h b/paddle/optimizer/lr_policy.h index 9a44a776f2b..14422d1f42f 100644 --- a/paddle/optimizer/lr_policy.h +++ b/paddle/optimizer/lr_policy.h @@ -1,4 +1,4 @@ -// Copyright (c) 2018 PaddlePaddle Authors. All Rights Reserve. +// Copyright (c) 2018 PaddlePaddle Authors. All Rights Reserved. // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. diff --git a/paddle/optimizer/optimizer.cc b/paddle/optimizer/optimizer.cc index 3af44484363..e583aebd77a 100644 --- a/paddle/optimizer/optimizer.cc +++ b/paddle/optimizer/optimizer.cc @@ -1,4 +1,4 @@ -/* Copyright (c) 2016 PaddlePaddle Authors. All Rights Reserve. +/* Copyright (c) 2016 PaddlePaddle Authors. All Rights Reserved. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/paddle/optimizer/optimizer.h b/paddle/optimizer/optimizer.h index 516e612167f..c079de921fa 100644 --- a/paddle/optimizer/optimizer.h +++ b/paddle/optimizer/optimizer.h @@ -1,4 +1,4 @@ -/* Copyright (c) 2016 PaddlePaddle Authors. All Rights Reserve. +/* Copyright (c) 2016 PaddlePaddle Authors. All Rights Reserved. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/paddle/optimizer/parameter_optimizer.cc b/paddle/optimizer/parameter_optimizer.cc index 1603e5fdc8a..f9474b315d5 100644 --- a/paddle/optimizer/parameter_optimizer.cc +++ b/paddle/optimizer/parameter_optimizer.cc @@ -1,4 +1,4 @@ -/* Copyright (c) 2016 PaddlePaddle Authors. All Rights Reserve. +/* Copyright (c) 2016 PaddlePaddle Authors. All Rights Reserved. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/paddle/optimizer/parameter_optimizer.h b/paddle/optimizer/parameter_optimizer.h index 1f501c49e1d..c7cf8db3ee0 100644 --- a/paddle/optimizer/parameter_optimizer.h +++ b/paddle/optimizer/parameter_optimizer.h @@ -1,4 +1,4 @@ -/* Copyright (c) 2016 PaddlePaddle Authors. All Rights Reserve. +/* Copyright (c) 2016 PaddlePaddle Authors. All Rights Reserved. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/paddle/optimizer/parameter_optimizer_test.cc b/paddle/optimizer/parameter_optimizer_test.cc index 2bcfca55cc5..d663e2fd007 100644 --- a/paddle/optimizer/parameter_optimizer_test.cc +++ b/paddle/optimizer/parameter_optimizer_test.cc @@ -1,4 +1,4 @@ -// Copyright (c) 2018 PaddlePaddle Authors. All Rights Reserve. +// Copyright (c) 2018 PaddlePaddle Authors. All Rights Reserved. // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. diff --git a/paddle/optimizer/serialization.h b/paddle/optimizer/serialization.h index 98548ddb7aa..bf12eed15f0 100644 --- a/paddle/optimizer/serialization.h +++ b/paddle/optimizer/serialization.h @@ -1,4 +1,4 @@ -// Copyright (c) 2018 PaddlePaddle Authors. All Rights Reserve. +// Copyright (c) 2018 PaddlePaddle Authors. All Rights Reserved. // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. diff --git a/paddle/optimizer/serialization_test.cc b/paddle/optimizer/serialization_test.cc index 25a8f5d351e..93ee1f492f0 100644 --- a/paddle/optimizer/serialization_test.cc +++ b/paddle/optimizer/serialization_test.cc @@ -1,4 +1,4 @@ -// Copyright (c) 2018 PaddlePaddle Authors. All Rights Reserve. +// Copyright (c) 2018 PaddlePaddle Authors. All Rights Reserved. // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. diff --git a/paddle/optimizer/sgd_optimizer.cc b/paddle/optimizer/sgd_optimizer.cc index ee80f543fc4..c1e2064de75 100644 --- a/paddle/optimizer/sgd_optimizer.cc +++ b/paddle/optimizer/sgd_optimizer.cc @@ -1,4 +1,4 @@ -/* Copyright (c) 2016 PaddlePaddle Authors. All Rights Reserve. +/* Copyright (c) 2016 PaddlePaddle Authors. All Rights Reserved. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/paddle/optimizer/sgd_optimizer.h b/paddle/optimizer/sgd_optimizer.h index 16a4df9973e..f504d98adb8 100644 --- a/paddle/optimizer/sgd_optimizer.h +++ b/paddle/optimizer/sgd_optimizer.h @@ -1,4 +1,4 @@ -/* Copyright (c) 2016 PaddlePaddle Authors. All Rights Reserve. +/* Copyright (c) 2016 PaddlePaddle Authors. All Rights Reserved. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/paddle/optimizer/tensor.h b/paddle/optimizer/tensor.h index e999e9bda12..fd32398a237 100644 --- a/paddle/optimizer/tensor.h +++ b/paddle/optimizer/tensor.h @@ -1,4 +1,4 @@ -// Copyright (c) 2018 PaddlePaddle Authors. All Rights Reserve. +// Copyright (c) 2018 PaddlePaddle Authors. All Rights Reserved. // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. diff --git a/paddle/parameter/Argument.cpp b/paddle/parameter/Argument.cpp index 8dbef0b22e7..cfdaf8998b0 100644 --- a/paddle/parameter/Argument.cpp +++ b/paddle/parameter/Argument.cpp @@ -1,4 +1,4 @@ -/* Copyright (c) 2016 PaddlePaddle Authors. All Rights Reserve. +/* Copyright (c) 2016 PaddlePaddle Authors. All Rights Reserved. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/paddle/parameter/Argument.h b/paddle/parameter/Argument.h index 7b59199dded..e580d38216b 100644 --- a/paddle/parameter/Argument.h +++ b/paddle/parameter/Argument.h @@ -1,4 +1,4 @@ -/* Copyright (c) 2016 PaddlePaddle Authors. All Rights Reserve. +/* Copyright (c) 2016 PaddlePaddle Authors. All Rights Reserved. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at diff --git a/paddle/parameter/AverageOptimizer.cpp b/paddle/parameter/AverageOptimizer.cpp index e51ca565209..75998d81dd9 100644 --- a/paddle/parameter/AverageOptimizer.cpp +++ b/paddle/parameter/AverageOptimizer.cpp @@ -1,4 +1,4 @@ -/* Copyright (c) 2016 PaddlePaddle Authors. All Rights Reserve. +/* Copyright (c) 2016 PaddlePaddle Authors. All Rights Reserved. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/paddle/parameter/AverageOptimizer.h b/paddle/parameter/AverageOptimizer.h index 9fd3f75baa6..4ad3c18d56a 100644 --- a/paddle/parameter/AverageOptimizer.h +++ b/paddle/parameter/AverageOptimizer.h @@ -1,4 +1,4 @@ -/* Copyright (c) 2016 PaddlePaddle Authors. All Rights Reserve. +/* Copyright (c) 2016 PaddlePaddle Authors. All Rights Reserved. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/paddle/parameter/FirstOrderOptimizer.cpp b/paddle/parameter/FirstOrderOptimizer.cpp index 5938b2210c7..5e280bcac33 100644 --- a/paddle/parameter/FirstOrderOptimizer.cpp +++ b/paddle/parameter/FirstOrderOptimizer.cpp @@ -1,4 +1,4 @@ -/* Copyright (c) 2016 PaddlePaddle Authors. All Rights Reserve. +/* Copyright (c) 2016 PaddlePaddle Authors. All Rights Reserved. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/paddle/parameter/FirstOrderOptimizer.h b/paddle/parameter/FirstOrderOptimizer.h index 5b0c52a30df..047989fcad5 100644 --- a/paddle/parameter/FirstOrderOptimizer.h +++ b/paddle/parameter/FirstOrderOptimizer.h @@ -1,4 +1,4 @@ -/* Copyright (c) 2016 PaddlePaddle Authors. All Rights Reserve. +/* Copyright (c) 2016 PaddlePaddle Authors. All Rights Reserved. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/paddle/parameter/LearningRateScheduler.cpp b/paddle/parameter/LearningRateScheduler.cpp index 66448b2c5f6..b6b58e3ddad 100644 --- a/paddle/parameter/LearningRateScheduler.cpp +++ b/paddle/parameter/LearningRateScheduler.cpp @@ -1,4 +1,4 @@ -/* Copyright (c) 2016 PaddlePaddle Authors. All Rights Reserve. +/* Copyright (c) 2016 PaddlePaddle Authors. All Rights Reserved. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/paddle/parameter/LearningRateScheduler.h b/paddle/parameter/LearningRateScheduler.h index 53b9dba446e..aea99a1c204 100644 --- a/paddle/parameter/LearningRateScheduler.h +++ b/paddle/parameter/LearningRateScheduler.h @@ -1,4 +1,4 @@ -/* Copyright (c) 2016 PaddlePaddle Authors. All Rights Reserve. +/* Copyright (c) 2016 PaddlePaddle Authors. All Rights Reserved. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/paddle/parameter/OptimizerFunctions.cpp b/paddle/parameter/OptimizerFunctions.cpp index a4af1b47058..b7f920b89cc 100644 --- a/paddle/parameter/OptimizerFunctions.cpp +++ b/paddle/parameter/OptimizerFunctions.cpp @@ -1,4 +1,4 @@ -/* Copyright (c) 2016 PaddlePaddle Authors. All Rights Reserve. +/* Copyright (c) 2016 PaddlePaddle Authors. All Rights Reserved. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/paddle/parameter/OptimizerFunctions.h b/paddle/parameter/OptimizerFunctions.h index 4f7370b6baf..57f6fc9d40e 100644 --- a/paddle/parameter/OptimizerFunctions.h +++ b/paddle/parameter/OptimizerFunctions.h @@ -1,4 +1,4 @@ -/* Copyright (c) 2016 PaddlePaddle Authors. All Rights Reserve. +/* Copyright (c) 2016 PaddlePaddle Authors. All Rights Reserved. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/paddle/parameter/OptimizerWithRegularizer.cpp b/paddle/parameter/OptimizerWithRegularizer.cpp index 7910b124449..9e914ae4ece 100644 --- a/paddle/parameter/OptimizerWithRegularizer.cpp +++ b/paddle/parameter/OptimizerWithRegularizer.cpp @@ -1,4 +1,4 @@ -/* Copyright (c) 2016 PaddlePaddle Authors. All Rights Reserve. +/* Copyright (c) 2016 PaddlePaddle Authors. All Rights Reserved. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/paddle/parameter/OptimizerWithRegularizer.h b/paddle/parameter/OptimizerWithRegularizer.h index 0e1c444d280..7219d96d924 100644 --- a/paddle/parameter/OptimizerWithRegularizer.h +++ b/paddle/parameter/OptimizerWithRegularizer.h @@ -1,4 +1,4 @@ -/* Copyright (c) 2016 PaddlePaddle Authors. All Rights Reserve. +/* Copyright (c) 2016 PaddlePaddle Authors. All Rights Reserved. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/paddle/parameter/Parameter.cpp b/paddle/parameter/Parameter.cpp index 3b0f09cea6e..0e6ea90f3d5 100644 --- a/paddle/parameter/Parameter.cpp +++ b/paddle/parameter/Parameter.cpp @@ -1,4 +1,4 @@ -/* Copyright (c) 2016 PaddlePaddle Authors. All Rights Reserve. +/* Copyright (c) 2016 PaddlePaddle Authors. All Rights Reserved. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/paddle/parameter/Parameter.h b/paddle/parameter/Parameter.h index 04f12efaac1..24ac10f3fe5 100644 --- a/paddle/parameter/Parameter.h +++ b/paddle/parameter/Parameter.h @@ -1,4 +1,4 @@ -/* Copyright (c) 2016 PaddlePaddle Authors. All Rights Reserve. +/* Copyright (c) 2016 PaddlePaddle Authors. All Rights Reserved. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/paddle/parameter/ParameterOptimizer.cpp b/paddle/parameter/ParameterOptimizer.cpp index 7c8c6978e22..638daa58f1e 100644 --- a/paddle/parameter/ParameterOptimizer.cpp +++ b/paddle/parameter/ParameterOptimizer.cpp @@ -1,4 +1,4 @@ -/* Copyright (c) 2016 PaddlePaddle Authors. All Rights Reserve. +/* Copyright (c) 2016 PaddlePaddle Authors. All Rights Reserved. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/paddle/parameter/ParameterOptimizer.h b/paddle/parameter/ParameterOptimizer.h index f98ba569b56..a8d0ca72f21 100644 --- a/paddle/parameter/ParameterOptimizer.h +++ b/paddle/parameter/ParameterOptimizer.h @@ -1,4 +1,4 @@ -/* Copyright (c) 2016 PaddlePaddle Authors. All Rights Reserve. +/* Copyright (c) 2016 PaddlePaddle Authors. All Rights Reserved. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/paddle/parameter/ParameterUpdateFunctions.cpp b/paddle/parameter/ParameterUpdateFunctions.cpp index d60cb363830..db1153c2d64 100644 --- a/paddle/parameter/ParameterUpdateFunctions.cpp +++ b/paddle/parameter/ParameterUpdateFunctions.cpp @@ -1,4 +1,4 @@ -/* Copyright (c) 2016 PaddlePaddle Authors. All Rights Reserve. +/* Copyright (c) 2016 PaddlePaddle Authors. All Rights Reserved. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/paddle/parameter/ParameterUpdateFunctions.h b/paddle/parameter/ParameterUpdateFunctions.h index 0fca280149c..7434baa2d3d 100644 --- a/paddle/parameter/ParameterUpdateFunctions.h +++ b/paddle/parameter/ParameterUpdateFunctions.h @@ -1,4 +1,4 @@ -/* Copyright (c) 2016 PaddlePaddle Authors. All Rights Reserve. +/* Copyright (c) 2016 PaddlePaddle Authors. All Rights Reserved. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/paddle/parameter/ParameterUpdaterBase.cpp b/paddle/parameter/ParameterUpdaterBase.cpp index 458cae886a4..7815856b45d 100644 --- a/paddle/parameter/ParameterUpdaterBase.cpp +++ b/paddle/parameter/ParameterUpdaterBase.cpp @@ -1,4 +1,4 @@ -/* Copyright (c) 2016 PaddlePaddle Authors. All Rights Reserve. +/* Copyright (c) 2016 PaddlePaddle Authors. All Rights Reserved. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/paddle/parameter/ParameterUpdaterBase.h b/paddle/parameter/ParameterUpdaterBase.h index 6265c828a1a..717e1c6721b 100644 --- a/paddle/parameter/ParameterUpdaterBase.h +++ b/paddle/parameter/ParameterUpdaterBase.h @@ -1,4 +1,4 @@ -/* Copyright (c) 2016 PaddlePaddle Authors. All Rights Reserve. +/* Copyright (c) 2016 PaddlePaddle Authors. All Rights Reserved. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/paddle/parameter/ParameterUpdaterHook.cpp b/paddle/parameter/ParameterUpdaterHook.cpp index c8b47687f5d..e6aec3c3482 100644 --- a/paddle/parameter/ParameterUpdaterHook.cpp +++ b/paddle/parameter/ParameterUpdaterHook.cpp @@ -1,4 +1,4 @@ -/* Copyright (c) 2016 PaddlePaddle Authors. All Rights Reserve. +/* Copyright (c) 2016 PaddlePaddle Authors. All Rights Reserved. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/paddle/parameter/ParameterUpdaterHook.h b/paddle/parameter/ParameterUpdaterHook.h index 1f4506441da..d30530ec393 100644 --- a/paddle/parameter/ParameterUpdaterHook.h +++ b/paddle/parameter/ParameterUpdaterHook.h @@ -1,4 +1,4 @@ -/* Copyright (c) 2016 PaddlePaddle Authors. All Rights Reserve. +/* Copyright (c) 2016 PaddlePaddle Authors. All Rights Reserved. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/paddle/parameter/Regularizer.cpp b/paddle/parameter/Regularizer.cpp index 85119001503..d223fd2df67 100644 --- a/paddle/parameter/Regularizer.cpp +++ b/paddle/parameter/Regularizer.cpp @@ -1,4 +1,4 @@ -/* Copyright (c) 2016 PaddlePaddle Authors. All Rights Reserve. +/* Copyright (c) 2016 PaddlePaddle Authors. All Rights Reserved. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/paddle/parameter/Regularizer.h b/paddle/parameter/Regularizer.h index 6d547730981..6bed7b0ddfe 100644 --- a/paddle/parameter/Regularizer.h +++ b/paddle/parameter/Regularizer.h @@ -1,4 +1,4 @@ -/* Copyright (c) 2016 PaddlePaddle Authors. All Rights Reserve. +/* Copyright (c) 2016 PaddlePaddle Authors. All Rights Reserved. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/paddle/parameter/ThreadLocalBuffer.cpp b/paddle/parameter/ThreadLocalBuffer.cpp index b21dd15245c..550e41dfdaa 100644 --- a/paddle/parameter/ThreadLocalBuffer.cpp +++ b/paddle/parameter/ThreadLocalBuffer.cpp @@ -1,4 +1,4 @@ -/* Copyright (c) 2016 PaddlePaddle Authors. All Rights Reserve. +/* Copyright (c) 2016 PaddlePaddle Authors. All Rights Reserved. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/paddle/parameter/ThreadLocalBuffer.h b/paddle/parameter/ThreadLocalBuffer.h index c916519c974..07c96e59d0b 100644 --- a/paddle/parameter/ThreadLocalBuffer.h +++ b/paddle/parameter/ThreadLocalBuffer.h @@ -1,4 +1,4 @@ -/* Copyright (c) 2016 PaddlePaddle Authors. All Rights Reserve. +/* Copyright (c) 2016 PaddlePaddle Authors. All Rights Reserved. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/paddle/parameter/Weight.cpp b/paddle/parameter/Weight.cpp index 3738a58d7f8..ba4ddce69fb 100644 --- a/paddle/parameter/Weight.cpp +++ b/paddle/parameter/Weight.cpp @@ -1,4 +1,4 @@ -/* Copyright (c) 2016 PaddlePaddle Authors. All Rights Reserve. +/* Copyright (c) 2016 PaddlePaddle Authors. All Rights Reserved. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/paddle/parameter/Weight.h b/paddle/parameter/Weight.h index 6e7a49154e8..7314c29d0db 100644 --- a/paddle/parameter/Weight.h +++ b/paddle/parameter/Weight.h @@ -1,4 +1,4 @@ -/* Copyright (c) 2016 PaddlePaddle Authors. All Rights Reserve. +/* Copyright (c) 2016 PaddlePaddle Authors. All Rights Reserved. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/paddle/parameter/tests/test_argument.cpp b/paddle/parameter/tests/test_argument.cpp index 19df6ea9574..54ceb3e0871 100644 --- a/paddle/parameter/tests/test_argument.cpp +++ b/paddle/parameter/tests/test_argument.cpp @@ -1,4 +1,4 @@ -/* Copyright (c) 2016 PaddlePaddle Authors. All Rights Reserve. +/* Copyright (c) 2016 PaddlePaddle Authors. All Rights Reserved. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/paddle/parameter/tests/test_common.cpp b/paddle/parameter/tests/test_common.cpp index 64d204aea10..6e10becabbb 100644 --- a/paddle/parameter/tests/test_common.cpp +++ b/paddle/parameter/tests/test_common.cpp @@ -1,4 +1,4 @@ -/* Copyright (c) 2016 PaddlePaddle Authors. All Rights Reserve. +/* Copyright (c) 2016 PaddlePaddle Authors. All Rights Reserved. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/paddle/pserver/BaseClient.cpp b/paddle/pserver/BaseClient.cpp index 0e031a7e20c..a6204ef47ea 100644 --- a/paddle/pserver/BaseClient.cpp +++ b/paddle/pserver/BaseClient.cpp @@ -1,4 +1,4 @@ -/* Copyright (c) 2016 PaddlePaddle Authors. All Rights Reserve. +/* Copyright (c) 2016 PaddlePaddle Authors. All Rights Reserved. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/paddle/pserver/BaseClient.h b/paddle/pserver/BaseClient.h index 667bc451d16..a932d34712f 100644 --- a/paddle/pserver/BaseClient.h +++ b/paddle/pserver/BaseClient.h @@ -1,4 +1,4 @@ -/* Copyright (c) 2016 PaddlePaddle Authors. All Rights Reserve. +/* Copyright (c) 2016 PaddlePaddle Authors. All Rights Reserved. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/paddle/pserver/LightNetwork.cpp b/paddle/pserver/LightNetwork.cpp index 0e8e5a83a47..4c0da2217e8 100644 --- a/paddle/pserver/LightNetwork.cpp +++ b/paddle/pserver/LightNetwork.cpp @@ -1,4 +1,4 @@ -/* Copyright (c) 2016 PaddlePaddle Authors. All Rights Reserve. +/* Copyright (c) 2016 PaddlePaddle Authors. All Rights Reserved. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/paddle/pserver/LightNetwork.h b/paddle/pserver/LightNetwork.h index c4a06deb940..2aaa26a5c70 100644 --- a/paddle/pserver/LightNetwork.h +++ b/paddle/pserver/LightNetwork.h @@ -1,4 +1,4 @@ -/* Copyright (c) 2016 PaddlePaddle Authors. All Rights Reserve. +/* Copyright (c) 2016 PaddlePaddle Authors. All Rights Reserved. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/paddle/pserver/ParameterClient2.cpp b/paddle/pserver/ParameterClient2.cpp index 9562c649867..43e4902b0f0 100644 --- a/paddle/pserver/ParameterClient2.cpp +++ b/paddle/pserver/ParameterClient2.cpp @@ -1,4 +1,4 @@ -/* Copyright (c) 2016 PaddlePaddle Authors. All Rights Reserve. +/* Copyright (c) 2016 PaddlePaddle Authors. All Rights Reserved. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/paddle/pserver/ParameterClient2.h b/paddle/pserver/ParameterClient2.h index 29b9eeacddf..d63273ccbc8 100644 --- a/paddle/pserver/ParameterClient2.h +++ b/paddle/pserver/ParameterClient2.h @@ -1,4 +1,4 @@ -/* Copyright (c) 2016 PaddlePaddle Authors. All Rights Reserve. +/* Copyright (c) 2016 PaddlePaddle Authors. All Rights Reserved. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/paddle/pserver/ParameterServer2.cpp b/paddle/pserver/ParameterServer2.cpp index 54f5c4c0fb4..f8814714c29 100644 --- a/paddle/pserver/ParameterServer2.cpp +++ b/paddle/pserver/ParameterServer2.cpp @@ -1,4 +1,4 @@ -/* Copyright (c) 2016 PaddlePaddle Authors. All Rights Reserve. +/* Copyright (c) 2016 PaddlePaddle Authors. All Rights Reserved. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/paddle/pserver/ParameterServer2.h b/paddle/pserver/ParameterServer2.h index f7d3587b88c..3ed06b6b045 100644 --- a/paddle/pserver/ParameterServer2.h +++ b/paddle/pserver/ParameterServer2.h @@ -1,4 +1,4 @@ -/* Copyright (c) 2016 PaddlePaddle Authors. All Rights Reserve. +/* Copyright (c) 2016 PaddlePaddle Authors. All Rights Reserved. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/paddle/pserver/ParameterServer2Main.cpp b/paddle/pserver/ParameterServer2Main.cpp index 845a2c27e24..dfbae0cd0f5 100644 --- a/paddle/pserver/ParameterServer2Main.cpp +++ b/paddle/pserver/ParameterServer2Main.cpp @@ -1,4 +1,4 @@ -/* Copyright (c) 2016 PaddlePaddle Authors. All Rights Reserve. +/* Copyright (c) 2016 PaddlePaddle Authors. All Rights Reserved. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/paddle/pserver/ParameterServerController.cpp b/paddle/pserver/ParameterServerController.cpp index 1d11a2e1acb..2a7dcc15aa6 100644 --- a/paddle/pserver/ParameterServerController.cpp +++ b/paddle/pserver/ParameterServerController.cpp @@ -1,4 +1,4 @@ -/* Copyright (c) 2016 PaddlePaddle Authors. All Rights Reserve. +/* Copyright (c) 2016 PaddlePaddle Authors. All Rights Reserved. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/paddle/pserver/ParameterServerController.h b/paddle/pserver/ParameterServerController.h index fe9bb0b4d02..3a9bc74edf2 100644 --- a/paddle/pserver/ParameterServerController.h +++ b/paddle/pserver/ParameterServerController.h @@ -1,4 +1,4 @@ -/* Copyright (c) 2016 PaddlePaddle Authors. All Rights Reserve. +/* Copyright (c) 2016 PaddlePaddle Authors. All Rights Reserved. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/paddle/pserver/ProtoServer.cpp b/paddle/pserver/ProtoServer.cpp index 410317ece28..6b7948a7d0a 100644 --- a/paddle/pserver/ProtoServer.cpp +++ b/paddle/pserver/ProtoServer.cpp @@ -1,4 +1,4 @@ -/* Copyright (c) 2016 PaddlePaddle Authors. All Rights Reserve. +/* Copyright (c) 2016 PaddlePaddle Authors. All Rights Reserved. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/paddle/pserver/ProtoServer.h b/paddle/pserver/ProtoServer.h index 3acdcc27dab..3f78799dbfe 100644 --- a/paddle/pserver/ProtoServer.h +++ b/paddle/pserver/ProtoServer.h @@ -1,4 +1,4 @@ -/* Copyright (c) 2016 PaddlePaddle Authors. All Rights Reserve. +/* Copyright (c) 2016 PaddlePaddle Authors. All Rights Reserved. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/paddle/pserver/RDMANetwork.h b/paddle/pserver/RDMANetwork.h index caef65134bf..83db6b9df71 100644 --- a/paddle/pserver/RDMANetwork.h +++ b/paddle/pserver/RDMANetwork.h @@ -1,4 +1,4 @@ -/* Copyright (c) 2016 PaddlePaddle Authors. All Rights Reserve. +/* Copyright (c) 2016 PaddlePaddle Authors. All Rights Reserved. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/paddle/pserver/SocketChannel.cpp b/paddle/pserver/SocketChannel.cpp index 12e3bc6552f..72e6943408a 100644 --- a/paddle/pserver/SocketChannel.cpp +++ b/paddle/pserver/SocketChannel.cpp @@ -1,4 +1,4 @@ -/* Copyright (c) 2016 PaddlePaddle Authors. All Rights Reserve. +/* Copyright (c) 2016 PaddlePaddle Authors. All Rights Reserved. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/paddle/pserver/SocketChannel.h b/paddle/pserver/SocketChannel.h index 6c3dd20d7be..c0f30d0db76 100644 --- a/paddle/pserver/SocketChannel.h +++ b/paddle/pserver/SocketChannel.h @@ -1,4 +1,4 @@ -/* Copyright (c) 2016 PaddlePaddle Authors. All Rights Reserve. +/* Copyright (c) 2016 PaddlePaddle Authors. All Rights Reserved. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/paddle/pserver/SparseParameterDistribution.cpp b/paddle/pserver/SparseParameterDistribution.cpp index 6dd725db30c..bb247f389cc 100644 --- a/paddle/pserver/SparseParameterDistribution.cpp +++ b/paddle/pserver/SparseParameterDistribution.cpp @@ -1,4 +1,4 @@ -/* Copyright (c) 2016 PaddlePaddle Authors. All Rights Reserve. +/* Copyright (c) 2016 PaddlePaddle Authors. All Rights Reserved. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/paddle/pserver/SparseParameterDistribution.h b/paddle/pserver/SparseParameterDistribution.h index 24b14106cf6..13f199548d5 100644 --- a/paddle/pserver/SparseParameterDistribution.h +++ b/paddle/pserver/SparseParameterDistribution.h @@ -1,4 +1,4 @@ -/* Copyright (c) 2016 PaddlePaddle Authors. All Rights Reserve. +/* Copyright (c) 2016 PaddlePaddle Authors. All Rights Reserved. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/paddle/pserver/test/SocketTest.cpp b/paddle/pserver/test/SocketTest.cpp index b43461d61ba..6019dccaadf 100644 --- a/paddle/pserver/test/SocketTest.cpp +++ b/paddle/pserver/test/SocketTest.cpp @@ -1,4 +1,4 @@ -/* Copyright (c) 2016 PaddlePaddle Authors. All Rights Reserve. +/* Copyright (c) 2016 PaddlePaddle Authors. All Rights Reserved. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/paddle/pserver/test/test_ParameterServer2.cpp b/paddle/pserver/test/test_ParameterServer2.cpp index 8e7231a9e1a..e742cd0871d 100644 --- a/paddle/pserver/test/test_ParameterServer2.cpp +++ b/paddle/pserver/test/test_ParameterServer2.cpp @@ -1,4 +1,4 @@ -/* Copyright (c) 2016 PaddlePaddle Authors. All Rights Reserve. +/* Copyright (c) 2016 PaddlePaddle Authors. All Rights Reserved. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/paddle/pserver/test/test_ProtoServer.cpp b/paddle/pserver/test/test_ProtoServer.cpp index ad8ffed9c1c..d68a8d2180c 100644 --- a/paddle/pserver/test/test_ProtoServer.cpp +++ b/paddle/pserver/test/test_ProtoServer.cpp @@ -1,4 +1,4 @@ -/* Copyright (c) 2016 PaddlePaddle Authors. All Rights Reserve. +/* Copyright (c) 2016 PaddlePaddle Authors. All Rights Reserved. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/proto/DataConfig.proto b/proto/DataConfig.proto index 0cb5d7afbb3..1b2aa8e726d 100644 --- a/proto/DataConfig.proto +++ b/proto/DataConfig.proto @@ -1,4 +1,4 @@ -/* Copyright (c) 2016 PaddlePaddle Authors. All Rights Reserve. +/* Copyright (c) 2016 PaddlePaddle Authors. All Rights Reserved. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/proto/DataFormat.proto b/proto/DataFormat.proto index 7d963bc29f7..46b1f58bdb8 100644 --- a/proto/DataFormat.proto +++ b/proto/DataFormat.proto @@ -1,4 +1,4 @@ -/* Copyright (c) 2016 PaddlePaddle Authors. All Rights Reserve. +/* Copyright (c) 2016 PaddlePaddle Authors. All Rights Reserved. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/proto/ModelConfig.proto b/proto/ModelConfig.proto index 1fbdd5bbd82..d699984ff2d 100644 --- a/proto/ModelConfig.proto +++ b/proto/ModelConfig.proto @@ -1,4 +1,4 @@ -/* Copyright (c) 2016 PaddlePaddle Authors. All Rights Reserve. +/* Copyright (c) 2016 PaddlePaddle Authors. All Rights Reserved. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/proto/OptimizerConfig.proto b/proto/OptimizerConfig.proto index b341d78d194..e9ea1bfbcc6 100644 --- a/proto/OptimizerConfig.proto +++ b/proto/OptimizerConfig.proto @@ -1,4 +1,4 @@ -// Copyright (c) 2018 PaddlePaddle Authors. All Rights Reserve. +// Copyright (c) 2018 PaddlePaddle Authors. All Rights Reserved. // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. diff --git a/proto/ParameterConfig.proto b/proto/ParameterConfig.proto index b13570a2c6e..6f8ba9d7605 100644 --- a/proto/ParameterConfig.proto +++ b/proto/ParameterConfig.proto @@ -1,4 +1,4 @@ -/* Copyright (c) 2016 PaddlePaddle Authors. All Rights Reserve. +/* Copyright (c) 2016 PaddlePaddle Authors. All Rights Reserved. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/proto/ParameterServerConfig.proto b/proto/ParameterServerConfig.proto index bd63cf35b14..1404c8aa143 100644 --- a/proto/ParameterServerConfig.proto +++ b/proto/ParameterServerConfig.proto @@ -1,4 +1,4 @@ -/* Copyright (c) 2016 PaddlePaddle Authors. All Rights Reserve. +/* Copyright (c) 2016 PaddlePaddle Authors. All Rights Reserved. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. @@ -47,4 +47,4 @@ message ParameterServerConfig { // if async_lagged_grad_discard_ratio is not set in trainer_config.conf // use it as defalut value required double async_lagged_ratio_default = 9 [ default = 1.5 ]; -} \ No newline at end of file +} diff --git a/proto/ParameterService.proto b/proto/ParameterService.proto index e3c180ccc3f..b56c1bfe7ca 100644 --- a/proto/ParameterService.proto +++ b/proto/ParameterService.proto @@ -1,4 +1,4 @@ -/* Copyright (c) 2016 PaddlePaddle Authors. All Rights Reserve. +/* Copyright (c) 2016 PaddlePaddle Authors. All Rights Reserved. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/proto/TrainerConfig.proto b/proto/TrainerConfig.proto index aa4e5f4ca09..9cc20b4a3ef 100644 --- a/proto/TrainerConfig.proto +++ b/proto/TrainerConfig.proto @@ -1,4 +1,4 @@ -/* Copyright (c) 2016 PaddlePaddle Authors. All Rights Reserve. +/* Copyright (c) 2016 PaddlePaddle Authors. All Rights Reserved. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/python/paddle/trainer_config_helpers/tests/ProtobufEqualMain.cpp b/python/paddle/trainer_config_helpers/tests/ProtobufEqualMain.cpp index fc53422afd4..7b10e0b7a60 100644 --- a/python/paddle/trainer_config_helpers/tests/ProtobufEqualMain.cpp +++ b/python/paddle/trainer_config_helpers/tests/ProtobufEqualMain.cpp @@ -1,4 +1,4 @@ -/* Copyright (c) 2016 PaddlePaddle Authors. All Rights Reserve. +/* Copyright (c) 2016 PaddlePaddle Authors. All Rights Reserved. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/python/paddle/trainer_config_helpers/tests/configs/img_layers.py b/python/paddle/trainer_config_helpers/tests/configs/img_layers.py index 93b505a6023..767b6454242 100644 --- a/python/paddle/trainer_config_helpers/tests/configs/img_layers.py +++ b/python/paddle/trainer_config_helpers/tests/configs/img_layers.py @@ -1,4 +1,4 @@ -# Copyright (c) 2018 PaddlePaddle Authors. All Rights Reserve. +# Copyright (c) 2018 PaddlePaddle Authors. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/python/paddle/trainer_config_helpers/tests/configs/img_trans_layers.py b/python/paddle/trainer_config_helpers/tests/configs/img_trans_layers.py index 745f060fa55..e17c8fa7c0a 100644 --- a/python/paddle/trainer_config_helpers/tests/configs/img_trans_layers.py +++ b/python/paddle/trainer_config_helpers/tests/configs/img_trans_layers.py @@ -1,4 +1,4 @@ -# Copyright (c) 2018 PaddlePaddle Authors. All Rights Reserve. +# Copyright (c) 2018 PaddlePaddle Authors. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/python/paddle/trainer_config_helpers/tests/configs/last_first_seq.py b/python/paddle/trainer_config_helpers/tests/configs/last_first_seq.py index b6fc8f70f96..5b6d2627e43 100644 --- a/python/paddle/trainer_config_helpers/tests/configs/last_first_seq.py +++ b/python/paddle/trainer_config_helpers/tests/configs/last_first_seq.py @@ -1,4 +1,4 @@ -# Copyright (c) 2018 PaddlePaddle Authors. All Rights Reserve. +# Copyright (c) 2018 PaddlePaddle Authors. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/python/paddle/trainer_config_helpers/tests/configs/layer_activations.py b/python/paddle/trainer_config_helpers/tests/configs/layer_activations.py index 6edc03bba0b..ac1f7e02c09 100644 --- a/python/paddle/trainer_config_helpers/tests/configs/layer_activations.py +++ b/python/paddle/trainer_config_helpers/tests/configs/layer_activations.py @@ -1,4 +1,4 @@ -# Copyright (c) 2018 PaddlePaddle Authors. All Rights Reserve. +# Copyright (c) 2018 PaddlePaddle Authors. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/python/paddle/trainer_config_helpers/tests/configs/math_ops.py b/python/paddle/trainer_config_helpers/tests/configs/math_ops.py index 59a71e1cd1d..29dc634fb39 100644 --- a/python/paddle/trainer_config_helpers/tests/configs/math_ops.py +++ b/python/paddle/trainer_config_helpers/tests/configs/math_ops.py @@ -1,4 +1,4 @@ -# Copyright (c) 2018 PaddlePaddle Authors. All Rights Reserve. +# Copyright (c) 2018 PaddlePaddle Authors. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/python/paddle/trainer_config_helpers/tests/configs/projections.py b/python/paddle/trainer_config_helpers/tests/configs/projections.py index 96f06b40180..3b7a196d1c1 100644 --- a/python/paddle/trainer_config_helpers/tests/configs/projections.py +++ b/python/paddle/trainer_config_helpers/tests/configs/projections.py @@ -1,4 +1,4 @@ -# Copyright (c) 2018 PaddlePaddle Authors. All Rights Reserve. +# Copyright (c) 2018 PaddlePaddle Authors. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/python/paddle/trainer_config_helpers/tests/configs/shared_fc.py b/python/paddle/trainer_config_helpers/tests/configs/shared_fc.py index 69a0a5b8ff5..3229252a2f4 100644 --- a/python/paddle/trainer_config_helpers/tests/configs/shared_fc.py +++ b/python/paddle/trainer_config_helpers/tests/configs/shared_fc.py @@ -1,4 +1,4 @@ -# Copyright (c) 2018 PaddlePaddle Authors. All Rights Reserve. +# Copyright (c) 2018 PaddlePaddle Authors. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/python/paddle/trainer_config_helpers/tests/configs/shared_gru.py b/python/paddle/trainer_config_helpers/tests/configs/shared_gru.py index 97b41fb3725..dff561fdf78 100644 --- a/python/paddle/trainer_config_helpers/tests/configs/shared_gru.py +++ b/python/paddle/trainer_config_helpers/tests/configs/shared_gru.py @@ -1,4 +1,4 @@ -# Copyright (c) 2018 PaddlePaddle Authors. All Rights Reserve. +# Copyright (c) 2018 PaddlePaddle Authors. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/python/paddle/trainer_config_helpers/tests/configs/shared_lstm.py b/python/paddle/trainer_config_helpers/tests/configs/shared_lstm.py index 4e653dedb9d..97ef2d07ae8 100644 --- a/python/paddle/trainer_config_helpers/tests/configs/shared_lstm.py +++ b/python/paddle/trainer_config_helpers/tests/configs/shared_lstm.py @@ -1,4 +1,4 @@ -# Copyright (c) 2018 PaddlePaddle Authors. All Rights Reserve. +# Copyright (c) 2018 PaddlePaddle Authors. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/python/paddle/trainer_config_helpers/tests/configs/simple_rnn_layers.py b/python/paddle/trainer_config_helpers/tests/configs/simple_rnn_layers.py index dc418325f88..f882efcba21 100644 --- a/python/paddle/trainer_config_helpers/tests/configs/simple_rnn_layers.py +++ b/python/paddle/trainer_config_helpers/tests/configs/simple_rnn_layers.py @@ -1,4 +1,4 @@ -# Copyright (c) 2018 PaddlePaddle Authors. All Rights Reserve. +# Copyright (c) 2018 PaddlePaddle Authors. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/python/paddle/trainer_config_helpers/tests/configs/test_BatchNorm3D.py b/python/paddle/trainer_config_helpers/tests/configs/test_BatchNorm3D.py index 5b98e3fb348..169038deb19 100644 --- a/python/paddle/trainer_config_helpers/tests/configs/test_BatchNorm3D.py +++ b/python/paddle/trainer_config_helpers/tests/configs/test_BatchNorm3D.py @@ -1,4 +1,4 @@ -# Copyright (c) 2018 PaddlePaddle Authors. All Rights Reserve. +# Copyright (c) 2018 PaddlePaddle Authors. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/python/paddle/trainer_config_helpers/tests/configs/test_bi_grumemory.py b/python/paddle/trainer_config_helpers/tests/configs/test_bi_grumemory.py index f3abdfe1ae7..d29e4e5c4d6 100644 --- a/python/paddle/trainer_config_helpers/tests/configs/test_bi_grumemory.py +++ b/python/paddle/trainer_config_helpers/tests/configs/test_bi_grumemory.py @@ -1,4 +1,4 @@ -# Copyright (c) 2018 PaddlePaddle Authors. All Rights Reserve. +# Copyright (c) 2018 PaddlePaddle Authors. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/python/paddle/trainer_config_helpers/tests/configs/test_bilinear_interp.py b/python/paddle/trainer_config_helpers/tests/configs/test_bilinear_interp.py index 4eb9f207e0c..5e724ba7d17 100644 --- a/python/paddle/trainer_config_helpers/tests/configs/test_bilinear_interp.py +++ b/python/paddle/trainer_config_helpers/tests/configs/test_bilinear_interp.py @@ -1,4 +1,4 @@ -# Copyright (c) 2018 PaddlePaddle Authors. All Rights Reserve. +# Copyright (c) 2018 PaddlePaddle Authors. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/python/paddle/trainer_config_helpers/tests/configs/test_clip_layer.py b/python/paddle/trainer_config_helpers/tests/configs/test_clip_layer.py index 24564c105f9..95a1192bfae 100644 --- a/python/paddle/trainer_config_helpers/tests/configs/test_clip_layer.py +++ b/python/paddle/trainer_config_helpers/tests/configs/test_clip_layer.py @@ -1,4 +1,4 @@ -# Copyright (c) 2018 PaddlePaddle Authors. All Rights Reserve. +# Copyright (c) 2018 PaddlePaddle Authors. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/python/paddle/trainer_config_helpers/tests/configs/test_conv3d_layer.py b/python/paddle/trainer_config_helpers/tests/configs/test_conv3d_layer.py index 35087c42289..f9966e399e7 100644 --- a/python/paddle/trainer_config_helpers/tests/configs/test_conv3d_layer.py +++ b/python/paddle/trainer_config_helpers/tests/configs/test_conv3d_layer.py @@ -1,4 +1,4 @@ -# Copyright (c) 2018 PaddlePaddle Authors. All Rights Reserve. +# Copyright (c) 2018 PaddlePaddle Authors. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/python/paddle/trainer_config_helpers/tests/configs/test_cost_layers.py b/python/paddle/trainer_config_helpers/tests/configs/test_cost_layers.py index b076b89106e..351694fd55c 100644 --- a/python/paddle/trainer_config_helpers/tests/configs/test_cost_layers.py +++ b/python/paddle/trainer_config_helpers/tests/configs/test_cost_layers.py @@ -1,4 +1,4 @@ -# Copyright (c) 2018 PaddlePaddle Authors. All Rights Reserve. +# Copyright (c) 2018 PaddlePaddle Authors. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/python/paddle/trainer_config_helpers/tests/configs/test_cost_layers_with_weight.py b/python/paddle/trainer_config_helpers/tests/configs/test_cost_layers_with_weight.py index fa7a1abe9a1..8cbcf5de0a3 100644 --- a/python/paddle/trainer_config_helpers/tests/configs/test_cost_layers_with_weight.py +++ b/python/paddle/trainer_config_helpers/tests/configs/test_cost_layers_with_weight.py @@ -1,4 +1,4 @@ -# Copyright (c) 2018 PaddlePaddle Authors. All Rights Reserve. +# Copyright (c) 2018 PaddlePaddle Authors. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/python/paddle/trainer_config_helpers/tests/configs/test_crop.py b/python/paddle/trainer_config_helpers/tests/configs/test_crop.py index 569d747857d..b4ffff252bb 100644 --- a/python/paddle/trainer_config_helpers/tests/configs/test_crop.py +++ b/python/paddle/trainer_config_helpers/tests/configs/test_crop.py @@ -1,4 +1,4 @@ -# Copyright (c) 2018 PaddlePaddle Authors. All Rights Reserve. +# Copyright (c) 2018 PaddlePaddle Authors. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/python/paddle/trainer_config_helpers/tests/configs/test_deconv3d_layer.py b/python/paddle/trainer_config_helpers/tests/configs/test_deconv3d_layer.py index 4f27d998734..08e701c7a8d 100644 --- a/python/paddle/trainer_config_helpers/tests/configs/test_deconv3d_layer.py +++ b/python/paddle/trainer_config_helpers/tests/configs/test_deconv3d_layer.py @@ -1,4 +1,4 @@ -# Copyright (c) 2018 PaddlePaddle Authors. All Rights Reserve. +# Copyright (c) 2018 PaddlePaddle Authors. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/python/paddle/trainer_config_helpers/tests/configs/test_detection_output_layer.py b/python/paddle/trainer_config_helpers/tests/configs/test_detection_output_layer.py index d37954222ed..4ecd1c2b7e0 100644 --- a/python/paddle/trainer_config_helpers/tests/configs/test_detection_output_layer.py +++ b/python/paddle/trainer_config_helpers/tests/configs/test_detection_output_layer.py @@ -1,4 +1,4 @@ -# Copyright (c) 2018 PaddlePaddle Authors. All Rights Reserve. +# Copyright (c) 2018 PaddlePaddle Authors. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/python/paddle/trainer_config_helpers/tests/configs/test_dot_prod_layer.py b/python/paddle/trainer_config_helpers/tests/configs/test_dot_prod_layer.py index 63ba0a72b9e..9b444bc2c02 100644 --- a/python/paddle/trainer_config_helpers/tests/configs/test_dot_prod_layer.py +++ b/python/paddle/trainer_config_helpers/tests/configs/test_dot_prod_layer.py @@ -1,4 +1,4 @@ -# Copyright (c) 2018 PaddlePaddle Authors. All Rights Reserve. +# Copyright (c) 2018 PaddlePaddle Authors. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/python/paddle/trainer_config_helpers/tests/configs/test_expand_layer.py b/python/paddle/trainer_config_helpers/tests/configs/test_expand_layer.py index 9892bca05d5..85101d2b927 100644 --- a/python/paddle/trainer_config_helpers/tests/configs/test_expand_layer.py +++ b/python/paddle/trainer_config_helpers/tests/configs/test_expand_layer.py @@ -1,4 +1,4 @@ -# Copyright (c) 2018 PaddlePaddle Authors. All Rights Reserve. +# Copyright (c) 2018 PaddlePaddle Authors. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/python/paddle/trainer_config_helpers/tests/configs/test_factorization_machine.py b/python/paddle/trainer_config_helpers/tests/configs/test_factorization_machine.py index 6fb773d9f73..48ac46c5bb6 100644 --- a/python/paddle/trainer_config_helpers/tests/configs/test_factorization_machine.py +++ b/python/paddle/trainer_config_helpers/tests/configs/test_factorization_machine.py @@ -1,4 +1,4 @@ -# Copyright (c) 2018 PaddlePaddle Authors. All Rights Reserve. +# Copyright (c) 2018 PaddlePaddle Authors. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/python/paddle/trainer_config_helpers/tests/configs/test_fc.py b/python/paddle/trainer_config_helpers/tests/configs/test_fc.py index 4dd37d02425..f1e454d2112 100644 --- a/python/paddle/trainer_config_helpers/tests/configs/test_fc.py +++ b/python/paddle/trainer_config_helpers/tests/configs/test_fc.py @@ -1,4 +1,4 @@ -# Copyright (c) 2018 PaddlePaddle Authors. All Rights Reserve. +# Copyright (c) 2018 PaddlePaddle Authors. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/python/paddle/trainer_config_helpers/tests/configs/test_gated_unit_layer.py b/python/paddle/trainer_config_helpers/tests/configs/test_gated_unit_layer.py index 082646b9d3d..afc3e9207c5 100644 --- a/python/paddle/trainer_config_helpers/tests/configs/test_gated_unit_layer.py +++ b/python/paddle/trainer_config_helpers/tests/configs/test_gated_unit_layer.py @@ -1,4 +1,4 @@ -# Copyright (c) 2018 PaddlePaddle Authors. All Rights Reserve. +# Copyright (c) 2018 PaddlePaddle Authors. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/python/paddle/trainer_config_helpers/tests/configs/test_grumemory_layer.py b/python/paddle/trainer_config_helpers/tests/configs/test_grumemory_layer.py index f5271b82804..ac9902d08c6 100644 --- a/python/paddle/trainer_config_helpers/tests/configs/test_grumemory_layer.py +++ b/python/paddle/trainer_config_helpers/tests/configs/test_grumemory_layer.py @@ -1,4 +1,4 @@ -# Copyright (c) 2018 PaddlePaddle Authors. All Rights Reserve. +# Copyright (c) 2018 PaddlePaddle Authors. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/python/paddle/trainer_config_helpers/tests/configs/test_hsigmoid.py b/python/paddle/trainer_config_helpers/tests/configs/test_hsigmoid.py index ad86d7d5bd5..da781c149b8 100644 --- a/python/paddle/trainer_config_helpers/tests/configs/test_hsigmoid.py +++ b/python/paddle/trainer_config_helpers/tests/configs/test_hsigmoid.py @@ -1,4 +1,4 @@ -# Copyright (c) 2018 PaddlePaddle Authors. All Rights Reserve. +# Copyright (c) 2018 PaddlePaddle Authors. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/python/paddle/trainer_config_helpers/tests/configs/test_l2_distance_layer.py b/python/paddle/trainer_config_helpers/tests/configs/test_l2_distance_layer.py index 1796e1c6b6d..42c9b5deea7 100644 --- a/python/paddle/trainer_config_helpers/tests/configs/test_l2_distance_layer.py +++ b/python/paddle/trainer_config_helpers/tests/configs/test_l2_distance_layer.py @@ -1,4 +1,4 @@ -# Copyright (c) 2018 PaddlePaddle Authors. All Rights Reserve. +# Copyright (c) 2018 PaddlePaddle Authors. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/python/paddle/trainer_config_helpers/tests/configs/test_lstmemory_layer.py b/python/paddle/trainer_config_helpers/tests/configs/test_lstmemory_layer.py index 7484818ab24..26eeea5461f 100644 --- a/python/paddle/trainer_config_helpers/tests/configs/test_lstmemory_layer.py +++ b/python/paddle/trainer_config_helpers/tests/configs/test_lstmemory_layer.py @@ -1,4 +1,4 @@ -# Copyright (c) 2018 PaddlePaddle Authors. All Rights Reserve. +# Copyright (c) 2018 PaddlePaddle Authors. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/python/paddle/trainer_config_helpers/tests/configs/test_maxout.py b/python/paddle/trainer_config_helpers/tests/configs/test_maxout.py index 22788be2e90..2cd41a306a7 100644 --- a/python/paddle/trainer_config_helpers/tests/configs/test_maxout.py +++ b/python/paddle/trainer_config_helpers/tests/configs/test_maxout.py @@ -1,4 +1,4 @@ -# Copyright (c) 2018 PaddlePaddle Authors. All Rights Reserve. +# Copyright (c) 2018 PaddlePaddle Authors. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/python/paddle/trainer_config_helpers/tests/configs/test_multibox_loss_layer.py b/python/paddle/trainer_config_helpers/tests/configs/test_multibox_loss_layer.py index 0dcccc49e43..b4fd9052c41 100644 --- a/python/paddle/trainer_config_helpers/tests/configs/test_multibox_loss_layer.py +++ b/python/paddle/trainer_config_helpers/tests/configs/test_multibox_loss_layer.py @@ -1,4 +1,4 @@ -# Copyright (c) 2018 PaddlePaddle Authors. All Rights Reserve. +# Copyright (c) 2018 PaddlePaddle Authors. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/python/paddle/trainer_config_helpers/tests/configs/test_multiplex_layer.py b/python/paddle/trainer_config_helpers/tests/configs/test_multiplex_layer.py index 046d38741e8..bfba07be869 100644 --- a/python/paddle/trainer_config_helpers/tests/configs/test_multiplex_layer.py +++ b/python/paddle/trainer_config_helpers/tests/configs/test_multiplex_layer.py @@ -1,4 +1,4 @@ -# Copyright (c) 2018 PaddlePaddle Authors. All Rights Reserve. +# Copyright (c) 2018 PaddlePaddle Authors. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/python/paddle/trainer_config_helpers/tests/configs/test_ntm_layers.py b/python/paddle/trainer_config_helpers/tests/configs/test_ntm_layers.py index d81128c77c3..891894172c5 100644 --- a/python/paddle/trainer_config_helpers/tests/configs/test_ntm_layers.py +++ b/python/paddle/trainer_config_helpers/tests/configs/test_ntm_layers.py @@ -1,4 +1,4 @@ -# Copyright (c) 2018 PaddlePaddle Authors. All Rights Reserve. +# Copyright (c) 2018 PaddlePaddle Authors. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/python/paddle/trainer_config_helpers/tests/configs/test_pad.py b/python/paddle/trainer_config_helpers/tests/configs/test_pad.py index 44b0b34d5ad..c5825c82e5b 100644 --- a/python/paddle/trainer_config_helpers/tests/configs/test_pad.py +++ b/python/paddle/trainer_config_helpers/tests/configs/test_pad.py @@ -1,4 +1,4 @@ -# Copyright (c) 2018 PaddlePaddle Authors. All Rights Reserve. +# Copyright (c) 2018 PaddlePaddle Authors. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/python/paddle/trainer_config_helpers/tests/configs/test_pooling3D_layer.py b/python/paddle/trainer_config_helpers/tests/configs/test_pooling3D_layer.py index e257e735ad2..5ff52c195a4 100644 --- a/python/paddle/trainer_config_helpers/tests/configs/test_pooling3D_layer.py +++ b/python/paddle/trainer_config_helpers/tests/configs/test_pooling3D_layer.py @@ -1,4 +1,4 @@ -# Copyright (c) 2018 PaddlePaddle Authors. All Rights Reserve. +# Copyright (c) 2018 PaddlePaddle Authors. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/python/paddle/trainer_config_helpers/tests/configs/test_prelu_layer.py b/python/paddle/trainer_config_helpers/tests/configs/test_prelu_layer.py index 098e2397ece..d803a0d13d5 100644 --- a/python/paddle/trainer_config_helpers/tests/configs/test_prelu_layer.py +++ b/python/paddle/trainer_config_helpers/tests/configs/test_prelu_layer.py @@ -1,4 +1,4 @@ -# Copyright (c) 2018 PaddlePaddle Authors. All Rights Reserve. +# Copyright (c) 2018 PaddlePaddle Authors. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/python/paddle/trainer_config_helpers/tests/configs/test_print_layer.py b/python/paddle/trainer_config_helpers/tests/configs/test_print_layer.py index 714d8893e95..ca1f5a45724 100644 --- a/python/paddle/trainer_config_helpers/tests/configs/test_print_layer.py +++ b/python/paddle/trainer_config_helpers/tests/configs/test_print_layer.py @@ -1,4 +1,4 @@ -# Copyright (c) 2018 PaddlePaddle Authors. All Rights Reserve. +# Copyright (c) 2018 PaddlePaddle Authors. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/python/paddle/trainer_config_helpers/tests/configs/test_recursive_topology.py b/python/paddle/trainer_config_helpers/tests/configs/test_recursive_topology.py index 188a3d2320f..d44870d804f 100644 --- a/python/paddle/trainer_config_helpers/tests/configs/test_recursive_topology.py +++ b/python/paddle/trainer_config_helpers/tests/configs/test_recursive_topology.py @@ -1,4 +1,4 @@ -# Copyright (c) 2018 PaddlePaddle Authors. All Rights Reserve. +# Copyright (c) 2018 PaddlePaddle Authors. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/python/paddle/trainer_config_helpers/tests/configs/test_repeat_layer.py b/python/paddle/trainer_config_helpers/tests/configs/test_repeat_layer.py index 93b673afeec..ee90e830df1 100644 --- a/python/paddle/trainer_config_helpers/tests/configs/test_repeat_layer.py +++ b/python/paddle/trainer_config_helpers/tests/configs/test_repeat_layer.py @@ -1,4 +1,4 @@ -# Copyright (c) 2018 PaddlePaddle Authors. All Rights Reserve. +# Copyright (c) 2018 PaddlePaddle Authors. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/python/paddle/trainer_config_helpers/tests/configs/test_resize_layer.py b/python/paddle/trainer_config_helpers/tests/configs/test_resize_layer.py index 3a202974e3d..4aa81919dfd 100644 --- a/python/paddle/trainer_config_helpers/tests/configs/test_resize_layer.py +++ b/python/paddle/trainer_config_helpers/tests/configs/test_resize_layer.py @@ -1,4 +1,4 @@ -# Copyright (c) 2018 PaddlePaddle Authors. All Rights Reserve. +# Copyright (c) 2018 PaddlePaddle Authors. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/python/paddle/trainer_config_helpers/tests/configs/test_rnn_group.py b/python/paddle/trainer_config_helpers/tests/configs/test_rnn_group.py index 91074b8fdf3..3824ef59953 100644 --- a/python/paddle/trainer_config_helpers/tests/configs/test_rnn_group.py +++ b/python/paddle/trainer_config_helpers/tests/configs/test_rnn_group.py @@ -1,4 +1,4 @@ -# Copyright (c) 2018 PaddlePaddle Authors. All Rights Reserve. +# Copyright (c) 2018 PaddlePaddle Authors. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/python/paddle/trainer_config_helpers/tests/configs/test_roi_pool_layer.py b/python/paddle/trainer_config_helpers/tests/configs/test_roi_pool_layer.py index f0a37f7e992..6929d106c64 100644 --- a/python/paddle/trainer_config_helpers/tests/configs/test_roi_pool_layer.py +++ b/python/paddle/trainer_config_helpers/tests/configs/test_roi_pool_layer.py @@ -1,4 +1,4 @@ -# Copyright (c) 2018 PaddlePaddle Authors. All Rights Reserve. +# Copyright (c) 2018 PaddlePaddle Authors. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/python/paddle/trainer_config_helpers/tests/configs/test_row_conv.py b/python/paddle/trainer_config_helpers/tests/configs/test_row_conv.py index 68b1a991f35..6381a26fe84 100644 --- a/python/paddle/trainer_config_helpers/tests/configs/test_row_conv.py +++ b/python/paddle/trainer_config_helpers/tests/configs/test_row_conv.py @@ -1,4 +1,4 @@ -# Copyright (c) 2018 PaddlePaddle Authors. All Rights Reserve. +# Copyright (c) 2018 PaddlePaddle Authors. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/python/paddle/trainer_config_helpers/tests/configs/test_row_l2_norm_layer.py b/python/paddle/trainer_config_helpers/tests/configs/test_row_l2_norm_layer.py index c25393f580e..3c17d2ccfd6 100644 --- a/python/paddle/trainer_config_helpers/tests/configs/test_row_l2_norm_layer.py +++ b/python/paddle/trainer_config_helpers/tests/configs/test_row_l2_norm_layer.py @@ -1,4 +1,4 @@ -# Copyright (c) 2018 PaddlePaddle Authors. All Rights Reserve. +# Copyright (c) 2018 PaddlePaddle Authors. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/python/paddle/trainer_config_helpers/tests/configs/test_scale_shift_layer.py b/python/paddle/trainer_config_helpers/tests/configs/test_scale_shift_layer.py index 3691e8daeaa..ae8a25ba94d 100644 --- a/python/paddle/trainer_config_helpers/tests/configs/test_scale_shift_layer.py +++ b/python/paddle/trainer_config_helpers/tests/configs/test_scale_shift_layer.py @@ -1,4 +1,4 @@ -# Copyright (c) 2018 PaddlePaddle Authors. All Rights Reserve. +# Copyright (c) 2018 PaddlePaddle Authors. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/python/paddle/trainer_config_helpers/tests/configs/test_scale_sub_region_layer.py b/python/paddle/trainer_config_helpers/tests/configs/test_scale_sub_region_layer.py index 426afcf3a00..e4f7120bcce 100644 --- a/python/paddle/trainer_config_helpers/tests/configs/test_scale_sub_region_layer.py +++ b/python/paddle/trainer_config_helpers/tests/configs/test_scale_sub_region_layer.py @@ -1,4 +1,4 @@ -# Copyright (c) 2018 PaddlePaddle Authors. All Rights Reserve. +# Copyright (c) 2018 PaddlePaddle Authors. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/python/paddle/trainer_config_helpers/tests/configs/test_seq_concat_reshape.py b/python/paddle/trainer_config_helpers/tests/configs/test_seq_concat_reshape.py index 72960818573..a6be069e7e2 100644 --- a/python/paddle/trainer_config_helpers/tests/configs/test_seq_concat_reshape.py +++ b/python/paddle/trainer_config_helpers/tests/configs/test_seq_concat_reshape.py @@ -1,4 +1,4 @@ -# Copyright (c) 2018 PaddlePaddle Authors. All Rights Reserve. +# Copyright (c) 2018 PaddlePaddle Authors. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/python/paddle/trainer_config_helpers/tests/configs/test_sequence_pooling.py b/python/paddle/trainer_config_helpers/tests/configs/test_sequence_pooling.py index d13a5a84299..7b951a4cd79 100644 --- a/python/paddle/trainer_config_helpers/tests/configs/test_sequence_pooling.py +++ b/python/paddle/trainer_config_helpers/tests/configs/test_sequence_pooling.py @@ -1,4 +1,4 @@ -# Copyright (c) 2018 PaddlePaddle Authors. All Rights Reserve. +# Copyright (c) 2018 PaddlePaddle Authors. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/python/paddle/trainer_config_helpers/tests/configs/test_smooth_l1.py b/python/paddle/trainer_config_helpers/tests/configs/test_smooth_l1.py index 42225b85058..32a4e6f6d08 100644 --- a/python/paddle/trainer_config_helpers/tests/configs/test_smooth_l1.py +++ b/python/paddle/trainer_config_helpers/tests/configs/test_smooth_l1.py @@ -1,4 +1,4 @@ -# Copyright (c) 2018 PaddlePaddle Authors. All Rights Reserve. +# Copyright (c) 2018 PaddlePaddle Authors. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/python/paddle/trainer_config_helpers/tests/configs/test_split_datasource.py b/python/paddle/trainer_config_helpers/tests/configs/test_split_datasource.py index 7ebdf7408db..ea68b5493ee 100644 --- a/python/paddle/trainer_config_helpers/tests/configs/test_split_datasource.py +++ b/python/paddle/trainer_config_helpers/tests/configs/test_split_datasource.py @@ -1,4 +1,4 @@ -# Copyright (c) 2018 PaddlePaddle Authors. All Rights Reserve. +# Copyright (c) 2018 PaddlePaddle Authors. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/python/paddle/trainer_config_helpers/tests/configs/test_spp_layer.py b/python/paddle/trainer_config_helpers/tests/configs/test_spp_layer.py index 1f19ea77adf..0e692d4b62c 100644 --- a/python/paddle/trainer_config_helpers/tests/configs/test_spp_layer.py +++ b/python/paddle/trainer_config_helpers/tests/configs/test_spp_layer.py @@ -1,4 +1,4 @@ -# Copyright (c) 2018 PaddlePaddle Authors. All Rights Reserve. +# Copyright (c) 2018 PaddlePaddle Authors. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/python/paddle/trainer_config_helpers/tests/configs/unused_layers.py b/python/paddle/trainer_config_helpers/tests/configs/unused_layers.py index 8581ba60ab9..8878e73fff6 100644 --- a/python/paddle/trainer_config_helpers/tests/configs/unused_layers.py +++ b/python/paddle/trainer_config_helpers/tests/configs/unused_layers.py @@ -1,4 +1,4 @@ -# Copyright (c) 2018 PaddlePaddle Authors. All Rights Reserve. +# Copyright (c) 2018 PaddlePaddle Authors. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/python/paddle/trainer_config_helpers/tests/configs/util_layers.py b/python/paddle/trainer_config_helpers/tests/configs/util_layers.py index a66c9515c77..da134f100b9 100644 --- a/python/paddle/trainer_config_helpers/tests/configs/util_layers.py +++ b/python/paddle/trainer_config_helpers/tests/configs/util_layers.py @@ -1,4 +1,4 @@ -# Copyright (c) 2018 PaddlePaddle Authors. All Rights Reserve. +# Copyright (c) 2018 PaddlePaddle Authors. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/python/paddle/trainer_config_helpers/tests/test_reset_hook.py b/python/paddle/trainer_config_helpers/tests/test_reset_hook.py index 81186dedd20..4d7542c35b2 100644 --- a/python/paddle/trainer_config_helpers/tests/test_reset_hook.py +++ b/python/paddle/trainer_config_helpers/tests/test_reset_hook.py @@ -1,4 +1,4 @@ -# Copyright (c) 2018 PaddlePaddle Authors. All Rights Reserve. +# Copyright (c) 2018 PaddlePaddle Authors. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/python/paddle/utils/image_multiproc.py b/python/paddle/utils/image_multiproc.py index fdbefef9ff7..3e3e519f76d 100644 --- a/python/paddle/utils/image_multiproc.py +++ b/python/paddle/utils/image_multiproc.py @@ -1,4 +1,4 @@ -# Copyright (c) 2018 PaddlePaddle Authors. All Rights Reserve. +# Copyright (c) 2018 PaddlePaddle Authors. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/python/paddle/v2/dataset/tests/imikolov_test.py b/python/paddle/v2/dataset/tests/imikolov_test.py index eed14582445..714a75d6f1f 100644 --- a/python/paddle/v2/dataset/tests/imikolov_test.py +++ b/python/paddle/v2/dataset/tests/imikolov_test.py @@ -1,4 +1,4 @@ -# Copyright (c) 2018 PaddlePaddle Authors. All Rights Reserve. +# Copyright (c) 2018 PaddlePaddle Authors. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/python/paddle/v2/event.py b/python/paddle/v2/event.py index 01067ef426d..c11aa121c19 100644 --- a/python/paddle/v2/event.py +++ b/python/paddle/v2/event.py @@ -1,4 +1,4 @@ -# Copyright (c) 2018 PaddlePaddle Authors. All Rights Reserve. +# Copyright (c) 2018 PaddlePaddle Authors. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/python/paddle/v2/fluid/__init__.py b/python/paddle/v2/fluid/__init__.py index 73acbf3e009..9f710c4a4aa 100644 --- a/python/paddle/v2/fluid/__init__.py +++ b/python/paddle/v2/fluid/__init__.py @@ -1,4 +1,4 @@ -# Copyright (c) 2018 PaddlePaddle Authors. All Rights Reserve. +# Copyright (c) 2018 PaddlePaddle Authors. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/python/paddle/v2/fluid/backward.py b/python/paddle/v2/fluid/backward.py index 29243c90e87..a690c14300e 100644 --- a/python/paddle/v2/fluid/backward.py +++ b/python/paddle/v2/fluid/backward.py @@ -1,4 +1,4 @@ -# Copyright (c) 2018 PaddlePaddle Authors. All Rights Reserve. +# Copyright (c) 2018 PaddlePaddle Authors. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/python/paddle/v2/fluid/clip.py b/python/paddle/v2/fluid/clip.py index fdbc8524abb..12add9e6869 100644 --- a/python/paddle/v2/fluid/clip.py +++ b/python/paddle/v2/fluid/clip.py @@ -1,4 +1,4 @@ -# Copyright (c) 2018 PaddlePaddle Authors. All Rights Reserve. +# Copyright (c) 2018 PaddlePaddle Authors. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/python/paddle/v2/fluid/data_feeder.py b/python/paddle/v2/fluid/data_feeder.py index a3b22a8633e..f9e2f3e6a28 100644 --- a/python/paddle/v2/fluid/data_feeder.py +++ b/python/paddle/v2/fluid/data_feeder.py @@ -1,4 +1,4 @@ -# Copyright (c) 2018 PaddlePaddle Authors. All Rights Reserve. +# Copyright (c) 2018 PaddlePaddle Authors. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/python/paddle/v2/fluid/debuger.py b/python/paddle/v2/fluid/debuger.py index db1808c6474..b7a906654a7 100644 --- a/python/paddle/v2/fluid/debuger.py +++ b/python/paddle/v2/fluid/debuger.py @@ -1,4 +1,4 @@ -# Copyright (c) 2018 PaddlePaddle Authors. All Rights Reserve. +# Copyright (c) 2018 PaddlePaddle Authors. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/python/paddle/v2/fluid/default_scope_funcs.py b/python/paddle/v2/fluid/default_scope_funcs.py index a27280208b8..eeb9fb20433 100644 --- a/python/paddle/v2/fluid/default_scope_funcs.py +++ b/python/paddle/v2/fluid/default_scope_funcs.py @@ -1,4 +1,4 @@ -# Copyright (c) 2018 PaddlePaddle Authors. All Rights Reserve. +# Copyright (c) 2018 PaddlePaddle Authors. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/python/paddle/v2/fluid/distribute_transpiler.py b/python/paddle/v2/fluid/distribute_transpiler.py index bf2e9e88f33..03a7478ae8f 100644 --- a/python/paddle/v2/fluid/distribute_transpiler.py +++ b/python/paddle/v2/fluid/distribute_transpiler.py @@ -1,4 +1,4 @@ -# Copyright (c) 2018 PaddlePaddle Authors. All Rights Reserve. +# Copyright (c) 2018 PaddlePaddle Authors. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/python/paddle/v2/fluid/distribute_transpiler_simple.py b/python/paddle/v2/fluid/distribute_transpiler_simple.py index 73d9bed1ae9..e94bbb6c39f 100644 --- a/python/paddle/v2/fluid/distribute_transpiler_simple.py +++ b/python/paddle/v2/fluid/distribute_transpiler_simple.py @@ -1,4 +1,4 @@ -# Copyright (c) 2018 PaddlePaddle Authors. All Rights Reserve. +# Copyright (c) 2018 PaddlePaddle Authors. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/python/paddle/v2/fluid/distributed_spliter.py b/python/paddle/v2/fluid/distributed_spliter.py index 8cf0b06786f..d288b27ba00 100644 --- a/python/paddle/v2/fluid/distributed_spliter.py +++ b/python/paddle/v2/fluid/distributed_spliter.py @@ -1,4 +1,4 @@ -# Copyright (c) 2018 PaddlePaddle Authors. All Rights Reserve. +# Copyright (c) 2018 PaddlePaddle Authors. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/python/paddle/v2/fluid/evaluator.py b/python/paddle/v2/fluid/evaluator.py index 2686a5bdfcf..30d87c76c28 100644 --- a/python/paddle/v2/fluid/evaluator.py +++ b/python/paddle/v2/fluid/evaluator.py @@ -1,4 +1,4 @@ -# Copyright (c) 2018 PaddlePaddle Authors. All Rights Reserve. +# Copyright (c) 2018 PaddlePaddle Authors. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/python/paddle/v2/fluid/executor.py b/python/paddle/v2/fluid/executor.py index 01cbdb3ec48..e2749593057 100644 --- a/python/paddle/v2/fluid/executor.py +++ b/python/paddle/v2/fluid/executor.py @@ -1,4 +1,4 @@ -# Copyright (c) 2018 PaddlePaddle Authors. All Rights Reserve. +# Copyright (c) 2018 PaddlePaddle Authors. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/python/paddle/v2/fluid/framework.py b/python/paddle/v2/fluid/framework.py index 35d3df785ba..dfd7e8047c1 100644 --- a/python/paddle/v2/fluid/framework.py +++ b/python/paddle/v2/fluid/framework.py @@ -1,4 +1,4 @@ -# Copyright (c) 2018 PaddlePaddle Authors. All Rights Reserve. +# Copyright (c) 2018 PaddlePaddle Authors. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/python/paddle/v2/fluid/graphviz.py b/python/paddle/v2/fluid/graphviz.py index 5881119c392..b8d21344fc8 100644 --- a/python/paddle/v2/fluid/graphviz.py +++ b/python/paddle/v2/fluid/graphviz.py @@ -1,4 +1,4 @@ -# Copyright (c) 2018 PaddlePaddle Authors. All Rights Reserve. +# Copyright (c) 2018 PaddlePaddle Authors. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/python/paddle/v2/fluid/initializer.py b/python/paddle/v2/fluid/initializer.py index 8c70fd90eff..927f1e625a5 100644 --- a/python/paddle/v2/fluid/initializer.py +++ b/python/paddle/v2/fluid/initializer.py @@ -1,4 +1,4 @@ -# Copyright (c) 2018 PaddlePaddle Authors. All Rights Reserve. +# Copyright (c) 2018 PaddlePaddle Authors. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/python/paddle/v2/fluid/io.py b/python/paddle/v2/fluid/io.py index 0f43e46082a..8a8bd089b58 100644 --- a/python/paddle/v2/fluid/io.py +++ b/python/paddle/v2/fluid/io.py @@ -1,4 +1,4 @@ -# Copyright (c) 2018 PaddlePaddle Authors. All Rights Reserve. +# Copyright (c) 2018 PaddlePaddle Authors. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/python/paddle/v2/fluid/layer_helper.py b/python/paddle/v2/fluid/layer_helper.py index 2119ca12c8d..e7abc23f2f1 100644 --- a/python/paddle/v2/fluid/layer_helper.py +++ b/python/paddle/v2/fluid/layer_helper.py @@ -1,4 +1,4 @@ -# Copyright (c) 2018 PaddlePaddle Authors. All Rights Reserve. +# Copyright (c) 2018 PaddlePaddle Authors. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/python/paddle/v2/fluid/layers/__init__.py b/python/paddle/v2/fluid/layers/__init__.py index f4fb2ca2798..906a16a49f7 100644 --- a/python/paddle/v2/fluid/layers/__init__.py +++ b/python/paddle/v2/fluid/layers/__init__.py @@ -1,4 +1,4 @@ -# Copyright (c) 2018 PaddlePaddle Authors. All Rights Reserve. +# Copyright (c) 2018 PaddlePaddle Authors. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/python/paddle/v2/fluid/layers/control_flow.py b/python/paddle/v2/fluid/layers/control_flow.py index 71a9459d556..800c11a53b8 100644 --- a/python/paddle/v2/fluid/layers/control_flow.py +++ b/python/paddle/v2/fluid/layers/control_flow.py @@ -1,4 +1,4 @@ -# Copyright (c) 2018 PaddlePaddle Authors. All Rights Reserve. +# Copyright (c) 2018 PaddlePaddle Authors. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/python/paddle/v2/fluid/layers/device.py b/python/paddle/v2/fluid/layers/device.py index 107511b5f4a..3fee263ac0f 100644 --- a/python/paddle/v2/fluid/layers/device.py +++ b/python/paddle/v2/fluid/layers/device.py @@ -1,4 +1,4 @@ -# Copyright (c) 2018 PaddlePaddle Authors. All Rights Reserve. +# Copyright (c) 2018 PaddlePaddle Authors. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/python/paddle/v2/fluid/layers/io.py b/python/paddle/v2/fluid/layers/io.py index 85e44a0e514..af3ae54248a 100644 --- a/python/paddle/v2/fluid/layers/io.py +++ b/python/paddle/v2/fluid/layers/io.py @@ -1,4 +1,4 @@ -# Copyright (c) 2018 PaddlePaddle Authors. All Rights Reserve. +# Copyright (c) 2018 PaddlePaddle Authors. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/python/paddle/v2/fluid/layers/layer_function_generator.py b/python/paddle/v2/fluid/layers/layer_function_generator.py index b0e4d1635f7..88c9ae31b79 100644 --- a/python/paddle/v2/fluid/layers/layer_function_generator.py +++ b/python/paddle/v2/fluid/layers/layer_function_generator.py @@ -1,4 +1,4 @@ -# Copyright (c) 2018 PaddlePaddle Authors. All Rights Reserve. +# Copyright (c) 2018 PaddlePaddle Authors. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/python/paddle/v2/fluid/layers/math_op_patch.py b/python/paddle/v2/fluid/layers/math_op_patch.py index d829bba1b10..417a01b76f1 100644 --- a/python/paddle/v2/fluid/layers/math_op_patch.py +++ b/python/paddle/v2/fluid/layers/math_op_patch.py @@ -1,4 +1,4 @@ -# Copyright (c) 2018 PaddlePaddle Authors. All Rights Reserve. +# Copyright (c) 2018 PaddlePaddle Authors. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/python/paddle/v2/fluid/layers/nn.py b/python/paddle/v2/fluid/layers/nn.py index fcb55c8d4da..f5b64fee1dc 100644 --- a/python/paddle/v2/fluid/layers/nn.py +++ b/python/paddle/v2/fluid/layers/nn.py @@ -1,4 +1,4 @@ -# Copyright (c) 2018 PaddlePaddle Authors. All Rights Reserve. +# Copyright (c) 2018 PaddlePaddle Authors. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/python/paddle/v2/fluid/layers/ops.py b/python/paddle/v2/fluid/layers/ops.py index bb3f71abbb0..28265a57e6a 100644 --- a/python/paddle/v2/fluid/layers/ops.py +++ b/python/paddle/v2/fluid/layers/ops.py @@ -1,4 +1,4 @@ -# Copyright (c) 2018 PaddlePaddle Authors. All Rights Reserve. +# Copyright (c) 2018 PaddlePaddle Authors. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/python/paddle/v2/fluid/layers/tensor.py b/python/paddle/v2/fluid/layers/tensor.py index 2d4e0ab0cc6..db400aad37c 100644 --- a/python/paddle/v2/fluid/layers/tensor.py +++ b/python/paddle/v2/fluid/layers/tensor.py @@ -1,4 +1,4 @@ -# Copyright (c) 2018 PaddlePaddle Authors. All Rights Reserve. +# Copyright (c) 2018 PaddlePaddle Authors. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/python/paddle/v2/fluid/memory_optimization_transpiler.py b/python/paddle/v2/fluid/memory_optimization_transpiler.py index 53e0991ee8c..78dc56f8490 100644 --- a/python/paddle/v2/fluid/memory_optimization_transpiler.py +++ b/python/paddle/v2/fluid/memory_optimization_transpiler.py @@ -1,4 +1,4 @@ -# Copyright (c) 2018 PaddlePaddle Authors. All Rights Reserve. +# Copyright (c) 2018 PaddlePaddle Authors. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/python/paddle/v2/fluid/net_drawer.py b/python/paddle/v2/fluid/net_drawer.py index 9b126f51971..66793a57858 100644 --- a/python/paddle/v2/fluid/net_drawer.py +++ b/python/paddle/v2/fluid/net_drawer.py @@ -1,4 +1,4 @@ -# Copyright (c) 2018 PaddlePaddle Authors. All Rights Reserve. +# Copyright (c) 2018 PaddlePaddle Authors. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/python/paddle/v2/fluid/nets.py b/python/paddle/v2/fluid/nets.py index be7878f869b..c161d93854a 100644 --- a/python/paddle/v2/fluid/nets.py +++ b/python/paddle/v2/fluid/nets.py @@ -1,4 +1,4 @@ -# Copyright (c) 2018 PaddlePaddle Authors. All Rights Reserve. +# Copyright (c) 2018 PaddlePaddle Authors. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/python/paddle/v2/fluid/op.py b/python/paddle/v2/fluid/op.py index f368e0c2d86..6a413704583 100644 --- a/python/paddle/v2/fluid/op.py +++ b/python/paddle/v2/fluid/op.py @@ -1,4 +1,4 @@ -# Copyright (c) 2018 PaddlePaddle Authors. All Rights Reserve. +# Copyright (c) 2018 PaddlePaddle Authors. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/python/paddle/v2/fluid/optimizer.py b/python/paddle/v2/fluid/optimizer.py index f8a00e3a5fb..39391eb8e40 100644 --- a/python/paddle/v2/fluid/optimizer.py +++ b/python/paddle/v2/fluid/optimizer.py @@ -1,4 +1,4 @@ -# Copyright (c) 2018 PaddlePaddle Authors. All Rights Reserve. +# Copyright (c) 2018 PaddlePaddle Authors. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/python/paddle/v2/fluid/param_attr.py b/python/paddle/v2/fluid/param_attr.py index fc566b8a248..255cd210432 100644 --- a/python/paddle/v2/fluid/param_attr.py +++ b/python/paddle/v2/fluid/param_attr.py @@ -1,4 +1,4 @@ -# Copyright (c) 2018 PaddlePaddle Authors. All Rights Reserve. +# Copyright (c) 2018 PaddlePaddle Authors. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/python/paddle/v2/fluid/profiler.py b/python/paddle/v2/fluid/profiler.py index d33a4c52a88..4611986c996 100644 --- a/python/paddle/v2/fluid/profiler.py +++ b/python/paddle/v2/fluid/profiler.py @@ -1,4 +1,4 @@ -# Copyright (c) 2018 PaddlePaddle Authors. All Rights Reserve. +# Copyright (c) 2018 PaddlePaddle Authors. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/python/paddle/v2/fluid/regularizer.py b/python/paddle/v2/fluid/regularizer.py index 0273da647af..a29f9a208eb 100644 --- a/python/paddle/v2/fluid/regularizer.py +++ b/python/paddle/v2/fluid/regularizer.py @@ -1,4 +1,4 @@ -# Copyright (c) 2018 PaddlePaddle Authors. All Rights Reserve. +# Copyright (c) 2018 PaddlePaddle Authors. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/python/paddle/v2/fluid/tests/__init__.py b/python/paddle/v2/fluid/tests/__init__.py index b94a21a7e40..eca2dce114b 100644 --- a/python/paddle/v2/fluid/tests/__init__.py +++ b/python/paddle/v2/fluid/tests/__init__.py @@ -1,4 +1,4 @@ -# Copyright (c) 2018 PaddlePaddle Authors. All Rights Reserve. +# Copyright (c) 2018 PaddlePaddle Authors. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/python/paddle/v2/fluid/tests/book/__init__.py b/python/paddle/v2/fluid/tests/book/__init__.py index b94a21a7e40..eca2dce114b 100644 --- a/python/paddle/v2/fluid/tests/book/__init__.py +++ b/python/paddle/v2/fluid/tests/book/__init__.py @@ -1,4 +1,4 @@ -# Copyright (c) 2018 PaddlePaddle Authors. All Rights Reserve. +# Copyright (c) 2018 PaddlePaddle Authors. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/python/paddle/v2/fluid/tests/book/notest_rnn_encoder_decoer.py b/python/paddle/v2/fluid/tests/book/notest_rnn_encoder_decoer.py index 7fe43c680ca..c7db70f1b18 100644 --- a/python/paddle/v2/fluid/tests/book/notest_rnn_encoder_decoer.py +++ b/python/paddle/v2/fluid/tests/book/notest_rnn_encoder_decoer.py @@ -1,4 +1,4 @@ -# Copyright (c) 2018 PaddlePaddle Authors. All Rights Reserve. +# Copyright (c) 2018 PaddlePaddle Authors. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/python/paddle/v2/fluid/tests/book/test_fit_a_line.py b/python/paddle/v2/fluid/tests/book/test_fit_a_line.py index b3332b4810b..a66c2c3c2fc 100644 --- a/python/paddle/v2/fluid/tests/book/test_fit_a_line.py +++ b/python/paddle/v2/fluid/tests/book/test_fit_a_line.py @@ -1,4 +1,4 @@ -# Copyright (c) 2018 PaddlePaddle Authors. All Rights Reserve. +# Copyright (c) 2018 PaddlePaddle Authors. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/python/paddle/v2/fluid/tests/book/test_image_classification.py b/python/paddle/v2/fluid/tests/book/test_image_classification.py index ffbe5bdbd64..734ab3e4fba 100644 --- a/python/paddle/v2/fluid/tests/book/test_image_classification.py +++ b/python/paddle/v2/fluid/tests/book/test_image_classification.py @@ -1,4 +1,4 @@ -# Copyright (c) 2018 PaddlePaddle Authors. All Rights Reserve. +# Copyright (c) 2018 PaddlePaddle Authors. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/python/paddle/v2/fluid/tests/book/test_label_semantic_roles.py b/python/paddle/v2/fluid/tests/book/test_label_semantic_roles.py index f33e81186bd..b790246ec15 100644 --- a/python/paddle/v2/fluid/tests/book/test_label_semantic_roles.py +++ b/python/paddle/v2/fluid/tests/book/test_label_semantic_roles.py @@ -1,4 +1,4 @@ -# Copyright (c) 2018 PaddlePaddle Authors. All Rights Reserve. +# Copyright (c) 2018 PaddlePaddle Authors. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/python/paddle/v2/fluid/tests/book/test_machine_translation.py b/python/paddle/v2/fluid/tests/book/test_machine_translation.py index 5716ddd3dda..d3405a9601d 100644 --- a/python/paddle/v2/fluid/tests/book/test_machine_translation.py +++ b/python/paddle/v2/fluid/tests/book/test_machine_translation.py @@ -1,4 +1,4 @@ -# Copyright (c) 2018 PaddlePaddle Authors. All Rights Reserve. +# Copyright (c) 2018 PaddlePaddle Authors. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/python/paddle/v2/fluid/tests/book/test_recognize_digits.py b/python/paddle/v2/fluid/tests/book/test_recognize_digits.py index 244c1749cd5..a0b4774da5f 100644 --- a/python/paddle/v2/fluid/tests/book/test_recognize_digits.py +++ b/python/paddle/v2/fluid/tests/book/test_recognize_digits.py @@ -1,4 +1,4 @@ -# Copyright (c) 2018 PaddlePaddle Authors. All Rights Reserve. +# Copyright (c) 2018 PaddlePaddle Authors. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/python/paddle/v2/fluid/tests/book/test_recommender_system.py b/python/paddle/v2/fluid/tests/book/test_recommender_system.py index 612d51e08e4..1a7d8d57ffa 100644 --- a/python/paddle/v2/fluid/tests/book/test_recommender_system.py +++ b/python/paddle/v2/fluid/tests/book/test_recommender_system.py @@ -1,4 +1,4 @@ -# Copyright (c) 2018 PaddlePaddle Authors. All Rights Reserve. +# Copyright (c) 2018 PaddlePaddle Authors. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/python/paddle/v2/fluid/tests/book/test_word2vec.py b/python/paddle/v2/fluid/tests/book/test_word2vec.py index 69bfbcee69a..9bd8f90c5ee 100644 --- a/python/paddle/v2/fluid/tests/book/test_word2vec.py +++ b/python/paddle/v2/fluid/tests/book/test_word2vec.py @@ -1,4 +1,4 @@ -# Copyright (c) 2018 PaddlePaddle Authors. All Rights Reserve. +# Copyright (c) 2018 PaddlePaddle Authors. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at diff --git a/python/paddle/v2/fluid/tests/book_distribute/notest_dist_fit_a_line.py b/python/paddle/v2/fluid/tests/book_distribute/notest_dist_fit_a_line.py index 9774edebfb1..c443c4e0b7d 100644 --- a/python/paddle/v2/fluid/tests/book_distribute/notest_dist_fit_a_line.py +++ b/python/paddle/v2/fluid/tests/book_distribute/notest_dist_fit_a_line.py @@ -1,4 +1,4 @@ -# Copyright (c) 2018 PaddlePaddle Authors. All Rights Reserve. +# Copyright (c) 2018 PaddlePaddle Authors. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/python/paddle/v2/fluid/tests/book_distribute/notest_dist_label_semantic_roles.py b/python/paddle/v2/fluid/tests/book_distribute/notest_dist_label_semantic_roles.py index 08bb67b0a1f..1210bf1d844 100644 --- a/python/paddle/v2/fluid/tests/book_distribute/notest_dist_label_semantic_roles.py +++ b/python/paddle/v2/fluid/tests/book_distribute/notest_dist_label_semantic_roles.py @@ -1,4 +1,4 @@ -# Copyright (c) 2018 PaddlePaddle Authors. All Rights Reserve. +# Copyright (c) 2018 PaddlePaddle Authors. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/python/paddle/v2/fluid/tests/book_distribute/notest_dist_word2vec.py b/python/paddle/v2/fluid/tests/book_distribute/notest_dist_word2vec.py index ec4c2d2721c..0d5ad988502 100644 --- a/python/paddle/v2/fluid/tests/book_distribute/notest_dist_word2vec.py +++ b/python/paddle/v2/fluid/tests/book_distribute/notest_dist_word2vec.py @@ -1,4 +1,4 @@ -# Copyright (c) 2018 PaddlePaddle Authors. All Rights Reserve. +# Copyright (c) 2018 PaddlePaddle Authors. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/python/paddle/v2/fluid/tests/book_distribute/notest_machine_translation.py b/python/paddle/v2/fluid/tests/book_distribute/notest_machine_translation.py index adeacd4adf2..15d2d40979e 100644 --- a/python/paddle/v2/fluid/tests/book_distribute/notest_machine_translation.py +++ b/python/paddle/v2/fluid/tests/book_distribute/notest_machine_translation.py @@ -1,4 +1,4 @@ -# Copyright (c) 2018 PaddlePaddle Authors. All Rights Reserve. +# Copyright (c) 2018 PaddlePaddle Authors. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/python/paddle/v2/fluid/tests/book_distribute/notest_recognize_digits_conv_dist.py b/python/paddle/v2/fluid/tests/book_distribute/notest_recognize_digits_conv_dist.py index f18ca05c780..07815059c4f 100644 --- a/python/paddle/v2/fluid/tests/book_distribute/notest_recognize_digits_conv_dist.py +++ b/python/paddle/v2/fluid/tests/book_distribute/notest_recognize_digits_conv_dist.py @@ -1,4 +1,4 @@ -# Copyright (c) 2018 PaddlePaddle Authors. All Rights Reserve. +# Copyright (c) 2018 PaddlePaddle Authors. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/python/paddle/v2/fluid/tests/book_distribute/notest_recognize_digits_mlp_dist.py b/python/paddle/v2/fluid/tests/book_distribute/notest_recognize_digits_mlp_dist.py index 7733248cb44..c442ada6e3c 100644 --- a/python/paddle/v2/fluid/tests/book_distribute/notest_recognize_digits_mlp_dist.py +++ b/python/paddle/v2/fluid/tests/book_distribute/notest_recognize_digits_mlp_dist.py @@ -1,4 +1,4 @@ -# Copyright (c) 2018 PaddlePaddle Authors. All Rights Reserve. +# Copyright (c) 2018 PaddlePaddle Authors. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/python/paddle/v2/fluid/tests/book_distribute/notest_recommender_system_dist.py b/python/paddle/v2/fluid/tests/book_distribute/notest_recommender_system_dist.py index 2d8885e377b..363c7102c7f 100644 --- a/python/paddle/v2/fluid/tests/book_distribute/notest_recommender_system_dist.py +++ b/python/paddle/v2/fluid/tests/book_distribute/notest_recommender_system_dist.py @@ -1,4 +1,4 @@ -# Copyright (c) 2018 PaddlePaddle Authors. All Rights Reserve. +# Copyright (c) 2018 PaddlePaddle Authors. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/python/paddle/v2/fluid/tests/book_distribute/notest_understand_sentiment_conv_dist.py b/python/paddle/v2/fluid/tests/book_distribute/notest_understand_sentiment_conv_dist.py index 49f26d6b69a..c5c0856c31a 100644 --- a/python/paddle/v2/fluid/tests/book_distribute/notest_understand_sentiment_conv_dist.py +++ b/python/paddle/v2/fluid/tests/book_distribute/notest_understand_sentiment_conv_dist.py @@ -1,4 +1,4 @@ -# Copyright (c) 2018 PaddlePaddle Authors. All Rights Reserve. +# Copyright (c) 2018 PaddlePaddle Authors. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/python/paddle/v2/fluid/tests/book_distribute/notest_understand_sentiment_dynamic_lstm.py b/python/paddle/v2/fluid/tests/book_distribute/notest_understand_sentiment_dynamic_lstm.py index bff376a0e2e..99e2c2bbac6 100644 --- a/python/paddle/v2/fluid/tests/book_distribute/notest_understand_sentiment_dynamic_lstm.py +++ b/python/paddle/v2/fluid/tests/book_distribute/notest_understand_sentiment_dynamic_lstm.py @@ -1,4 +1,4 @@ -# Copyright (c) 2018 PaddlePaddle Authors. All Rights Reserve. +# Copyright (c) 2018 PaddlePaddle Authors. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/python/paddle/v2/fluid/tests/book_distribute/test_split_var.py b/python/paddle/v2/fluid/tests/book_distribute/test_split_var.py index 4a50049bf26..d7160b78b95 100644 --- a/python/paddle/v2/fluid/tests/book_distribute/test_split_var.py +++ b/python/paddle/v2/fluid/tests/book_distribute/test_split_var.py @@ -1,4 +1,4 @@ -# Copyright (c) 2018 PaddlePaddle Authors. All Rights Reserve. +# Copyright (c) 2018 PaddlePaddle Authors. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/python/paddle/v2/fluid/tests/book_memory_optimization/test_memopt_fit_a_line.py b/python/paddle/v2/fluid/tests/book_memory_optimization/test_memopt_fit_a_line.py index 045db8390cd..944f8af0861 100644 --- a/python/paddle/v2/fluid/tests/book_memory_optimization/test_memopt_fit_a_line.py +++ b/python/paddle/v2/fluid/tests/book_memory_optimization/test_memopt_fit_a_line.py @@ -1,4 +1,4 @@ -# Copyright (c) 2018 PaddlePaddle Authors. All Rights Reserve. +# Copyright (c) 2018 PaddlePaddle Authors. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/python/paddle/v2/fluid/tests/book_memory_optimization/test_memopt_image_classification_train.py b/python/paddle/v2/fluid/tests/book_memory_optimization/test_memopt_image_classification_train.py index 9fbb36d3638..a556904107c 100644 --- a/python/paddle/v2/fluid/tests/book_memory_optimization/test_memopt_image_classification_train.py +++ b/python/paddle/v2/fluid/tests/book_memory_optimization/test_memopt_image_classification_train.py @@ -1,4 +1,4 @@ -# Copyright (c) 2018 PaddlePaddle Authors. All Rights Reserve. +# Copyright (c) 2018 PaddlePaddle Authors. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/python/paddle/v2/fluid/tests/book_memory_optimization/test_memopt_machine_translation.py b/python/paddle/v2/fluid/tests/book_memory_optimization/test_memopt_machine_translation.py index 48abaa8d875..4c1eae861bb 100644 --- a/python/paddle/v2/fluid/tests/book_memory_optimization/test_memopt_machine_translation.py +++ b/python/paddle/v2/fluid/tests/book_memory_optimization/test_memopt_machine_translation.py @@ -1,4 +1,4 @@ -# Copyright (c) 2018 PaddlePaddle Authors. All Rights Reserve. +# Copyright (c) 2018 PaddlePaddle Authors. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/python/paddle/v2/fluid/tests/decorators.py b/python/paddle/v2/fluid/tests/decorators.py index 0a8a2ccc4dc..7081e4b9345 100644 --- a/python/paddle/v2/fluid/tests/decorators.py +++ b/python/paddle/v2/fluid/tests/decorators.py @@ -1,4 +1,4 @@ -# Copyright (c) 2018 PaddlePaddle Authors. All Rights Reserve. +# Copyright (c) 2018 PaddlePaddle Authors. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/python/paddle/v2/fluid/tests/demo/fc_gan.py b/python/paddle/v2/fluid/tests/demo/fc_gan.py index 0652c8134d5..67921db04ab 100644 --- a/python/paddle/v2/fluid/tests/demo/fc_gan.py +++ b/python/paddle/v2/fluid/tests/demo/fc_gan.py @@ -1,4 +1,4 @@ -# Copyright (c) 2018 PaddlePaddle Authors. All Rights Reserve. +# Copyright (c) 2018 PaddlePaddle Authors. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/python/paddle/v2/fluid/tests/op_test.py b/python/paddle/v2/fluid/tests/op_test.py index f8475813c0c..940e2bfb16a 100644 --- a/python/paddle/v2/fluid/tests/op_test.py +++ b/python/paddle/v2/fluid/tests/op_test.py @@ -1,4 +1,4 @@ -# Copyright (c) 2018 PaddlePaddle Authors. All Rights Reserve. +# Copyright (c) 2018 PaddlePaddle Authors. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/python/paddle/v2/fluid/tests/test_accuracy_op.py b/python/paddle/v2/fluid/tests/test_accuracy_op.py index ac3f3bdff44..212a87e529d 100644 --- a/python/paddle/v2/fluid/tests/test_accuracy_op.py +++ b/python/paddle/v2/fluid/tests/test_accuracy_op.py @@ -1,4 +1,4 @@ -# Copyright (c) 2018 PaddlePaddle Authors. All Rights Reserve. +# Copyright (c) 2018 PaddlePaddle Authors. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/python/paddle/v2/fluid/tests/test_activation_op.py b/python/paddle/v2/fluid/tests/test_activation_op.py index 1de5d446b8e..eab41ebe711 100644 --- a/python/paddle/v2/fluid/tests/test_activation_op.py +++ b/python/paddle/v2/fluid/tests/test_activation_op.py @@ -1,4 +1,4 @@ -# Copyright (c) 2018 PaddlePaddle Authors. All Rights Reserve. +# Copyright (c) 2018 PaddlePaddle Authors. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/python/paddle/v2/fluid/tests/test_adadelta_op.py b/python/paddle/v2/fluid/tests/test_adadelta_op.py index 949318d0077..1b892e64c76 100644 --- a/python/paddle/v2/fluid/tests/test_adadelta_op.py +++ b/python/paddle/v2/fluid/tests/test_adadelta_op.py @@ -1,4 +1,4 @@ -# Copyright (c) 2018 PaddlePaddle Authors. All Rights Reserve. +# Copyright (c) 2018 PaddlePaddle Authors. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/python/paddle/v2/fluid/tests/test_adagrad_op.py b/python/paddle/v2/fluid/tests/test_adagrad_op.py index 3556bcf8ba0..320f43023c0 100644 --- a/python/paddle/v2/fluid/tests/test_adagrad_op.py +++ b/python/paddle/v2/fluid/tests/test_adagrad_op.py @@ -1,4 +1,4 @@ -# Copyright (c) 2018 PaddlePaddle Authors. All Rights Reserve. +# Copyright (c) 2018 PaddlePaddle Authors. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/python/paddle/v2/fluid/tests/test_adam_op.py b/python/paddle/v2/fluid/tests/test_adam_op.py index df1fa8983c1..d6c5a16ff2b 100644 --- a/python/paddle/v2/fluid/tests/test_adam_op.py +++ b/python/paddle/v2/fluid/tests/test_adam_op.py @@ -1,4 +1,4 @@ -# Copyright (c) 2018 PaddlePaddle Authors. All Rights Reserve. +# Copyright (c) 2018 PaddlePaddle Authors. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/python/paddle/v2/fluid/tests/test_adamax_op.py b/python/paddle/v2/fluid/tests/test_adamax_op.py index e285c454f03..8099beefa58 100644 --- a/python/paddle/v2/fluid/tests/test_adamax_op.py +++ b/python/paddle/v2/fluid/tests/test_adamax_op.py @@ -1,4 +1,4 @@ -# Copyright (c) 2018 PaddlePaddle Authors. All Rights Reserve. +# Copyright (c) 2018 PaddlePaddle Authors. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/python/paddle/v2/fluid/tests/test_array_read_write_op.py b/python/paddle/v2/fluid/tests/test_array_read_write_op.py index a32c24486e1..8917b9b906d 100644 --- a/python/paddle/v2/fluid/tests/test_array_read_write_op.py +++ b/python/paddle/v2/fluid/tests/test_array_read_write_op.py @@ -1,4 +1,4 @@ -# Copyright (c) 2018 PaddlePaddle Authors. All Rights Reserve. +# Copyright (c) 2018 PaddlePaddle Authors. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/python/paddle/v2/fluid/tests/test_assign_op.py b/python/paddle/v2/fluid/tests/test_assign_op.py index fbbfe0d02c4..e93c02bd3ee 100644 --- a/python/paddle/v2/fluid/tests/test_assign_op.py +++ b/python/paddle/v2/fluid/tests/test_assign_op.py @@ -1,4 +1,4 @@ -# Copyright (c) 2018 PaddlePaddle Authors. All Rights Reserve. +# Copyright (c) 2018 PaddlePaddle Authors. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/python/paddle/v2/fluid/tests/test_assign_value_op.py b/python/paddle/v2/fluid/tests/test_assign_value_op.py index 93970f863b1..99d7e958c32 100644 --- a/python/paddle/v2/fluid/tests/test_assign_value_op.py +++ b/python/paddle/v2/fluid/tests/test_assign_value_op.py @@ -1,4 +1,4 @@ -# Copyright (c) 2018 PaddlePaddle Authors. All Rights Reserve. +# Copyright (c) 2018 PaddlePaddle Authors. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/python/paddle/v2/fluid/tests/test_auc_op.py b/python/paddle/v2/fluid/tests/test_auc_op.py index 5e4caedf5d6..948836039be 100644 --- a/python/paddle/v2/fluid/tests/test_auc_op.py +++ b/python/paddle/v2/fluid/tests/test_auc_op.py @@ -1,4 +1,4 @@ -# Copyright (c) 2018 PaddlePaddle Authors. All Rights Reserve. +# Copyright (c) 2018 PaddlePaddle Authors. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/python/paddle/v2/fluid/tests/test_batch_norm_op.py b/python/paddle/v2/fluid/tests/test_batch_norm_op.py index cf13166f255..778c7044ce8 100644 --- a/python/paddle/v2/fluid/tests/test_batch_norm_op.py +++ b/python/paddle/v2/fluid/tests/test_batch_norm_op.py @@ -1,4 +1,4 @@ -# Copyright (c) 2018 PaddlePaddle Authors. All Rights Reserve. +# Copyright (c) 2018 PaddlePaddle Authors. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/python/paddle/v2/fluid/tests/test_beam_search_decode_op.py b/python/paddle/v2/fluid/tests/test_beam_search_decode_op.py index 36747849859..91f8f7b18bb 100644 --- a/python/paddle/v2/fluid/tests/test_beam_search_decode_op.py +++ b/python/paddle/v2/fluid/tests/test_beam_search_decode_op.py @@ -1,4 +1,4 @@ -# Copyright (c) 2018 PaddlePaddle Authors. All Rights Reserve. +# Copyright (c) 2018 PaddlePaddle Authors. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/python/paddle/v2/fluid/tests/test_beam_search_op.py b/python/paddle/v2/fluid/tests/test_beam_search_op.py index 4da463df260..1596bb3970c 100644 --- a/python/paddle/v2/fluid/tests/test_beam_search_op.py +++ b/python/paddle/v2/fluid/tests/test_beam_search_op.py @@ -1,4 +1,4 @@ -# Copyright (c) 2018 PaddlePaddle Authors. All Rights Reserve. +# Copyright (c) 2018 PaddlePaddle Authors. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/python/paddle/v2/fluid/tests/test_bilinear_tensor_product_op.py b/python/paddle/v2/fluid/tests/test_bilinear_tensor_product_op.py index 4b03f512c2f..d20a11e27ea 100644 --- a/python/paddle/v2/fluid/tests/test_bilinear_tensor_product_op.py +++ b/python/paddle/v2/fluid/tests/test_bilinear_tensor_product_op.py @@ -1,4 +1,4 @@ -# Copyright (c) 2018 PaddlePaddle Authors. All Rights Reserve. +# Copyright (c) 2018 PaddlePaddle Authors. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/python/paddle/v2/fluid/tests/test_bipartite_match_op.py b/python/paddle/v2/fluid/tests/test_bipartite_match_op.py index 4943bbb3388..9f9af2f55e2 100644 --- a/python/paddle/v2/fluid/tests/test_bipartite_match_op.py +++ b/python/paddle/v2/fluid/tests/test_bipartite_match_op.py @@ -1,4 +1,4 @@ -# Copyright (c) 2018 PaddlePaddle Authors. All Rights Reserve. +# Copyright (c) 2018 PaddlePaddle Authors. All Rights Reserved. # #Licensed under the Apache License, Version 2.0 (the "License"); #you may not use this file except in compliance with the License. diff --git a/python/paddle/v2/fluid/tests/test_box_coder_op.py b/python/paddle/v2/fluid/tests/test_box_coder_op.py index 0dc18476fd5..b8391760922 100644 --- a/python/paddle/v2/fluid/tests/test_box_coder_op.py +++ b/python/paddle/v2/fluid/tests/test_box_coder_op.py @@ -1,4 +1,4 @@ -# Copyright (c) 2018 PaddlePaddle Authors. All Rights Reserve. +# Copyright (c) 2018 PaddlePaddle Authors. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/python/paddle/v2/fluid/tests/test_calc_gradient.py b/python/paddle/v2/fluid/tests/test_calc_gradient.py index c773e81768f..1b38dcf343a 100644 --- a/python/paddle/v2/fluid/tests/test_calc_gradient.py +++ b/python/paddle/v2/fluid/tests/test_calc_gradient.py @@ -1,4 +1,4 @@ -# Copyright (c) 2018 PaddlePaddle Authors. All Rights Reserve. +# Copyright (c) 2018 PaddlePaddle Authors. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/python/paddle/v2/fluid/tests/test_cast_op.py b/python/paddle/v2/fluid/tests/test_cast_op.py index 327b246ed80..44859e21556 100644 --- a/python/paddle/v2/fluid/tests/test_cast_op.py +++ b/python/paddle/v2/fluid/tests/test_cast_op.py @@ -1,4 +1,4 @@ -# Copyright (c) 2018 PaddlePaddle Authors. All Rights Reserve. +# Copyright (c) 2018 PaddlePaddle Authors. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/python/paddle/v2/fluid/tests/test_chunk_eval_op.py b/python/paddle/v2/fluid/tests/test_chunk_eval_op.py index 5c3efe9baa7..050df2801c9 100644 --- a/python/paddle/v2/fluid/tests/test_chunk_eval_op.py +++ b/python/paddle/v2/fluid/tests/test_chunk_eval_op.py @@ -1,4 +1,4 @@ -# Copyright (c) 2018 PaddlePaddle Authors. All Rights Reserve. +# Copyright (c) 2018 PaddlePaddle Authors. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/python/paddle/v2/fluid/tests/test_clip_by_norm_op.py b/python/paddle/v2/fluid/tests/test_clip_by_norm_op.py index b30f321c79f..129958fa281 100644 --- a/python/paddle/v2/fluid/tests/test_clip_by_norm_op.py +++ b/python/paddle/v2/fluid/tests/test_clip_by_norm_op.py @@ -1,4 +1,4 @@ -# Copyright (c) 2018 PaddlePaddle Authors. All Rights Reserve. +# Copyright (c) 2018 PaddlePaddle Authors. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/python/paddle/v2/fluid/tests/test_clip_op.py b/python/paddle/v2/fluid/tests/test_clip_op.py index ef0b75e2867..3df80c8ec8f 100644 --- a/python/paddle/v2/fluid/tests/test_clip_op.py +++ b/python/paddle/v2/fluid/tests/test_clip_op.py @@ -1,4 +1,4 @@ -# Copyright (c) 2018 PaddlePaddle Authors. All Rights Reserve. +# Copyright (c) 2018 PaddlePaddle Authors. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/python/paddle/v2/fluid/tests/test_compare_op.py b/python/paddle/v2/fluid/tests/test_compare_op.py index c9be80fc45c..83d57639ca4 100644 --- a/python/paddle/v2/fluid/tests/test_compare_op.py +++ b/python/paddle/v2/fluid/tests/test_compare_op.py @@ -1,4 +1,4 @@ -# Copyright (c) 2018 PaddlePaddle Authors. All Rights Reserve. +# Copyright (c) 2018 PaddlePaddle Authors. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/python/paddle/v2/fluid/tests/test_concat_op.py b/python/paddle/v2/fluid/tests/test_concat_op.py index ea0a95ebec2..558f3a4dcbb 100644 --- a/python/paddle/v2/fluid/tests/test_concat_op.py +++ b/python/paddle/v2/fluid/tests/test_concat_op.py @@ -1,4 +1,4 @@ -# Copyright (c) 2018 PaddlePaddle Authors. All Rights Reserve. +# Copyright (c) 2018 PaddlePaddle Authors. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/python/paddle/v2/fluid/tests/test_cond_op.py b/python/paddle/v2/fluid/tests/test_cond_op.py index 4b7ca0963e9..6f4380166bb 100644 --- a/python/paddle/v2/fluid/tests/test_cond_op.py +++ b/python/paddle/v2/fluid/tests/test_cond_op.py @@ -1,4 +1,4 @@ -# Copyright (c) 2018 PaddlePaddle Authors. All Rights Reserve. +# Copyright (c) 2018 PaddlePaddle Authors. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/python/paddle/v2/fluid/tests/test_conditional_block.py b/python/paddle/v2/fluid/tests/test_conditional_block.py index 5ee729cfee6..58ac2672036 100644 --- a/python/paddle/v2/fluid/tests/test_conditional_block.py +++ b/python/paddle/v2/fluid/tests/test_conditional_block.py @@ -1,4 +1,4 @@ -# Copyright (c) 2018 PaddlePaddle Authors. All Rights Reserve. +# Copyright (c) 2018 PaddlePaddle Authors. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/python/paddle/v2/fluid/tests/test_const_value.py b/python/paddle/v2/fluid/tests/test_const_value.py index d5b7cfded1a..06c1c21fbcb 100644 --- a/python/paddle/v2/fluid/tests/test_const_value.py +++ b/python/paddle/v2/fluid/tests/test_const_value.py @@ -1,4 +1,4 @@ -# Copyright (c) 2018 PaddlePaddle Authors. All Rights Reserve. +# Copyright (c) 2018 PaddlePaddle Authors. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/python/paddle/v2/fluid/tests/test_conv2d_op.py b/python/paddle/v2/fluid/tests/test_conv2d_op.py index 7512ea333e3..ad242692ec6 100644 --- a/python/paddle/v2/fluid/tests/test_conv2d_op.py +++ b/python/paddle/v2/fluid/tests/test_conv2d_op.py @@ -1,4 +1,4 @@ -# Copyright (c) 2018 PaddlePaddle Authors. All Rights Reserve. +# Copyright (c) 2018 PaddlePaddle Authors. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/python/paddle/v2/fluid/tests/test_conv2d_transpose_op.py b/python/paddle/v2/fluid/tests/test_conv2d_transpose_op.py index 0c76e222c90..c9e74f58605 100644 --- a/python/paddle/v2/fluid/tests/test_conv2d_transpose_op.py +++ b/python/paddle/v2/fluid/tests/test_conv2d_transpose_op.py @@ -1,4 +1,4 @@ -# Copyright (c) 2018 PaddlePaddle Authors. All Rights Reserve. +# Copyright (c) 2018 PaddlePaddle Authors. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/python/paddle/v2/fluid/tests/test_conv3d_op.py b/python/paddle/v2/fluid/tests/test_conv3d_op.py index 8121e328659..0f7e383d1aa 100644 --- a/python/paddle/v2/fluid/tests/test_conv3d_op.py +++ b/python/paddle/v2/fluid/tests/test_conv3d_op.py @@ -1,4 +1,4 @@ -# Copyright (c) 2018 PaddlePaddle Authors. All Rights Reserve. +# Copyright (c) 2018 PaddlePaddle Authors. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/python/paddle/v2/fluid/tests/test_conv3d_transpose_op.py b/python/paddle/v2/fluid/tests/test_conv3d_transpose_op.py index 4934c5a34e5..a70f23d4ad4 100644 --- a/python/paddle/v2/fluid/tests/test_conv3d_transpose_op.py +++ b/python/paddle/v2/fluid/tests/test_conv3d_transpose_op.py @@ -1,4 +1,4 @@ -# Copyright (c) 2018 PaddlePaddle Authors. All Rights Reserve. +# Copyright (c) 2018 PaddlePaddle Authors. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/python/paddle/v2/fluid/tests/test_conv_shift_op.py b/python/paddle/v2/fluid/tests/test_conv_shift_op.py index 7029d5a2eb4..5d4d244f439 100644 --- a/python/paddle/v2/fluid/tests/test_conv_shift_op.py +++ b/python/paddle/v2/fluid/tests/test_conv_shift_op.py @@ -1,4 +1,4 @@ -# Copyright (c) 2018 PaddlePaddle Authors. All Rights Reserve. +# Copyright (c) 2018 PaddlePaddle Authors. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/python/paddle/v2/fluid/tests/test_cos_sim_op.py b/python/paddle/v2/fluid/tests/test_cos_sim_op.py index 33db12ba9c7..1b27cd57670 100644 --- a/python/paddle/v2/fluid/tests/test_cos_sim_op.py +++ b/python/paddle/v2/fluid/tests/test_cos_sim_op.py @@ -1,4 +1,4 @@ -# Copyright (c) 2018 PaddlePaddle Authors. All Rights Reserve. +# Copyright (c) 2018 PaddlePaddle Authors. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/python/paddle/v2/fluid/tests/test_create_op_doc_string.py b/python/paddle/v2/fluid/tests/test_create_op_doc_string.py index 2b7951ecea7..4eadbd18ac4 100644 --- a/python/paddle/v2/fluid/tests/test_create_op_doc_string.py +++ b/python/paddle/v2/fluid/tests/test_create_op_doc_string.py @@ -1,4 +1,4 @@ -# Copyright (c) 2018 PaddlePaddle Authors. All Rights Reserve. +# Copyright (c) 2018 PaddlePaddle Authors. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/python/paddle/v2/fluid/tests/test_crf_decoding_op.py b/python/paddle/v2/fluid/tests/test_crf_decoding_op.py index f819387cdc4..f397f542bb0 100644 --- a/python/paddle/v2/fluid/tests/test_crf_decoding_op.py +++ b/python/paddle/v2/fluid/tests/test_crf_decoding_op.py @@ -1,4 +1,4 @@ -# Copyright (c) 2018 PaddlePaddle Authors. All Rights Reserve. +# Copyright (c) 2018 PaddlePaddle Authors. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/python/paddle/v2/fluid/tests/test_crop_op.py b/python/paddle/v2/fluid/tests/test_crop_op.py index 36bf1761689..20cc3a643f1 100644 --- a/python/paddle/v2/fluid/tests/test_crop_op.py +++ b/python/paddle/v2/fluid/tests/test_crop_op.py @@ -1,4 +1,4 @@ -# Copyright (c) 2018 PaddlePaddle Authors. All Rights Reserve. +# Copyright (c) 2018 PaddlePaddle Authors. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/python/paddle/v2/fluid/tests/test_cross_entropy_op.py b/python/paddle/v2/fluid/tests/test_cross_entropy_op.py index ae8e9be6de4..c5b9e92d691 100644 --- a/python/paddle/v2/fluid/tests/test_cross_entropy_op.py +++ b/python/paddle/v2/fluid/tests/test_cross_entropy_op.py @@ -1,4 +1,4 @@ -# Copyright (c) 2018 PaddlePaddle Authors. All Rights Reserve. +# Copyright (c) 2018 PaddlePaddle Authors. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/python/paddle/v2/fluid/tests/test_ctc_align.py b/python/paddle/v2/fluid/tests/test_ctc_align.py index cc815d8e9e1..f166031a1cb 100644 --- a/python/paddle/v2/fluid/tests/test_ctc_align.py +++ b/python/paddle/v2/fluid/tests/test_ctc_align.py @@ -1,4 +1,4 @@ -# Copyright (c) 2018 PaddlePaddle Authors. All Rights Reserve. +# Copyright (c) 2018 PaddlePaddle Authors. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/python/paddle/v2/fluid/tests/test_cumsum_op.py b/python/paddle/v2/fluid/tests/test_cumsum_op.py index e45ef457306..04e7f0b9451 100644 --- a/python/paddle/v2/fluid/tests/test_cumsum_op.py +++ b/python/paddle/v2/fluid/tests/test_cumsum_op.py @@ -1,4 +1,4 @@ -# Copyright (c) 2018 PaddlePaddle Authors. All Rights Reserve. +# Copyright (c) 2018 PaddlePaddle Authors. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/python/paddle/v2/fluid/tests/test_data_feeder.py b/python/paddle/v2/fluid/tests/test_data_feeder.py index f9672210158..3154293ee63 100644 --- a/python/paddle/v2/fluid/tests/test_data_feeder.py +++ b/python/paddle/v2/fluid/tests/test_data_feeder.py @@ -1,4 +1,4 @@ -# Copyright (c) 2018 PaddlePaddle Authors. All Rights Reserve. +# Copyright (c) 2018 PaddlePaddle Authors. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/python/paddle/v2/fluid/tests/test_decayed_adagrad_op.py b/python/paddle/v2/fluid/tests/test_decayed_adagrad_op.py index 78d4e3608e6..84c44d48173 100644 --- a/python/paddle/v2/fluid/tests/test_decayed_adagrad_op.py +++ b/python/paddle/v2/fluid/tests/test_decayed_adagrad_op.py @@ -1,4 +1,4 @@ -# Copyright (c) 2018 PaddlePaddle Authors. All Rights Reserve. +# Copyright (c) 2018 PaddlePaddle Authors. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/python/paddle/v2/fluid/tests/test_default_scope_funcs.py b/python/paddle/v2/fluid/tests/test_default_scope_funcs.py index 5ff52f6d6b4..d7ca5960709 100644 --- a/python/paddle/v2/fluid/tests/test_default_scope_funcs.py +++ b/python/paddle/v2/fluid/tests/test_default_scope_funcs.py @@ -1,4 +1,4 @@ -# Copyright (c) 2018 PaddlePaddle Authors. All Rights Reserve. +# Copyright (c) 2018 PaddlePaddle Authors. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/python/paddle/v2/fluid/tests/test_detection.py b/python/paddle/v2/fluid/tests/test_detection.py index b731fc9b02e..ca7cb5a30c7 100644 --- a/python/paddle/v2/fluid/tests/test_detection.py +++ b/python/paddle/v2/fluid/tests/test_detection.py @@ -1,4 +1,4 @@ -# Copyright (c) 2018 PaddlePaddle Authors. All Rights Reserve. +# Copyright (c) 2018 PaddlePaddle Authors. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/python/paddle/v2/fluid/tests/test_detection_output_op.py b/python/paddle/v2/fluid/tests/test_detection_output_op.py index 8a5e06b38f5..0a132652f1f 100644 --- a/python/paddle/v2/fluid/tests/test_detection_output_op.py +++ b/python/paddle/v2/fluid/tests/test_detection_output_op.py @@ -1,4 +1,4 @@ -# Copyright (c) 2018 PaddlePaddle Authors. All Rights Reserve. +# Copyright (c) 2018 PaddlePaddle Authors. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/python/paddle/v2/fluid/tests/test_dropout_op.py b/python/paddle/v2/fluid/tests/test_dropout_op.py index b0c55df9f58..60930a612c1 100644 --- a/python/paddle/v2/fluid/tests/test_dropout_op.py +++ b/python/paddle/v2/fluid/tests/test_dropout_op.py @@ -1,4 +1,4 @@ -# Copyright (c) 2018 PaddlePaddle Authors. All Rights Reserve. +# Copyright (c) 2018 PaddlePaddle Authors. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/python/paddle/v2/fluid/tests/test_dyn_rnn.py b/python/paddle/v2/fluid/tests/test_dyn_rnn.py index 2ac926c63c9..1571572fc6b 100644 --- a/python/paddle/v2/fluid/tests/test_dyn_rnn.py +++ b/python/paddle/v2/fluid/tests/test_dyn_rnn.py @@ -1,4 +1,4 @@ -# Copyright (c) 2018 PaddlePaddle Authors. All Rights Reserve. +# Copyright (c) 2018 PaddlePaddle Authors. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/python/paddle/v2/fluid/tests/test_dynrnn_gradient_check.py b/python/paddle/v2/fluid/tests/test_dynrnn_gradient_check.py index dd608432df4..8b01ec730aa 100644 --- a/python/paddle/v2/fluid/tests/test_dynrnn_gradient_check.py +++ b/python/paddle/v2/fluid/tests/test_dynrnn_gradient_check.py @@ -1,4 +1,4 @@ -# Copyright (c) 2018 PaddlePaddle Authors. All Rights Reserve. +# Copyright (c) 2018 PaddlePaddle Authors. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/python/paddle/v2/fluid/tests/test_dynrnn_static_input.py b/python/paddle/v2/fluid/tests/test_dynrnn_static_input.py index d14923b6b30..d2f05dcd14e 100644 --- a/python/paddle/v2/fluid/tests/test_dynrnn_static_input.py +++ b/python/paddle/v2/fluid/tests/test_dynrnn_static_input.py @@ -1,4 +1,4 @@ -# Copyright (c) 2018 PaddlePaddle Authors. All Rights Reserve. +# Copyright (c) 2018 PaddlePaddle Authors. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/python/paddle/v2/fluid/tests/test_edit_distance_op.py b/python/paddle/v2/fluid/tests/test_edit_distance_op.py index bebdc5cba36..2957fb50586 100644 --- a/python/paddle/v2/fluid/tests/test_edit_distance_op.py +++ b/python/paddle/v2/fluid/tests/test_edit_distance_op.py @@ -1,4 +1,4 @@ -# Copyright (c) 2018 PaddlePaddle Authors. All Rights Reserve. +# Copyright (c) 2018 PaddlePaddle Authors. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/python/paddle/v2/fluid/tests/test_elementwise_add_op.py b/python/paddle/v2/fluid/tests/test_elementwise_add_op.py index 3564772fb52..c8e930dad76 100644 --- a/python/paddle/v2/fluid/tests/test_elementwise_add_op.py +++ b/python/paddle/v2/fluid/tests/test_elementwise_add_op.py @@ -1,4 +1,4 @@ -# Copyright (c) 2018 PaddlePaddle Authors. All Rights Reserve. +# Copyright (c) 2018 PaddlePaddle Authors. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/python/paddle/v2/fluid/tests/test_elementwise_div_op.py b/python/paddle/v2/fluid/tests/test_elementwise_div_op.py index 77b113af769..bfe022af6da 100644 --- a/python/paddle/v2/fluid/tests/test_elementwise_div_op.py +++ b/python/paddle/v2/fluid/tests/test_elementwise_div_op.py @@ -1,4 +1,4 @@ -# Copyright (c) 2018 PaddlePaddle Authors. All Rights Reserve. +# Copyright (c) 2018 PaddlePaddle Authors. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/python/paddle/v2/fluid/tests/test_elementwise_max_op.py b/python/paddle/v2/fluid/tests/test_elementwise_max_op.py index 0fc15693b1d..b6cd18a5795 100644 --- a/python/paddle/v2/fluid/tests/test_elementwise_max_op.py +++ b/python/paddle/v2/fluid/tests/test_elementwise_max_op.py @@ -1,4 +1,4 @@ -# Copyright (c) 2018 PaddlePaddle Authors. All Rights Reserve. +# Copyright (c) 2018 PaddlePaddle Authors. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/python/paddle/v2/fluid/tests/test_elementwise_min_op.py b/python/paddle/v2/fluid/tests/test_elementwise_min_op.py index 51584d69809..92099724fe6 100644 --- a/python/paddle/v2/fluid/tests/test_elementwise_min_op.py +++ b/python/paddle/v2/fluid/tests/test_elementwise_min_op.py @@ -1,4 +1,4 @@ -# Copyright (c) 2018 PaddlePaddle Authors. All Rights Reserve. +# Copyright (c) 2018 PaddlePaddle Authors. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/python/paddle/v2/fluid/tests/test_elementwise_mul_op.py b/python/paddle/v2/fluid/tests/test_elementwise_mul_op.py index 12dfa6599cd..2742bb21d95 100644 --- a/python/paddle/v2/fluid/tests/test_elementwise_mul_op.py +++ b/python/paddle/v2/fluid/tests/test_elementwise_mul_op.py @@ -1,4 +1,4 @@ -# Copyright (c) 2018 PaddlePaddle Authors. All Rights Reserve. +# Copyright (c) 2018 PaddlePaddle Authors. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/python/paddle/v2/fluid/tests/test_elementwise_pow_op.py b/python/paddle/v2/fluid/tests/test_elementwise_pow_op.py index e31749df9ba..a3fd18669c5 100644 --- a/python/paddle/v2/fluid/tests/test_elementwise_pow_op.py +++ b/python/paddle/v2/fluid/tests/test_elementwise_pow_op.py @@ -1,4 +1,4 @@ -# Copyright (c) 2018 PaddlePaddle Authors. All Rights Reserve. +# Copyright (c) 2018 PaddlePaddle Authors. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/python/paddle/v2/fluid/tests/test_elementwise_sub_op.py b/python/paddle/v2/fluid/tests/test_elementwise_sub_op.py index cf53d85bbad..acf652d3fb9 100644 --- a/python/paddle/v2/fluid/tests/test_elementwise_sub_op.py +++ b/python/paddle/v2/fluid/tests/test_elementwise_sub_op.py @@ -1,4 +1,4 @@ -# Copyright (c) 2018 PaddlePaddle Authors. All Rights Reserve. +# Copyright (c) 2018 PaddlePaddle Authors. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/python/paddle/v2/fluid/tests/test_error_clip.py b/python/paddle/v2/fluid/tests/test_error_clip.py index 6f7718f4d87..b331f16913d 100644 --- a/python/paddle/v2/fluid/tests/test_error_clip.py +++ b/python/paddle/v2/fluid/tests/test_error_clip.py @@ -1,4 +1,4 @@ -# Copyright (c) 2018 PaddlePaddle Authors. All Rights Reserve. +# Copyright (c) 2018 PaddlePaddle Authors. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/python/paddle/v2/fluid/tests/test_exception.py b/python/paddle/v2/fluid/tests/test_exception.py index cd57ca586bf..066b0b7409f 100644 --- a/python/paddle/v2/fluid/tests/test_exception.py +++ b/python/paddle/v2/fluid/tests/test_exception.py @@ -1,4 +1,4 @@ -# Copyright (c) 2018 PaddlePaddle Authors. All Rights Reserve. +# Copyright (c) 2018 PaddlePaddle Authors. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/python/paddle/v2/fluid/tests/test_executor_and_mul.py b/python/paddle/v2/fluid/tests/test_executor_and_mul.py index 44f93be6cb3..c043c07b3a3 100644 --- a/python/paddle/v2/fluid/tests/test_executor_and_mul.py +++ b/python/paddle/v2/fluid/tests/test_executor_and_mul.py @@ -1,4 +1,4 @@ -# Copyright (c) 2018 PaddlePaddle Authors. All Rights Reserve. +# Copyright (c) 2018 PaddlePaddle Authors. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/python/paddle/v2/fluid/tests/test_expand_op.py b/python/paddle/v2/fluid/tests/test_expand_op.py index b1a1cbc0fae..a91e3aef5a1 100644 --- a/python/paddle/v2/fluid/tests/test_expand_op.py +++ b/python/paddle/v2/fluid/tests/test_expand_op.py @@ -1,4 +1,4 @@ -# Copyright (c) 2018 PaddlePaddle Authors. All Rights Reserve. +# Copyright (c) 2018 PaddlePaddle Authors. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/python/paddle/v2/fluid/tests/test_feed_fetch_method.py b/python/paddle/v2/fluid/tests/test_feed_fetch_method.py index 827a7590ff3..f24e5e27f37 100644 --- a/python/paddle/v2/fluid/tests/test_feed_fetch_method.py +++ b/python/paddle/v2/fluid/tests/test_feed_fetch_method.py @@ -1,4 +1,4 @@ -# Copyright (c) 2018 PaddlePaddle Authors. All Rights Reserve. +# Copyright (c) 2018 PaddlePaddle Authors. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/python/paddle/v2/fluid/tests/test_fill_constant_batch_size_like_op.py b/python/paddle/v2/fluid/tests/test_fill_constant_batch_size_like_op.py index f34a1ceb230..66e3e2d51d1 100644 --- a/python/paddle/v2/fluid/tests/test_fill_constant_batch_size_like_op.py +++ b/python/paddle/v2/fluid/tests/test_fill_constant_batch_size_like_op.py @@ -1,4 +1,4 @@ -# Copyright (c) 2018 PaddlePaddle Authors. All Rights Reserve. +# Copyright (c) 2018 PaddlePaddle Authors. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/python/paddle/v2/fluid/tests/test_fill_constant_op.py b/python/paddle/v2/fluid/tests/test_fill_constant_op.py index a05fa39729d..5e2ddb218af 100644 --- a/python/paddle/v2/fluid/tests/test_fill_constant_op.py +++ b/python/paddle/v2/fluid/tests/test_fill_constant_op.py @@ -1,4 +1,4 @@ -# Copyright (c) 2018 PaddlePaddle Authors. All Rights Reserve. +# Copyright (c) 2018 PaddlePaddle Authors. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/python/paddle/v2/fluid/tests/test_fill_op.py b/python/paddle/v2/fluid/tests/test_fill_op.py index 901546f6f89..34c64013779 100644 --- a/python/paddle/v2/fluid/tests/test_fill_op.py +++ b/python/paddle/v2/fluid/tests/test_fill_op.py @@ -1,4 +1,4 @@ -# Copyright (c) 2018 PaddlePaddle Authors. All Rights Reserve. +# Copyright (c) 2018 PaddlePaddle Authors. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/python/paddle/v2/fluid/tests/test_fill_zeros_like_op.py b/python/paddle/v2/fluid/tests/test_fill_zeros_like_op.py index b7f0b96647d..c9b3e4ba138 100644 --- a/python/paddle/v2/fluid/tests/test_fill_zeros_like_op.py +++ b/python/paddle/v2/fluid/tests/test_fill_zeros_like_op.py @@ -1,4 +1,4 @@ -# Copyright (c) 2018 PaddlePaddle Authors. All Rights Reserve. +# Copyright (c) 2018 PaddlePaddle Authors. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/python/paddle/v2/fluid/tests/test_framework_debug_str.py b/python/paddle/v2/fluid/tests/test_framework_debug_str.py index f8fcfb2249b..88995c24dfc 100644 --- a/python/paddle/v2/fluid/tests/test_framework_debug_str.py +++ b/python/paddle/v2/fluid/tests/test_framework_debug_str.py @@ -1,4 +1,4 @@ -# Copyright (c) 2018 PaddlePaddle Authors. All Rights Reserve. +# Copyright (c) 2018 PaddlePaddle Authors. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/python/paddle/v2/fluid/tests/test_ftrl_op.py b/python/paddle/v2/fluid/tests/test_ftrl_op.py index 895337de0fb..5f7581391af 100644 --- a/python/paddle/v2/fluid/tests/test_ftrl_op.py +++ b/python/paddle/v2/fluid/tests/test_ftrl_op.py @@ -1,4 +1,4 @@ -# Copyright (c) 2018 PaddlePaddle Authors. All Rights Reserve. +# Copyright (c) 2018 PaddlePaddle Authors. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/python/paddle/v2/fluid/tests/test_gather_op.py b/python/paddle/v2/fluid/tests/test_gather_op.py index 76756367976..6fd043c27e2 100644 --- a/python/paddle/v2/fluid/tests/test_gather_op.py +++ b/python/paddle/v2/fluid/tests/test_gather_op.py @@ -1,4 +1,4 @@ -# Copyright (c) 2018 PaddlePaddle Authors. All Rights Reserve. +# Copyright (c) 2018 PaddlePaddle Authors. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/python/paddle/v2/fluid/tests/test_gaussian_random_op.py b/python/paddle/v2/fluid/tests/test_gaussian_random_op.py index 79beb8b1fce..3c0ee64098a 100644 --- a/python/paddle/v2/fluid/tests/test_gaussian_random_op.py +++ b/python/paddle/v2/fluid/tests/test_gaussian_random_op.py @@ -1,4 +1,4 @@ -# Copyright (c) 2018 PaddlePaddle Authors. All Rights Reserve. +# Copyright (c) 2018 PaddlePaddle Authors. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/python/paddle/v2/fluid/tests/test_get_places_op.py b/python/paddle/v2/fluid/tests/test_get_places_op.py index 68698c5f4a2..265433e606f 100644 --- a/python/paddle/v2/fluid/tests/test_get_places_op.py +++ b/python/paddle/v2/fluid/tests/test_get_places_op.py @@ -1,4 +1,4 @@ -# Copyright (c) 2018 PaddlePaddle Authors. All Rights Reserve. +# Copyright (c) 2018 PaddlePaddle Authors. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/python/paddle/v2/fluid/tests/test_gradient_clip.py b/python/paddle/v2/fluid/tests/test_gradient_clip.py index 9337791c211..792262df84f 100644 --- a/python/paddle/v2/fluid/tests/test_gradient_clip.py +++ b/python/paddle/v2/fluid/tests/test_gradient_clip.py @@ -1,4 +1,4 @@ -# Copyright (c) 2018 PaddlePaddle Authors. All Rights Reserve. +# Copyright (c) 2018 PaddlePaddle Authors. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/python/paddle/v2/fluid/tests/test_gru_op.py b/python/paddle/v2/fluid/tests/test_gru_op.py index 69cfd6c481c..3a13eb872a8 100644 --- a/python/paddle/v2/fluid/tests/test_gru_op.py +++ b/python/paddle/v2/fluid/tests/test_gru_op.py @@ -1,4 +1,4 @@ -# Copyright (c) 2018 PaddlePaddle Authors. All Rights Reserve. +# Copyright (c) 2018 PaddlePaddle Authors. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/python/paddle/v2/fluid/tests/test_gru_unit_op.py b/python/paddle/v2/fluid/tests/test_gru_unit_op.py index 71f13c45136..c56b1eefd3a 100644 --- a/python/paddle/v2/fluid/tests/test_gru_unit_op.py +++ b/python/paddle/v2/fluid/tests/test_gru_unit_op.py @@ -1,4 +1,4 @@ -# Copyright (c) 2018 PaddlePaddle Authors. All Rights Reserve. +# Copyright (c) 2018 PaddlePaddle Authors. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/python/paddle/v2/fluid/tests/test_hinge_loss_op.py b/python/paddle/v2/fluid/tests/test_hinge_loss_op.py index 71ff47316ec..70586c6be3d 100644 --- a/python/paddle/v2/fluid/tests/test_hinge_loss_op.py +++ b/python/paddle/v2/fluid/tests/test_hinge_loss_op.py @@ -1,4 +1,4 @@ -# Copyright (c) 2018 PaddlePaddle Authors. All Rights Reserve. +# Copyright (c) 2018 PaddlePaddle Authors. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/python/paddle/v2/fluid/tests/test_huber_loss_op.py b/python/paddle/v2/fluid/tests/test_huber_loss_op.py index e4560af7782..a8d0a776255 100644 --- a/python/paddle/v2/fluid/tests/test_huber_loss_op.py +++ b/python/paddle/v2/fluid/tests/test_huber_loss_op.py @@ -1,4 +1,4 @@ -# Copyright (c) 2018 PaddlePaddle Authors. All Rights Reserve. +# Copyright (c) 2018 PaddlePaddle Authors. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/python/paddle/v2/fluid/tests/test_im2sequence_op.py b/python/paddle/v2/fluid/tests/test_im2sequence_op.py index 2cab3e31a50..4946475f11a 100644 --- a/python/paddle/v2/fluid/tests/test_im2sequence_op.py +++ b/python/paddle/v2/fluid/tests/test_im2sequence_op.py @@ -1,4 +1,4 @@ -# Copyright (c) 2018 PaddlePaddle Authors. All Rights Reserve. +# Copyright (c) 2018 PaddlePaddle Authors. All Rights Reserved. # #Licensed under the Apache License, Version 2.0 (the "License"); #you may not use this file except in compliance with the License. diff --git a/python/paddle/v2/fluid/tests/test_image_classification_layer.py b/python/paddle/v2/fluid/tests/test_image_classification_layer.py index c64cfed5f58..8af8f646a71 100644 --- a/python/paddle/v2/fluid/tests/test_image_classification_layer.py +++ b/python/paddle/v2/fluid/tests/test_image_classification_layer.py @@ -1,4 +1,4 @@ -# Copyright (c) 2018 PaddlePaddle Authors. All Rights Reserve. +# Copyright (c) 2018 PaddlePaddle Authors. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/python/paddle/v2/fluid/tests/test_infer_shape.py b/python/paddle/v2/fluid/tests/test_infer_shape.py index 521096388a3..17957b9e049 100644 --- a/python/paddle/v2/fluid/tests/test_infer_shape.py +++ b/python/paddle/v2/fluid/tests/test_infer_shape.py @@ -1,4 +1,4 @@ -# Copyright (c) 2018 PaddlePaddle Authors. All Rights Reserve. +# Copyright (c) 2018 PaddlePaddle Authors. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/python/paddle/v2/fluid/tests/test_inference_model_io.py b/python/paddle/v2/fluid/tests/test_inference_model_io.py index adf428aa848..e381312ccc7 100644 --- a/python/paddle/v2/fluid/tests/test_inference_model_io.py +++ b/python/paddle/v2/fluid/tests/test_inference_model_io.py @@ -1,4 +1,4 @@ -# Copyright (c) 2018 PaddlePaddle Authors. All Rights Reserve. +# Copyright (c) 2018 PaddlePaddle Authors. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/python/paddle/v2/fluid/tests/test_initializer.py b/python/paddle/v2/fluid/tests/test_initializer.py index 67746b4d7d9..6d4eb62916b 100644 --- a/python/paddle/v2/fluid/tests/test_initializer.py +++ b/python/paddle/v2/fluid/tests/test_initializer.py @@ -1,4 +1,4 @@ -# Copyright (c) 2018 PaddlePaddle Authors. All Rights Reserve. +# Copyright (c) 2018 PaddlePaddle Authors. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/python/paddle/v2/fluid/tests/test_iou_similarity_op.py b/python/paddle/v2/fluid/tests/test_iou_similarity_op.py index 128f2e49771..e33436b63c0 100644 --- a/python/paddle/v2/fluid/tests/test_iou_similarity_op.py +++ b/python/paddle/v2/fluid/tests/test_iou_similarity_op.py @@ -1,4 +1,4 @@ -# Copyright (c) 2018 PaddlePaddle Authors. All Rights Reserve. +# Copyright (c) 2018 PaddlePaddle Authors. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/python/paddle/v2/fluid/tests/test_is_empty_op.py b/python/paddle/v2/fluid/tests/test_is_empty_op.py index 7c17e3d57aa..799da9dc151 100644 --- a/python/paddle/v2/fluid/tests/test_is_empty_op.py +++ b/python/paddle/v2/fluid/tests/test_is_empty_op.py @@ -1,4 +1,4 @@ -# Copyright (c) 2018 PaddlePaddle Authors. All Rights Reserve. +# Copyright (c) 2018 PaddlePaddle Authors. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/python/paddle/v2/fluid/tests/test_l1_norm_op.py b/python/paddle/v2/fluid/tests/test_l1_norm_op.py index bbc20878468..fa5b18a16f7 100644 --- a/python/paddle/v2/fluid/tests/test_l1_norm_op.py +++ b/python/paddle/v2/fluid/tests/test_l1_norm_op.py @@ -1,4 +1,4 @@ -# Copyright (c) 2018 PaddlePaddle Authors. All Rights Reserve. +# Copyright (c) 2018 PaddlePaddle Authors. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/python/paddle/v2/fluid/tests/test_label_smooth_op.py b/python/paddle/v2/fluid/tests/test_label_smooth_op.py index 19a4df57446..ca21289a0d4 100644 --- a/python/paddle/v2/fluid/tests/test_label_smooth_op.py +++ b/python/paddle/v2/fluid/tests/test_label_smooth_op.py @@ -1,4 +1,4 @@ -# Copyright (c) 2018 PaddlePaddle Authors. All Rights Reserve. +# Copyright (c) 2018 PaddlePaddle Authors. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/python/paddle/v2/fluid/tests/test_layer_norm_op.py b/python/paddle/v2/fluid/tests/test_layer_norm_op.py index 4460ffaf9c4..b723b471bc8 100644 --- a/python/paddle/v2/fluid/tests/test_layer_norm_op.py +++ b/python/paddle/v2/fluid/tests/test_layer_norm_op.py @@ -1,4 +1,4 @@ -# Copyright (c) 2018 PaddlePaddle Authors. All Rights Reserve. +# Copyright (c) 2018 PaddlePaddle Authors. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/python/paddle/v2/fluid/tests/test_layers.py b/python/paddle/v2/fluid/tests/test_layers.py index 50ef8204249..e757598bbac 100644 --- a/python/paddle/v2/fluid/tests/test_layers.py +++ b/python/paddle/v2/fluid/tests/test_layers.py @@ -1,4 +1,4 @@ -# Copyright (c) 2018 PaddlePaddle Authors. All Rights Reserve. +# Copyright (c) 2018 PaddlePaddle Authors. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/python/paddle/v2/fluid/tests/test_linear_chain_crf_op.py b/python/paddle/v2/fluid/tests/test_linear_chain_crf_op.py index cbfd9d5e5b3..f49f7635f76 100644 --- a/python/paddle/v2/fluid/tests/test_linear_chain_crf_op.py +++ b/python/paddle/v2/fluid/tests/test_linear_chain_crf_op.py @@ -1,4 +1,4 @@ -# Copyright (c) 2018 PaddlePaddle Authors. All Rights Reserve. +# Copyright (c) 2018 PaddlePaddle Authors. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/python/paddle/v2/fluid/tests/test_lod_array_length_op.py b/python/paddle/v2/fluid/tests/test_lod_array_length_op.py index eff28368f1a..643ee906d6f 100644 --- a/python/paddle/v2/fluid/tests/test_lod_array_length_op.py +++ b/python/paddle/v2/fluid/tests/test_lod_array_length_op.py @@ -1,4 +1,4 @@ -# Copyright (c) 2018 PaddlePaddle Authors. All Rights Reserve. +# Copyright (c) 2018 PaddlePaddle Authors. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/python/paddle/v2/fluid/tests/test_lod_rank_table.py b/python/paddle/v2/fluid/tests/test_lod_rank_table.py index eb0392e8bf7..70b8d69585c 100644 --- a/python/paddle/v2/fluid/tests/test_lod_rank_table.py +++ b/python/paddle/v2/fluid/tests/test_lod_rank_table.py @@ -1,4 +1,4 @@ -# Copyright (c) 2018 PaddlePaddle Authors. All Rights Reserve. +# Copyright (c) 2018 PaddlePaddle Authors. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/python/paddle/v2/fluid/tests/test_lod_reset_op.py b/python/paddle/v2/fluid/tests/test_lod_reset_op.py index 4ee360403e8..3bf8230f874 100644 --- a/python/paddle/v2/fluid/tests/test_lod_reset_op.py +++ b/python/paddle/v2/fluid/tests/test_lod_reset_op.py @@ -1,4 +1,4 @@ -# Copyright (c) 2018 PaddlePaddle Authors. All Rights Reserve. +# Copyright (c) 2018 PaddlePaddle Authors. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/python/paddle/v2/fluid/tests/test_lod_tensor_array.py b/python/paddle/v2/fluid/tests/test_lod_tensor_array.py index 0f3ac3c03db..0e90e255381 100644 --- a/python/paddle/v2/fluid/tests/test_lod_tensor_array.py +++ b/python/paddle/v2/fluid/tests/test_lod_tensor_array.py @@ -1,4 +1,4 @@ -# Copyright (c) 2018 PaddlePaddle Authors. All Rights Reserve. +# Copyright (c) 2018 PaddlePaddle Authors. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/python/paddle/v2/fluid/tests/test_lod_tensor_array_ops.py b/python/paddle/v2/fluid/tests/test_lod_tensor_array_ops.py index c2d04db99b9..ebc0a2f7146 100644 --- a/python/paddle/v2/fluid/tests/test_lod_tensor_array_ops.py +++ b/python/paddle/v2/fluid/tests/test_lod_tensor_array_ops.py @@ -1,4 +1,4 @@ -# Copyright (c) 2018 PaddlePaddle Authors. All Rights Reserve. +# Copyright (c) 2018 PaddlePaddle Authors. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/python/paddle/v2/fluid/tests/test_log_loss_op.py b/python/paddle/v2/fluid/tests/test_log_loss_op.py index 338355d0c4d..d3980b8db93 100644 --- a/python/paddle/v2/fluid/tests/test_log_loss_op.py +++ b/python/paddle/v2/fluid/tests/test_log_loss_op.py @@ -1,4 +1,4 @@ -# Copyright (c) 2018 PaddlePaddle Authors. All Rights Reserve. +# Copyright (c) 2018 PaddlePaddle Authors. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/python/paddle/v2/fluid/tests/test_logical_op.py b/python/paddle/v2/fluid/tests/test_logical_op.py index dd67dc561b0..1d7dfe60f20 100644 --- a/python/paddle/v2/fluid/tests/test_logical_op.py +++ b/python/paddle/v2/fluid/tests/test_logical_op.py @@ -1,4 +1,4 @@ -# Copyright (c) 2018 PaddlePaddle Authors. All Rights Reserve. +# Copyright (c) 2018 PaddlePaddle Authors. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/python/paddle/v2/fluid/tests/test_lookup_table_op.py b/python/paddle/v2/fluid/tests/test_lookup_table_op.py index 0c566c76c91..03a5bd24a13 100644 --- a/python/paddle/v2/fluid/tests/test_lookup_table_op.py +++ b/python/paddle/v2/fluid/tests/test_lookup_table_op.py @@ -1,4 +1,4 @@ -# Copyright (c) 2018 PaddlePaddle Authors. All Rights Reserve. +# Copyright (c) 2018 PaddlePaddle Authors. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/python/paddle/v2/fluid/tests/test_lrn_op.py b/python/paddle/v2/fluid/tests/test_lrn_op.py index a841dcf79f9..7f2352c5882 100644 --- a/python/paddle/v2/fluid/tests/test_lrn_op.py +++ b/python/paddle/v2/fluid/tests/test_lrn_op.py @@ -1,4 +1,4 @@ -# Copyright (c) 2018 PaddlePaddle Authors. All Rights Reserve. +# Copyright (c) 2018 PaddlePaddle Authors. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/python/paddle/v2/fluid/tests/test_lstm_op.py b/python/paddle/v2/fluid/tests/test_lstm_op.py index 3e79f9d8e15..f8ff5a3361a 100644 --- a/python/paddle/v2/fluid/tests/test_lstm_op.py +++ b/python/paddle/v2/fluid/tests/test_lstm_op.py @@ -1,4 +1,4 @@ -# Copyright (c) 2018 PaddlePaddle Authors. All Rights Reserve. +# Copyright (c) 2018 PaddlePaddle Authors. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/python/paddle/v2/fluid/tests/test_lstm_unit_op.py b/python/paddle/v2/fluid/tests/test_lstm_unit_op.py index d6348ea0ec9..af0c3db701e 100644 --- a/python/paddle/v2/fluid/tests/test_lstm_unit_op.py +++ b/python/paddle/v2/fluid/tests/test_lstm_unit_op.py @@ -1,4 +1,4 @@ -# Copyright (c) 2018 PaddlePaddle Authors. All Rights Reserve. +# Copyright (c) 2018 PaddlePaddle Authors. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/python/paddle/v2/fluid/tests/test_lstmp_op.py b/python/paddle/v2/fluid/tests/test_lstmp_op.py index 92a954a9aa5..afff133f6c6 100644 --- a/python/paddle/v2/fluid/tests/test_lstmp_op.py +++ b/python/paddle/v2/fluid/tests/test_lstmp_op.py @@ -1,4 +1,4 @@ -# Copyright (c) 2018 PaddlePaddle Authors. All Rights Reserve. +# Copyright (c) 2018 PaddlePaddle Authors. All Rights Reserved. # #Licensed under the Apache License, Version 2.0 (the "License"); #you may not use this file except in compliance with the License. diff --git a/python/paddle/v2/fluid/tests/test_margin_rank_loss_op.py b/python/paddle/v2/fluid/tests/test_margin_rank_loss_op.py index 694ce207128..97c112487fd 100644 --- a/python/paddle/v2/fluid/tests/test_margin_rank_loss_op.py +++ b/python/paddle/v2/fluid/tests/test_margin_rank_loss_op.py @@ -1,4 +1,4 @@ -# Copyright (c) 2018 PaddlePaddle Authors. All Rights Reserve. +# Copyright (c) 2018 PaddlePaddle Authors. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/python/paddle/v2/fluid/tests/test_math_op_patch.py b/python/paddle/v2/fluid/tests/test_math_op_patch.py index 2e77639a4c8..cae5188fe88 100644 --- a/python/paddle/v2/fluid/tests/test_math_op_patch.py +++ b/python/paddle/v2/fluid/tests/test_math_op_patch.py @@ -1,4 +1,4 @@ -# Copyright (c) 2018 PaddlePaddle Authors. All Rights Reserve. +# Copyright (c) 2018 PaddlePaddle Authors. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/python/paddle/v2/fluid/tests/test_matmul_op.py b/python/paddle/v2/fluid/tests/test_matmul_op.py index 5138af38f4d..44ac4683891 100644 --- a/python/paddle/v2/fluid/tests/test_matmul_op.py +++ b/python/paddle/v2/fluid/tests/test_matmul_op.py @@ -1,4 +1,4 @@ -# Copyright (c) 2018 PaddlePaddle Authors. All Rights Reserve. +# Copyright (c) 2018 PaddlePaddle Authors. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/python/paddle/v2/fluid/tests/test_maxout_op.py b/python/paddle/v2/fluid/tests/test_maxout_op.py index 5cd7fbde84a..f5ddf72516b 100644 --- a/python/paddle/v2/fluid/tests/test_maxout_op.py +++ b/python/paddle/v2/fluid/tests/test_maxout_op.py @@ -1,4 +1,4 @@ -# Copyright (c) 2018 PaddlePaddle Authors. All Rights Reserve. +# Copyright (c) 2018 PaddlePaddle Authors. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/python/paddle/v2/fluid/tests/test_mean_op.py b/python/paddle/v2/fluid/tests/test_mean_op.py index 81e84216358..15472a8fc47 100644 --- a/python/paddle/v2/fluid/tests/test_mean_op.py +++ b/python/paddle/v2/fluid/tests/test_mean_op.py @@ -1,4 +1,4 @@ -# Copyright (c) 2018 PaddlePaddle Authors. All Rights Reserve. +# Copyright (c) 2018 PaddlePaddle Authors. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/python/paddle/v2/fluid/tests/test_memory_optimization_transpiler.py b/python/paddle/v2/fluid/tests/test_memory_optimization_transpiler.py index 2e9ed78ffd8..a276db581e2 100644 --- a/python/paddle/v2/fluid/tests/test_memory_optimization_transpiler.py +++ b/python/paddle/v2/fluid/tests/test_memory_optimization_transpiler.py @@ -1,4 +1,4 @@ -# Copyright (c) 2018 PaddlePaddle Authors. All Rights Reserve. +# Copyright (c) 2018 PaddlePaddle Authors. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/python/paddle/v2/fluid/tests/test_minus_op.py b/python/paddle/v2/fluid/tests/test_minus_op.py index aee909f56c4..ee32bd49925 100644 --- a/python/paddle/v2/fluid/tests/test_minus_op.py +++ b/python/paddle/v2/fluid/tests/test_minus_op.py @@ -1,4 +1,4 @@ -# Copyright (c) 2018 PaddlePaddle Authors. All Rights Reserve. +# Copyright (c) 2018 PaddlePaddle Authors. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/python/paddle/v2/fluid/tests/test_mnist_if_else_op.py b/python/paddle/v2/fluid/tests/test_mnist_if_else_op.py index 3288a0f007c..75a651cf271 100644 --- a/python/paddle/v2/fluid/tests/test_mnist_if_else_op.py +++ b/python/paddle/v2/fluid/tests/test_mnist_if_else_op.py @@ -1,4 +1,4 @@ -# Copyright (c) 2018 PaddlePaddle Authors. All Rights Reserve. +# Copyright (c) 2018 PaddlePaddle Authors. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/python/paddle/v2/fluid/tests/test_modified_huber_loss_op.py b/python/paddle/v2/fluid/tests/test_modified_huber_loss_op.py index eb3873b9ea8..def48c92613 100644 --- a/python/paddle/v2/fluid/tests/test_modified_huber_loss_op.py +++ b/python/paddle/v2/fluid/tests/test_modified_huber_loss_op.py @@ -1,4 +1,4 @@ -# Copyright (c) 2018 PaddlePaddle Authors. All Rights Reserve. +# Copyright (c) 2018 PaddlePaddle Authors. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/python/paddle/v2/fluid/tests/test_momentum_op.py b/python/paddle/v2/fluid/tests/test_momentum_op.py index 048eaae06ba..aaea9c18092 100644 --- a/python/paddle/v2/fluid/tests/test_momentum_op.py +++ b/python/paddle/v2/fluid/tests/test_momentum_op.py @@ -1,4 +1,4 @@ -# Copyright (c) 2018 PaddlePaddle Authors. All Rights Reserve. +# Copyright (c) 2018 PaddlePaddle Authors. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/python/paddle/v2/fluid/tests/test_mul_op.py b/python/paddle/v2/fluid/tests/test_mul_op.py index 83715f0e27b..9d1da420c7f 100644 --- a/python/paddle/v2/fluid/tests/test_mul_op.py +++ b/python/paddle/v2/fluid/tests/test_mul_op.py @@ -1,4 +1,4 @@ -# Copyright (c) 2018 PaddlePaddle Authors. All Rights Reserve. +# Copyright (c) 2018 PaddlePaddle Authors. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/python/paddle/v2/fluid/tests/test_multiclass_nms_op.py b/python/paddle/v2/fluid/tests/test_multiclass_nms_op.py index 529223cf40d..6459913c016 100644 --- a/python/paddle/v2/fluid/tests/test_multiclass_nms_op.py +++ b/python/paddle/v2/fluid/tests/test_multiclass_nms_op.py @@ -1,4 +1,4 @@ -# Copyright (c) 2018 PaddlePaddle Authors. All Rights Reserve. +# Copyright (c) 2018 PaddlePaddle Authors. All Rights Reserved. # #Licensed under the Apache License, Version 2.0 (the "License"); #you may not use this file except in compliance with the License. diff --git a/python/paddle/v2/fluid/tests/test_multihead_attention.py b/python/paddle/v2/fluid/tests/test_multihead_attention.py index a2b300a645f..6eeeefe021c 100644 --- a/python/paddle/v2/fluid/tests/test_multihead_attention.py +++ b/python/paddle/v2/fluid/tests/test_multihead_attention.py @@ -1,4 +1,4 @@ -# Copyright (c) 2018 PaddlePaddle Authors. All Rights Reserve. +# Copyright (c) 2018 PaddlePaddle Authors. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/python/paddle/v2/fluid/tests/test_multiplex_op.py b/python/paddle/v2/fluid/tests/test_multiplex_op.py index a06aef94a5d..03cad8b43ba 100644 --- a/python/paddle/v2/fluid/tests/test_multiplex_op.py +++ b/python/paddle/v2/fluid/tests/test_multiplex_op.py @@ -1,4 +1,4 @@ -# Copyright (c) 2018 PaddlePaddle Authors. All Rights Reserve. +# Copyright (c) 2018 PaddlePaddle Authors. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/python/paddle/v2/fluid/tests/test_nce.py b/python/paddle/v2/fluid/tests/test_nce.py index 9a51c1f612a..068081972db 100644 --- a/python/paddle/v2/fluid/tests/test_nce.py +++ b/python/paddle/v2/fluid/tests/test_nce.py @@ -1,4 +1,4 @@ -# Copyright (c) 2018 PaddlePaddle Authors. All Rights Reserve. +# Copyright (c) 2018 PaddlePaddle Authors. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/python/paddle/v2/fluid/tests/test_net.py b/python/paddle/v2/fluid/tests/test_net.py index 69d95d4f707..796a8391179 100644 --- a/python/paddle/v2/fluid/tests/test_net.py +++ b/python/paddle/v2/fluid/tests/test_net.py @@ -1,4 +1,4 @@ -# Copyright (c) 2018 PaddlePaddle Authors. All Rights Reserve. +# Copyright (c) 2018 PaddlePaddle Authors. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/python/paddle/v2/fluid/tests/test_norm_op.py b/python/paddle/v2/fluid/tests/test_norm_op.py index dd1cd5a31c5..6feda175fb5 100644 --- a/python/paddle/v2/fluid/tests/test_norm_op.py +++ b/python/paddle/v2/fluid/tests/test_norm_op.py @@ -1,4 +1,4 @@ -# Copyright (c) 2018 PaddlePaddle Authors. All Rights Reserve. +# Copyright (c) 2018 PaddlePaddle Authors. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/python/paddle/v2/fluid/tests/test_normalization_wrapper.py b/python/paddle/v2/fluid/tests/test_normalization_wrapper.py index 6b71f2a923f..094d8071e27 100644 --- a/python/paddle/v2/fluid/tests/test_normalization_wrapper.py +++ b/python/paddle/v2/fluid/tests/test_normalization_wrapper.py @@ -1,4 +1,4 @@ -# Copyright (c) 2018 PaddlePaddle Authors. All Rights Reserve. +# Copyright (c) 2018 PaddlePaddle Authors. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/python/paddle/v2/fluid/tests/test_one_hot_op.py b/python/paddle/v2/fluid/tests/test_one_hot_op.py index e51ea27d14d..c93be0efda9 100644 --- a/python/paddle/v2/fluid/tests/test_one_hot_op.py +++ b/python/paddle/v2/fluid/tests/test_one_hot_op.py @@ -1,4 +1,4 @@ -# Copyright (c) 2018 PaddlePaddle Authors. All Rights Reserve. +# Copyright (c) 2018 PaddlePaddle Authors. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/python/paddle/v2/fluid/tests/test_op_support_gpu.py b/python/paddle/v2/fluid/tests/test_op_support_gpu.py index 7de02a8fda2..f8ac55590c7 100644 --- a/python/paddle/v2/fluid/tests/test_op_support_gpu.py +++ b/python/paddle/v2/fluid/tests/test_op_support_gpu.py @@ -1,4 +1,4 @@ -# Copyright (c) 2018 PaddlePaddle Authors. All Rights Reserve. +# Copyright (c) 2018 PaddlePaddle Authors. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/python/paddle/v2/fluid/tests/test_operator.py b/python/paddle/v2/fluid/tests/test_operator.py index b82cf580e85..1f5de93387d 100644 --- a/python/paddle/v2/fluid/tests/test_operator.py +++ b/python/paddle/v2/fluid/tests/test_operator.py @@ -1,4 +1,4 @@ -# Copyright (c) 2018 PaddlePaddle Authors. All Rights Reserve. +# Copyright (c) 2018 PaddlePaddle Authors. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/python/paddle/v2/fluid/tests/test_operator_desc.py b/python/paddle/v2/fluid/tests/test_operator_desc.py index 2c8665ffa25..c64c08ff7f3 100644 --- a/python/paddle/v2/fluid/tests/test_operator_desc.py +++ b/python/paddle/v2/fluid/tests/test_operator_desc.py @@ -1,4 +1,4 @@ -# Copyright (c) 2018 PaddlePaddle Authors. All Rights Reserve. +# Copyright (c) 2018 PaddlePaddle Authors. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/python/paddle/v2/fluid/tests/test_optimizer.py b/python/paddle/v2/fluid/tests/test_optimizer.py index dc6b84dcdc0..875e9e7c762 100644 --- a/python/paddle/v2/fluid/tests/test_optimizer.py +++ b/python/paddle/v2/fluid/tests/test_optimizer.py @@ -1,4 +1,4 @@ -# Copyright (c) 2018 PaddlePaddle Authors. All Rights Reserve. +# Copyright (c) 2018 PaddlePaddle Authors. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/python/paddle/v2/fluid/tests/test_pad_op.py b/python/paddle/v2/fluid/tests/test_pad_op.py index 0bd48000555..300f3ffcb8d 100644 --- a/python/paddle/v2/fluid/tests/test_pad_op.py +++ b/python/paddle/v2/fluid/tests/test_pad_op.py @@ -1,4 +1,4 @@ -# Copyright (c) 2018 PaddlePaddle Authors. All Rights Reserve. +# Copyright (c) 2018 PaddlePaddle Authors. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/python/paddle/v2/fluid/tests/test_parallel_op.py b/python/paddle/v2/fluid/tests/test_parallel_op.py index f1fd09a7fdb..a0fc91f6de6 100644 --- a/python/paddle/v2/fluid/tests/test_parallel_op.py +++ b/python/paddle/v2/fluid/tests/test_parallel_op.py @@ -1,4 +1,4 @@ -# Copyright (c) 2018 PaddlePaddle Authors. All Rights Reserve. +# Copyright (c) 2018 PaddlePaddle Authors. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/python/paddle/v2/fluid/tests/test_parameter.py b/python/paddle/v2/fluid/tests/test_parameter.py index dfecdf939bc..0ba9235fdb6 100644 --- a/python/paddle/v2/fluid/tests/test_parameter.py +++ b/python/paddle/v2/fluid/tests/test_parameter.py @@ -1,4 +1,4 @@ -# Copyright (c) 2018 PaddlePaddle Authors. All Rights Reserve. +# Copyright (c) 2018 PaddlePaddle Authors. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/python/paddle/v2/fluid/tests/test_pool2d_op.py b/python/paddle/v2/fluid/tests/test_pool2d_op.py index 2f43be8a0ff..77961bc99f0 100644 --- a/python/paddle/v2/fluid/tests/test_pool2d_op.py +++ b/python/paddle/v2/fluid/tests/test_pool2d_op.py @@ -1,4 +1,4 @@ -# Copyright (c) 2018 PaddlePaddle Authors. All Rights Reserve. +# Copyright (c) 2018 PaddlePaddle Authors. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/python/paddle/v2/fluid/tests/test_pool3d_op.py b/python/paddle/v2/fluid/tests/test_pool3d_op.py index c93711e051b..a6afdaedc51 100644 --- a/python/paddle/v2/fluid/tests/test_pool3d_op.py +++ b/python/paddle/v2/fluid/tests/test_pool3d_op.py @@ -1,4 +1,4 @@ -# Copyright (c) 2018 PaddlePaddle Authors. All Rights Reserve. +# Copyright (c) 2018 PaddlePaddle Authors. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/python/paddle/v2/fluid/tests/test_pool_max_op.py b/python/paddle/v2/fluid/tests/test_pool_max_op.py index 330ad24bd42..cf9b7639224 100644 --- a/python/paddle/v2/fluid/tests/test_pool_max_op.py +++ b/python/paddle/v2/fluid/tests/test_pool_max_op.py @@ -1,4 +1,4 @@ -# Copyright (c) 2018 PaddlePaddle Authors. All Rights Reserve. +# Copyright (c) 2018 PaddlePaddle Authors. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/python/paddle/v2/fluid/tests/test_positive_negative_pair_op.py b/python/paddle/v2/fluid/tests/test_positive_negative_pair_op.py index 9b5e5446555..091cfc9c727 100644 --- a/python/paddle/v2/fluid/tests/test_positive_negative_pair_op.py +++ b/python/paddle/v2/fluid/tests/test_positive_negative_pair_op.py @@ -1,4 +1,4 @@ -# Copyright (c) 2018 PaddlePaddle Authors. All Rights Reserve. +# Copyright (c) 2018 PaddlePaddle Authors. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/python/paddle/v2/fluid/tests/test_precision_recall_op.py b/python/paddle/v2/fluid/tests/test_precision_recall_op.py index 188b7af5593..7830ba29583 100644 --- a/python/paddle/v2/fluid/tests/test_precision_recall_op.py +++ b/python/paddle/v2/fluid/tests/test_precision_recall_op.py @@ -1,4 +1,4 @@ -# Copyright (c) 2018 PaddlePaddle Authors. All Rights Reserve. +# Copyright (c) 2018 PaddlePaddle Authors. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/python/paddle/v2/fluid/tests/test_prelu_op.py b/python/paddle/v2/fluid/tests/test_prelu_op.py index 848036234c8..ae19a553bb8 100644 --- a/python/paddle/v2/fluid/tests/test_prelu_op.py +++ b/python/paddle/v2/fluid/tests/test_prelu_op.py @@ -1,4 +1,4 @@ -# Copyright (c) 2018 PaddlePaddle Authors. All Rights Reserve. +# Copyright (c) 2018 PaddlePaddle Authors. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/python/paddle/v2/fluid/tests/test_print_op.py b/python/paddle/v2/fluid/tests/test_print_op.py index 3177700dfad..1e49ce994b7 100644 --- a/python/paddle/v2/fluid/tests/test_print_op.py +++ b/python/paddle/v2/fluid/tests/test_print_op.py @@ -1,4 +1,4 @@ -# Copyright (c) 2018 PaddlePaddle Authors. All Rights Reserve. +# Copyright (c) 2018 PaddlePaddle Authors. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/python/paddle/v2/fluid/tests/test_prior_box_op.py b/python/paddle/v2/fluid/tests/test_prior_box_op.py index a6c21af49f6..c21138c13e6 100644 --- a/python/paddle/v2/fluid/tests/test_prior_box_op.py +++ b/python/paddle/v2/fluid/tests/test_prior_box_op.py @@ -1,4 +1,4 @@ -# Copyright (c) 2018 PaddlePaddle Authors. All Rights Reserve. +# Copyright (c) 2018 PaddlePaddle Authors. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/python/paddle/v2/fluid/tests/test_profiler.py b/python/paddle/v2/fluid/tests/test_profiler.py index 09b2d084018..62bfb2b8e24 100644 --- a/python/paddle/v2/fluid/tests/test_profiler.py +++ b/python/paddle/v2/fluid/tests/test_profiler.py @@ -1,4 +1,4 @@ -# Copyright (c) 2018 PaddlePaddle Authors. All Rights Reserve. +# Copyright (c) 2018 PaddlePaddle Authors. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/python/paddle/v2/fluid/tests/test_program.py b/python/paddle/v2/fluid/tests/test_program.py index 9967da15937..266e189e501 100644 --- a/python/paddle/v2/fluid/tests/test_program.py +++ b/python/paddle/v2/fluid/tests/test_program.py @@ -1,4 +1,4 @@ -# Copyright (c) 2018 PaddlePaddle Authors. All Rights Reserve. +# Copyright (c) 2018 PaddlePaddle Authors. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/python/paddle/v2/fluid/tests/test_protobuf.py b/python/paddle/v2/fluid/tests/test_protobuf.py index 48e6dedc586..90de56514da 100644 --- a/python/paddle/v2/fluid/tests/test_protobuf.py +++ b/python/paddle/v2/fluid/tests/test_protobuf.py @@ -1,4 +1,4 @@ -# Copyright (c) 2018 PaddlePaddle Authors. All Rights Reserve. +# Copyright (c) 2018 PaddlePaddle Authors. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/python/paddle/v2/fluid/tests/test_protobuf_descs.py b/python/paddle/v2/fluid/tests/test_protobuf_descs.py index c590bf1c657..55d18d2729a 100644 --- a/python/paddle/v2/fluid/tests/test_protobuf_descs.py +++ b/python/paddle/v2/fluid/tests/test_protobuf_descs.py @@ -1,4 +1,4 @@ -# Copyright (c) 2018 PaddlePaddle Authors. All Rights Reserve. +# Copyright (c) 2018 PaddlePaddle Authors. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/python/paddle/v2/fluid/tests/test_proximal_adagrad_op.py b/python/paddle/v2/fluid/tests/test_proximal_adagrad_op.py index 744d71bdcf4..3c268958506 100644 --- a/python/paddle/v2/fluid/tests/test_proximal_adagrad_op.py +++ b/python/paddle/v2/fluid/tests/test_proximal_adagrad_op.py @@ -1,4 +1,4 @@ -# Copyright (c) 2018 PaddlePaddle Authors. All Rights Reserve. +# Copyright (c) 2018 PaddlePaddle Authors. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/python/paddle/v2/fluid/tests/test_proximal_gd_op.py b/python/paddle/v2/fluid/tests/test_proximal_gd_op.py index 96540cf6cf4..137594b9a08 100644 --- a/python/paddle/v2/fluid/tests/test_proximal_gd_op.py +++ b/python/paddle/v2/fluid/tests/test_proximal_gd_op.py @@ -1,4 +1,4 @@ -# Copyright (c) 2018 PaddlePaddle Authors. All Rights Reserve. +# Copyright (c) 2018 PaddlePaddle Authors. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/python/paddle/v2/fluid/tests/test_rank_loss_op.py b/python/paddle/v2/fluid/tests/test_rank_loss_op.py index f31a2c26818..7eba1e2077e 100644 --- a/python/paddle/v2/fluid/tests/test_rank_loss_op.py +++ b/python/paddle/v2/fluid/tests/test_rank_loss_op.py @@ -1,4 +1,4 @@ -# Copyright (c) 2018 PaddlePaddle Authors. All Rights Reserve. +# Copyright (c) 2018 PaddlePaddle Authors. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/python/paddle/v2/fluid/tests/test_recurrent_op.py b/python/paddle/v2/fluid/tests/test_recurrent_op.py index 6d59e199e24..e540ca43b60 100644 --- a/python/paddle/v2/fluid/tests/test_recurrent_op.py +++ b/python/paddle/v2/fluid/tests/test_recurrent_op.py @@ -1,4 +1,4 @@ -# Copyright (c) 2018 PaddlePaddle Authors. All Rights Reserve. +# Copyright (c) 2018 PaddlePaddle Authors. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/python/paddle/v2/fluid/tests/test_recv_op.py b/python/paddle/v2/fluid/tests/test_recv_op.py index 3a02b882410..7a0802afc54 100644 --- a/python/paddle/v2/fluid/tests/test_recv_op.py +++ b/python/paddle/v2/fluid/tests/test_recv_op.py @@ -1,4 +1,4 @@ -# Copyright (c) 2018 PaddlePaddle Authors. All Rights Reserve. +# Copyright (c) 2018 PaddlePaddle Authors. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/python/paddle/v2/fluid/tests/test_reduce_op.py b/python/paddle/v2/fluid/tests/test_reduce_op.py index c669f73a7c6..5e656bddb79 100644 --- a/python/paddle/v2/fluid/tests/test_reduce_op.py +++ b/python/paddle/v2/fluid/tests/test_reduce_op.py @@ -1,4 +1,4 @@ -# Copyright (c) 2018 PaddlePaddle Authors. All Rights Reserve. +# Copyright (c) 2018 PaddlePaddle Authors. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/python/paddle/v2/fluid/tests/test_registry.py b/python/paddle/v2/fluid/tests/test_registry.py index 44e50ca55ac..bf4dc641865 100644 --- a/python/paddle/v2/fluid/tests/test_registry.py +++ b/python/paddle/v2/fluid/tests/test_registry.py @@ -1,4 +1,4 @@ -# Copyright (c) 2018 PaddlePaddle Authors. All Rights Reserve. +# Copyright (c) 2018 PaddlePaddle Authors. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/python/paddle/v2/fluid/tests/test_regularizer.py b/python/paddle/v2/fluid/tests/test_regularizer.py index b33817fa416..8fc4db1c5a8 100644 --- a/python/paddle/v2/fluid/tests/test_regularizer.py +++ b/python/paddle/v2/fluid/tests/test_regularizer.py @@ -1,4 +1,4 @@ -# Copyright (c) 2018 PaddlePaddle Authors. All Rights Reserve. +# Copyright (c) 2018 PaddlePaddle Authors. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/python/paddle/v2/fluid/tests/test_reorder_lod_tensor.py b/python/paddle/v2/fluid/tests/test_reorder_lod_tensor.py index 0a223bac0ce..d4e17d1b1e5 100644 --- a/python/paddle/v2/fluid/tests/test_reorder_lod_tensor.py +++ b/python/paddle/v2/fluid/tests/test_reorder_lod_tensor.py @@ -1,4 +1,4 @@ -# Copyright (c) 2018 PaddlePaddle Authors. All Rights Reserve. +# Copyright (c) 2018 PaddlePaddle Authors. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/python/paddle/v2/fluid/tests/test_reshape_op.py b/python/paddle/v2/fluid/tests/test_reshape_op.py index 2cc0b364609..6d1aa549d59 100644 --- a/python/paddle/v2/fluid/tests/test_reshape_op.py +++ b/python/paddle/v2/fluid/tests/test_reshape_op.py @@ -1,4 +1,4 @@ -# Copyright (c) 2018 PaddlePaddle Authors. All Rights Reserve. +# Copyright (c) 2018 PaddlePaddle Authors. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/python/paddle/v2/fluid/tests/test_rmsprop_op.py b/python/paddle/v2/fluid/tests/test_rmsprop_op.py index b6d7c698009..0d84a5853ea 100644 --- a/python/paddle/v2/fluid/tests/test_rmsprop_op.py +++ b/python/paddle/v2/fluid/tests/test_rmsprop_op.py @@ -1,4 +1,4 @@ -# Copyright (c) 2018 PaddlePaddle Authors. All Rights Reserve. +# Copyright (c) 2018 PaddlePaddle Authors. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/python/paddle/v2/fluid/tests/test_rnn_memory_helper_op.py b/python/paddle/v2/fluid/tests/test_rnn_memory_helper_op.py index 82b54bbd1a4..773bd17456a 100644 --- a/python/paddle/v2/fluid/tests/test_rnn_memory_helper_op.py +++ b/python/paddle/v2/fluid/tests/test_rnn_memory_helper_op.py @@ -1,4 +1,4 @@ -# Copyright (c) 2018 PaddlePaddle Authors. All Rights Reserve. +# Copyright (c) 2018 PaddlePaddle Authors. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/python/paddle/v2/fluid/tests/test_roi_pool_op.py b/python/paddle/v2/fluid/tests/test_roi_pool_op.py index af48848dcd0..e556d51b021 100644 --- a/python/paddle/v2/fluid/tests/test_roi_pool_op.py +++ b/python/paddle/v2/fluid/tests/test_roi_pool_op.py @@ -1,4 +1,4 @@ -# Copyright (c) 2018 PaddlePaddle Authors. All Rights Reserve. +# Copyright (c) 2018 PaddlePaddle Authors. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/python/paddle/v2/fluid/tests/test_row_conv_op.py b/python/paddle/v2/fluid/tests/test_row_conv_op.py index 580b08f75eb..30f1efbcbcb 100644 --- a/python/paddle/v2/fluid/tests/test_row_conv_op.py +++ b/python/paddle/v2/fluid/tests/test_row_conv_op.py @@ -1,4 +1,4 @@ -# Copyright (c) 2018 PaddlePaddle Authors. All Rights Reserve. +# Copyright (c) 2018 PaddlePaddle Authors. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/python/paddle/v2/fluid/tests/test_scale_op.py b/python/paddle/v2/fluid/tests/test_scale_op.py index 95cd935dda3..53f59c39905 100644 --- a/python/paddle/v2/fluid/tests/test_scale_op.py +++ b/python/paddle/v2/fluid/tests/test_scale_op.py @@ -1,4 +1,4 @@ -# Copyright (c) 2018 PaddlePaddle Authors. All Rights Reserve. +# Copyright (c) 2018 PaddlePaddle Authors. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/python/paddle/v2/fluid/tests/test_scatter_op.py b/python/paddle/v2/fluid/tests/test_scatter_op.py index f2936e19ae5..bb02a40d449 100644 --- a/python/paddle/v2/fluid/tests/test_scatter_op.py +++ b/python/paddle/v2/fluid/tests/test_scatter_op.py @@ -1,4 +1,4 @@ -# Copyright (c) 2018 PaddlePaddle Authors. All Rights Reserve. +# Copyright (c) 2018 PaddlePaddle Authors. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/python/paddle/v2/fluid/tests/test_scope.py b/python/paddle/v2/fluid/tests/test_scope.py index 566a11abbe2..2a2efbf0982 100644 --- a/python/paddle/v2/fluid/tests/test_scope.py +++ b/python/paddle/v2/fluid/tests/test_scope.py @@ -1,4 +1,4 @@ -# Copyright (c) 2018 PaddlePaddle Authors. All Rights Reserve. +# Copyright (c) 2018 PaddlePaddle Authors. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/python/paddle/v2/fluid/tests/test_selected_rows.py b/python/paddle/v2/fluid/tests/test_selected_rows.py index 65ddf1f8f5f..50c8bb4bca2 100644 --- a/python/paddle/v2/fluid/tests/test_selected_rows.py +++ b/python/paddle/v2/fluid/tests/test_selected_rows.py @@ -1,4 +1,4 @@ -# Copyright (c) 2018 PaddlePaddle Authors. All Rights Reserve. +# Copyright (c) 2018 PaddlePaddle Authors. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/python/paddle/v2/fluid/tests/test_seq_concat_op.py b/python/paddle/v2/fluid/tests/test_seq_concat_op.py index ba2bb075e6d..1c9b61d8fdb 100644 --- a/python/paddle/v2/fluid/tests/test_seq_concat_op.py +++ b/python/paddle/v2/fluid/tests/test_seq_concat_op.py @@ -1,4 +1,4 @@ -# Copyright (c) 2018 PaddlePaddle Authors. All Rights Reserve. +# Copyright (c) 2018 PaddlePaddle Authors. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/python/paddle/v2/fluid/tests/test_seq_conv.py b/python/paddle/v2/fluid/tests/test_seq_conv.py index 674a2e16940..51dbf1f6183 100644 --- a/python/paddle/v2/fluid/tests/test_seq_conv.py +++ b/python/paddle/v2/fluid/tests/test_seq_conv.py @@ -1,4 +1,4 @@ -# Copyright (c) 2018 PaddlePaddle Authors. All Rights Reserve. +# Copyright (c) 2018 PaddlePaddle Authors. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/python/paddle/v2/fluid/tests/test_seq_pool.py b/python/paddle/v2/fluid/tests/test_seq_pool.py index 9dd6b2a0872..04884757216 100644 --- a/python/paddle/v2/fluid/tests/test_seq_pool.py +++ b/python/paddle/v2/fluid/tests/test_seq_pool.py @@ -1,4 +1,4 @@ -# Copyright (c) 2018 PaddlePaddle Authors. All Rights Reserve. +# Copyright (c) 2018 PaddlePaddle Authors. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/python/paddle/v2/fluid/tests/test_sequence_erase_op.py b/python/paddle/v2/fluid/tests/test_sequence_erase_op.py index 4823836ba97..ebab77e8041 100644 --- a/python/paddle/v2/fluid/tests/test_sequence_erase_op.py +++ b/python/paddle/v2/fluid/tests/test_sequence_erase_op.py @@ -1,4 +1,4 @@ -# Copyright (c) 2018 PaddlePaddle Authors. All Rights Reserve. +# Copyright (c) 2018 PaddlePaddle Authors. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/python/paddle/v2/fluid/tests/test_sequence_expand.py b/python/paddle/v2/fluid/tests/test_sequence_expand.py index 0d37751de48..957fa5d2c4a 100644 --- a/python/paddle/v2/fluid/tests/test_sequence_expand.py +++ b/python/paddle/v2/fluid/tests/test_sequence_expand.py @@ -1,4 +1,4 @@ -# Copyright (c) 2018 PaddlePaddle Authors. All Rights Reserve. +# Copyright (c) 2018 PaddlePaddle Authors. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/python/paddle/v2/fluid/tests/test_sequence_reshape.py b/python/paddle/v2/fluid/tests/test_sequence_reshape.py index 06d5af8f5e7..efeab560392 100644 --- a/python/paddle/v2/fluid/tests/test_sequence_reshape.py +++ b/python/paddle/v2/fluid/tests/test_sequence_reshape.py @@ -1,4 +1,4 @@ -# Copyright (c) 2018 PaddlePaddle Authors. All Rights Reserve. +# Copyright (c) 2018 PaddlePaddle Authors. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/python/paddle/v2/fluid/tests/test_sequence_slice_op.py b/python/paddle/v2/fluid/tests/test_sequence_slice_op.py index bf1f21bcde4..660b4a171d0 100644 --- a/python/paddle/v2/fluid/tests/test_sequence_slice_op.py +++ b/python/paddle/v2/fluid/tests/test_sequence_slice_op.py @@ -1,4 +1,4 @@ -# Copyright (c) 2018 PaddlePaddle Authors. All Rights Reserve. +# Copyright (c) 2018 PaddlePaddle Authors. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/python/paddle/v2/fluid/tests/test_sequence_softmax_op.py b/python/paddle/v2/fluid/tests/test_sequence_softmax_op.py index 5bd780f6b5b..9e5c1e7a3d0 100644 --- a/python/paddle/v2/fluid/tests/test_sequence_softmax_op.py +++ b/python/paddle/v2/fluid/tests/test_sequence_softmax_op.py @@ -1,4 +1,4 @@ -# Copyright (c) 2018 PaddlePaddle Authors. All Rights Reserve. +# Copyright (c) 2018 PaddlePaddle Authors. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/python/paddle/v2/fluid/tests/test_sgd_op.py b/python/paddle/v2/fluid/tests/test_sgd_op.py index ba2ca1683f9..e5379b961f4 100644 --- a/python/paddle/v2/fluid/tests/test_sgd_op.py +++ b/python/paddle/v2/fluid/tests/test_sgd_op.py @@ -1,4 +1,4 @@ -# Copyright (c) 2018 PaddlePaddle Authors. All Rights Reserve. +# Copyright (c) 2018 PaddlePaddle Authors. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/python/paddle/v2/fluid/tests/test_shrink_rnn_memory.py b/python/paddle/v2/fluid/tests/test_shrink_rnn_memory.py index 4578211bac6..48874ba8a5b 100644 --- a/python/paddle/v2/fluid/tests/test_shrink_rnn_memory.py +++ b/python/paddle/v2/fluid/tests/test_shrink_rnn_memory.py @@ -1,4 +1,4 @@ -# Copyright (c) 2018 PaddlePaddle Authors. All Rights Reserve. +# Copyright (c) 2018 PaddlePaddle Authors. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/python/paddle/v2/fluid/tests/test_sigmoid_cross_entropy_with_logits_op.py b/python/paddle/v2/fluid/tests/test_sigmoid_cross_entropy_with_logits_op.py index f88fa62119c..c435796569c 100644 --- a/python/paddle/v2/fluid/tests/test_sigmoid_cross_entropy_with_logits_op.py +++ b/python/paddle/v2/fluid/tests/test_sigmoid_cross_entropy_with_logits_op.py @@ -1,4 +1,4 @@ -# Copyright (c) 2018 PaddlePaddle Authors. All Rights Reserve. +# Copyright (c) 2018 PaddlePaddle Authors. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/python/paddle/v2/fluid/tests/test_sign_op.py b/python/paddle/v2/fluid/tests/test_sign_op.py index c1dfa7f45d4..087a0c575bf 100644 --- a/python/paddle/v2/fluid/tests/test_sign_op.py +++ b/python/paddle/v2/fluid/tests/test_sign_op.py @@ -1,4 +1,4 @@ -# Copyright (c) 2018 PaddlePaddle Authors. All Rights Reserve. +# Copyright (c) 2018 PaddlePaddle Authors. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/python/paddle/v2/fluid/tests/test_smooth_l1_loss_op.py b/python/paddle/v2/fluid/tests/test_smooth_l1_loss_op.py index 5a388bb7b37..e74664dac4d 100644 --- a/python/paddle/v2/fluid/tests/test_smooth_l1_loss_op.py +++ b/python/paddle/v2/fluid/tests/test_smooth_l1_loss_op.py @@ -1,4 +1,4 @@ -# Copyright (c) 2018 PaddlePaddle Authors. All Rights Reserve. +# Copyright (c) 2018 PaddlePaddle Authors. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/python/paddle/v2/fluid/tests/test_softmax_op.py b/python/paddle/v2/fluid/tests/test_softmax_op.py index cf43e676c54..8f8312edca7 100644 --- a/python/paddle/v2/fluid/tests/test_softmax_op.py +++ b/python/paddle/v2/fluid/tests/test_softmax_op.py @@ -1,4 +1,4 @@ -# Copyright (c) 2018 PaddlePaddle Authors. All Rights Reserve. +# Copyright (c) 2018 PaddlePaddle Authors. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/python/paddle/v2/fluid/tests/test_softmax_with_cross_entropy_op.py b/python/paddle/v2/fluid/tests/test_softmax_with_cross_entropy_op.py index 626f34f0e07..889fea2ce66 100644 --- a/python/paddle/v2/fluid/tests/test_softmax_with_cross_entropy_op.py +++ b/python/paddle/v2/fluid/tests/test_softmax_with_cross_entropy_op.py @@ -1,4 +1,4 @@ -# Copyright (c) 2018 PaddlePaddle Authors. All Rights Reserve. +# Copyright (c) 2018 PaddlePaddle Authors. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/python/paddle/v2/fluid/tests/test_split_and_merge_lod_tensor_op.py b/python/paddle/v2/fluid/tests/test_split_and_merge_lod_tensor_op.py index bc541298ed8..48e6756a868 100644 --- a/python/paddle/v2/fluid/tests/test_split_and_merge_lod_tensor_op.py +++ b/python/paddle/v2/fluid/tests/test_split_and_merge_lod_tensor_op.py @@ -1,4 +1,4 @@ -# Copyright (c) 2018 PaddlePaddle Authors. All Rights Reserve. +# Copyright (c) 2018 PaddlePaddle Authors. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/python/paddle/v2/fluid/tests/test_split_op.py b/python/paddle/v2/fluid/tests/test_split_op.py index 50347d2df48..887bdfe8b36 100644 --- a/python/paddle/v2/fluid/tests/test_split_op.py +++ b/python/paddle/v2/fluid/tests/test_split_op.py @@ -1,4 +1,4 @@ -# Copyright (c) 2018 PaddlePaddle Authors. All Rights Reserve. +# Copyright (c) 2018 PaddlePaddle Authors. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/python/paddle/v2/fluid/tests/test_split_selected_rows_op.py b/python/paddle/v2/fluid/tests/test_split_selected_rows_op.py index 343aa200661..2aaa05dcacf 100644 --- a/python/paddle/v2/fluid/tests/test_split_selected_rows_op.py +++ b/python/paddle/v2/fluid/tests/test_split_selected_rows_op.py @@ -1,4 +1,4 @@ -# Copyright (c) 2018 PaddlePaddle Authors. All Rights Reserve. +# Copyright (c) 2018 PaddlePaddle Authors. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/python/paddle/v2/fluid/tests/test_spp_op.py b/python/paddle/v2/fluid/tests/test_spp_op.py index e912b56de54..f0ab5909df6 100644 --- a/python/paddle/v2/fluid/tests/test_spp_op.py +++ b/python/paddle/v2/fluid/tests/test_spp_op.py @@ -1,4 +1,4 @@ -# Copyright (c) 2018 PaddlePaddle Authors. All Rights Reserve. +# Copyright (c) 2018 PaddlePaddle Authors. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/python/paddle/v2/fluid/tests/test_squared_l2_distance_op.py b/python/paddle/v2/fluid/tests/test_squared_l2_distance_op.py index 8171207cd95..78bc300ebec 100644 --- a/python/paddle/v2/fluid/tests/test_squared_l2_distance_op.py +++ b/python/paddle/v2/fluid/tests/test_squared_l2_distance_op.py @@ -1,4 +1,4 @@ -# Copyright (c) 2018 PaddlePaddle Authors. All Rights Reserve. +# Copyright (c) 2018 PaddlePaddle Authors. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/python/paddle/v2/fluid/tests/test_squared_l2_norm_op.py b/python/paddle/v2/fluid/tests/test_squared_l2_norm_op.py index b7575cb4d2c..609445d5228 100644 --- a/python/paddle/v2/fluid/tests/test_squared_l2_norm_op.py +++ b/python/paddle/v2/fluid/tests/test_squared_l2_norm_op.py @@ -1,4 +1,4 @@ -# Copyright (c) 2018 PaddlePaddle Authors. All Rights Reserve. +# Copyright (c) 2018 PaddlePaddle Authors. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/python/paddle/v2/fluid/tests/test_sum_op.py b/python/paddle/v2/fluid/tests/test_sum_op.py index 0a15a9485d7..2faf5b10647 100644 --- a/python/paddle/v2/fluid/tests/test_sum_op.py +++ b/python/paddle/v2/fluid/tests/test_sum_op.py @@ -1,4 +1,4 @@ -# Copyright (c) 2018 PaddlePaddle Authors. All Rights Reserve. +# Copyright (c) 2018 PaddlePaddle Authors. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/python/paddle/v2/fluid/tests/test_switch.py b/python/paddle/v2/fluid/tests/test_switch.py index 52ebf773ec7..11296bc04ea 100644 --- a/python/paddle/v2/fluid/tests/test_switch.py +++ b/python/paddle/v2/fluid/tests/test_switch.py @@ -1,4 +1,4 @@ -# Copyright (c) 2018 PaddlePaddle Authors. All Rights Reserve. +# Copyright (c) 2018 PaddlePaddle Authors. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/python/paddle/v2/fluid/tests/test_target_assign_op.py b/python/paddle/v2/fluid/tests/test_target_assign_op.py index ceda61ff552..ccb41e56c55 100755 --- a/python/paddle/v2/fluid/tests/test_target_assign_op.py +++ b/python/paddle/v2/fluid/tests/test_target_assign_op.py @@ -1,4 +1,4 @@ -# Copyright (c) 2018 PaddlePaddle Authors. All Rights Reserve. +# Copyright (c) 2018 PaddlePaddle Authors. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/python/paddle/v2/fluid/tests/test_tensor.py b/python/paddle/v2/fluid/tests/test_tensor.py index 0219bef42b3..8fe234a90f2 100644 --- a/python/paddle/v2/fluid/tests/test_tensor.py +++ b/python/paddle/v2/fluid/tests/test_tensor.py @@ -1,4 +1,4 @@ -# Copyright (c) 2018 PaddlePaddle Authors. All Rights Reserve. +# Copyright (c) 2018 PaddlePaddle Authors. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/python/paddle/v2/fluid/tests/test_top_k_op.py b/python/paddle/v2/fluid/tests/test_top_k_op.py index a50faf0fffd..cc2fcc5ec0a 100644 --- a/python/paddle/v2/fluid/tests/test_top_k_op.py +++ b/python/paddle/v2/fluid/tests/test_top_k_op.py @@ -1,4 +1,4 @@ -# Copyright (c) 2018 PaddlePaddle Authors. All Rights Reserve. +# Copyright (c) 2018 PaddlePaddle Authors. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/python/paddle/v2/fluid/tests/test_transpose_op.py b/python/paddle/v2/fluid/tests/test_transpose_op.py index a16de1416f4..ebd63fbd495 100644 --- a/python/paddle/v2/fluid/tests/test_transpose_op.py +++ b/python/paddle/v2/fluid/tests/test_transpose_op.py @@ -1,4 +1,4 @@ -# Copyright (c) 2018 PaddlePaddle Authors. All Rights Reserve. +# Copyright (c) 2018 PaddlePaddle Authors. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/python/paddle/v2/fluid/tests/test_uniform_random_op.py b/python/paddle/v2/fluid/tests/test_uniform_random_op.py index 94cf416fad8..53227716efb 100644 --- a/python/paddle/v2/fluid/tests/test_uniform_random_op.py +++ b/python/paddle/v2/fluid/tests/test_uniform_random_op.py @@ -1,4 +1,4 @@ -# Copyright (c) 2018 PaddlePaddle Authors. All Rights Reserve. +# Copyright (c) 2018 PaddlePaddle Authors. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/python/paddle/v2/fluid/tests/test_unpool_op.py b/python/paddle/v2/fluid/tests/test_unpool_op.py index 3dd43f9ba4b..a97d6dfdda9 100644 --- a/python/paddle/v2/fluid/tests/test_unpool_op.py +++ b/python/paddle/v2/fluid/tests/test_unpool_op.py @@ -1,4 +1,4 @@ -# Copyright (c) 2018 PaddlePaddle Authors. All Rights Reserve. +# Copyright (c) 2018 PaddlePaddle Authors. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/python/paddle/v2/fluid/tests/test_variable.py b/python/paddle/v2/fluid/tests/test_variable.py index 9f9748ca4e4..b06bcfb0759 100644 --- a/python/paddle/v2/fluid/tests/test_variable.py +++ b/python/paddle/v2/fluid/tests/test_variable.py @@ -1,4 +1,4 @@ -# Copyright (c) 2018 PaddlePaddle Authors. All Rights Reserve. +# Copyright (c) 2018 PaddlePaddle Authors. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/python/paddle/v2/fluid/tests/test_warpctc_op.py b/python/paddle/v2/fluid/tests/test_warpctc_op.py index 55d1c73262a..ac638f7836f 100644 --- a/python/paddle/v2/fluid/tests/test_warpctc_op.py +++ b/python/paddle/v2/fluid/tests/test_warpctc_op.py @@ -1,4 +1,4 @@ -# Copyright (c) 2018 PaddlePaddle Authors. All Rights Reserve. +# Copyright (c) 2018 PaddlePaddle Authors. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/python/paddle/v2/fluid/tests/test_weight_normalization.py b/python/paddle/v2/fluid/tests/test_weight_normalization.py index 80ad8285d8a..c2b81dddb00 100644 --- a/python/paddle/v2/fluid/tests/test_weight_normalization.py +++ b/python/paddle/v2/fluid/tests/test_weight_normalization.py @@ -1,4 +1,4 @@ -# Copyright (c) 2018 PaddlePaddle Authors. All Rights Reserve. +# Copyright (c) 2018 PaddlePaddle Authors. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/python/paddle/v2/fluid/tests/test_while_op.py b/python/paddle/v2/fluid/tests/test_while_op.py index 9f5e1b668c0..3fa1d5e0edd 100644 --- a/python/paddle/v2/fluid/tests/test_while_op.py +++ b/python/paddle/v2/fluid/tests/test_while_op.py @@ -1,4 +1,4 @@ -# Copyright (c) 2018 PaddlePaddle Authors. All Rights Reserve. +# Copyright (c) 2018 PaddlePaddle Authors. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/python/paddle/v2/image.py b/python/paddle/v2/image.py index e5000e440cc..9235c41e9eb 100644 --- a/python/paddle/v2/image.py +++ b/python/paddle/v2/image.py @@ -1,4 +1,4 @@ -# Copyright (c) 2018 PaddlePaddle Authors. All Rights Reserve. +# Copyright (c) 2018 PaddlePaddle Authors. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/python/paddle/v2/inference.py b/python/paddle/v2/inference.py index 78bf9807da3..52f5b947fde 100644 --- a/python/paddle/v2/inference.py +++ b/python/paddle/v2/inference.py @@ -1,4 +1,4 @@ -# Copyright (c) 2018 PaddlePaddle Authors. All Rights Reserve. +# Copyright (c) 2018 PaddlePaddle Authors. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/python/paddle/v2/master/__init__.py b/python/paddle/v2/master/__init__.py index 494e4baf20e..efaeeabfa26 100644 --- a/python/paddle/v2/master/__init__.py +++ b/python/paddle/v2/master/__init__.py @@ -1,4 +1,4 @@ -# Copyright (c) 2018 PaddlePaddle Authors. All Rights Reserve. +# Copyright (c) 2018 PaddlePaddle Authors. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/python/paddle/v2/master/client.py b/python/paddle/v2/master/client.py index b3c790e39d7..d62e7cc28ef 100644 --- a/python/paddle/v2/master/client.py +++ b/python/paddle/v2/master/client.py @@ -1,4 +1,4 @@ -# Copyright (c) 2018 PaddlePaddle Authors. All Rights Reserve. +# Copyright (c) 2018 PaddlePaddle Authors. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/python/paddle/v2/reader/tests/__init__.py b/python/paddle/v2/reader/tests/__init__.py index b94a21a7e40..eca2dce114b 100644 --- a/python/paddle/v2/reader/tests/__init__.py +++ b/python/paddle/v2/reader/tests/__init__.py @@ -1,4 +1,4 @@ -# Copyright (c) 2018 PaddlePaddle Authors. All Rights Reserve. +# Copyright (c) 2018 PaddlePaddle Authors. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/python/paddle/v2/reader/tests/creator_test.py b/python/paddle/v2/reader/tests/creator_test.py index ac6cd4e9b6e..7fe374e6636 100644 --- a/python/paddle/v2/reader/tests/creator_test.py +++ b/python/paddle/v2/reader/tests/creator_test.py @@ -1,4 +1,4 @@ -# Copyright (c) 2018 PaddlePaddle Authors. All Rights Reserve. +# Copyright (c) 2018 PaddlePaddle Authors. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. @@ -12,7 +12,7 @@ # See the License for the specific language governing permissions and # limitations under the License. -# Copyright PaddlePaddle contributors. All Rights Reserved +# Copyright PaddlePaddle contributors. All Rights Reservedd # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/python/paddle/v2/reader/tests/decorator_test.py b/python/paddle/v2/reader/tests/decorator_test.py index e41e9c78a07..6b680e39f3f 100644 --- a/python/paddle/v2/reader/tests/decorator_test.py +++ b/python/paddle/v2/reader/tests/decorator_test.py @@ -1,4 +1,4 @@ -# Copyright (c) 2018 PaddlePaddle Authors. All Rights Reserve. +# Copyright (c) 2018 PaddlePaddle Authors. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/python/paddle/v2/tests/test_image.py b/python/paddle/v2/tests/test_image.py index 2b0444bb03f..c78bbdc40a2 100644 --- a/python/paddle/v2/tests/test_image.py +++ b/python/paddle/v2/tests/test_image.py @@ -1,4 +1,4 @@ -# Copyright (c) 2018 PaddlePaddle Authors. All Rights Reserve. +# Copyright (c) 2018 PaddlePaddle Authors. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/python/paddle/v2/tests/test_layer.py b/python/paddle/v2/tests/test_layer.py index 710e8135f2d..b169a0f38ee 100644 --- a/python/paddle/v2/tests/test_layer.py +++ b/python/paddle/v2/tests/test_layer.py @@ -1,4 +1,4 @@ -# Copyright (c) 2018 PaddlePaddle Authors. All Rights Reserve. +# Copyright (c) 2018 PaddlePaddle Authors. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/python/paddle/v2/tests/test_op.py b/python/paddle/v2/tests/test_op.py index dd04cc4ab66..15d5aef5111 100644 --- a/python/paddle/v2/tests/test_op.py +++ b/python/paddle/v2/tests/test_op.py @@ -1,4 +1,4 @@ -# Copyright (c) 2018 PaddlePaddle Authors. All Rights Reserve. +# Copyright (c) 2018 PaddlePaddle Authors. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/python/paddle/v2/tests/test_paramconf_order.py b/python/paddle/v2/tests/test_paramconf_order.py index 33c240b8f5a..264442be182 100644 --- a/python/paddle/v2/tests/test_paramconf_order.py +++ b/python/paddle/v2/tests/test_paramconf_order.py @@ -1,4 +1,4 @@ -# Copyright (c) 2018 PaddlePaddle Authors. All Rights Reserve. +# Copyright (c) 2018 PaddlePaddle Authors. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. @@ -12,7 +12,7 @@ # See the License for the specific language governing permissions and # limitations under the License. -# Copyright PaddlePaddle contributors. All Rights Reserved +# Copyright PaddlePaddle contributors. All Rights Reservedd # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/python/paddle/v2/tests/test_parameters.py b/python/paddle/v2/tests/test_parameters.py index 1fe1f09b9d3..3bfd9348a61 100644 --- a/python/paddle/v2/tests/test_parameters.py +++ b/python/paddle/v2/tests/test_parameters.py @@ -1,4 +1,4 @@ -# Copyright (c) 2018 PaddlePaddle Authors. All Rights Reserve. +# Copyright (c) 2018 PaddlePaddle Authors. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/python/paddle/v2/tests/test_rnn_layer.py b/python/paddle/v2/tests/test_rnn_layer.py index 7920e342e14..6ad07167dce 100644 --- a/python/paddle/v2/tests/test_rnn_layer.py +++ b/python/paddle/v2/tests/test_rnn_layer.py @@ -1,4 +1,4 @@ -# Copyright (c) 2018 PaddlePaddle Authors. All Rights Reserve. +# Copyright (c) 2018 PaddlePaddle Authors. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/python/paddle/v2/tests/test_topology.py b/python/paddle/v2/tests/test_topology.py index 11b4154eedc..bacd28ddb7b 100644 --- a/python/paddle/v2/tests/test_topology.py +++ b/python/paddle/v2/tests/test_topology.py @@ -1,4 +1,4 @@ -# Copyright (c) 2018 PaddlePaddle Authors. All Rights Reserve. +# Copyright (c) 2018 PaddlePaddle Authors. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/python/paddle/v2/trainer.py b/python/paddle/v2/trainer.py index a0060bf227f..5d98d5b6db5 100644 --- a/python/paddle/v2/trainer.py +++ b/python/paddle/v2/trainer.py @@ -1,4 +1,4 @@ -# Copyright (c) 2018 PaddlePaddle Authors. All Rights Reserve. +# Copyright (c) 2018 PaddlePaddle Authors. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/tools/manylinux1/build_scripts/manylinux1-check.py b/tools/manylinux1/build_scripts/manylinux1-check.py index a27eab1c77c..0d1a6df4eec 100644 --- a/tools/manylinux1/build_scripts/manylinux1-check.py +++ b/tools/manylinux1/build_scripts/manylinux1-check.py @@ -1,4 +1,4 @@ -# Copyright (c) 2018 PaddlePaddle Authors. All Rights Reserve. +# Copyright (c) 2018 PaddlePaddle Authors. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/tools/manylinux1/build_scripts/python-tag-abi-tag.py b/tools/manylinux1/build_scripts/python-tag-abi-tag.py index cd2573314c5..0364ab3659e 100644 --- a/tools/manylinux1/build_scripts/python-tag-abi-tag.py +++ b/tools/manylinux1/build_scripts/python-tag-abi-tag.py @@ -1,4 +1,4 @@ -# Copyright (c) 2018 PaddlePaddle Authors. All Rights Reserve. +# Copyright (c) 2018 PaddlePaddle Authors. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/tools/manylinux1/build_scripts/ssl-check.py b/tools/manylinux1/build_scripts/ssl-check.py index 34a3116207f..afef2812f3f 100644 --- a/tools/manylinux1/build_scripts/ssl-check.py +++ b/tools/manylinux1/build_scripts/ssl-check.py @@ -1,4 +1,4 @@ -# Copyright (c) 2018 PaddlePaddle Authors. All Rights Reserve. +# Copyright (c) 2018 PaddlePaddle Authors. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. -- GitLab From 5e1640f7e403c7fd2641d685479ab2375601d89e Mon Sep 17 00:00:00 2001 From: Jacek Czaja Date: Mon, 12 Feb 2018 05:36:24 -0800 Subject: [PATCH 039/122] - Fix MKLDNN build type to match Paddle build type --- cmake/external/mkldnn.cmake | 1 + 1 file changed, 1 insertion(+) diff --git a/cmake/external/mkldnn.cmake b/cmake/external/mkldnn.cmake index 89fc34796a0..3b8314a06ba 100644 --- a/cmake/external/mkldnn.cmake +++ b/cmake/external/mkldnn.cmake @@ -56,6 +56,7 @@ ExternalProject_Add( PREFIX ${MKLDNN_SOURCES_DIR} UPDATE_COMMAND "" CMAKE_ARGS -DCMAKE_INSTALL_PREFIX=${MKLDNN_INSTALL_DIR} + CMAKE_ARGS -DCMAKE_BUILD_TYPE=${CMAKE_BUILD_TYPE} CMAKE_ARGS -DMKLROOT=${MKLML_ROOT} CMAKE_ARGS -DCMAKE_C_FLAGS=${MKLDNN_CFLAG} CMAKE_ARGS -DCMAKE_CXX_FLAGS=${MKLDNN_CXXFLAG} -- GitLab From 3c47c730483d52d50b7d83ab4edbdbaff5b6694b Mon Sep 17 00:00:00 2001 From: Yang Yang Date: Mon, 12 Feb 2018 19:43:22 +0000 Subject: [PATCH 040/122] add back libnccl-dev --- Dockerfile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Dockerfile b/Dockerfile index ed559ca5c43..6ac9901ac6c 100644 --- a/Dockerfile +++ b/Dockerfile @@ -22,7 +22,7 @@ COPY ./paddle/scripts/docker/root/ /root/ RUN apt-get update && \ apt-get install -y \ - git python-pip python-dev openssh-server bison \ + git python-pip python-dev openssh-server bison libnccl-dev \ wget unzip unrar tar xz-utils bzip2 gzip coreutils ntp \ curl sed grep graphviz libjpeg-dev zlib1g-dev \ python-matplotlib gcc-4.8 g++-4.8 \ -- GitLab From f82fa64a06f71700a99b641aeb8fc9ef16c0d940 Mon Sep 17 00:00:00 2001 From: kexinzhao Date: Mon, 12 Feb 2018 13:53:06 -0800 Subject: [PATCH 041/122] Move float16 into fluid folder (#8394) * move float16 into fluid * fix include * move to platform folder --- paddle/fluid/platform/CMakeLists.txt | 5 ++- paddle/{math => fluid/platform}/float16.h | 31 +++++++------------ .../platform/float16_test.cc} | 2 +- .../platform/float16_test.cu} | 2 +- paddle/math/tests/CMakeLists.txt | 2 -- 5 files changed, 17 insertions(+), 25 deletions(-) rename paddle/{math => fluid/platform}/float16.h (97%) rename paddle/{math/tests/test_float16.cpp => fluid/platform/float16_test.cc} (98%) rename paddle/{math/tests/test_float16.cu => fluid/platform/float16_test.cu} (99%) diff --git a/paddle/fluid/platform/CMakeLists.txt b/paddle/fluid/platform/CMakeLists.txt index 5ce4b3de39d..32e768fdf44 100644 --- a/paddle/fluid/platform/CMakeLists.txt +++ b/paddle/fluid/platform/CMakeLists.txt @@ -27,7 +27,7 @@ ELSE() set(MKLDNN_CTX_DEPS) ENDIF() -# memcpy deoends on device_context, here add deps individually for +# memcpy depends on device_context, here add deps individually for # avoiding cycle dependencies cc_library(device_context SRCS device_context.cc DEPS memory buddy_allocator system_allocator memory_block meta_data meta_cache place eigen3 ${GPU_CTX_DEPS} ${MKLDNN_CTX_DEPS}) @@ -39,3 +39,6 @@ nv_test(nccl_test SRCS nccl_test.cu DEPS dynload_cuda gpu_info device_context) cc_library(profiler SRCS profiler.cc DEPS device_context) cc_test(profiler_test SRCS profiler_test.cc DEPS profiler) + +nv_test(float16_gpu_test SRCS float16_test.cu) +cc_test(float16_test SRCS float16_test.cc) diff --git a/paddle/math/float16.h b/paddle/fluid/platform/float16.h similarity index 97% rename from paddle/math/float16.h rename to paddle/fluid/platform/float16.h index b00a85b082c..c36bfad4bc1 100644 --- a/paddle/math/float16.h +++ b/paddle/fluid/platform/float16.h @@ -68,7 +68,7 @@ namespace paddle { // memory access of float16 struct and also makes float16 compatible // with CUDA half, ARM float16_t, and Eigen::half data types. struct PADDLE_ALIGN(2) float16 { -public: + public: uint16_t x; // Constructors @@ -319,7 +319,7 @@ public: return static_cast(float(*this)); } -private: + private: union Bits { float f; int32_t si; @@ -485,8 +485,7 @@ HOST inline float16 operator+(const float16& a, const float16& b) { "st1 {v0.h}[0], [%[res_ptr]]\n" : // outputs : // inputs - [a_ptr] "r"(&(a.x)), - [b_ptr] "r"(&(b.x)), + [a_ptr] "r"(&(a.x)), [b_ptr] "r"(&(b.x)), [res_ptr] "r"(&(res.x)) : // clobbers "memory", "v0", "v1"); @@ -502,8 +501,7 @@ HOST inline float16 operator-(const float16& a, const float16& b) { "st1 {v0.h}[0], [%[res_ptr]]\n" : // outputs : // inputs - [a_ptr] "r"(&(a.x)), - [b_ptr] "r"(&(b.x)), + [a_ptr] "r"(&(a.x)), [b_ptr] "r"(&(b.x)), [res_ptr] "r"(&(res.x)) : // clobbers "memory", "v0", "v1"); @@ -519,8 +517,7 @@ HOST inline float16 operator*(const float16& a, const float16& b) { "st1 {v0.h}[0], [%[res_ptr]]\n" : // outputs : // inputs - [a_ptr] "r"(&(a.x)), - [b_ptr] "r"(&(b.x)), + [a_ptr] "r"(&(a.x)), [b_ptr] "r"(&(b.x)), [res_ptr] "r"(&(res.x)) : // clobbers "memory", "v0", "v1"); @@ -536,8 +533,7 @@ HOST inline float16 operator/(const float16& a, const float16& b) { "st1 {v0.h}[0], [%[res_ptr]]\n" : // outputs : // inputs - [a_ptr] "r"(&(a.x)), - [b_ptr] "r"(&(b.x)), + [a_ptr] "r"(&(a.x)), [b_ptr] "r"(&(b.x)), [res_ptr] "r"(&(res.x)) : // clobbers "memory", "v0", "v1"); @@ -588,8 +584,7 @@ HOST inline bool operator==(const float16& a, const float16& b) { "st1 {v0.h}[0], [%[res_ptr]]\n" : // outputs : // inputs - [a_ptr] "r"(&(a.x)), - [b_ptr] "r"(&(b.x)), + [a_ptr] "r"(&(a.x)), [b_ptr] "r"(&(b.x)), [res_ptr] "r"(&res) : // clobbers "memory", "v0", "v1"); @@ -609,8 +604,7 @@ HOST inline bool operator<(const float16& a, const float16& b) { "st1 {v0.h}[0], [%[res_ptr]]\n" : // outputs : // inputs - [a_ptr] "r"(&(a.x)), - [b_ptr] "r"(&(b.x)), + [a_ptr] "r"(&(a.x)), [b_ptr] "r"(&(b.x)), [res_ptr] "r"(&res) : // clobbers "memory", "v0", "v1"); @@ -626,8 +620,7 @@ HOST inline bool operator<=(const float16& a, const float16& b) { "st1 {v0.h}[0], [%[res_ptr]]\n" : // outputs : // inputs - [a_ptr] "r"(&(a.x)), - [b_ptr] "r"(&(b.x)), + [a_ptr] "r"(&(a.x)), [b_ptr] "r"(&(b.x)), [res_ptr] "r"(&res) : // clobbers "memory", "v0", "v1"); @@ -643,8 +636,7 @@ HOST inline bool operator>(const float16& a, const float16& b) { "st1 {v0.h}[0], [%[res_ptr]]\n" : // outputs : // inputs - [a_ptr] "r"(&(a.x)), - [b_ptr] "r"(&(b.x)), + [a_ptr] "r"(&(a.x)), [b_ptr] "r"(&(b.x)), [res_ptr] "r"(&res) : // clobbers "memory", "v0", "v1"); @@ -660,8 +652,7 @@ HOST inline bool operator>=(const float16& a, const float16& b) { "st1 {v0.h}[0], [%[res_ptr]]\n" : // outputs : // inputs - [a_ptr] "r"(&(a.x)), - [b_ptr] "r"(&(b.x)), + [a_ptr] "r"(&(a.x)), [b_ptr] "r"(&(b.x)), [res_ptr] "r"(&res) : // clobbers "memory", "v0", "v1"); diff --git a/paddle/math/tests/test_float16.cpp b/paddle/fluid/platform/float16_test.cc similarity index 98% rename from paddle/math/tests/test_float16.cpp rename to paddle/fluid/platform/float16_test.cc index 64cc43f9727..bed29dbfa7e 100644 --- a/paddle/math/tests/test_float16.cpp +++ b/paddle/fluid/platform/float16_test.cc @@ -9,7 +9,7 @@ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. */ -#include "paddle/math/float16.h" +#include "paddle/fluid/platform/float16.h" #include diff --git a/paddle/math/tests/test_float16.cu b/paddle/fluid/platform/float16_test.cu similarity index 99% rename from paddle/math/tests/test_float16.cu rename to paddle/fluid/platform/float16_test.cu index 3b2d8cfcece..7e6c9f58aca 100644 --- a/paddle/math/tests/test_float16.cu +++ b/paddle/fluid/platform/float16_test.cu @@ -9,7 +9,7 @@ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. */ -#include "paddle/math/float16.h" +#include "paddle/fluid/platform/float16.h" #include diff --git a/paddle/math/tests/CMakeLists.txt b/paddle/math/tests/CMakeLists.txt index dcd2a345834..d8b7f9e3fc7 100644 --- a/paddle/math/tests/CMakeLists.txt +++ b/paddle/math/tests/CMakeLists.txt @@ -22,7 +22,6 @@ if(WITH_GPU) link_paddle_test(test_Tensor) CUDA_ADD_EXECUTABLE(test_lazyAssign test_lazyAssign.cu) link_paddle_test(test_lazyAssign) - nv_test(test_float16_gpu SRCS test_float16.cu) else() compile_cu_as_cpp(test_Tensor.cu) add_unittest(test_Tensor test_Tensor.cu) @@ -34,4 +33,3 @@ add_simple_unittest(test_FPException) add_simple_unittest(test_GpuProfiler) add_simple_unittest(test_BaseMatrix) add_simple_unittest(test_Matrix) -add_simple_unittest(test_float16) -- GitLab From 004df46f28be0201d4bfb40b981be4fc919f632f Mon Sep 17 00:00:00 2001 From: xuwei06 Date: Mon, 12 Feb 2018 14:02:24 -0800 Subject: [PATCH 042/122] Make print_op able to show the value of bool tensor And some minor fixes on comments. --- .../fluid/operators/elementwise_op_function.h | 1 - paddle/fluid/operators/print_op.cc | 16 +++++----- python/paddle/v2/fluid/layers/control_flow.py | 2 +- python/paddle/v2/fluid/layers/nn.py | 30 +++++++++---------- 4 files changed, 25 insertions(+), 24 deletions(-) diff --git a/paddle/fluid/operators/elementwise_op_function.h b/paddle/fluid/operators/elementwise_op_function.h index 0ee7291f04a..2a4a6115111 100644 --- a/paddle/fluid/operators/elementwise_op_function.h +++ b/paddle/fluid/operators/elementwise_op_function.h @@ -314,7 +314,6 @@ EIGEN_FUNCTOR(Div, EIGEN_DIV); template void ElementwiseGradCompute(const framework::ExecutionContext& ctx, - const framework::Tensor* x, const framework::Tensor* y, const framework::Tensor* out, diff --git a/paddle/fluid/operators/print_op.cc b/paddle/fluid/operators/print_op.cc index a76ba796fe4..7fa2b060afd 100644 --- a/paddle/fluid/operators/print_op.cc +++ b/paddle/fluid/operators/print_op.cc @@ -46,7 +46,7 @@ struct Formater { } private: - void PrintMessage() { CLOG << std::time(nullptr) << "\t" << message; } + void PrintMessage() { CLOG << std::time(nullptr) << "\t" << message << "\t"; } void PrintName() { if (!name.empty()) { CLOG << "Tensor[" << name << "]" << std::endl; @@ -85,15 +85,16 @@ struct Formater { // print float if (dtype.hash_code() == typeid(float).hash_code()) { Display(size); - } - if (dtype.hash_code() == typeid(double).hash_code()) { + } else if (dtype.hash_code() == typeid(double).hash_code()) { Display(size); - } - if (dtype.hash_code() == typeid(int).hash_code()) { + } else if (dtype.hash_code() == typeid(int).hash_code()) { Display(size); - } - if (dtype.hash_code() == typeid(int64_t).hash_code()) { + } else if (dtype.hash_code() == typeid(int64_t).hash_code()) { Display(size); + } else if (dtype.hash_code() == typeid(bool).hash_code()) { + Display(size); + } else { + CLOG << "\tdata: unprintable type: " << dtype.name() << std::endl; } } @@ -182,6 +183,7 @@ class TensorPrintOp : public framework::OperatorBase { } Formater formater; + formater.message = Attr("message"); if (Attr("print_tensor_name")) { formater.name = printed_var_name; } diff --git a/python/paddle/v2/fluid/layers/control_flow.py b/python/paddle/v2/fluid/layers/control_flow.py index 800c11a53b8..1ca11bb35b0 100644 --- a/python/paddle/v2/fluid/layers/control_flow.py +++ b/python/paddle/v2/fluid/layers/control_flow.py @@ -174,7 +174,7 @@ def Print(input, print_tensor_type (bool): Print the tensor type. print_tensor_shape (bool): Print the tensor shape. print_tensor_lod (bool): Print the tensor lod. - print_phase (bool): Which phase to displace, including 'forward', + print_phase (str): Which phase to displace, including 'forward', 'backward' and 'both'. If set to 'backward' or 'both', will print the gradients of input tensor. diff --git a/python/paddle/v2/fluid/layers/nn.py b/python/paddle/v2/fluid/layers/nn.py index f5b64fee1dc..5f1842f5fb9 100644 --- a/python/paddle/v2/fluid/layers/nn.py +++ b/python/paddle/v2/fluid/layers/nn.py @@ -1579,7 +1579,7 @@ def layer_norm(input, """ **Layer Normalization** - Assume feature vectors exist on dimensions + Assume feature vectors exist on dimensions :attr:`begin_norm_axis ... rank(input)` and calculate the moment statistics along these dimensions for each feature vector :math:`a` with size :math:`H`, then normalize each feature vector using the corresponding @@ -1600,13 +1600,13 @@ def layer_norm(input, Args: input(Variable): The input tensor variable. - scale(bool): Whether to learn the adaptive gain :math:`g` after + scale(bool): Whether to learn the adaptive gain :math:`g` after normalization. - shift(bool): Whether to learn the adaptive bias :math:`b` after + shift(bool): Whether to learn the adaptive bias :math:`b` after normalization. - begin_norm_axis(bool): The normalization will be performed along + begin_norm_axis(bool): The normalization will be performed along dimensions from :attr:`begin_norm_axis` to :attr:`rank(input)`. - epsilon(float): The small value added to the variance to prevent + epsilon(float): The small value added to the variance to prevent division by zero. param_attr(ParamAttr|None): The parameter attribute for the learnable gain :math:`g`. @@ -2070,7 +2070,7 @@ def reduce_sum(input, dim=None, keep_dim=False, name=None): Tensor variable with a single element, otherwise must be in the range :math:`[-rank(input), rank(input))`. If :math:`dim < 0`, the dimension to reduce is :math:`rank + dim`. - keep_dim (bool): Whether to reserve the reduced dimension in the + keep_dim (bool|False): Whether to reserve the reduced dimension in the output Tensor. The result tensor will have one fewer dimension than the :attr:`input` unless :attr:`keep_dim` is true. name(str|None): A name for this layer(optional). If set None, the layer @@ -3098,33 +3098,33 @@ def multiplex(inputs, index): def softmax_with_cross_entropy(logits, label, soft_label=False): """ **Softmax With Cross Entropy Operator.** - + Cross entropy loss with softmax is used as the output layer extensively. This operator computes the softmax normalized values for each row of the input tensor, after which cross-entropy loss is computed. This provides a more numerically stable gradient. - + Because this operator performs a softmax on logits internally, it expects unscaled logits. This operator should not be used with the output of softmax operator since that would produce incorrect results. - + When the attribute soft_label is set false, this operators expects mutually exclusive hard labels, each sample in a batch is in exactly one class with a probability of 1.0. Each sample in the batch will have a single label. - + The equation is as follows: - + 1) Hard label (one-hot label, so every sample has exactly one class) - + .. math:: loss_j = -\\text{logit}_{label_j} + \\log\\left(\\sum_{i=0}^{K}\\exp(\\text{logit}_i)\\right), j = 1,..., K - + 2) Soft label (each sample can have a distribution over all classes) .. math:: - + loss_j = -\\sum_{i=0}^{K}\\text{label}_i \\left(\\text{logit}_i - \\log\\left(\\sum_{i=0}^{K} \\exp(\\text{logit}_i)\\right)\\right), j = 1,...,K @@ -3169,7 +3169,7 @@ def smooth_l1(x, y, inside_weight=None, outside_weight=None, sigma=None): The operator takes the first dimension of X and Y as batch size. For each instance, it computes the smooth l1 loss element by element first and then sums all the losses. So the shape of Out is [batch_size, 1]. - + Args: x (Variable): A tensor with rank at least 2. The input value of smooth l1 loss op with shape [batch_size, dim1, ..., dimN]. -- GitLab From a259ad41b03e52d3d3e97f53e5ffa163f80c79bb Mon Sep 17 00:00:00 2001 From: Yang Yang Date: Mon, 12 Feb 2018 23:13:12 +0000 Subject: [PATCH 043/122] remove duplicated cbegin and cend in mixed vector --- paddle/fluid/framework/mixed_vector.h | 4 ---- 1 file changed, 4 deletions(-) diff --git a/paddle/fluid/framework/mixed_vector.h b/paddle/fluid/framework/mixed_vector.h index 114c21c26cd..c1a89a1261c 100644 --- a/paddle/fluid/framework/mixed_vector.h +++ b/paddle/fluid/framework/mixed_vector.h @@ -132,10 +132,6 @@ class Vector { const T* cend() const { return end(); } - const T* cbegin() const { return begin(); } - - const T* cend() const { return end(); } - const T& back() const { auto it = end(); --it; -- GitLab From fcadb452515b6acabf9daf987b4a92dcb8e62d73 Mon Sep 17 00:00:00 2001 From: Abhinav Arora Date: Mon, 12 Feb 2018 16:05:41 -0800 Subject: [PATCH 044/122] Separate VarType from VarDesc in framework.proto and fix all related compiler errors (#8414) * Refine Type system * Fixing type inference * Fixed create_reader_op.cc * Fix var_desc.h * Fixed executor.cc * Fix shape_inference.h * Fixed create_reader_op.cc * Fix tensor_util.h * Fixed var_type_inference_test.cc * Fix shape_inference.cc * Fixed sum_op.c * Fixed read_op.cc * Fix var_type.h * Fixed beam_search_decode_op.cc * sendrecvop_utils.cc * Fix operator.cc * Fixed lookup_table_op.cc * Fixed op_desc.cc * Fixed get_places_op.cc * Fixed lod_rank_table_op.cc * Fixed beam_search_op.cc * Fix var_desc.cc * Fixed lod_tensor_to_array_op.cc * Fixed while_op.cc * Fix program_desc_test.cc * tensor_array_read_write_op.cc * Fix assign_op.cc * Fix executor.cc * Fix protobuf.cc * Fix protobuf.cc --- paddle/fluid/framework/executor.cc | 28 ++--- paddle/fluid/framework/framework.proto | 51 ++++---- paddle/fluid/framework/op_desc.cc | 10 +- paddle/fluid/framework/operator.cc | 2 +- paddle/fluid/framework/program_desc_test.cc | 12 +- paddle/fluid/framework/shape_inference.cc | 8 +- paddle/fluid/framework/shape_inference.h | 8 +- paddle/fluid/framework/tensor_util.h | 4 +- paddle/fluid/framework/var_desc.cc | 119 ++++++++++-------- paddle/fluid/framework/var_desc.h | 14 +-- paddle/fluid/framework/var_type.h | 22 ++-- .../framework/var_type_inference_test.cc | 26 ++-- paddle/fluid/operators/assign_op.cc | 4 +- .../fluid/operators/beam_search_decode_op.cc | 4 +- paddle/fluid/operators/beam_search_op.cc | 4 +- paddle/fluid/operators/create_reader_op.cc | 12 +- .../operators/detail/sendrecvop_utils.cc | 4 +- paddle/fluid/operators/get_places_op.cc | 2 +- paddle/fluid/operators/lod_rank_table_op.cc | 2 +- .../fluid/operators/lod_tensor_to_array_op.cc | 2 +- paddle/fluid/operators/lookup_table_op.cc | 4 +- paddle/fluid/operators/read_op.cc | 2 +- paddle/fluid/operators/sum_op.cc | 12 +- .../operators/tensor_array_read_write_op.cc | 2 +- paddle/fluid/operators/while_op.cc | 4 +- paddle/fluid/pybind/protobuf.cc | 20 +-- 26 files changed, 198 insertions(+), 184 deletions(-) diff --git a/paddle/fluid/framework/executor.cc b/paddle/fluid/framework/executor.cc index 179f9194a9d..ebfd54fdc55 100644 --- a/paddle/fluid/framework/executor.cc +++ b/paddle/fluid/framework/executor.cc @@ -36,24 +36,24 @@ namespace framework { Executor::Executor(const platform::Place& place) : place_(place) {} -static void CreateTensor(Variable* var, proto::VarDesc::VarType var_type) { - if (var_type == proto::VarDesc::LOD_TENSOR) { +static void CreateTensor(Variable* var, proto::VarType::Type var_type) { + if (var_type == proto::VarType::LOD_TENSOR) { var->GetMutable(); - } else if (var_type == proto::VarDesc::SELECTED_ROWS) { + } else if (var_type == proto::VarType::SELECTED_ROWS) { var->GetMutable(); - } else if (var_type == proto::VarDesc::FEED_MINIBATCH) { + } else if (var_type == proto::VarType::FEED_MINIBATCH) { var->GetMutable(); - } else if (var_type == proto::VarDesc::FETCH_LIST) { + } else if (var_type == proto::VarType::FETCH_LIST) { var->GetMutable(); - } else if (var_type == proto::VarDesc::STEP_SCOPES) { + } else if (var_type == proto::VarType::STEP_SCOPES) { var->GetMutable>(); - } else if (var_type == proto::VarDesc::LOD_RANK_TABLE) { + } else if (var_type == proto::VarType::LOD_RANK_TABLE) { var->GetMutable(); - } else if (var_type == proto::VarDesc::LOD_TENSOR_ARRAY) { + } else if (var_type == proto::VarType::LOD_TENSOR_ARRAY) { var->GetMutable(); - } else if (var_type == proto::VarDesc::PLACE_LIST) { + } else if (var_type == proto::VarType::PLACE_LIST) { var->GetMutable(); - } else if (var_type == proto::VarDesc::READER) { + } else if (var_type == proto::VarType::READER) { var->GetMutable(); } else { PADDLE_THROW( @@ -182,7 +182,7 @@ static bool has_feed_operators( auto var = block->FindVar(feed_holder_name); PADDLE_ENFORCE_NOT_NULL(var, "Block should already have a '%s' variable", feed_holder_name); - PADDLE_ENFORCE_EQ(var->GetType(), proto::VarDesc::FEED_MINIBATCH, + PADDLE_ENFORCE_EQ(var->GetType(), proto::VarType::FEED_MINIBATCH, "'%s' variable should be 'FEED_MINIBATCH' type", feed_holder_name); } @@ -222,7 +222,7 @@ static bool has_fetch_operators( auto var = block->FindVar(fetch_holder_name); PADDLE_ENFORCE_NOT_NULL(var, "Block should already have a '%s' variable", fetch_holder_name); - PADDLE_ENFORCE_EQ(var->GetType(), proto::VarDesc::FETCH_LIST, + PADDLE_ENFORCE_EQ(var->GetType(), proto::VarType::FETCH_LIST, "'%s' variable should be 'FETCH_LIST' type", fetch_holder_name); } @@ -241,7 +241,7 @@ void Executor::Run(const ProgramDesc& program, Scope* scope, if (!has_feed_operators(global_block, feed_targets, feed_holder_name)) { // create feed_holder variable auto* feed_holder = global_block->Var(feed_holder_name); - feed_holder->SetType(proto::VarDesc::FEED_MINIBATCH); + feed_holder->SetType(proto::VarType::FEED_MINIBATCH); feed_holder->SetPersistable(true); int i = 0; @@ -274,7 +274,7 @@ void Executor::Run(const ProgramDesc& program, Scope* scope, if (!has_fetch_operators(global_block, fetch_targets, fetch_holder_name)) { // create fetch_holder variable auto* fetch_holder = global_block->Var(fetch_holder_name); - fetch_holder->SetType(proto::VarDesc::FETCH_LIST); + fetch_holder->SetType(proto::VarType::FETCH_LIST); fetch_holder->SetPersistable(true); int i = 0; diff --git a/paddle/fluid/framework/framework.proto b/paddle/fluid/framework/framework.proto index ad8da21ae0f..fa7f4378511 100644 --- a/paddle/fluid/framework/framework.proto +++ b/paddle/fluid/framework/framework.proto @@ -101,25 +101,8 @@ enum DataType { FP64 = 6; } -message TensorDesc { - required DataType data_type = 1; - repeated int64 dims = 2; // [UNK, 640, 480] is saved as [-1, 640, 480] -} - -message LoDTensorDesc { - required TensorDesc tensor = 1; - optional int32 lod_level = 2 [ default = 0 ]; -} - -message LoDTensorArrayDesc { - required TensorDesc tensor = 1; - optional int32 lod_level = 2 [ default = 0 ]; -} - -message ReaderDesc { repeated LoDTensorDesc lod_tensor = 1; } - -message VarDesc { - enum VarType { +message VarType { + enum Type { LOD_TENSOR = 1; SELECTED_ROWS = 2; FEED_MINIBATCH = 3; @@ -130,13 +113,35 @@ message VarDesc { PLACE_LIST = 8; READER = 9; } + + required Type type = 1; + + message TensorDesc { + required DataType data_type = 1; + repeated int64 dims = 2; // [UNK, 640, 480] is saved as [-1, 640, 480] + } + optional TensorDesc selected_rows = 2; + + message LoDTensorDesc { + required TensorDesc tensor = 1; + optional int32 lod_level = 2 [ default = 0 ]; + } + optional LoDTensorDesc lod_tensor = 3; + + message LoDTensorArrayDesc { + required TensorDesc tensor = 1; + optional int32 lod_level = 2 [ default = 0 ]; + } + optional LoDTensorArrayDesc tensor_array = 4; + + message ReaderDesc { repeated LoDTensorDesc lod_tensor = 1; } + optional ReaderDesc reader = 5; +} + +message VarDesc { required string name = 1; required VarType type = 2; optional bool persistable = 3 [ default = false ]; - optional LoDTensorDesc lod_tensor = 4; - optional TensorDesc selected_rows = 5; - optional LoDTensorArrayDesc tensor_array = 6; - optional ReaderDesc reader = 7; } message BlockDesc { diff --git a/paddle/fluid/framework/op_desc.cc b/paddle/fluid/framework/op_desc.cc index e740010c63c..eabfdc11a8b 100644 --- a/paddle/fluid/framework/op_desc.cc +++ b/paddle/fluid/framework/op_desc.cc @@ -53,11 +53,11 @@ class CompileTimeInferShapeContext : public InferShapeContext { PADDLE_ENFORCE_LT(j, Outputs(out).size()); auto *in_var = block_.FindVarRecursive(Inputs(in)[i]); auto *out_var = block_.FindVarRecursive(Outputs(out)[j]); - if (in_var->GetType() != proto::VarDesc::LOD_TENSOR) { + if (in_var->GetType() != proto::VarType::LOD_TENSOR) { VLOG(3) << "input " << in << " is not LodTensor"; return; } - PADDLE_ENFORCE_EQ(in_var->GetType(), proto::VarDesc::LOD_TENSOR, + PADDLE_ENFORCE_EQ(in_var->GetType(), proto::VarType::LOD_TENSOR, "The %d-th output of Output(%s) must be LoDTensor.", j, out); out_var->SetLoDLevel(in_var->GetLoDLevel()); @@ -66,7 +66,7 @@ class CompileTimeInferShapeContext : public InferShapeContext { bool IsRuntime() const override; protected: - proto::VarDesc::VarType GetVarType(const std::string &name) const override; + proto::VarType::Type GetVarType(const std::string &name) const override; DDim GetDim(const std::string &name) const override; @@ -388,7 +388,7 @@ void OpDesc::InferVarType(BlockDesc *block) const { for (auto &out_pair : this->outputs_) { for (auto &out_var_name : out_pair.second) { block->FindRecursiveOrCreateVar(out_var_name) - .SetType(proto::VarDesc::LOD_TENSOR); + .SetType(proto::VarType::LOD_TENSOR); } } } @@ -507,7 +507,7 @@ void CompileTimeInferShapeContext::SetRepeatedDims( bool CompileTimeInferShapeContext::IsRuntime() const { return false; } -proto::VarDesc::VarType CompileTimeInferShapeContext::GetVarType( +proto::VarType::Type CompileTimeInferShapeContext::GetVarType( const std::string &name) const { return block_.FindVarRecursive(name)->GetType(); } diff --git a/paddle/fluid/framework/operator.cc b/paddle/fluid/framework/operator.cc index bc529b8269a..ff90aba10ba 100644 --- a/paddle/fluid/framework/operator.cc +++ b/paddle/fluid/framework/operator.cc @@ -477,7 +477,7 @@ class RuntimeInferShapeContext : public InferShapeContext { } } - proto::VarDesc::VarType GetVarType(const std::string& name) const override { + proto::VarType::Type GetVarType(const std::string& name) const override { auto* var = scope_.FindVar(name); return ToVarType(var->Type()); } diff --git a/paddle/fluid/framework/program_desc_test.cc b/paddle/fluid/framework/program_desc_test.cc index 3a4a87cfa5a..d9c4331da1d 100644 --- a/paddle/fluid/framework/program_desc_test.cc +++ b/paddle/fluid/framework/program_desc_test.cc @@ -22,13 +22,13 @@ TEST(ProgramDesc, copy_ctor) { ProgramDesc program; auto* global_block = program.MutableBlock(0); auto* x = global_block->Var("X"); - x->SetType(proto::VarDesc_VarType_LOD_TENSOR); + x->SetType(proto::VarType::LOD_TENSOR); x->SetLoDLevel(0); x->SetDataType(proto::FP32); x->SetShape({1000, 784}); auto* y = global_block->Var("Y"); - y->SetType(proto::VarDesc_VarType_LOD_TENSOR); + y->SetType(proto::VarType::LOD_TENSOR); y->SetLoDLevel(0); y->SetDataType(proto::FP32); y->SetShape({784, 100}); @@ -39,7 +39,7 @@ TEST(ProgramDesc, copy_ctor) { op->SetInput("Y", {y->Name()}); auto* out = global_block->Var("Out"); - out->SetType(proto::VarDesc_VarType_LOD_TENSOR); + out->SetType(proto::VarType::LOD_TENSOR); op->SetOutput("Y", {out->Name()}); ProgramDesc program_copy(program); @@ -84,13 +84,13 @@ TEST(ProgramDescBind, serialize_and_deserialize) { ProgramDesc program_origin; auto* global_block = program_origin.MutableBlock(0); auto* x = global_block->Var("X"); - x->SetType(proto::VarDesc_VarType_LOD_TENSOR); + x->SetType(proto::VarType::LOD_TENSOR); x->SetLoDLevel(0); x->SetDataType(proto::FP32); x->SetShape({1000, 784}); auto* y = global_block->Var("Y"); - y->SetType(proto::VarDesc_VarType_LOD_TENSOR); + y->SetType(proto::VarType::LOD_TENSOR); y->SetLoDLevel(0); y->SetDataType(proto::FP32); y->SetShape({784, 100}); @@ -101,7 +101,7 @@ TEST(ProgramDescBind, serialize_and_deserialize) { op->SetInput("Y", {y->Name()}); auto* out = global_block->Var("Out"); - out->SetType(proto::VarDesc_VarType_LOD_TENSOR); + out->SetType(proto::VarType::LOD_TENSOR); op->SetOutput("Y", {out->Name()}); std::string binary_str; diff --git a/paddle/fluid/framework/shape_inference.cc b/paddle/fluid/framework/shape_inference.cc index 1b518970acd..dc9a79020f1 100644 --- a/paddle/fluid/framework/shape_inference.cc +++ b/paddle/fluid/framework/shape_inference.cc @@ -116,19 +116,19 @@ void InferShapeContext::SetDims(const std::vector &names, } } -std::vector InferShapeContext::GetInputsVarType( +std::vector InferShapeContext::GetInputsVarType( const std::string &name) const { return GetVarTypes(Inputs(name)); } -std::vector InferShapeContext::GetOutputsVarType( +std::vector InferShapeContext::GetOutputsVarType( const std::string &name) const { return GetVarTypes(Outputs(name)); } -std::vector InferShapeContext::GetVarTypes( +std::vector InferShapeContext::GetVarTypes( const std::vector &names) const { - std::vector retv; + std::vector retv; retv.resize(names.size()); std::transform(names.begin(), names.end(), retv.begin(), std::bind(std::mem_fn(&InferShapeContext::GetVarType), this, diff --git a/paddle/fluid/framework/shape_inference.h b/paddle/fluid/framework/shape_inference.h index 3739d640fe9..bc02d700da5 100644 --- a/paddle/fluid/framework/shape_inference.h +++ b/paddle/fluid/framework/shape_inference.h @@ -31,9 +31,9 @@ class InferShapeContext { virtual bool HasInput(const std::string &name) const = 0; virtual bool HasOutput(const std::string &name) const = 0; - std::vector GetInputsVarType( + std::vector GetInputsVarType( const std::string &name) const; - std::vector GetOutputsVarType( + std::vector GetOutputsVarType( const std::string &name) const; virtual bool HasInputs(const std::string &name) const = 0; @@ -75,10 +75,10 @@ class InferShapeContext { std::vector GetDims(const std::vector &names) const; - std::vector GetVarTypes( + std::vector GetVarTypes( const std::vector &names) const; - virtual proto::VarDesc::VarType GetVarType(const std::string &name) const = 0; + virtual proto::VarType::Type GetVarType(const std::string &name) const = 0; virtual InferShapeVarPtr GetVarPtr(const std::string &name) = 0; }; diff --git a/paddle/fluid/framework/tensor_util.h b/paddle/fluid/framework/tensor_util.h index 22519013cc4..f0464d48078 100644 --- a/paddle/fluid/framework/tensor_util.h +++ b/paddle/fluid/framework/tensor_util.h @@ -225,7 +225,7 @@ inline void SerializeToStream(std::ostream& os, const Tensor& tensor, { // the 2nd field, tensor description // int32_t size // void* protobuf message - proto::TensorDesc desc; + proto::VarType::TensorDesc desc; desc.set_data_type(framework::ToDataType(tensor.type())); auto dims = framework::vectorize(tensor.dims()); auto* pb_dims = desc.mutable_dims(); @@ -290,7 +290,7 @@ inline void DeserializeFromStream(std::istream& is, Tensor* tensor, uint32_t version; is.read(reinterpret_cast(&version), sizeof(version)); PADDLE_ENFORCE_EQ(version, 0U, "Only version 0 is supported"); - proto::TensorDesc desc; + proto::VarType::TensorDesc desc; { // int32_t size // proto buffer int32_t size; diff --git a/paddle/fluid/framework/var_desc.cc b/paddle/fluid/framework/var_desc.cc index eb881469697..bb2be1ab50a 100644 --- a/paddle/fluid/framework/var_desc.cc +++ b/paddle/fluid/framework/var_desc.cc @@ -18,18 +18,21 @@ limitations under the License. */ namespace paddle { namespace framework { -proto::VarDesc::VarType VarDesc::GetType() const { return desc_.type(); } +proto::VarType::Type VarDesc::GetType() const { return desc_.type().type(); } -void VarDesc::SetType(proto::VarDesc::VarType type) { desc_.set_type(type); } +void VarDesc::SetType(proto::VarType::Type type) { + desc_.mutable_type()->set_type(type); +} void VarDesc::SetShape(const std::vector &dims) { VectorToRepeated(dims, mutable_tensor_desc()->mutable_dims()); } void VarDesc::SetTensorDescNum(size_t num) { - switch (desc_.type()) { - case proto::VarDesc::READER: { - auto *lod_tensors_ptr = desc_.mutable_reader()->mutable_lod_tensor(); + switch (desc_.type().type()) { + case proto::VarType::READER: { + auto *lod_tensors_ptr = + desc_.mutable_type()->mutable_reader()->mutable_lod_tensor(); lod_tensors_ptr->Clear(); for (size_t i = 0; i < num; ++i) { lod_tensors_ptr->Add(); @@ -44,9 +47,9 @@ void VarDesc::SetTensorDescNum(size_t num) { } size_t VarDesc::GetTensorDescNum() const { - switch (desc_.type()) { - case proto::VarDesc::READER: - return desc_.reader().lod_tensor_size(); + switch (desc_.type().type()) { + case proto::VarType::READER: + return desc_.type().reader().lod_tensor_size(); break; default: PADDLE_THROW( @@ -64,7 +67,7 @@ void VarDesc::SetShapes( << "). The Reader is going to be reinitialized."; SetTensorDescNum(multiple_dims.size()); } - std::vector tensors = mutable_tensor_descs(); + std::vector tensors = mutable_tensor_descs(); for (size_t i = 0; i < multiple_dims.size(); ++i) { VectorToRepeated(multiple_dims[i], tensors[i]->mutable_dims()); } @@ -75,7 +78,7 @@ std::vector VarDesc::GetShape() const { } std::vector> VarDesc::GetShapes() const { - std::vector descs = tensor_descs(); + std::vector descs = tensor_descs(); std::vector> res; res.reserve(descs.size()); for (const auto &tensor_desc : descs) { @@ -98,7 +101,8 @@ void VarDesc::SetDataTypes( << "). The Reader is going to be reinitialized."; SetTensorDescNum(multiple_data_type.size()); } - std::vector tensor_descs = mutable_tensor_descs(); + std::vector tensor_descs = + mutable_tensor_descs(); for (size_t i = 0; i < multiple_data_type.size(); ++i) { tensor_descs[i]->set_data_type(multiple_data_type[i]); } @@ -109,7 +113,7 @@ proto::DataType VarDesc::GetDataType() const { } std::vector VarDesc::GetDataTypes() const { - std::vector descs = tensor_descs(); + std::vector descs = tensor_descs(); std::vector res; res.reserve(descs.size()); for (const auto &tensor_desc : descs) { @@ -119,12 +123,12 @@ std::vector VarDesc::GetDataTypes() const { } void VarDesc::SetLoDLevel(int32_t lod_level) { - switch (desc_.type()) { - case proto::VarDesc::LOD_TENSOR: - desc_.mutable_lod_tensor()->set_lod_level(lod_level); + switch (desc_.type().type()) { + case proto::VarType::LOD_TENSOR: + desc_.mutable_type()->mutable_lod_tensor()->set_lod_level(lod_level); break; - case proto::VarDesc::LOD_TENSOR_ARRAY: - desc_.mutable_tensor_array()->set_lod_level(lod_level); + case proto::VarType::LOD_TENSOR_ARRAY: + desc_.mutable_type()->mutable_tensor_array()->set_lod_level(lod_level); break; default: PADDLE_THROW( @@ -142,10 +146,11 @@ void VarDesc::SetLoDLevels(const std::vector &multiple_lod_level) { << "). The Reader is going to be reinitialized."; SetTensorDescNum(multiple_lod_level.size()); } - switch (desc_.type()) { - case proto::VarDesc::READER: { + switch (desc_.type().type()) { + case proto::VarType::READER: { size_t i = 0; - for (auto &lod_tensor : *desc_.mutable_reader()->mutable_lod_tensor()) { + for (auto &lod_tensor : + *desc_.mutable_type()->mutable_reader()->mutable_lod_tensor()) { lod_tensor.set_lod_level(multiple_lod_level[i++]); } } break; @@ -157,11 +162,11 @@ void VarDesc::SetLoDLevels(const std::vector &multiple_lod_level) { } int32_t VarDesc::GetLoDLevel() const { - switch (desc_.type()) { - case proto::VarDesc::LOD_TENSOR: - return desc_.lod_tensor().lod_level(); - case proto::VarDesc::LOD_TENSOR_ARRAY: - return desc_.tensor_array().lod_level(); + switch (desc_.type().type()) { + case proto::VarType::LOD_TENSOR: + return desc_.type().lod_tensor().lod_level(); + case proto::VarType::LOD_TENSOR_ARRAY: + return desc_.type().tensor_array().lod_level(); default: PADDLE_THROW( "Getting 'lod_level' is not supported by the type of var %s.", @@ -171,10 +176,10 @@ int32_t VarDesc::GetLoDLevel() const { std::vector VarDesc::GetLoDLevels() const { std::vector res; - switch (desc_.type()) { - case proto::VarDesc::READER: - res.reserve(desc_.reader().lod_tensor_size()); - for (auto &lod_tensor : desc_.reader().lod_tensor()) { + switch (desc_.type().type()) { + case proto::VarType::READER: + res.reserve(desc_.type().reader().lod_tensor_size()); + for (auto &lod_tensor : desc_.type().reader().lod_tensor()) { res.push_back(lod_tensor.lod_level()); } return res; @@ -186,15 +191,16 @@ std::vector VarDesc::GetLoDLevels() const { } } -const proto::TensorDesc &VarDesc::tensor_desc() const { +const proto::VarType::TensorDesc &VarDesc::tensor_desc() const { PADDLE_ENFORCE(desc_.has_type(), "The var's type hasn't been set."); - switch (desc_.type()) { - case proto::VarDesc::SELECTED_ROWS: - return desc_.selected_rows(); - case proto::VarDesc::LOD_TENSOR: - return desc_.lod_tensor().tensor(); - case proto::VarDesc::LOD_TENSOR_ARRAY: - return desc_.tensor_array().tensor(); + PADDLE_ENFORCE(desc_.type().has_type(), "The var type hasn't been set."); + switch (desc_.type().type()) { + case proto::VarType::SELECTED_ROWS: + return desc_.type().selected_rows(); + case proto::VarType::LOD_TENSOR: + return desc_.type().lod_tensor().tensor(); + case proto::VarType::LOD_TENSOR_ARRAY: + return desc_.type().tensor_array().tensor(); default: PADDLE_THROW( "Getting 'tensor_desc' is not supported by the type of var %s.", @@ -202,13 +208,13 @@ const proto::TensorDesc &VarDesc::tensor_desc() const { } } -std::vector VarDesc::tensor_descs() const { +std::vector VarDesc::tensor_descs() const { PADDLE_ENFORCE(desc_.has_type(), "The var type hasn't been set."); - std::vector res; + std::vector res; res.reserve(GetTensorDescNum()); - switch (desc_.type()) { - case proto::VarDesc::READER: - for (const auto &lod_tensor : desc_.reader().lod_tensor()) { + switch (desc_.type().type()) { + case proto::VarType::READER: + for (const auto &lod_tensor : desc_.type().reader().lod_tensor()) { res.push_back(lod_tensor.tensor()); } return res; @@ -220,15 +226,16 @@ std::vector VarDesc::tensor_descs() const { } } -proto::TensorDesc *VarDesc::mutable_tensor_desc() { +proto::VarType::TensorDesc *VarDesc::mutable_tensor_desc() { PADDLE_ENFORCE(desc_.has_type(), "The var type hasn't been set."); - switch (desc_.type()) { - case proto::VarDesc::SELECTED_ROWS: - return desc_.mutable_selected_rows(); - case proto::VarDesc::LOD_TENSOR: - return desc_.mutable_lod_tensor()->mutable_tensor(); - case proto::VarDesc::LOD_TENSOR_ARRAY: - return desc_.mutable_tensor_array()->mutable_tensor(); + PADDLE_ENFORCE(desc_.type().has_type(), "The var type hasn't been set."); + switch (desc_.type().type()) { + case proto::VarType::SELECTED_ROWS: + return desc_.mutable_type()->mutable_selected_rows(); + case proto::VarType::LOD_TENSOR: + return desc_.mutable_type()->mutable_lod_tensor()->mutable_tensor(); + case proto::VarType::LOD_TENSOR_ARRAY: + return desc_.mutable_type()->mutable_tensor_array()->mutable_tensor(); default: PADDLE_THROW( "Getting 'mutable_tensor_desc' is not supported by the type of var " @@ -237,13 +244,15 @@ proto::TensorDesc *VarDesc::mutable_tensor_desc() { } } -std::vector VarDesc::mutable_tensor_descs() { +std::vector VarDesc::mutable_tensor_descs() { PADDLE_ENFORCE(desc_.has_type(), "The var type hasn't been set."); - std::vector res; + PADDLE_ENFORCE(desc_.type().has_type(), "The var type hasn't been set."); + std::vector res; res.reserve(GetTensorDescNum()); - switch (desc_.type()) { - case proto::VarDesc::READER: - for (auto &lod_tensor : *desc_.mutable_reader()->mutable_lod_tensor()) { + switch (desc_.type().type()) { + case proto::VarType::READER: + for (auto &lod_tensor : + *desc_.mutable_type()->mutable_reader()->mutable_lod_tensor()) { res.push_back(lod_tensor.mutable_tensor()); } return res; diff --git a/paddle/fluid/framework/var_desc.h b/paddle/fluid/framework/var_desc.h index b272e5063e1..013ba446b94 100644 --- a/paddle/fluid/framework/var_desc.h +++ b/paddle/fluid/framework/var_desc.h @@ -57,7 +57,7 @@ class VarDesc { public: explicit VarDesc(const std::string &name) { desc_.set_name(name); - desc_.set_type(proto::VarDesc::LOD_TENSOR); + desc_.mutable_type()->set_type(proto::VarType::LOD_TENSOR); } explicit VarDesc(const proto::VarDesc &desc) : desc_(desc) {} @@ -96,19 +96,19 @@ class VarDesc { std::vector GetLoDLevels() const; - proto::VarDesc::VarType GetType() const; + proto::VarType::Type GetType() const; - void SetType(proto::VarDesc::VarType type); + void SetType(proto::VarType::Type type); bool Persistable() const { return desc_.persistable(); } void SetPersistable(bool persistable) { desc_.set_persistable(persistable); } private: - const proto::TensorDesc &tensor_desc() const; - std::vector tensor_descs() const; - proto::TensorDesc *mutable_tensor_desc(); - std::vector mutable_tensor_descs(); + const proto::VarType::TensorDesc &tensor_desc() const; + std::vector tensor_descs() const; + proto::VarType::TensorDesc *mutable_tensor_desc(); + std::vector mutable_tensor_descs(); proto::VarDesc desc_; }; diff --git a/paddle/fluid/framework/var_type.h b/paddle/fluid/framework/var_type.h index b5a6183892a..960ebff9d7d 100644 --- a/paddle/fluid/framework/var_type.h +++ b/paddle/fluid/framework/var_type.h @@ -23,17 +23,17 @@ limitations under the License. */ namespace paddle { namespace framework { -inline proto::VarDesc::VarType ToVarType(std::type_index type) { +inline proto::VarType::Type ToVarType(std::type_index type) { if (type.hash_code() == typeid(LoDTensor).hash_code()) { - return proto::VarDesc_VarType_LOD_TENSOR; + return proto::VarType_Type_LOD_TENSOR; } else if (type.hash_code() == typeid(LoDRankTable).hash_code()) { - return proto::VarDesc_VarType_LOD_RANK_TABLE; + return proto::VarType_Type_LOD_RANK_TABLE; } else if (type.hash_code() == typeid(LoDTensorArray).hash_code()) { - return proto::VarDesc_VarType_LOD_TENSOR_ARRAY; + return proto::VarType_Type_LOD_TENSOR_ARRAY; } else if (type.hash_code() == typeid(SelectedRows).hash_code()) { - return proto::VarDesc_VarType_SELECTED_ROWS; + return proto::VarType_Type_SELECTED_ROWS; } else if (type.hash_code() == typeid(ReaderHolder).hash_code()) { - return proto::VarDesc_VarType_READER; + return proto::VarType_Type_READER; } else { PADDLE_THROW("ToVarType:Unsupported type %s", type.name()); } @@ -42,19 +42,19 @@ inline proto::VarDesc::VarType ToVarType(std::type_index type) { template inline void VisitVarType(const framework::Variable& var, Visitor visitor) { switch (ToVarType(var.Type())) { - case proto::VarDesc_VarType_LOD_TENSOR: + case proto::VarType_Type_LOD_TENSOR: visitor(var.Get()); return; - case proto::VarDesc_VarType_LOD_RANK_TABLE: + case proto::VarType_Type_LOD_RANK_TABLE: visitor(var.Get()); return; - case proto::VarDesc_VarType_LOD_TENSOR_ARRAY: + case proto::VarType_Type_LOD_TENSOR_ARRAY: visitor(var.Get()); return; - case proto::VarDesc_VarType_SELECTED_ROWS: + case proto::VarType_Type_SELECTED_ROWS: visitor(var.Get()); return; - case proto::VarDesc_VarType_READER: + case proto::VarType_Type_READER: visitor(var.Get()); return; default: diff --git a/paddle/fluid/framework/var_type_inference_test.cc b/paddle/fluid/framework/var_type_inference_test.cc index 961f209ee1c..1dced845ed7 100644 --- a/paddle/fluid/framework/var_type_inference_test.cc +++ b/paddle/fluid/framework/var_type_inference_test.cc @@ -35,14 +35,14 @@ class SumOpVarTypeInference : public VarTypeInference { public: void operator()(const OpDesc &op_desc, BlockDesc *block) const override { auto &inputs = op_desc.Input("X"); - auto default_var_type = proto::VarDesc::SELECTED_ROWS; + auto default_var_type = proto::VarType::SELECTED_ROWS; bool any_input_is_lod_tensor = std::any_of( inputs.begin(), inputs.end(), [block](const std::string &name) { - return block->Var(name)->GetType() == proto::VarDesc::LOD_TENSOR; + return block->Var(name)->GetType() == proto::VarType::LOD_TENSOR; }); if (any_input_is_lod_tensor) { - default_var_type = proto::VarDesc::LOD_TENSOR; + default_var_type = proto::VarType::LOD_TENSOR; } auto out_var_name = op_desc.Output("Out").front(); @@ -67,19 +67,19 @@ TEST(InferVarType, sum_op) { op->SetInput("X", {"test_a", "test_b", "test_c"}); op->SetOutput("Out", {"test_out"}); - prog.MutableBlock(0)->Var("test_a")->SetType(proto::VarDesc::SELECTED_ROWS); - prog.MutableBlock(0)->Var("test_b")->SetType(proto::VarDesc::SELECTED_ROWS); - prog.MutableBlock(0)->Var("test_c")->SetType(proto::VarDesc::SELECTED_ROWS); + prog.MutableBlock(0)->Var("test_a")->SetType(proto::VarType::SELECTED_ROWS); + prog.MutableBlock(0)->Var("test_b")->SetType(proto::VarType::SELECTED_ROWS); + prog.MutableBlock(0)->Var("test_c")->SetType(proto::VarType::SELECTED_ROWS); prog.MutableBlock(0)->Var("test_out"); op->InferVarType(prog.MutableBlock(0)); - ASSERT_EQ(proto::VarDesc::SELECTED_ROWS, + ASSERT_EQ(proto::VarType::SELECTED_ROWS, prog.MutableBlock(0)->Var("test_out")->GetType()); - prog.MutableBlock(0)->Var("test_b")->SetType(proto::VarDesc::LOD_TENSOR); + prog.MutableBlock(0)->Var("test_b")->SetType(proto::VarType::LOD_TENSOR); op->InferVarType(prog.MutableBlock(0)); - ASSERT_EQ(proto::VarDesc::LOD_TENSOR, + ASSERT_EQ(proto::VarType::LOD_TENSOR, prog.MutableBlock(0)->Var("test_out")->GetType()); } @@ -90,14 +90,14 @@ TEST(InferVarType, sum_op_without_infer_var_type) { op->SetInput("X", {"test2_a", "test2_b", "test2_c"}); op->SetOutput("Out", {"test2_out"}); - prog.MutableBlock(0)->Var("test2_a")->SetType(proto::VarDesc::SELECTED_ROWS); - prog.MutableBlock(0)->Var("test2_b")->SetType(proto::VarDesc::SELECTED_ROWS); - prog.MutableBlock(0)->Var("test2_c")->SetType(proto::VarDesc::SELECTED_ROWS); + prog.MutableBlock(0)->Var("test2_a")->SetType(proto::VarType::SELECTED_ROWS); + prog.MutableBlock(0)->Var("test2_b")->SetType(proto::VarType::SELECTED_ROWS); + prog.MutableBlock(0)->Var("test2_c")->SetType(proto::VarType::SELECTED_ROWS); prog.MutableBlock(0)->Var("test2_out"); op->InferVarType(prog.MutableBlock(0)); - ASSERT_EQ(proto::VarDesc_VarType_LOD_TENSOR, + ASSERT_EQ(proto::VarType_Type_LOD_TENSOR, prog.MutableBlock(0)->Var("test2_out")->GetType()); } diff --git a/paddle/fluid/operators/assign_op.cc b/paddle/fluid/operators/assign_op.cc index eedf6b8c66f..e21dc6d77f3 100644 --- a/paddle/fluid/operators/assign_op.cc +++ b/paddle/fluid/operators/assign_op.cc @@ -115,8 +115,8 @@ class AssignInferShape : public framework::InferShapeBase { void operator()(framework::InferShapeContext *context) const override { if (context->HasInput("X")) { auto type = context->GetInputsVarType("X")[0]; - if (type == framework::proto::VarDesc_VarType_SELECTED_ROWS || - type == framework::proto::VarDesc_VarType_LOD_TENSOR) { + if (type == framework::proto::VarType::SELECTED_ROWS || + type == framework::proto::VarType::LOD_TENSOR) { context->SetOutputDim("Out", context->GetInputDim("X")); } } diff --git a/paddle/fluid/operators/beam_search_decode_op.cc b/paddle/fluid/operators/beam_search_decode_op.cc index dacb0e2681d..718f469d38c 100644 --- a/paddle/fluid/operators/beam_search_decode_op.cc +++ b/paddle/fluid/operators/beam_search_decode_op.cc @@ -128,10 +128,10 @@ class BeamSearchDecodeInferVarType : public framework::VarTypeInference { void operator()(const framework::OpDesc& op_desc, framework::BlockDesc* block) const override { for (auto& o : op_desc.Output("SentenceIds")) { - block->Var(o)->SetType(framework::proto::VarDesc::LOD_TENSOR); + block->Var(o)->SetType(framework::proto::VarType::LOD_TENSOR); } for (auto& o : op_desc.Output("SentenceScores")) { - block->Var(o)->SetType(framework::proto::VarDesc::LOD_TENSOR); + block->Var(o)->SetType(framework::proto::VarType::LOD_TENSOR); } } }; diff --git a/paddle/fluid/operators/beam_search_op.cc b/paddle/fluid/operators/beam_search_op.cc index 76985ea9c26..e848b1f12cb 100644 --- a/paddle/fluid/operators/beam_search_op.cc +++ b/paddle/fluid/operators/beam_search_op.cc @@ -240,10 +240,10 @@ class BeamSearchInferVarType : public framework::VarTypeInference { void operator()(const framework::OpDesc &op_desc, framework::BlockDesc *block) const override { for (auto &o : op_desc.Output("selected_ids")) { - block->Var(o)->SetType(framework::proto::VarDesc::LOD_TENSOR); + block->Var(o)->SetType(framework::proto::VarType::LOD_TENSOR); } for (auto &o : op_desc.Output("selected_scores")) { - block->Var(o)->SetType(framework::proto::VarDesc::LOD_TENSOR); + block->Var(o)->SetType(framework::proto::VarType::LOD_TENSOR); } } }; diff --git a/paddle/fluid/operators/create_reader_op.cc b/paddle/fluid/operators/create_reader_op.cc index 1393f1a66ba..17ed7e24eca 100644 --- a/paddle/fluid/operators/create_reader_op.cc +++ b/paddle/fluid/operators/create_reader_op.cc @@ -84,7 +84,7 @@ class CreateFileReaderInferVarType : public framework::VarTypeInference { framework::BlockDesc* block) const override { std::string reader_name = op_desc.Output("Out")[0]; framework::VarDesc* reader = block->FindVarRecursive(reader_name); - reader->SetType(framework::proto::VarDesc::READER); + reader->SetType(framework::proto::VarType::READER); } }; @@ -97,7 +97,7 @@ class CreateDecoratedReaderInferVarType : public framework::VarTypeInference { framework::VarDesc* in_reader = block->FindVarRecursive(in_reader_name); std::string out_reader_name = op_desc.Output("Out")[0]; framework::VarDesc* out_reader = block->FindVarRecursive(out_reader_name); - out_reader->SetType(framework::proto::VarDesc::READER); + out_reader->SetType(framework::proto::VarType::READER); out_reader->SetDataTypes(in_reader->GetDataTypes()); } }; @@ -147,7 +147,7 @@ class CreateRandomDataGeneratorOpMaker AddComment(R"DOC( CreateRandomDataGenerator Operator - This Op creates a random reader. + This Op creates a random reader. The reader generates random data instead of really reading from files. Generated data follow an uniform distribution between 'min' and 'max'. )DOC"); @@ -183,7 +183,7 @@ class CreateShuffleReaderOpMaker : public framework::OpProtoAndCheckerMaker { CreateShuffleReader Operator A shuffle reader takes another reader as its 'underlying reader' - and yields the underlying reader's outputs in a shuffled order. + and yields the underlying reader's outputs in a shuffled order. )DOC"); } }; @@ -218,8 +218,8 @@ class CreateBatchReaderOpMaker : public framework::OpProtoAndCheckerMaker { AddComment(R"DOC( CreateBatchReader Operator - A batch reader takes another reader as its 'underlying reader', - gathers the underlying reader's outputs and then yields them in batches. + A batch reader takes another reader as its 'underlying reader', + gathers the underlying reader's outputs and then yields them in batches. )DOC"); } }; diff --git a/paddle/fluid/operators/detail/sendrecvop_utils.cc b/paddle/fluid/operators/detail/sendrecvop_utils.cc index 5403dbc2a05..169fd40fd95 100644 --- a/paddle/fluid/operators/detail/sendrecvop_utils.cc +++ b/paddle/fluid/operators/detail/sendrecvop_utils.cc @@ -24,11 +24,11 @@ void SerializeToMessage(const std::string& name, const framework::Variable* var, msg->set_varname(name); std::ostringstream oss; switch (framework::ToVarType(var->Type())) { - case framework::proto::VarDesc_VarType_LOD_TENSOR: + case framework::proto::VarType_Type_LOD_TENSOR: msg->set_type(sendrecv::VarType::LOD_TENSOR); framework::SerializeToStream(oss, var->Get(), ctx); break; - case framework::proto::VarDesc_VarType_SELECTED_ROWS: + case framework::proto::VarType_Type_SELECTED_ROWS: msg->set_type(sendrecv::VarType::SELECTED_ROWS); framework::SerializeToStream(oss, var->Get(), ctx); diff --git a/paddle/fluid/operators/get_places_op.cc b/paddle/fluid/operators/get_places_op.cc index 8555b0778fa..9002ce4717c 100644 --- a/paddle/fluid/operators/get_places_op.cc +++ b/paddle/fluid/operators/get_places_op.cc @@ -98,7 +98,7 @@ class GetPlacesInferVarType : public framework::VarTypeInference { framework::BlockDesc *block) const override { for (auto &o_name : op_desc.Output("Out")) { block->FindRecursiveOrCreateVar(o_name).SetType( - framework::proto::VarDesc::PLACE_LIST); + framework::proto::VarType::PLACE_LIST); } } }; diff --git a/paddle/fluid/operators/lod_rank_table_op.cc b/paddle/fluid/operators/lod_rank_table_op.cc index 2d01ed67376..590b44e14f5 100644 --- a/paddle/fluid/operators/lod_rank_table_op.cc +++ b/paddle/fluid/operators/lod_rank_table_op.cc @@ -69,7 +69,7 @@ class LoDRankTableInferVarType : public framework::VarTypeInference { framework::BlockDesc *block) const override { for (auto &o : op_desc.Output("Out")) { block->FindRecursiveOrCreateVar(o).SetType( - framework::proto::VarDesc::LOD_RANK_TABLE); + framework::proto::VarType::LOD_RANK_TABLE); } } }; diff --git a/paddle/fluid/operators/lod_tensor_to_array_op.cc b/paddle/fluid/operators/lod_tensor_to_array_op.cc index be47fdfd048..b5e778a5811 100644 --- a/paddle/fluid/operators/lod_tensor_to_array_op.cc +++ b/paddle/fluid/operators/lod_tensor_to_array_op.cc @@ -138,7 +138,7 @@ class LoDTensorToArrayInferVarType : public framework::VarTypeInference { void operator()(const framework::OpDesc &op_desc, framework::BlockDesc *block) const override { for (auto &out_var : op_desc.Output("Out")) { - block->Var(out_var)->SetType(framework::proto::VarDesc::LOD_TENSOR_ARRAY); + block->Var(out_var)->SetType(framework::proto::VarType::LOD_TENSOR_ARRAY); } } }; diff --git a/paddle/fluid/operators/lookup_table_op.cc b/paddle/fluid/operators/lookup_table_op.cc index d338553f7c4..3acdca17afc 100644 --- a/paddle/fluid/operators/lookup_table_op.cc +++ b/paddle/fluid/operators/lookup_table_op.cc @@ -123,11 +123,11 @@ class LookupTableOpGradVarTypeInference : public framework::VarTypeInference { VLOG(3) << "lookup_table_grad op " << framework::GradVarName("W") << " is set to SelectedRows"; block->Var(out_var_name) - ->SetType(framework::proto::VarDesc::SELECTED_ROWS); + ->SetType(framework::proto::VarType::SELECTED_ROWS); } else { VLOG(3) << "lookup_table_grad op " << framework::GradVarName("W") << " is set to LoDTensor"; - block->Var(out_var_name)->SetType(framework::proto::VarDesc::LOD_TENSOR); + block->Var(out_var_name)->SetType(framework::proto::VarType::LOD_TENSOR); } } }; diff --git a/paddle/fluid/operators/read_op.cc b/paddle/fluid/operators/read_op.cc index 127df82ff13..62beab82d4f 100644 --- a/paddle/fluid/operators/read_op.cc +++ b/paddle/fluid/operators/read_op.cc @@ -45,7 +45,7 @@ class ReadInferVarType : public framework::VarTypeInference { PADDLE_ENFORCE_EQ(dtypes.size(), out_names.size()); for (size_t i = 0; i < dtypes.size(); ++i) { framework::VarDesc& out = block->FindRecursiveOrCreateVar(out_names[i]); - out.SetType(framework::proto::VarDesc::LOD_TENSOR); + out.SetType(framework::proto::VarType::LOD_TENSOR); out.SetDataType(dtypes[i]); } } diff --git a/paddle/fluid/operators/sum_op.cc b/paddle/fluid/operators/sum_op.cc index bfc5709c4b7..7b88387c338 100644 --- a/paddle/fluid/operators/sum_op.cc +++ b/paddle/fluid/operators/sum_op.cc @@ -29,7 +29,7 @@ class SumOp : public framework::OperatorWithKernel { "Output(Out) of SumOp should not be null."); if (ctx->IsRuntime() && ctx->GetOutputsVarType("Out")[0] == - framework::proto::VarDesc::LOD_TENSOR_ARRAY) { + framework::proto::VarType::LOD_TENSOR_ARRAY) { return; // skip runtime infershape when is tensor array; } @@ -118,7 +118,7 @@ class SumOpVarTypeInference : public framework::VarTypeInference { void operator()(const framework::OpDesc& op_desc, framework::BlockDesc* block) const override { auto& inputs = op_desc.Input("X"); - auto var_type = framework::proto::VarDesc::SELECTED_ROWS; + auto var_type = framework::proto::VarType::SELECTED_ROWS; for (auto& name : op_desc.Input("X")) { VLOG(10) << name << " " @@ -128,12 +128,12 @@ class SumOpVarTypeInference : public framework::VarTypeInference { bool any_input_is_lod_tensor = std::any_of( inputs.begin(), inputs.end(), [block](const std::string& name) { return block->FindRecursiveOrCreateVar(name).GetType() == - framework::proto::VarDesc::LOD_TENSOR; + framework::proto::VarType::LOD_TENSOR; }); auto is_tensor_array = [block](const std::string& name) { return block->FindRecursiveOrCreateVar(name).GetType() == - framework::proto::VarDesc::LOD_TENSOR_ARRAY; + framework::proto::VarType::LOD_TENSOR_ARRAY; }; bool any_input_is_tensor_array = @@ -151,9 +151,9 @@ class SumOpVarTypeInference : public framework::VarTypeInference { PADDLE_ENFORCE(all_inputs_are_tensor_array, "Not all inputs are tensor array:\n%s", os.str()); } - var_type = framework::proto::VarDesc::LOD_TENSOR_ARRAY; + var_type = framework::proto::VarType::LOD_TENSOR_ARRAY; } else if (any_input_is_lod_tensor) { - var_type = framework::proto::VarDesc::LOD_TENSOR; + var_type = framework::proto::VarType::LOD_TENSOR; } auto out_var_name = op_desc.Output("Out").front(); diff --git a/paddle/fluid/operators/tensor_array_read_write_op.cc b/paddle/fluid/operators/tensor_array_read_write_op.cc index 278b3481176..9b484cda121 100644 --- a/paddle/fluid/operators/tensor_array_read_write_op.cc +++ b/paddle/fluid/operators/tensor_array_read_write_op.cc @@ -108,7 +108,7 @@ class WriteToArrayInferVarType : public framework::VarTypeInference { auto out_name = op_desc.Output("Out")[0]; VLOG(10) << "Set Variable " << out_name << " as LOD_TENSOR_ARRAY"; auto &out = block->FindRecursiveOrCreateVar(out_name); - out.SetType(framework::proto::VarDesc::LOD_TENSOR_ARRAY); + out.SetType(framework::proto::VarType::LOD_TENSOR_ARRAY); auto *x = block->FindVarRecursive(x_name); if (x != nullptr) { out.SetDataType(x->GetDataType()); diff --git a/paddle/fluid/operators/while_op.cc b/paddle/fluid/operators/while_op.cc index 94a11eaf782..3d5cdeda26a 100644 --- a/paddle/fluid/operators/while_op.cc +++ b/paddle/fluid/operators/while_op.cc @@ -330,10 +330,10 @@ class WhileGradOpShapeInference : public framework::InferShapeBase { continue; } auto dims = ctx->GetInputsElementDim(kX, i); - if (var_types[i] == framework::proto::VarDesc::LOD_TENSOR) { + if (var_types[i] == framework::proto::VarType::LOD_TENSOR) { names_to_set.push_back(pg_names[i]); dims_to_set.push_back(dims); - } else if (var_types[i] == framework::proto::VarDesc::LOD_TENSOR_ARRAY) { + } else if (var_types[i] == framework::proto::VarType::LOD_TENSOR_ARRAY) { // not sure how to set the dim of LOD_TENSOR_ARRAY names_to_set.push_back(pg_names[i]); dims_to_set.push_back(dims); diff --git a/paddle/fluid/pybind/protobuf.cc b/paddle/fluid/pybind/protobuf.cc index 3341edb370f..9f97cc5007e 100644 --- a/paddle/fluid/pybind/protobuf.cc +++ b/paddle/fluid/pybind/protobuf.cc @@ -232,16 +232,16 @@ void BindVarDsec(py::module &m) { .def("persistable", &VarDesc::Persistable) .def("set_persistable", &VarDesc::SetPersistable); - py::enum_(var_desc, "VarType", "") - .value("LOD_TENSOR", proto::VarDesc::LOD_TENSOR) - .value("SELECTED_ROWS", proto::VarDesc::SELECTED_ROWS) - .value("FEED_MINIBATCH", proto::VarDesc::FEED_MINIBATCH) - .value("FETCH_LIST", proto::VarDesc::FETCH_LIST) - .value("STEP_SCOPES", proto::VarDesc::STEP_SCOPES) - .value("LOD_RANK_TABLE", proto::VarDesc::LOD_RANK_TABLE) - .value("LOD_TENSOR_ARRAY", proto::VarDesc::LOD_TENSOR_ARRAY) - .value("PLACE_LIST", proto::VarDesc::PLACE_LIST) - .value("READER", proto::VarDesc::READER); + py::enum_(var_desc, "VarType", "") + .value("LOD_TENSOR", proto::VarType::LOD_TENSOR) + .value("SELECTED_ROWS", proto::VarType::SELECTED_ROWS) + .value("FEED_MINIBATCH", proto::VarType::FEED_MINIBATCH) + .value("FETCH_LIST", proto::VarType::FETCH_LIST) + .value("STEP_SCOPES", proto::VarType::STEP_SCOPES) + .value("LOD_RANK_TABLE", proto::VarType::LOD_RANK_TABLE) + .value("LOD_TENSOR_ARRAY", proto::VarType::LOD_TENSOR_ARRAY) + .value("PLACE_LIST", proto::VarType::PLACE_LIST) + .value("READER", proto::VarType::READER); } void BindOpDesc(py::module &m) { -- GitLab From cde6241a1bc1c4c42d3991d5a394f7f1398c702d Mon Sep 17 00:00:00 2001 From: Xin Pan Date: Tue, 13 Feb 2018 08:37:48 +0800 Subject: [PATCH 045/122] Run Python OP tests in a single Python process to improve test time. (#8362) Currently, our tests run with 2 GPUs, the init time is absurdly long: about 4s for each process. Currently, we run each OP test on different processes. This PR: 1. create cmake function py_test_modules which will generate the Makefile that runs a list of Python unittest module in a single Python process. 2. move all "python unittest compatible" (e.g., used the unittest package, not just a regular python file). from fluid/tests to fluid/tests/unittests. 3. cmake now will run all OP tests in fluid/tests/unittests in a single process, except the time-consuming tests, they are separated into different processes to utilize parallelism. Please make sure to use the unittest package if you put the python test file in fluid/tests/unittests 4. remove all exit(0) from fluid/tests/unittests/*.py, exit(0) is used to disable unittest, we can not do it when running all tests in a single process since it will terminate the process without running the other tests. Instead, the test is disabled in fluid/tests/unittests/CMakeLists.txt. FIXME is added for each disabled item. Please disable the unittest from fluid/tests/unittests/CMakeLists.txt, instead of adding exit(0) to the Python file, for all Python file in fluid/tests/unittests/. 5. add an option WITH_FAST_BUNDLE_TEST. When OFF, will run the unit tests in separate process so that they can be tested individually. --- CMakeLists.txt | 1 + python/paddle/v2/fluid/tests/CMakeLists.txt | 9 +- .../v2/fluid/tests/unittests/CMakeLists.txt | 89 +++++++++++++++++++ .../v2/fluid/tests/unittests/__init__.py | 13 +++ .../fluid/tests/{ => unittests}/decorators.py | 0 .../v2/fluid/tests/{ => unittests}/op_test.py | 0 .../tests/{ => unittests}/test_accuracy_op.py | 0 .../{ => unittests}/test_activation_op.py | 0 .../tests/{ => unittests}/test_adadelta_op.py | 0 .../tests/{ => unittests}/test_adagrad_op.py | 0 .../tests/{ => unittests}/test_adam_op.py | 0 .../tests/{ => unittests}/test_adamax_op.py | 0 .../test_array_read_write_op.py | 0 .../tests/{ => unittests}/test_assign_op.py | 0 .../{ => unittests}/test_assign_value_op.py | 0 .../tests/{ => unittests}/test_auc_op.py | 0 .../{ => unittests}/test_batch_norm_op.py | 0 .../test_beam_search_decode_op.py | 0 .../{ => unittests}/test_beam_search_op.py | 0 .../test_bilinear_tensor_product_op.py | 0 .../test_bipartite_match_op.py | 0 .../{ => unittests}/test_box_coder_op.py | 0 .../{ => unittests}/test_calc_gradient.py | 0 .../tests/{ => unittests}/test_cast_op.py | 0 .../{ => unittests}/test_chunk_eval_op.py | 0 .../{ => unittests}/test_clip_by_norm_op.py | 0 .../tests/{ => unittests}/test_clip_op.py | 0 .../tests/{ => unittests}/test_compare_op.py | 0 .../tests/{ => unittests}/test_concat_op.py | 0 .../tests/{ => unittests}/test_cond_op.py | 3 - .../{ => unittests}/test_conditional_block.py | 0 .../tests/{ => unittests}/test_const_value.py | 0 .../tests/{ => unittests}/test_conv2d_op.py | 0 .../test_conv2d_transpose_op.py | 0 .../tests/{ => unittests}/test_conv3d_op.py | 0 .../test_conv3d_transpose_op.py | 0 .../{ => unittests}/test_conv_shift_op.py | 0 .../tests/{ => unittests}/test_cos_sim_op.py | 0 .../test_create_op_doc_string.py | 0 .../{ => unittests}/test_crf_decoding_op.py | 0 .../tests/{ => unittests}/test_crop_op.py | 0 .../{ => unittests}/test_cross_entropy_op.py | 0 .../tests/{ => unittests}/test_ctc_align.py | 0 .../tests/{ => unittests}/test_cumsum_op.py | 0 .../test_decayed_adagrad_op.py | 0 .../test_default_scope_funcs.py | 0 .../{ => unittests}/test_detection_map_op.py | 0 .../test_detection_output_op.py | 4 +- .../tests/{ => unittests}/test_dropout_op.py | 0 .../tests/{ => unittests}/test_dyn_rnn.py | 0 .../test_dynrnn_gradient_check.py | 0 .../test_dynrnn_static_input.py | 0 .../{ => unittests}/test_edit_distance_op.py | 0 .../test_elementwise_add_op.py | 0 .../test_elementwise_div_op.py | 0 .../test_elementwise_max_op.py | 0 .../test_elementwise_min_op.py | 0 .../test_elementwise_mul_op.py | 0 .../test_elementwise_pow_op.py | 0 .../test_elementwise_sub_op.py | 0 .../tests/{ => unittests}/test_exception.py | 0 .../{ => unittests}/test_executor_and_mul.py | 0 .../tests/{ => unittests}/test_expand_op.py | 0 .../{ => unittests}/test_feed_fetch_method.py | 0 .../tests/{ => unittests}/test_fetch_var.py | 0 .../test_fill_constant_batch_size_like_op.py | 0 .../{ => unittests}/test_fill_constant_op.py | 0 .../tests/{ => unittests}/test_fill_op.py | 0 .../test_fill_zeros_like_op.py | 0 .../test_framework_debug_str.py | 0 .../tests/{ => unittests}/test_ftrl_op.py | 0 .../tests/{ => unittests}/test_gather_op.py | 0 .../test_gaussian_random_op.py | 0 .../{ => unittests}/test_get_places_op.py | 0 .../tests/{ => unittests}/test_gru_op.py | 0 .../tests/{ => unittests}/test_gru_unit_op.py | 0 .../{ => unittests}/test_hinge_loss_op.py | 0 .../{ => unittests}/test_huber_loss_op.py | 0 .../{ => unittests}/test_im2sequence_op.py | 0 .../test_image_classification_layer.py | 0 .../tests/{ => unittests}/test_infer_shape.py | 0 .../test_inference_model_io.py | 0 .../tests/{ => unittests}/test_initializer.py | 0 .../{ => unittests}/test_iou_similarity_op.py | 0 .../tests/{ => unittests}/test_is_empty_op.py | 0 .../tests/{ => unittests}/test_l1_norm_op.py | 0 .../{ => unittests}/test_label_smooth_op.py | 0 .../{ => unittests}/test_layer_norm_op.py | 0 .../tests/{ => unittests}/test_layers.py | 0 .../test_learning_rate_decay.py | 0 .../test_linear_chain_crf_op.py | 0 .../test_lod_array_length_op.py | 0 .../{ => unittests}/test_lod_rank_table.py | 0 .../{ => unittests}/test_lod_reset_op.py | 0 .../{ => unittests}/test_lod_tensor_array.py | 0 .../test_lod_tensor_array_ops.py | 0 .../tests/{ => unittests}/test_log_loss_op.py | 0 .../tests/{ => unittests}/test_logical_op.py | 0 .../{ => unittests}/test_lookup_table_op.py | 0 .../tests/{ => unittests}/test_lrn_op.py | 0 .../tests/{ => unittests}/test_lstm_op.py | 0 .../{ => unittests}/test_lstm_unit_op.py | 2 - .../tests/{ => unittests}/test_lstmp_op.py | 0 .../test_margin_rank_loss_op.py | 0 .../{ => unittests}/test_math_op_patch.py | 0 .../tests/{ => unittests}/test_matmul_op.py | 0 .../tests/{ => unittests}/test_maxout_op.py | 0 .../tests/{ => unittests}/test_mean_op.py | 0 .../test_memory_optimization_transpiler.py | 0 .../test_mine_hard_examples_op.py | 0 .../tests/{ => unittests}/test_minus_op.py | 0 .../test_modified_huber_loss_op.py | 2 - .../tests/{ => unittests}/test_momentum_op.py | 0 .../tests/{ => unittests}/test_mul_op.py | 0 .../{ => unittests}/test_multiclass_nms_op.py | 0 .../test_multihead_attention.py | 0 .../{ => unittests}/test_multiplex_op.py | 0 .../fluid/tests/{ => unittests}/test_nce.py | 2 - .../fluid/tests/{ => unittests}/test_net.py | 0 .../tests/{ => unittests}/test_norm_op.py | 0 .../test_normalization_wrapper.py | 0 .../tests/{ => unittests}/test_one_hot_op.py | 0 .../{ => unittests}/test_op_support_gpu.py | 0 .../tests/{ => unittests}/test_operator.py | 0 .../{ => unittests}/test_operator_desc.py | 0 .../tests/{ => unittests}/test_optimizer.py | 0 .../tests/{ => unittests}/test_pad_op.py | 0 .../tests/{ => unittests}/test_parallel_op.py | 7 +- .../tests/{ => unittests}/test_parameter.py | 0 .../tests/{ => unittests}/test_pool2d_op.py | 0 .../tests/{ => unittests}/test_pool3d_op.py | 0 .../tests/{ => unittests}/test_pool_max_op.py | 0 .../test_positive_negative_pair_op.py | 0 .../test_precision_recall_op.py | 0 .../tests/{ => unittests}/test_prelu_op.py | 0 .../tests/{ => unittests}/test_print_op.py | 0 .../{ => unittests}/test_prior_box_op.py | 0 .../tests/{ => unittests}/test_profiler.py | 0 .../tests/{ => unittests}/test_program.py | 0 .../tests/{ => unittests}/test_protobuf.py | 0 .../{ => unittests}/test_protobuf_descs.py | 0 .../test_proximal_adagrad_op.py | 0 .../{ => unittests}/test_proximal_gd_op.py | 0 .../{ => unittests}/test_rank_loss_op.py | 0 .../{ => unittests}/test_recurrent_op.py | 2 - .../tests/{ => unittests}/test_recv_op.py | 0 .../tests/{ => unittests}/test_reduce_op.py | 0 .../tests/{ => unittests}/test_registry.py | 2 +- .../tests/{ => unittests}/test_regularizer.py | 0 .../test_reorder_lod_tensor.py | 0 .../tests/{ => unittests}/test_reshape_op.py | 0 .../tests/{ => unittests}/test_rmsprop_op.py | 0 .../test_rnn_memory_helper_op.py | 0 .../tests/{ => unittests}/test_roi_pool_op.py | 0 .../tests/{ => unittests}/test_row_conv_op.py | 0 .../tests/{ => unittests}/test_scale_op.py | 0 .../tests/{ => unittests}/test_scatter_op.py | 0 .../fluid/tests/{ => unittests}/test_scope.py | 0 .../{ => unittests}/test_selected_rows.py | 0 .../{ => unittests}/test_seq_concat_op.py | 1 - .../tests/{ => unittests}/test_seq_conv.py | 0 .../tests/{ => unittests}/test_seq_pool.py | 0 .../{ => unittests}/test_sequence_erase_op.py | 0 .../{ => unittests}/test_sequence_expand.py | 0 .../{ => unittests}/test_sequence_reshape.py | 0 .../{ => unittests}/test_sequence_slice_op.py | 0 .../test_sequence_softmax_op.py | 0 .../tests/{ => unittests}/test_sgd_op.py | 0 .../{ => unittests}/test_shrink_rnn_memory.py | 0 ...st_sigmoid_cross_entropy_with_logits_op.py | 0 .../tests/{ => unittests}/test_sign_op.py | 0 .../{ => unittests}/test_smooth_l1_loss_op.py | 0 .../tests/{ => unittests}/test_softmax_op.py | 0 .../test_softmax_with_cross_entropy_op.py | 0 .../test_split_and_merge_lod_tensor_op.py | 0 .../tests/{ => unittests}/test_split_op.py | 0 .../test_split_selected_rows_op.py | 0 .../test_split_var.py | 0 .../tests/{ => unittests}/test_spp_op.py | 0 .../test_squared_l2_distance_op.py | 0 .../test_squared_l2_norm_op.py | 0 .../tests/{ => unittests}/test_sum_op.py | 0 .../tests/{ => unittests}/test_switch.py | 0 .../{ => unittests}/test_target_assign_op.py | 0 .../tests/{ => unittests}/test_tensor.py | 0 .../tests/{ => unittests}/test_top_k_op.py | 0 .../{ => unittests}/test_transpose_op.py | 0 .../{ => unittests}/test_uniform_random_op.py | 0 .../tests/{ => unittests}/test_unpool_op.py | 0 .../tests/{ => unittests}/test_variable.py | 0 .../tests/{ => unittests}/test_warpctc_op.py | 0 .../test_weight_normalization.py | 0 .../tests/{ => unittests}/test_while_op.py | 0 193 files changed, 111 insertions(+), 26 deletions(-) create mode 100644 python/paddle/v2/fluid/tests/unittests/CMakeLists.txt create mode 100644 python/paddle/v2/fluid/tests/unittests/__init__.py rename python/paddle/v2/fluid/tests/{ => unittests}/decorators.py (100%) rename python/paddle/v2/fluid/tests/{ => unittests}/op_test.py (100%) rename python/paddle/v2/fluid/tests/{ => unittests}/test_accuracy_op.py (100%) rename python/paddle/v2/fluid/tests/{ => unittests}/test_activation_op.py (100%) rename python/paddle/v2/fluid/tests/{ => unittests}/test_adadelta_op.py (100%) rename python/paddle/v2/fluid/tests/{ => unittests}/test_adagrad_op.py (100%) rename python/paddle/v2/fluid/tests/{ => unittests}/test_adam_op.py (100%) rename python/paddle/v2/fluid/tests/{ => unittests}/test_adamax_op.py (100%) rename python/paddle/v2/fluid/tests/{ => unittests}/test_array_read_write_op.py (100%) rename python/paddle/v2/fluid/tests/{ => unittests}/test_assign_op.py (100%) rename python/paddle/v2/fluid/tests/{ => unittests}/test_assign_value_op.py (100%) rename python/paddle/v2/fluid/tests/{ => unittests}/test_auc_op.py (100%) rename python/paddle/v2/fluid/tests/{ => unittests}/test_batch_norm_op.py (100%) rename python/paddle/v2/fluid/tests/{ => unittests}/test_beam_search_decode_op.py (100%) rename python/paddle/v2/fluid/tests/{ => unittests}/test_beam_search_op.py (100%) rename python/paddle/v2/fluid/tests/{ => unittests}/test_bilinear_tensor_product_op.py (100%) rename python/paddle/v2/fluid/tests/{ => unittests}/test_bipartite_match_op.py (100%) rename python/paddle/v2/fluid/tests/{ => unittests}/test_box_coder_op.py (100%) rename python/paddle/v2/fluid/tests/{ => unittests}/test_calc_gradient.py (100%) rename python/paddle/v2/fluid/tests/{ => unittests}/test_cast_op.py (100%) rename python/paddle/v2/fluid/tests/{ => unittests}/test_chunk_eval_op.py (100%) rename python/paddle/v2/fluid/tests/{ => unittests}/test_clip_by_norm_op.py (100%) rename python/paddle/v2/fluid/tests/{ => unittests}/test_clip_op.py (100%) rename python/paddle/v2/fluid/tests/{ => unittests}/test_compare_op.py (100%) rename python/paddle/v2/fluid/tests/{ => unittests}/test_concat_op.py (100%) rename python/paddle/v2/fluid/tests/{ => unittests}/test_cond_op.py (96%) rename python/paddle/v2/fluid/tests/{ => unittests}/test_conditional_block.py (100%) rename python/paddle/v2/fluid/tests/{ => unittests}/test_const_value.py (100%) rename python/paddle/v2/fluid/tests/{ => unittests}/test_conv2d_op.py (100%) rename python/paddle/v2/fluid/tests/{ => unittests}/test_conv2d_transpose_op.py (100%) rename python/paddle/v2/fluid/tests/{ => unittests}/test_conv3d_op.py (100%) rename python/paddle/v2/fluid/tests/{ => unittests}/test_conv3d_transpose_op.py (100%) rename python/paddle/v2/fluid/tests/{ => unittests}/test_conv_shift_op.py (100%) rename python/paddle/v2/fluid/tests/{ => unittests}/test_cos_sim_op.py (100%) rename python/paddle/v2/fluid/tests/{ => unittests}/test_create_op_doc_string.py (100%) rename python/paddle/v2/fluid/tests/{ => unittests}/test_crf_decoding_op.py (100%) rename python/paddle/v2/fluid/tests/{ => unittests}/test_crop_op.py (100%) rename python/paddle/v2/fluid/tests/{ => unittests}/test_cross_entropy_op.py (100%) rename python/paddle/v2/fluid/tests/{ => unittests}/test_ctc_align.py (100%) rename python/paddle/v2/fluid/tests/{ => unittests}/test_cumsum_op.py (100%) rename python/paddle/v2/fluid/tests/{ => unittests}/test_decayed_adagrad_op.py (100%) rename python/paddle/v2/fluid/tests/{ => unittests}/test_default_scope_funcs.py (100%) rename python/paddle/v2/fluid/tests/{ => unittests}/test_detection_map_op.py (100%) rename python/paddle/v2/fluid/tests/{ => unittests}/test_detection_output_op.py (94%) rename python/paddle/v2/fluid/tests/{ => unittests}/test_dropout_op.py (100%) rename python/paddle/v2/fluid/tests/{ => unittests}/test_dyn_rnn.py (100%) rename python/paddle/v2/fluid/tests/{ => unittests}/test_dynrnn_gradient_check.py (100%) rename python/paddle/v2/fluid/tests/{ => unittests}/test_dynrnn_static_input.py (100%) rename python/paddle/v2/fluid/tests/{ => unittests}/test_edit_distance_op.py (100%) rename python/paddle/v2/fluid/tests/{ => unittests}/test_elementwise_add_op.py (100%) rename python/paddle/v2/fluid/tests/{ => unittests}/test_elementwise_div_op.py (100%) rename python/paddle/v2/fluid/tests/{ => unittests}/test_elementwise_max_op.py (100%) rename python/paddle/v2/fluid/tests/{ => unittests}/test_elementwise_min_op.py (100%) rename python/paddle/v2/fluid/tests/{ => unittests}/test_elementwise_mul_op.py (100%) rename python/paddle/v2/fluid/tests/{ => unittests}/test_elementwise_pow_op.py (100%) rename python/paddle/v2/fluid/tests/{ => unittests}/test_elementwise_sub_op.py (100%) rename python/paddle/v2/fluid/tests/{ => unittests}/test_exception.py (100%) rename python/paddle/v2/fluid/tests/{ => unittests}/test_executor_and_mul.py (100%) rename python/paddle/v2/fluid/tests/{ => unittests}/test_expand_op.py (100%) rename python/paddle/v2/fluid/tests/{ => unittests}/test_feed_fetch_method.py (100%) rename python/paddle/v2/fluid/tests/{ => unittests}/test_fetch_var.py (100%) rename python/paddle/v2/fluid/tests/{ => unittests}/test_fill_constant_batch_size_like_op.py (100%) rename python/paddle/v2/fluid/tests/{ => unittests}/test_fill_constant_op.py (100%) rename python/paddle/v2/fluid/tests/{ => unittests}/test_fill_op.py (100%) rename python/paddle/v2/fluid/tests/{ => unittests}/test_fill_zeros_like_op.py (100%) rename python/paddle/v2/fluid/tests/{ => unittests}/test_framework_debug_str.py (100%) rename python/paddle/v2/fluid/tests/{ => unittests}/test_ftrl_op.py (100%) rename python/paddle/v2/fluid/tests/{ => unittests}/test_gather_op.py (100%) rename python/paddle/v2/fluid/tests/{ => unittests}/test_gaussian_random_op.py (100%) rename python/paddle/v2/fluid/tests/{ => unittests}/test_get_places_op.py (100%) rename python/paddle/v2/fluid/tests/{ => unittests}/test_gru_op.py (100%) rename python/paddle/v2/fluid/tests/{ => unittests}/test_gru_unit_op.py (100%) rename python/paddle/v2/fluid/tests/{ => unittests}/test_hinge_loss_op.py (100%) rename python/paddle/v2/fluid/tests/{ => unittests}/test_huber_loss_op.py (100%) rename python/paddle/v2/fluid/tests/{ => unittests}/test_im2sequence_op.py (100%) rename python/paddle/v2/fluid/tests/{ => unittests}/test_image_classification_layer.py (100%) rename python/paddle/v2/fluid/tests/{ => unittests}/test_infer_shape.py (100%) rename python/paddle/v2/fluid/tests/{ => unittests}/test_inference_model_io.py (100%) rename python/paddle/v2/fluid/tests/{ => unittests}/test_initializer.py (100%) rename python/paddle/v2/fluid/tests/{ => unittests}/test_iou_similarity_op.py (100%) rename python/paddle/v2/fluid/tests/{ => unittests}/test_is_empty_op.py (100%) rename python/paddle/v2/fluid/tests/{ => unittests}/test_l1_norm_op.py (100%) rename python/paddle/v2/fluid/tests/{ => unittests}/test_label_smooth_op.py (100%) rename python/paddle/v2/fluid/tests/{ => unittests}/test_layer_norm_op.py (100%) rename python/paddle/v2/fluid/tests/{ => unittests}/test_layers.py (100%) rename python/paddle/v2/fluid/tests/{ => unittests}/test_learning_rate_decay.py (100%) rename python/paddle/v2/fluid/tests/{ => unittests}/test_linear_chain_crf_op.py (100%) rename python/paddle/v2/fluid/tests/{ => unittests}/test_lod_array_length_op.py (100%) rename python/paddle/v2/fluid/tests/{ => unittests}/test_lod_rank_table.py (100%) rename python/paddle/v2/fluid/tests/{ => unittests}/test_lod_reset_op.py (100%) rename python/paddle/v2/fluid/tests/{ => unittests}/test_lod_tensor_array.py (100%) rename python/paddle/v2/fluid/tests/{ => unittests}/test_lod_tensor_array_ops.py (100%) rename python/paddle/v2/fluid/tests/{ => unittests}/test_log_loss_op.py (100%) rename python/paddle/v2/fluid/tests/{ => unittests}/test_logical_op.py (100%) rename python/paddle/v2/fluid/tests/{ => unittests}/test_lookup_table_op.py (100%) rename python/paddle/v2/fluid/tests/{ => unittests}/test_lrn_op.py (100%) rename python/paddle/v2/fluid/tests/{ => unittests}/test_lstm_op.py (100%) rename python/paddle/v2/fluid/tests/{ => unittests}/test_lstm_unit_op.py (95%) rename python/paddle/v2/fluid/tests/{ => unittests}/test_lstmp_op.py (100%) rename python/paddle/v2/fluid/tests/{ => unittests}/test_margin_rank_loss_op.py (100%) rename python/paddle/v2/fluid/tests/{ => unittests}/test_math_op_patch.py (100%) rename python/paddle/v2/fluid/tests/{ => unittests}/test_matmul_op.py (100%) rename python/paddle/v2/fluid/tests/{ => unittests}/test_maxout_op.py (100%) rename python/paddle/v2/fluid/tests/{ => unittests}/test_mean_op.py (100%) rename python/paddle/v2/fluid/tests/{ => unittests}/test_memory_optimization_transpiler.py (100%) rename python/paddle/v2/fluid/tests/{ => unittests}/test_mine_hard_examples_op.py (100%) rename python/paddle/v2/fluid/tests/{ => unittests}/test_minus_op.py (100%) rename python/paddle/v2/fluid/tests/{ => unittests}/test_modified_huber_loss_op.py (96%) rename python/paddle/v2/fluid/tests/{ => unittests}/test_momentum_op.py (100%) rename python/paddle/v2/fluid/tests/{ => unittests}/test_mul_op.py (100%) rename python/paddle/v2/fluid/tests/{ => unittests}/test_multiclass_nms_op.py (100%) rename python/paddle/v2/fluid/tests/{ => unittests}/test_multihead_attention.py (100%) rename python/paddle/v2/fluid/tests/{ => unittests}/test_multiplex_op.py (100%) rename python/paddle/v2/fluid/tests/{ => unittests}/test_nce.py (97%) rename python/paddle/v2/fluid/tests/{ => unittests}/test_net.py (100%) rename python/paddle/v2/fluid/tests/{ => unittests}/test_norm_op.py (100%) rename python/paddle/v2/fluid/tests/{ => unittests}/test_normalization_wrapper.py (100%) rename python/paddle/v2/fluid/tests/{ => unittests}/test_one_hot_op.py (100%) rename python/paddle/v2/fluid/tests/{ => unittests}/test_op_support_gpu.py (100%) rename python/paddle/v2/fluid/tests/{ => unittests}/test_operator.py (100%) rename python/paddle/v2/fluid/tests/{ => unittests}/test_operator_desc.py (100%) rename python/paddle/v2/fluid/tests/{ => unittests}/test_optimizer.py (100%) rename python/paddle/v2/fluid/tests/{ => unittests}/test_pad_op.py (100%) rename python/paddle/v2/fluid/tests/{ => unittests}/test_parallel_op.py (96%) rename python/paddle/v2/fluid/tests/{ => unittests}/test_parameter.py (100%) rename python/paddle/v2/fluid/tests/{ => unittests}/test_pool2d_op.py (100%) rename python/paddle/v2/fluid/tests/{ => unittests}/test_pool3d_op.py (100%) rename python/paddle/v2/fluid/tests/{ => unittests}/test_pool_max_op.py (100%) rename python/paddle/v2/fluid/tests/{ => unittests}/test_positive_negative_pair_op.py (100%) rename python/paddle/v2/fluid/tests/{ => unittests}/test_precision_recall_op.py (100%) rename python/paddle/v2/fluid/tests/{ => unittests}/test_prelu_op.py (100%) rename python/paddle/v2/fluid/tests/{ => unittests}/test_print_op.py (100%) rename python/paddle/v2/fluid/tests/{ => unittests}/test_prior_box_op.py (100%) rename python/paddle/v2/fluid/tests/{ => unittests}/test_profiler.py (100%) rename python/paddle/v2/fluid/tests/{ => unittests}/test_program.py (100%) rename python/paddle/v2/fluid/tests/{ => unittests}/test_protobuf.py (100%) rename python/paddle/v2/fluid/tests/{ => unittests}/test_protobuf_descs.py (100%) rename python/paddle/v2/fluid/tests/{ => unittests}/test_proximal_adagrad_op.py (100%) rename python/paddle/v2/fluid/tests/{ => unittests}/test_proximal_gd_op.py (100%) rename python/paddle/v2/fluid/tests/{ => unittests}/test_rank_loss_op.py (100%) rename python/paddle/v2/fluid/tests/{ => unittests}/test_recurrent_op.py (99%) rename python/paddle/v2/fluid/tests/{ => unittests}/test_recv_op.py (100%) rename python/paddle/v2/fluid/tests/{ => unittests}/test_reduce_op.py (100%) rename python/paddle/v2/fluid/tests/{ => unittests}/test_registry.py (94%) rename python/paddle/v2/fluid/tests/{ => unittests}/test_regularizer.py (100%) rename python/paddle/v2/fluid/tests/{ => unittests}/test_reorder_lod_tensor.py (100%) rename python/paddle/v2/fluid/tests/{ => unittests}/test_reshape_op.py (100%) rename python/paddle/v2/fluid/tests/{ => unittests}/test_rmsprop_op.py (100%) rename python/paddle/v2/fluid/tests/{ => unittests}/test_rnn_memory_helper_op.py (100%) rename python/paddle/v2/fluid/tests/{ => unittests}/test_roi_pool_op.py (100%) rename python/paddle/v2/fluid/tests/{ => unittests}/test_row_conv_op.py (100%) rename python/paddle/v2/fluid/tests/{ => unittests}/test_scale_op.py (100%) rename python/paddle/v2/fluid/tests/{ => unittests}/test_scatter_op.py (100%) rename python/paddle/v2/fluid/tests/{ => unittests}/test_scope.py (100%) rename python/paddle/v2/fluid/tests/{ => unittests}/test_selected_rows.py (100%) rename python/paddle/v2/fluid/tests/{ => unittests}/test_seq_concat_op.py (99%) rename python/paddle/v2/fluid/tests/{ => unittests}/test_seq_conv.py (100%) rename python/paddle/v2/fluid/tests/{ => unittests}/test_seq_pool.py (100%) rename python/paddle/v2/fluid/tests/{ => unittests}/test_sequence_erase_op.py (100%) rename python/paddle/v2/fluid/tests/{ => unittests}/test_sequence_expand.py (100%) rename python/paddle/v2/fluid/tests/{ => unittests}/test_sequence_reshape.py (100%) rename python/paddle/v2/fluid/tests/{ => unittests}/test_sequence_slice_op.py (100%) rename python/paddle/v2/fluid/tests/{ => unittests}/test_sequence_softmax_op.py (100%) rename python/paddle/v2/fluid/tests/{ => unittests}/test_sgd_op.py (100%) rename python/paddle/v2/fluid/tests/{ => unittests}/test_shrink_rnn_memory.py (100%) rename python/paddle/v2/fluid/tests/{ => unittests}/test_sigmoid_cross_entropy_with_logits_op.py (100%) rename python/paddle/v2/fluid/tests/{ => unittests}/test_sign_op.py (100%) rename python/paddle/v2/fluid/tests/{ => unittests}/test_smooth_l1_loss_op.py (100%) rename python/paddle/v2/fluid/tests/{ => unittests}/test_softmax_op.py (100%) rename python/paddle/v2/fluid/tests/{ => unittests}/test_softmax_with_cross_entropy_op.py (100%) rename python/paddle/v2/fluid/tests/{ => unittests}/test_split_and_merge_lod_tensor_op.py (100%) rename python/paddle/v2/fluid/tests/{ => unittests}/test_split_op.py (100%) rename python/paddle/v2/fluid/tests/{ => unittests}/test_split_selected_rows_op.py (100%) rename python/paddle/v2/fluid/tests/{book_distribute => unittests}/test_split_var.py (100%) rename python/paddle/v2/fluid/tests/{ => unittests}/test_spp_op.py (100%) rename python/paddle/v2/fluid/tests/{ => unittests}/test_squared_l2_distance_op.py (100%) rename python/paddle/v2/fluid/tests/{ => unittests}/test_squared_l2_norm_op.py (100%) rename python/paddle/v2/fluid/tests/{ => unittests}/test_sum_op.py (100%) rename python/paddle/v2/fluid/tests/{ => unittests}/test_switch.py (100%) rename python/paddle/v2/fluid/tests/{ => unittests}/test_target_assign_op.py (100%) rename python/paddle/v2/fluid/tests/{ => unittests}/test_tensor.py (100%) rename python/paddle/v2/fluid/tests/{ => unittests}/test_top_k_op.py (100%) rename python/paddle/v2/fluid/tests/{ => unittests}/test_transpose_op.py (100%) rename python/paddle/v2/fluid/tests/{ => unittests}/test_uniform_random_op.py (100%) rename python/paddle/v2/fluid/tests/{ => unittests}/test_unpool_op.py (100%) rename python/paddle/v2/fluid/tests/{ => unittests}/test_variable.py (100%) rename python/paddle/v2/fluid/tests/{ => unittests}/test_warpctc_op.py (100%) rename python/paddle/v2/fluid/tests/{ => unittests}/test_weight_normalization.py (100%) rename python/paddle/v2/fluid/tests/{ => unittests}/test_while_op.py (100%) diff --git a/CMakeLists.txt b/CMakeLists.txt index ae04f9ff3f4..fb91e3b369c 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -60,6 +60,7 @@ option(USE_NNPACK "Compile PaddlePaddle with NNPACK library" OFF) option(WITH_DISTRIBUTE "Compile with grpc distributed support" OFF) option(USE_EIGEN_FOR_BLAS "Use matrix multiplication in Eigen" OFF) option(WITH_ARM_FP16 "Use half precision support on armv8.2-a cpu" OFF) +option(WITH_FAST_BUNDLE_TEST "Bundle tests that can be run in a single process together to reduce launch overhead" ON) # CMAKE_BUILD_TYPE if(NOT CMAKE_BUILD_TYPE) diff --git a/python/paddle/v2/fluid/tests/CMakeLists.txt b/python/paddle/v2/fluid/tests/CMakeLists.txt index 26a80abcb58..5ff7b1b027e 100644 --- a/python/paddle/v2/fluid/tests/CMakeLists.txt +++ b/python/paddle/v2/fluid/tests/CMakeLists.txt @@ -1,16 +1,11 @@ file(GLOB TEST_OPS RELATIVE "${CMAKE_CURRENT_SOURCE_DIR}" "test_*.py") string(REPLACE ".py" "" TEST_OPS "${TEST_OPS}") -if(NOT WITH_DISTRIBUTE) - list(REMOVE_ITEM TEST_OPS test_recv_op) -endif(NOT WITH_DISTRIBUTE) - -list(REMOVE_ITEM TEST_OPS test_warpctc_op) foreach(src ${TEST_OPS}) - py_test(${src} SRCS ${src}.py) + py_test(${src} SRCS ${src}.py) endforeach() -py_test(test_warpctc_op SRCS test_warpctc_op.py ENVS FLAGS_warpctc_dir=${WARPCTC_LIB_DIR}) +add_subdirectory(unittests) add_subdirectory(book) add_subdirectory(book_distribute) add_subdirectory(book_memory_optimization) diff --git a/python/paddle/v2/fluid/tests/unittests/CMakeLists.txt b/python/paddle/v2/fluid/tests/unittests/CMakeLists.txt new file mode 100644 index 00000000000..9355f51311e --- /dev/null +++ b/python/paddle/v2/fluid/tests/unittests/CMakeLists.txt @@ -0,0 +1,89 @@ +file(GLOB TEST_OPS RELATIVE "${CMAKE_CURRENT_SOURCE_DIR}" "test_*.py") +string(REPLACE ".py" "" TEST_OPS "${TEST_OPS}") + +if(NOT WITH_DISTRIBUTE) + list(REMOVE_ITEM TEST_OPS test_recv_op) +endif(NOT WITH_DISTRIBUTE) + +list(REMOVE_ITEM TEST_OPS test_seq_concat_op) # FIXME(helin): https://github.com/PaddlePaddle/Paddle/issues/8290 +list(REMOVE_ITEM TEST_OPS test_modified_huber_loss_op) # FIXME(qijun) https://github.com/PaddlePaddle/Paddle/issues/5184 +list(REMOVE_ITEM TEST_OPS test_lstm_unit_op) # # FIXME(qijun) https://github.com/PaddlePaddle/Paddle/issues/5185 +list(REMOVE_ITEM TEST_OPS test_nce) # IXME(qijun) https://github.com/PaddlePaddle/Paddle/issues/7778 +list(REMOVE_ITEM TEST_OPS test_recurrent_op) # FIXME(qijun) https://github.com/PaddlePaddle/Paddle/issues/6152 +list(REMOVE_ITEM TEST_OPS test_cond_op) # FIXME(qijun): https://github.com/PaddlePaddle/Paddle/issues/5101#issuecomment-339814957 +list(REMOVE_ITEM TEST_OPS test_detection_output_op) # FIXME: detection_output_op will be rewritten. This unittest should be + +list(REMOVE_ITEM TEST_OPS op_test) # op_test is a helper python file, not a test +list(REMOVE_ITEM TEST_OPS decorators) # decorators is a helper python file, not a test + +function(py_test_modules TARGET_NAME) + if(WITH_TESTING) + set(options "") + set(oneValueArgs "") + set(multiValueArgs MODULES DEPS ARGS ENVS) + cmake_parse_arguments(py_test_modules "${options}" "${oneValueArgs}" "${multiValueArgs}" ${ARGN}) + add_test(NAME ${TARGET_NAME} + COMMAND env PYTHONPATH=${PADDLE_PYTHON_BUILD_DIR}/lib-python ${py_test_modules_ENVS} + ${PYTHON_EXECUTABLE} -u -m unittest --verbose ${py_test_modules_MODULES} ${py_test_modules_ARGS} + WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}) + endif() +endfunction() + +# test time consuming OPs in a separate process for expliot parallism +list(REMOVE_ITEM TEST_OPS test_warpctc_op) +list(REMOVE_ITEM TEST_OPS test_dyn_rnn) +list(REMOVE_ITEM TEST_OPS test_mul_op) + +# tests that need to be run in separate process. +list(REMOVE_ITEM TEST_OPS test_multihead_attention) +list(REMOVE_ITEM TEST_OPS test_calc_gradient) +list(REMOVE_ITEM TEST_OPS test_while_op) +list(REMOVE_ITEM TEST_OPS test_lod_array_length_op) +list(REMOVE_ITEM TEST_OPS test_reorder_lod_tensor) +list(REMOVE_ITEM TEST_OPS test_profiler) +list(REMOVE_ITEM TEST_OPS test_normalization_wrapper) +list(REMOVE_ITEM TEST_OPS test_executor_and_mul) +list(REMOVE_ITEM TEST_OPS test_assign_value_op) +list(REMOVE_ITEM TEST_OPS test_array_read_write_op) +list(REMOVE_ITEM TEST_OPS test_lod_rank_table) +list(REMOVE_ITEM TEST_OPS test_weight_normalization) +list(REMOVE_ITEM TEST_OPS test_conditional_block) +list(REMOVE_ITEM TEST_OPS test_parameter) +list(REMOVE_ITEM TEST_OPS test_registry) +list(REMOVE_ITEM TEST_OPS test_fetch_var) +list(REMOVE_ITEM TEST_OPS test_parallel_op) +list(REMOVE_ITEM TEST_OPS test_dynrnn_static_input) + +# tests that can be bundled together in one python process for speed. +if(WITH_FAST_BUNDLE_TEST) + py_test_modules("test_all_ops" MODULES ${TEST_OPS}) +else() + foreach(TEST_OP ${TEST_OPS}) + py_test_modules(${TEST_OP} MODULES ${TEST_OP}) + endforeach(TEST_OP) +endif(WITH_FAST_BUNDLE_TEST) + +# tests with high overhead +py_test_modules(test_warpctc_op MODULES test_warpctc_op ENVS FLAGS_warpctc_dir=${WARPCTC_LIB_DIR}) +py_test_modules(test_train_dyn_rnn MODULES test_dyn_rnn) +py_test_modules(test_mul_op MODULES test_mul_op) + +# tests that need to be run in separate process. +py_test_modules(test_multihead_attention MODULES test_multihead_attention) +py_test_modules(test_calc_gradient MODULES test_calc_gradient) +py_test_modules(test_while_op MODULES test_while_op) +py_test_modules(test_lod_array_length_op MODULES test_lod_array_length_op) +py_test_modules(test_reorder_lod_tensor MODULES test_reorder_lod_tensor) +py_test_modules(test_profiler MODULES test_profiler) +py_test_modules(test_normalization_wrapper MODULES test_normalization_wrapper) +py_test_modules(test_executor_and_mul MODULES test_executor_and_mul) +py_test_modules(test_assign_value_op MODULES test_assign_value_op) +py_test_modules(test_array_read_write_op MODULES test_array_read_write_op) +py_test_modules(test_lod_rank_table MODULES test_lod_rank_table) +py_test_modules(test_weight_normalization MODULES test_weight_normalization) +py_test_modules(test_conditional_block MODULES test_conditional_block) +py_test_modules(test_parameter MODULES test_parameter) +py_test_modules(test_registry MODULES test_registry) +py_test_modules(test_fetch_var MODULES test_fetch_var) +py_test_modules(test_dynrnn_static_input MODULES test_dynrnn_static_input) +py_test_modules(test_parallel_op MODULES test_parallel_op) diff --git a/python/paddle/v2/fluid/tests/unittests/__init__.py b/python/paddle/v2/fluid/tests/unittests/__init__.py new file mode 100644 index 00000000000..b94a21a7e40 --- /dev/null +++ b/python/paddle/v2/fluid/tests/unittests/__init__.py @@ -0,0 +1,13 @@ +# Copyright (c) 2018 PaddlePaddle Authors. All Rights Reserve. +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. diff --git a/python/paddle/v2/fluid/tests/decorators.py b/python/paddle/v2/fluid/tests/unittests/decorators.py similarity index 100% rename from python/paddle/v2/fluid/tests/decorators.py rename to python/paddle/v2/fluid/tests/unittests/decorators.py diff --git a/python/paddle/v2/fluid/tests/op_test.py b/python/paddle/v2/fluid/tests/unittests/op_test.py similarity index 100% rename from python/paddle/v2/fluid/tests/op_test.py rename to python/paddle/v2/fluid/tests/unittests/op_test.py diff --git a/python/paddle/v2/fluid/tests/test_accuracy_op.py b/python/paddle/v2/fluid/tests/unittests/test_accuracy_op.py similarity index 100% rename from python/paddle/v2/fluid/tests/test_accuracy_op.py rename to python/paddle/v2/fluid/tests/unittests/test_accuracy_op.py diff --git a/python/paddle/v2/fluid/tests/test_activation_op.py b/python/paddle/v2/fluid/tests/unittests/test_activation_op.py similarity index 100% rename from python/paddle/v2/fluid/tests/test_activation_op.py rename to python/paddle/v2/fluid/tests/unittests/test_activation_op.py diff --git a/python/paddle/v2/fluid/tests/test_adadelta_op.py b/python/paddle/v2/fluid/tests/unittests/test_adadelta_op.py similarity index 100% rename from python/paddle/v2/fluid/tests/test_adadelta_op.py rename to python/paddle/v2/fluid/tests/unittests/test_adadelta_op.py diff --git a/python/paddle/v2/fluid/tests/test_adagrad_op.py b/python/paddle/v2/fluid/tests/unittests/test_adagrad_op.py similarity index 100% rename from python/paddle/v2/fluid/tests/test_adagrad_op.py rename to python/paddle/v2/fluid/tests/unittests/test_adagrad_op.py diff --git a/python/paddle/v2/fluid/tests/test_adam_op.py b/python/paddle/v2/fluid/tests/unittests/test_adam_op.py similarity index 100% rename from python/paddle/v2/fluid/tests/test_adam_op.py rename to python/paddle/v2/fluid/tests/unittests/test_adam_op.py diff --git a/python/paddle/v2/fluid/tests/test_adamax_op.py b/python/paddle/v2/fluid/tests/unittests/test_adamax_op.py similarity index 100% rename from python/paddle/v2/fluid/tests/test_adamax_op.py rename to python/paddle/v2/fluid/tests/unittests/test_adamax_op.py diff --git a/python/paddle/v2/fluid/tests/test_array_read_write_op.py b/python/paddle/v2/fluid/tests/unittests/test_array_read_write_op.py similarity index 100% rename from python/paddle/v2/fluid/tests/test_array_read_write_op.py rename to python/paddle/v2/fluid/tests/unittests/test_array_read_write_op.py diff --git a/python/paddle/v2/fluid/tests/test_assign_op.py b/python/paddle/v2/fluid/tests/unittests/test_assign_op.py similarity index 100% rename from python/paddle/v2/fluid/tests/test_assign_op.py rename to python/paddle/v2/fluid/tests/unittests/test_assign_op.py diff --git a/python/paddle/v2/fluid/tests/test_assign_value_op.py b/python/paddle/v2/fluid/tests/unittests/test_assign_value_op.py similarity index 100% rename from python/paddle/v2/fluid/tests/test_assign_value_op.py rename to python/paddle/v2/fluid/tests/unittests/test_assign_value_op.py diff --git a/python/paddle/v2/fluid/tests/test_auc_op.py b/python/paddle/v2/fluid/tests/unittests/test_auc_op.py similarity index 100% rename from python/paddle/v2/fluid/tests/test_auc_op.py rename to python/paddle/v2/fluid/tests/unittests/test_auc_op.py diff --git a/python/paddle/v2/fluid/tests/test_batch_norm_op.py b/python/paddle/v2/fluid/tests/unittests/test_batch_norm_op.py similarity index 100% rename from python/paddle/v2/fluid/tests/test_batch_norm_op.py rename to python/paddle/v2/fluid/tests/unittests/test_batch_norm_op.py diff --git a/python/paddle/v2/fluid/tests/test_beam_search_decode_op.py b/python/paddle/v2/fluid/tests/unittests/test_beam_search_decode_op.py similarity index 100% rename from python/paddle/v2/fluid/tests/test_beam_search_decode_op.py rename to python/paddle/v2/fluid/tests/unittests/test_beam_search_decode_op.py diff --git a/python/paddle/v2/fluid/tests/test_beam_search_op.py b/python/paddle/v2/fluid/tests/unittests/test_beam_search_op.py similarity index 100% rename from python/paddle/v2/fluid/tests/test_beam_search_op.py rename to python/paddle/v2/fluid/tests/unittests/test_beam_search_op.py diff --git a/python/paddle/v2/fluid/tests/test_bilinear_tensor_product_op.py b/python/paddle/v2/fluid/tests/unittests/test_bilinear_tensor_product_op.py similarity index 100% rename from python/paddle/v2/fluid/tests/test_bilinear_tensor_product_op.py rename to python/paddle/v2/fluid/tests/unittests/test_bilinear_tensor_product_op.py diff --git a/python/paddle/v2/fluid/tests/test_bipartite_match_op.py b/python/paddle/v2/fluid/tests/unittests/test_bipartite_match_op.py similarity index 100% rename from python/paddle/v2/fluid/tests/test_bipartite_match_op.py rename to python/paddle/v2/fluid/tests/unittests/test_bipartite_match_op.py diff --git a/python/paddle/v2/fluid/tests/test_box_coder_op.py b/python/paddle/v2/fluid/tests/unittests/test_box_coder_op.py similarity index 100% rename from python/paddle/v2/fluid/tests/test_box_coder_op.py rename to python/paddle/v2/fluid/tests/unittests/test_box_coder_op.py diff --git a/python/paddle/v2/fluid/tests/test_calc_gradient.py b/python/paddle/v2/fluid/tests/unittests/test_calc_gradient.py similarity index 100% rename from python/paddle/v2/fluid/tests/test_calc_gradient.py rename to python/paddle/v2/fluid/tests/unittests/test_calc_gradient.py diff --git a/python/paddle/v2/fluid/tests/test_cast_op.py b/python/paddle/v2/fluid/tests/unittests/test_cast_op.py similarity index 100% rename from python/paddle/v2/fluid/tests/test_cast_op.py rename to python/paddle/v2/fluid/tests/unittests/test_cast_op.py diff --git a/python/paddle/v2/fluid/tests/test_chunk_eval_op.py b/python/paddle/v2/fluid/tests/unittests/test_chunk_eval_op.py similarity index 100% rename from python/paddle/v2/fluid/tests/test_chunk_eval_op.py rename to python/paddle/v2/fluid/tests/unittests/test_chunk_eval_op.py diff --git a/python/paddle/v2/fluid/tests/test_clip_by_norm_op.py b/python/paddle/v2/fluid/tests/unittests/test_clip_by_norm_op.py similarity index 100% rename from python/paddle/v2/fluid/tests/test_clip_by_norm_op.py rename to python/paddle/v2/fluid/tests/unittests/test_clip_by_norm_op.py diff --git a/python/paddle/v2/fluid/tests/test_clip_op.py b/python/paddle/v2/fluid/tests/unittests/test_clip_op.py similarity index 100% rename from python/paddle/v2/fluid/tests/test_clip_op.py rename to python/paddle/v2/fluid/tests/unittests/test_clip_op.py diff --git a/python/paddle/v2/fluid/tests/test_compare_op.py b/python/paddle/v2/fluid/tests/unittests/test_compare_op.py similarity index 100% rename from python/paddle/v2/fluid/tests/test_compare_op.py rename to python/paddle/v2/fluid/tests/unittests/test_compare_op.py diff --git a/python/paddle/v2/fluid/tests/test_concat_op.py b/python/paddle/v2/fluid/tests/unittests/test_concat_op.py similarity index 100% rename from python/paddle/v2/fluid/tests/test_concat_op.py rename to python/paddle/v2/fluid/tests/unittests/test_concat_op.py diff --git a/python/paddle/v2/fluid/tests/test_cond_op.py b/python/paddle/v2/fluid/tests/unittests/test_cond_op.py similarity index 96% rename from python/paddle/v2/fluid/tests/test_cond_op.py rename to python/paddle/v2/fluid/tests/unittests/test_cond_op.py index 6f4380166bb..4a1e806c4be 100644 --- a/python/paddle/v2/fluid/tests/test_cond_op.py +++ b/python/paddle/v2/fluid/tests/unittests/test_cond_op.py @@ -125,7 +125,4 @@ class TestCondOp(unittest.TestCase): if __name__ == "__main__": - exit( - 0 - ) # FIXME(qijun): https://github.com/PaddlePaddle/Paddle/issues/5101#issuecomment-339814957 unittest.main() diff --git a/python/paddle/v2/fluid/tests/test_conditional_block.py b/python/paddle/v2/fluid/tests/unittests/test_conditional_block.py similarity index 100% rename from python/paddle/v2/fluid/tests/test_conditional_block.py rename to python/paddle/v2/fluid/tests/unittests/test_conditional_block.py diff --git a/python/paddle/v2/fluid/tests/test_const_value.py b/python/paddle/v2/fluid/tests/unittests/test_const_value.py similarity index 100% rename from python/paddle/v2/fluid/tests/test_const_value.py rename to python/paddle/v2/fluid/tests/unittests/test_const_value.py diff --git a/python/paddle/v2/fluid/tests/test_conv2d_op.py b/python/paddle/v2/fluid/tests/unittests/test_conv2d_op.py similarity index 100% rename from python/paddle/v2/fluid/tests/test_conv2d_op.py rename to python/paddle/v2/fluid/tests/unittests/test_conv2d_op.py diff --git a/python/paddle/v2/fluid/tests/test_conv2d_transpose_op.py b/python/paddle/v2/fluid/tests/unittests/test_conv2d_transpose_op.py similarity index 100% rename from python/paddle/v2/fluid/tests/test_conv2d_transpose_op.py rename to python/paddle/v2/fluid/tests/unittests/test_conv2d_transpose_op.py diff --git a/python/paddle/v2/fluid/tests/test_conv3d_op.py b/python/paddle/v2/fluid/tests/unittests/test_conv3d_op.py similarity index 100% rename from python/paddle/v2/fluid/tests/test_conv3d_op.py rename to python/paddle/v2/fluid/tests/unittests/test_conv3d_op.py diff --git a/python/paddle/v2/fluid/tests/test_conv3d_transpose_op.py b/python/paddle/v2/fluid/tests/unittests/test_conv3d_transpose_op.py similarity index 100% rename from python/paddle/v2/fluid/tests/test_conv3d_transpose_op.py rename to python/paddle/v2/fluid/tests/unittests/test_conv3d_transpose_op.py diff --git a/python/paddle/v2/fluid/tests/test_conv_shift_op.py b/python/paddle/v2/fluid/tests/unittests/test_conv_shift_op.py similarity index 100% rename from python/paddle/v2/fluid/tests/test_conv_shift_op.py rename to python/paddle/v2/fluid/tests/unittests/test_conv_shift_op.py diff --git a/python/paddle/v2/fluid/tests/test_cos_sim_op.py b/python/paddle/v2/fluid/tests/unittests/test_cos_sim_op.py similarity index 100% rename from python/paddle/v2/fluid/tests/test_cos_sim_op.py rename to python/paddle/v2/fluid/tests/unittests/test_cos_sim_op.py diff --git a/python/paddle/v2/fluid/tests/test_create_op_doc_string.py b/python/paddle/v2/fluid/tests/unittests/test_create_op_doc_string.py similarity index 100% rename from python/paddle/v2/fluid/tests/test_create_op_doc_string.py rename to python/paddle/v2/fluid/tests/unittests/test_create_op_doc_string.py diff --git a/python/paddle/v2/fluid/tests/test_crf_decoding_op.py b/python/paddle/v2/fluid/tests/unittests/test_crf_decoding_op.py similarity index 100% rename from python/paddle/v2/fluid/tests/test_crf_decoding_op.py rename to python/paddle/v2/fluid/tests/unittests/test_crf_decoding_op.py diff --git a/python/paddle/v2/fluid/tests/test_crop_op.py b/python/paddle/v2/fluid/tests/unittests/test_crop_op.py similarity index 100% rename from python/paddle/v2/fluid/tests/test_crop_op.py rename to python/paddle/v2/fluid/tests/unittests/test_crop_op.py diff --git a/python/paddle/v2/fluid/tests/test_cross_entropy_op.py b/python/paddle/v2/fluid/tests/unittests/test_cross_entropy_op.py similarity index 100% rename from python/paddle/v2/fluid/tests/test_cross_entropy_op.py rename to python/paddle/v2/fluid/tests/unittests/test_cross_entropy_op.py diff --git a/python/paddle/v2/fluid/tests/test_ctc_align.py b/python/paddle/v2/fluid/tests/unittests/test_ctc_align.py similarity index 100% rename from python/paddle/v2/fluid/tests/test_ctc_align.py rename to python/paddle/v2/fluid/tests/unittests/test_ctc_align.py diff --git a/python/paddle/v2/fluid/tests/test_cumsum_op.py b/python/paddle/v2/fluid/tests/unittests/test_cumsum_op.py similarity index 100% rename from python/paddle/v2/fluid/tests/test_cumsum_op.py rename to python/paddle/v2/fluid/tests/unittests/test_cumsum_op.py diff --git a/python/paddle/v2/fluid/tests/test_decayed_adagrad_op.py b/python/paddle/v2/fluid/tests/unittests/test_decayed_adagrad_op.py similarity index 100% rename from python/paddle/v2/fluid/tests/test_decayed_adagrad_op.py rename to python/paddle/v2/fluid/tests/unittests/test_decayed_adagrad_op.py diff --git a/python/paddle/v2/fluid/tests/test_default_scope_funcs.py b/python/paddle/v2/fluid/tests/unittests/test_default_scope_funcs.py similarity index 100% rename from python/paddle/v2/fluid/tests/test_default_scope_funcs.py rename to python/paddle/v2/fluid/tests/unittests/test_default_scope_funcs.py diff --git a/python/paddle/v2/fluid/tests/test_detection_map_op.py b/python/paddle/v2/fluid/tests/unittests/test_detection_map_op.py similarity index 100% rename from python/paddle/v2/fluid/tests/test_detection_map_op.py rename to python/paddle/v2/fluid/tests/unittests/test_detection_map_op.py diff --git a/python/paddle/v2/fluid/tests/test_detection_output_op.py b/python/paddle/v2/fluid/tests/unittests/test_detection_output_op.py similarity index 94% rename from python/paddle/v2/fluid/tests/test_detection_output_op.py rename to python/paddle/v2/fluid/tests/unittests/test_detection_output_op.py index 0a132652f1f..94681319144 100644 --- a/python/paddle/v2/fluid/tests/test_detection_output_op.py +++ b/python/paddle/v2/fluid/tests/unittests/test_detection_output_op.py @@ -68,6 +68,4 @@ class TestUnpoolOp(OpTest): if __name__ == '__main__': - # FIXME: detection_output_op will be rewritten. This unittest should be - # enabled after rewriting. - exit(0) # temporary disable this unittest + unittest.main() diff --git a/python/paddle/v2/fluid/tests/test_dropout_op.py b/python/paddle/v2/fluid/tests/unittests/test_dropout_op.py similarity index 100% rename from python/paddle/v2/fluid/tests/test_dropout_op.py rename to python/paddle/v2/fluid/tests/unittests/test_dropout_op.py diff --git a/python/paddle/v2/fluid/tests/test_dyn_rnn.py b/python/paddle/v2/fluid/tests/unittests/test_dyn_rnn.py similarity index 100% rename from python/paddle/v2/fluid/tests/test_dyn_rnn.py rename to python/paddle/v2/fluid/tests/unittests/test_dyn_rnn.py diff --git a/python/paddle/v2/fluid/tests/test_dynrnn_gradient_check.py b/python/paddle/v2/fluid/tests/unittests/test_dynrnn_gradient_check.py similarity index 100% rename from python/paddle/v2/fluid/tests/test_dynrnn_gradient_check.py rename to python/paddle/v2/fluid/tests/unittests/test_dynrnn_gradient_check.py diff --git a/python/paddle/v2/fluid/tests/test_dynrnn_static_input.py b/python/paddle/v2/fluid/tests/unittests/test_dynrnn_static_input.py similarity index 100% rename from python/paddle/v2/fluid/tests/test_dynrnn_static_input.py rename to python/paddle/v2/fluid/tests/unittests/test_dynrnn_static_input.py diff --git a/python/paddle/v2/fluid/tests/test_edit_distance_op.py b/python/paddle/v2/fluid/tests/unittests/test_edit_distance_op.py similarity index 100% rename from python/paddle/v2/fluid/tests/test_edit_distance_op.py rename to python/paddle/v2/fluid/tests/unittests/test_edit_distance_op.py diff --git a/python/paddle/v2/fluid/tests/test_elementwise_add_op.py b/python/paddle/v2/fluid/tests/unittests/test_elementwise_add_op.py similarity index 100% rename from python/paddle/v2/fluid/tests/test_elementwise_add_op.py rename to python/paddle/v2/fluid/tests/unittests/test_elementwise_add_op.py diff --git a/python/paddle/v2/fluid/tests/test_elementwise_div_op.py b/python/paddle/v2/fluid/tests/unittests/test_elementwise_div_op.py similarity index 100% rename from python/paddle/v2/fluid/tests/test_elementwise_div_op.py rename to python/paddle/v2/fluid/tests/unittests/test_elementwise_div_op.py diff --git a/python/paddle/v2/fluid/tests/test_elementwise_max_op.py b/python/paddle/v2/fluid/tests/unittests/test_elementwise_max_op.py similarity index 100% rename from python/paddle/v2/fluid/tests/test_elementwise_max_op.py rename to python/paddle/v2/fluid/tests/unittests/test_elementwise_max_op.py diff --git a/python/paddle/v2/fluid/tests/test_elementwise_min_op.py b/python/paddle/v2/fluid/tests/unittests/test_elementwise_min_op.py similarity index 100% rename from python/paddle/v2/fluid/tests/test_elementwise_min_op.py rename to python/paddle/v2/fluid/tests/unittests/test_elementwise_min_op.py diff --git a/python/paddle/v2/fluid/tests/test_elementwise_mul_op.py b/python/paddle/v2/fluid/tests/unittests/test_elementwise_mul_op.py similarity index 100% rename from python/paddle/v2/fluid/tests/test_elementwise_mul_op.py rename to python/paddle/v2/fluid/tests/unittests/test_elementwise_mul_op.py diff --git a/python/paddle/v2/fluid/tests/test_elementwise_pow_op.py b/python/paddle/v2/fluid/tests/unittests/test_elementwise_pow_op.py similarity index 100% rename from python/paddle/v2/fluid/tests/test_elementwise_pow_op.py rename to python/paddle/v2/fluid/tests/unittests/test_elementwise_pow_op.py diff --git a/python/paddle/v2/fluid/tests/test_elementwise_sub_op.py b/python/paddle/v2/fluid/tests/unittests/test_elementwise_sub_op.py similarity index 100% rename from python/paddle/v2/fluid/tests/test_elementwise_sub_op.py rename to python/paddle/v2/fluid/tests/unittests/test_elementwise_sub_op.py diff --git a/python/paddle/v2/fluid/tests/test_exception.py b/python/paddle/v2/fluid/tests/unittests/test_exception.py similarity index 100% rename from python/paddle/v2/fluid/tests/test_exception.py rename to python/paddle/v2/fluid/tests/unittests/test_exception.py diff --git a/python/paddle/v2/fluid/tests/test_executor_and_mul.py b/python/paddle/v2/fluid/tests/unittests/test_executor_and_mul.py similarity index 100% rename from python/paddle/v2/fluid/tests/test_executor_and_mul.py rename to python/paddle/v2/fluid/tests/unittests/test_executor_and_mul.py diff --git a/python/paddle/v2/fluid/tests/test_expand_op.py b/python/paddle/v2/fluid/tests/unittests/test_expand_op.py similarity index 100% rename from python/paddle/v2/fluid/tests/test_expand_op.py rename to python/paddle/v2/fluid/tests/unittests/test_expand_op.py diff --git a/python/paddle/v2/fluid/tests/test_feed_fetch_method.py b/python/paddle/v2/fluid/tests/unittests/test_feed_fetch_method.py similarity index 100% rename from python/paddle/v2/fluid/tests/test_feed_fetch_method.py rename to python/paddle/v2/fluid/tests/unittests/test_feed_fetch_method.py diff --git a/python/paddle/v2/fluid/tests/test_fetch_var.py b/python/paddle/v2/fluid/tests/unittests/test_fetch_var.py similarity index 100% rename from python/paddle/v2/fluid/tests/test_fetch_var.py rename to python/paddle/v2/fluid/tests/unittests/test_fetch_var.py diff --git a/python/paddle/v2/fluid/tests/test_fill_constant_batch_size_like_op.py b/python/paddle/v2/fluid/tests/unittests/test_fill_constant_batch_size_like_op.py similarity index 100% rename from python/paddle/v2/fluid/tests/test_fill_constant_batch_size_like_op.py rename to python/paddle/v2/fluid/tests/unittests/test_fill_constant_batch_size_like_op.py diff --git a/python/paddle/v2/fluid/tests/test_fill_constant_op.py b/python/paddle/v2/fluid/tests/unittests/test_fill_constant_op.py similarity index 100% rename from python/paddle/v2/fluid/tests/test_fill_constant_op.py rename to python/paddle/v2/fluid/tests/unittests/test_fill_constant_op.py diff --git a/python/paddle/v2/fluid/tests/test_fill_op.py b/python/paddle/v2/fluid/tests/unittests/test_fill_op.py similarity index 100% rename from python/paddle/v2/fluid/tests/test_fill_op.py rename to python/paddle/v2/fluid/tests/unittests/test_fill_op.py diff --git a/python/paddle/v2/fluid/tests/test_fill_zeros_like_op.py b/python/paddle/v2/fluid/tests/unittests/test_fill_zeros_like_op.py similarity index 100% rename from python/paddle/v2/fluid/tests/test_fill_zeros_like_op.py rename to python/paddle/v2/fluid/tests/unittests/test_fill_zeros_like_op.py diff --git a/python/paddle/v2/fluid/tests/test_framework_debug_str.py b/python/paddle/v2/fluid/tests/unittests/test_framework_debug_str.py similarity index 100% rename from python/paddle/v2/fluid/tests/test_framework_debug_str.py rename to python/paddle/v2/fluid/tests/unittests/test_framework_debug_str.py diff --git a/python/paddle/v2/fluid/tests/test_ftrl_op.py b/python/paddle/v2/fluid/tests/unittests/test_ftrl_op.py similarity index 100% rename from python/paddle/v2/fluid/tests/test_ftrl_op.py rename to python/paddle/v2/fluid/tests/unittests/test_ftrl_op.py diff --git a/python/paddle/v2/fluid/tests/test_gather_op.py b/python/paddle/v2/fluid/tests/unittests/test_gather_op.py similarity index 100% rename from python/paddle/v2/fluid/tests/test_gather_op.py rename to python/paddle/v2/fluid/tests/unittests/test_gather_op.py diff --git a/python/paddle/v2/fluid/tests/test_gaussian_random_op.py b/python/paddle/v2/fluid/tests/unittests/test_gaussian_random_op.py similarity index 100% rename from python/paddle/v2/fluid/tests/test_gaussian_random_op.py rename to python/paddle/v2/fluid/tests/unittests/test_gaussian_random_op.py diff --git a/python/paddle/v2/fluid/tests/test_get_places_op.py b/python/paddle/v2/fluid/tests/unittests/test_get_places_op.py similarity index 100% rename from python/paddle/v2/fluid/tests/test_get_places_op.py rename to python/paddle/v2/fluid/tests/unittests/test_get_places_op.py diff --git a/python/paddle/v2/fluid/tests/test_gru_op.py b/python/paddle/v2/fluid/tests/unittests/test_gru_op.py similarity index 100% rename from python/paddle/v2/fluid/tests/test_gru_op.py rename to python/paddle/v2/fluid/tests/unittests/test_gru_op.py diff --git a/python/paddle/v2/fluid/tests/test_gru_unit_op.py b/python/paddle/v2/fluid/tests/unittests/test_gru_unit_op.py similarity index 100% rename from python/paddle/v2/fluid/tests/test_gru_unit_op.py rename to python/paddle/v2/fluid/tests/unittests/test_gru_unit_op.py diff --git a/python/paddle/v2/fluid/tests/test_hinge_loss_op.py b/python/paddle/v2/fluid/tests/unittests/test_hinge_loss_op.py similarity index 100% rename from python/paddle/v2/fluid/tests/test_hinge_loss_op.py rename to python/paddle/v2/fluid/tests/unittests/test_hinge_loss_op.py diff --git a/python/paddle/v2/fluid/tests/test_huber_loss_op.py b/python/paddle/v2/fluid/tests/unittests/test_huber_loss_op.py similarity index 100% rename from python/paddle/v2/fluid/tests/test_huber_loss_op.py rename to python/paddle/v2/fluid/tests/unittests/test_huber_loss_op.py diff --git a/python/paddle/v2/fluid/tests/test_im2sequence_op.py b/python/paddle/v2/fluid/tests/unittests/test_im2sequence_op.py similarity index 100% rename from python/paddle/v2/fluid/tests/test_im2sequence_op.py rename to python/paddle/v2/fluid/tests/unittests/test_im2sequence_op.py diff --git a/python/paddle/v2/fluid/tests/test_image_classification_layer.py b/python/paddle/v2/fluid/tests/unittests/test_image_classification_layer.py similarity index 100% rename from python/paddle/v2/fluid/tests/test_image_classification_layer.py rename to python/paddle/v2/fluid/tests/unittests/test_image_classification_layer.py diff --git a/python/paddle/v2/fluid/tests/test_infer_shape.py b/python/paddle/v2/fluid/tests/unittests/test_infer_shape.py similarity index 100% rename from python/paddle/v2/fluid/tests/test_infer_shape.py rename to python/paddle/v2/fluid/tests/unittests/test_infer_shape.py diff --git a/python/paddle/v2/fluid/tests/test_inference_model_io.py b/python/paddle/v2/fluid/tests/unittests/test_inference_model_io.py similarity index 100% rename from python/paddle/v2/fluid/tests/test_inference_model_io.py rename to python/paddle/v2/fluid/tests/unittests/test_inference_model_io.py diff --git a/python/paddle/v2/fluid/tests/test_initializer.py b/python/paddle/v2/fluid/tests/unittests/test_initializer.py similarity index 100% rename from python/paddle/v2/fluid/tests/test_initializer.py rename to python/paddle/v2/fluid/tests/unittests/test_initializer.py diff --git a/python/paddle/v2/fluid/tests/test_iou_similarity_op.py b/python/paddle/v2/fluid/tests/unittests/test_iou_similarity_op.py similarity index 100% rename from python/paddle/v2/fluid/tests/test_iou_similarity_op.py rename to python/paddle/v2/fluid/tests/unittests/test_iou_similarity_op.py diff --git a/python/paddle/v2/fluid/tests/test_is_empty_op.py b/python/paddle/v2/fluid/tests/unittests/test_is_empty_op.py similarity index 100% rename from python/paddle/v2/fluid/tests/test_is_empty_op.py rename to python/paddle/v2/fluid/tests/unittests/test_is_empty_op.py diff --git a/python/paddle/v2/fluid/tests/test_l1_norm_op.py b/python/paddle/v2/fluid/tests/unittests/test_l1_norm_op.py similarity index 100% rename from python/paddle/v2/fluid/tests/test_l1_norm_op.py rename to python/paddle/v2/fluid/tests/unittests/test_l1_norm_op.py diff --git a/python/paddle/v2/fluid/tests/test_label_smooth_op.py b/python/paddle/v2/fluid/tests/unittests/test_label_smooth_op.py similarity index 100% rename from python/paddle/v2/fluid/tests/test_label_smooth_op.py rename to python/paddle/v2/fluid/tests/unittests/test_label_smooth_op.py diff --git a/python/paddle/v2/fluid/tests/test_layer_norm_op.py b/python/paddle/v2/fluid/tests/unittests/test_layer_norm_op.py similarity index 100% rename from python/paddle/v2/fluid/tests/test_layer_norm_op.py rename to python/paddle/v2/fluid/tests/unittests/test_layer_norm_op.py diff --git a/python/paddle/v2/fluid/tests/test_layers.py b/python/paddle/v2/fluid/tests/unittests/test_layers.py similarity index 100% rename from python/paddle/v2/fluid/tests/test_layers.py rename to python/paddle/v2/fluid/tests/unittests/test_layers.py diff --git a/python/paddle/v2/fluid/tests/test_learning_rate_decay.py b/python/paddle/v2/fluid/tests/unittests/test_learning_rate_decay.py similarity index 100% rename from python/paddle/v2/fluid/tests/test_learning_rate_decay.py rename to python/paddle/v2/fluid/tests/unittests/test_learning_rate_decay.py diff --git a/python/paddle/v2/fluid/tests/test_linear_chain_crf_op.py b/python/paddle/v2/fluid/tests/unittests/test_linear_chain_crf_op.py similarity index 100% rename from python/paddle/v2/fluid/tests/test_linear_chain_crf_op.py rename to python/paddle/v2/fluid/tests/unittests/test_linear_chain_crf_op.py diff --git a/python/paddle/v2/fluid/tests/test_lod_array_length_op.py b/python/paddle/v2/fluid/tests/unittests/test_lod_array_length_op.py similarity index 100% rename from python/paddle/v2/fluid/tests/test_lod_array_length_op.py rename to python/paddle/v2/fluid/tests/unittests/test_lod_array_length_op.py diff --git a/python/paddle/v2/fluid/tests/test_lod_rank_table.py b/python/paddle/v2/fluid/tests/unittests/test_lod_rank_table.py similarity index 100% rename from python/paddle/v2/fluid/tests/test_lod_rank_table.py rename to python/paddle/v2/fluid/tests/unittests/test_lod_rank_table.py diff --git a/python/paddle/v2/fluid/tests/test_lod_reset_op.py b/python/paddle/v2/fluid/tests/unittests/test_lod_reset_op.py similarity index 100% rename from python/paddle/v2/fluid/tests/test_lod_reset_op.py rename to python/paddle/v2/fluid/tests/unittests/test_lod_reset_op.py diff --git a/python/paddle/v2/fluid/tests/test_lod_tensor_array.py b/python/paddle/v2/fluid/tests/unittests/test_lod_tensor_array.py similarity index 100% rename from python/paddle/v2/fluid/tests/test_lod_tensor_array.py rename to python/paddle/v2/fluid/tests/unittests/test_lod_tensor_array.py diff --git a/python/paddle/v2/fluid/tests/test_lod_tensor_array_ops.py b/python/paddle/v2/fluid/tests/unittests/test_lod_tensor_array_ops.py similarity index 100% rename from python/paddle/v2/fluid/tests/test_lod_tensor_array_ops.py rename to python/paddle/v2/fluid/tests/unittests/test_lod_tensor_array_ops.py diff --git a/python/paddle/v2/fluid/tests/test_log_loss_op.py b/python/paddle/v2/fluid/tests/unittests/test_log_loss_op.py similarity index 100% rename from python/paddle/v2/fluid/tests/test_log_loss_op.py rename to python/paddle/v2/fluid/tests/unittests/test_log_loss_op.py diff --git a/python/paddle/v2/fluid/tests/test_logical_op.py b/python/paddle/v2/fluid/tests/unittests/test_logical_op.py similarity index 100% rename from python/paddle/v2/fluid/tests/test_logical_op.py rename to python/paddle/v2/fluid/tests/unittests/test_logical_op.py diff --git a/python/paddle/v2/fluid/tests/test_lookup_table_op.py b/python/paddle/v2/fluid/tests/unittests/test_lookup_table_op.py similarity index 100% rename from python/paddle/v2/fluid/tests/test_lookup_table_op.py rename to python/paddle/v2/fluid/tests/unittests/test_lookup_table_op.py diff --git a/python/paddle/v2/fluid/tests/test_lrn_op.py b/python/paddle/v2/fluid/tests/unittests/test_lrn_op.py similarity index 100% rename from python/paddle/v2/fluid/tests/test_lrn_op.py rename to python/paddle/v2/fluid/tests/unittests/test_lrn_op.py diff --git a/python/paddle/v2/fluid/tests/test_lstm_op.py b/python/paddle/v2/fluid/tests/unittests/test_lstm_op.py similarity index 100% rename from python/paddle/v2/fluid/tests/test_lstm_op.py rename to python/paddle/v2/fluid/tests/unittests/test_lstm_op.py diff --git a/python/paddle/v2/fluid/tests/test_lstm_unit_op.py b/python/paddle/v2/fluid/tests/unittests/test_lstm_unit_op.py similarity index 95% rename from python/paddle/v2/fluid/tests/test_lstm_unit_op.py rename to python/paddle/v2/fluid/tests/unittests/test_lstm_unit_op.py index af0c3db701e..e343265874f 100644 --- a/python/paddle/v2/fluid/tests/test_lstm_unit_op.py +++ b/python/paddle/v2/fluid/tests/unittests/test_lstm_unit_op.py @@ -49,6 +49,4 @@ class LstmUnitTest(OpTest): if __name__ == "__main__": - # FIXME(qijun) https://github.com/PaddlePaddle/Paddle/issues/5185 - exit(0) unittest.main() diff --git a/python/paddle/v2/fluid/tests/test_lstmp_op.py b/python/paddle/v2/fluid/tests/unittests/test_lstmp_op.py similarity index 100% rename from python/paddle/v2/fluid/tests/test_lstmp_op.py rename to python/paddle/v2/fluid/tests/unittests/test_lstmp_op.py diff --git a/python/paddle/v2/fluid/tests/test_margin_rank_loss_op.py b/python/paddle/v2/fluid/tests/unittests/test_margin_rank_loss_op.py similarity index 100% rename from python/paddle/v2/fluid/tests/test_margin_rank_loss_op.py rename to python/paddle/v2/fluid/tests/unittests/test_margin_rank_loss_op.py diff --git a/python/paddle/v2/fluid/tests/test_math_op_patch.py b/python/paddle/v2/fluid/tests/unittests/test_math_op_patch.py similarity index 100% rename from python/paddle/v2/fluid/tests/test_math_op_patch.py rename to python/paddle/v2/fluid/tests/unittests/test_math_op_patch.py diff --git a/python/paddle/v2/fluid/tests/test_matmul_op.py b/python/paddle/v2/fluid/tests/unittests/test_matmul_op.py similarity index 100% rename from python/paddle/v2/fluid/tests/test_matmul_op.py rename to python/paddle/v2/fluid/tests/unittests/test_matmul_op.py diff --git a/python/paddle/v2/fluid/tests/test_maxout_op.py b/python/paddle/v2/fluid/tests/unittests/test_maxout_op.py similarity index 100% rename from python/paddle/v2/fluid/tests/test_maxout_op.py rename to python/paddle/v2/fluid/tests/unittests/test_maxout_op.py diff --git a/python/paddle/v2/fluid/tests/test_mean_op.py b/python/paddle/v2/fluid/tests/unittests/test_mean_op.py similarity index 100% rename from python/paddle/v2/fluid/tests/test_mean_op.py rename to python/paddle/v2/fluid/tests/unittests/test_mean_op.py diff --git a/python/paddle/v2/fluid/tests/test_memory_optimization_transpiler.py b/python/paddle/v2/fluid/tests/unittests/test_memory_optimization_transpiler.py similarity index 100% rename from python/paddle/v2/fluid/tests/test_memory_optimization_transpiler.py rename to python/paddle/v2/fluid/tests/unittests/test_memory_optimization_transpiler.py diff --git a/python/paddle/v2/fluid/tests/test_mine_hard_examples_op.py b/python/paddle/v2/fluid/tests/unittests/test_mine_hard_examples_op.py similarity index 100% rename from python/paddle/v2/fluid/tests/test_mine_hard_examples_op.py rename to python/paddle/v2/fluid/tests/unittests/test_mine_hard_examples_op.py diff --git a/python/paddle/v2/fluid/tests/test_minus_op.py b/python/paddle/v2/fluid/tests/unittests/test_minus_op.py similarity index 100% rename from python/paddle/v2/fluid/tests/test_minus_op.py rename to python/paddle/v2/fluid/tests/unittests/test_minus_op.py diff --git a/python/paddle/v2/fluid/tests/test_modified_huber_loss_op.py b/python/paddle/v2/fluid/tests/unittests/test_modified_huber_loss_op.py similarity index 96% rename from python/paddle/v2/fluid/tests/test_modified_huber_loss_op.py rename to python/paddle/v2/fluid/tests/unittests/test_modified_huber_loss_op.py index def48c92613..62035efe8ec 100644 --- a/python/paddle/v2/fluid/tests/test_modified_huber_loss_op.py +++ b/python/paddle/v2/fluid/tests/unittests/test_modified_huber_loss_op.py @@ -59,6 +59,4 @@ class TestModifiedHuberLossOp(OpTest): if __name__ == '__main__': - exit(0) - # FIXME(qijun) https://github.com/PaddlePaddle/Paddle/issues/5184 unittest.main() diff --git a/python/paddle/v2/fluid/tests/test_momentum_op.py b/python/paddle/v2/fluid/tests/unittests/test_momentum_op.py similarity index 100% rename from python/paddle/v2/fluid/tests/test_momentum_op.py rename to python/paddle/v2/fluid/tests/unittests/test_momentum_op.py diff --git a/python/paddle/v2/fluid/tests/test_mul_op.py b/python/paddle/v2/fluid/tests/unittests/test_mul_op.py similarity index 100% rename from python/paddle/v2/fluid/tests/test_mul_op.py rename to python/paddle/v2/fluid/tests/unittests/test_mul_op.py diff --git a/python/paddle/v2/fluid/tests/test_multiclass_nms_op.py b/python/paddle/v2/fluid/tests/unittests/test_multiclass_nms_op.py similarity index 100% rename from python/paddle/v2/fluid/tests/test_multiclass_nms_op.py rename to python/paddle/v2/fluid/tests/unittests/test_multiclass_nms_op.py diff --git a/python/paddle/v2/fluid/tests/test_multihead_attention.py b/python/paddle/v2/fluid/tests/unittests/test_multihead_attention.py similarity index 100% rename from python/paddle/v2/fluid/tests/test_multihead_attention.py rename to python/paddle/v2/fluid/tests/unittests/test_multihead_attention.py diff --git a/python/paddle/v2/fluid/tests/test_multiplex_op.py b/python/paddle/v2/fluid/tests/unittests/test_multiplex_op.py similarity index 100% rename from python/paddle/v2/fluid/tests/test_multiplex_op.py rename to python/paddle/v2/fluid/tests/unittests/test_multiplex_op.py diff --git a/python/paddle/v2/fluid/tests/test_nce.py b/python/paddle/v2/fluid/tests/unittests/test_nce.py similarity index 97% rename from python/paddle/v2/fluid/tests/test_nce.py rename to python/paddle/v2/fluid/tests/unittests/test_nce.py index 068081972db..76ecc8ba08b 100644 --- a/python/paddle/v2/fluid/tests/test_nce.py +++ b/python/paddle/v2/fluid/tests/unittests/test_nce.py @@ -109,6 +109,4 @@ class TestNCECase1(TestNCE): if __name__ == '__main__': - # FIXME(qijun) https://github.com/PaddlePaddle/Paddle/issues/7778 - exit(0) unittest.main() diff --git a/python/paddle/v2/fluid/tests/test_net.py b/python/paddle/v2/fluid/tests/unittests/test_net.py similarity index 100% rename from python/paddle/v2/fluid/tests/test_net.py rename to python/paddle/v2/fluid/tests/unittests/test_net.py diff --git a/python/paddle/v2/fluid/tests/test_norm_op.py b/python/paddle/v2/fluid/tests/unittests/test_norm_op.py similarity index 100% rename from python/paddle/v2/fluid/tests/test_norm_op.py rename to python/paddle/v2/fluid/tests/unittests/test_norm_op.py diff --git a/python/paddle/v2/fluid/tests/test_normalization_wrapper.py b/python/paddle/v2/fluid/tests/unittests/test_normalization_wrapper.py similarity index 100% rename from python/paddle/v2/fluid/tests/test_normalization_wrapper.py rename to python/paddle/v2/fluid/tests/unittests/test_normalization_wrapper.py diff --git a/python/paddle/v2/fluid/tests/test_one_hot_op.py b/python/paddle/v2/fluid/tests/unittests/test_one_hot_op.py similarity index 100% rename from python/paddle/v2/fluid/tests/test_one_hot_op.py rename to python/paddle/v2/fluid/tests/unittests/test_one_hot_op.py diff --git a/python/paddle/v2/fluid/tests/test_op_support_gpu.py b/python/paddle/v2/fluid/tests/unittests/test_op_support_gpu.py similarity index 100% rename from python/paddle/v2/fluid/tests/test_op_support_gpu.py rename to python/paddle/v2/fluid/tests/unittests/test_op_support_gpu.py diff --git a/python/paddle/v2/fluid/tests/test_operator.py b/python/paddle/v2/fluid/tests/unittests/test_operator.py similarity index 100% rename from python/paddle/v2/fluid/tests/test_operator.py rename to python/paddle/v2/fluid/tests/unittests/test_operator.py diff --git a/python/paddle/v2/fluid/tests/test_operator_desc.py b/python/paddle/v2/fluid/tests/unittests/test_operator_desc.py similarity index 100% rename from python/paddle/v2/fluid/tests/test_operator_desc.py rename to python/paddle/v2/fluid/tests/unittests/test_operator_desc.py diff --git a/python/paddle/v2/fluid/tests/test_optimizer.py b/python/paddle/v2/fluid/tests/unittests/test_optimizer.py similarity index 100% rename from python/paddle/v2/fluid/tests/test_optimizer.py rename to python/paddle/v2/fluid/tests/unittests/test_optimizer.py diff --git a/python/paddle/v2/fluid/tests/test_pad_op.py b/python/paddle/v2/fluid/tests/unittests/test_pad_op.py similarity index 100% rename from python/paddle/v2/fluid/tests/test_pad_op.py rename to python/paddle/v2/fluid/tests/unittests/test_pad_op.py diff --git a/python/paddle/v2/fluid/tests/test_parallel_op.py b/python/paddle/v2/fluid/tests/unittests/test_parallel_op.py similarity index 96% rename from python/paddle/v2/fluid/tests/test_parallel_op.py rename to python/paddle/v2/fluid/tests/unittests/test_parallel_op.py index a0fc91f6de6..0d377ae70cc 100644 --- a/python/paddle/v2/fluid/tests/test_parallel_op.py +++ b/python/paddle/v2/fluid/tests/unittests/test_parallel_op.py @@ -138,9 +138,10 @@ class BaseParallelForTest(unittest.TestCase): def _impl_(a, b, fetch_id, item_id): item_str = ['CPU', 'ParallelCPU', 'GPU', 'ParallelGPU'] - flag = numpy.allclose(a, b, rtol=0.1) - self.assertTrue(flag, "The {0} are different in {1}".format( - fetch[fetch_id], item_str[item_id])) + flag = numpy.allclose(a, b, rtol=0.1, atol=1e-3) + self.assertTrue(flag, + "The {0} are different in {1}, {2} vs {3}".format( + fetch[fetch_id], item_str[item_id], a, b)) for i, items in enumerate(zip(*args)): self.assertGreater(len(items), 0) diff --git a/python/paddle/v2/fluid/tests/test_parameter.py b/python/paddle/v2/fluid/tests/unittests/test_parameter.py similarity index 100% rename from python/paddle/v2/fluid/tests/test_parameter.py rename to python/paddle/v2/fluid/tests/unittests/test_parameter.py diff --git a/python/paddle/v2/fluid/tests/test_pool2d_op.py b/python/paddle/v2/fluid/tests/unittests/test_pool2d_op.py similarity index 100% rename from python/paddle/v2/fluid/tests/test_pool2d_op.py rename to python/paddle/v2/fluid/tests/unittests/test_pool2d_op.py diff --git a/python/paddle/v2/fluid/tests/test_pool3d_op.py b/python/paddle/v2/fluid/tests/unittests/test_pool3d_op.py similarity index 100% rename from python/paddle/v2/fluid/tests/test_pool3d_op.py rename to python/paddle/v2/fluid/tests/unittests/test_pool3d_op.py diff --git a/python/paddle/v2/fluid/tests/test_pool_max_op.py b/python/paddle/v2/fluid/tests/unittests/test_pool_max_op.py similarity index 100% rename from python/paddle/v2/fluid/tests/test_pool_max_op.py rename to python/paddle/v2/fluid/tests/unittests/test_pool_max_op.py diff --git a/python/paddle/v2/fluid/tests/test_positive_negative_pair_op.py b/python/paddle/v2/fluid/tests/unittests/test_positive_negative_pair_op.py similarity index 100% rename from python/paddle/v2/fluid/tests/test_positive_negative_pair_op.py rename to python/paddle/v2/fluid/tests/unittests/test_positive_negative_pair_op.py diff --git a/python/paddle/v2/fluid/tests/test_precision_recall_op.py b/python/paddle/v2/fluid/tests/unittests/test_precision_recall_op.py similarity index 100% rename from python/paddle/v2/fluid/tests/test_precision_recall_op.py rename to python/paddle/v2/fluid/tests/unittests/test_precision_recall_op.py diff --git a/python/paddle/v2/fluid/tests/test_prelu_op.py b/python/paddle/v2/fluid/tests/unittests/test_prelu_op.py similarity index 100% rename from python/paddle/v2/fluid/tests/test_prelu_op.py rename to python/paddle/v2/fluid/tests/unittests/test_prelu_op.py diff --git a/python/paddle/v2/fluid/tests/test_print_op.py b/python/paddle/v2/fluid/tests/unittests/test_print_op.py similarity index 100% rename from python/paddle/v2/fluid/tests/test_print_op.py rename to python/paddle/v2/fluid/tests/unittests/test_print_op.py diff --git a/python/paddle/v2/fluid/tests/test_prior_box_op.py b/python/paddle/v2/fluid/tests/unittests/test_prior_box_op.py similarity index 100% rename from python/paddle/v2/fluid/tests/test_prior_box_op.py rename to python/paddle/v2/fluid/tests/unittests/test_prior_box_op.py diff --git a/python/paddle/v2/fluid/tests/test_profiler.py b/python/paddle/v2/fluid/tests/unittests/test_profiler.py similarity index 100% rename from python/paddle/v2/fluid/tests/test_profiler.py rename to python/paddle/v2/fluid/tests/unittests/test_profiler.py diff --git a/python/paddle/v2/fluid/tests/test_program.py b/python/paddle/v2/fluid/tests/unittests/test_program.py similarity index 100% rename from python/paddle/v2/fluid/tests/test_program.py rename to python/paddle/v2/fluid/tests/unittests/test_program.py diff --git a/python/paddle/v2/fluid/tests/test_protobuf.py b/python/paddle/v2/fluid/tests/unittests/test_protobuf.py similarity index 100% rename from python/paddle/v2/fluid/tests/test_protobuf.py rename to python/paddle/v2/fluid/tests/unittests/test_protobuf.py diff --git a/python/paddle/v2/fluid/tests/test_protobuf_descs.py b/python/paddle/v2/fluid/tests/unittests/test_protobuf_descs.py similarity index 100% rename from python/paddle/v2/fluid/tests/test_protobuf_descs.py rename to python/paddle/v2/fluid/tests/unittests/test_protobuf_descs.py diff --git a/python/paddle/v2/fluid/tests/test_proximal_adagrad_op.py b/python/paddle/v2/fluid/tests/unittests/test_proximal_adagrad_op.py similarity index 100% rename from python/paddle/v2/fluid/tests/test_proximal_adagrad_op.py rename to python/paddle/v2/fluid/tests/unittests/test_proximal_adagrad_op.py diff --git a/python/paddle/v2/fluid/tests/test_proximal_gd_op.py b/python/paddle/v2/fluid/tests/unittests/test_proximal_gd_op.py similarity index 100% rename from python/paddle/v2/fluid/tests/test_proximal_gd_op.py rename to python/paddle/v2/fluid/tests/unittests/test_proximal_gd_op.py diff --git a/python/paddle/v2/fluid/tests/test_rank_loss_op.py b/python/paddle/v2/fluid/tests/unittests/test_rank_loss_op.py similarity index 100% rename from python/paddle/v2/fluid/tests/test_rank_loss_op.py rename to python/paddle/v2/fluid/tests/unittests/test_rank_loss_op.py diff --git a/python/paddle/v2/fluid/tests/test_recurrent_op.py b/python/paddle/v2/fluid/tests/unittests/test_recurrent_op.py similarity index 99% rename from python/paddle/v2/fluid/tests/test_recurrent_op.py rename to python/paddle/v2/fluid/tests/unittests/test_recurrent_op.py index e540ca43b60..177d8fc65f4 100644 --- a/python/paddle/v2/fluid/tests/test_recurrent_op.py +++ b/python/paddle/v2/fluid/tests/unittests/test_recurrent_op.py @@ -468,6 +468,4 @@ class RecurrentOpNoMemBootTest(RecurrentOpTest1): if __name__ == '__main__': - # FIXME(qijun) https://github.com/PaddlePaddle/Paddle/issues/6152 - exit(0) unittest.main() diff --git a/python/paddle/v2/fluid/tests/test_recv_op.py b/python/paddle/v2/fluid/tests/unittests/test_recv_op.py similarity index 100% rename from python/paddle/v2/fluid/tests/test_recv_op.py rename to python/paddle/v2/fluid/tests/unittests/test_recv_op.py diff --git a/python/paddle/v2/fluid/tests/test_reduce_op.py b/python/paddle/v2/fluid/tests/unittests/test_reduce_op.py similarity index 100% rename from python/paddle/v2/fluid/tests/test_reduce_op.py rename to python/paddle/v2/fluid/tests/unittests/test_reduce_op.py diff --git a/python/paddle/v2/fluid/tests/test_registry.py b/python/paddle/v2/fluid/tests/unittests/test_registry.py similarity index 94% rename from python/paddle/v2/fluid/tests/test_registry.py rename to python/paddle/v2/fluid/tests/unittests/test_registry.py index bf4dc641865..82527a6ec7c 100644 --- a/python/paddle/v2/fluid/tests/test_registry.py +++ b/python/paddle/v2/fluid/tests/unittests/test_registry.py @@ -28,4 +28,4 @@ class TestRegistry(unittest.TestCase): exe = fluid.Executor(place) X = np.random.random((10, 10)).astype("float32") mean_out = exe.run(feed={"X": X}, fetch_list=[output]) - self.assertAlmostEqual(np.mean(X), mean_out[0]) + self.assertAlmostEqual(np.mean(X), mean_out[0], delta=1e-5) diff --git a/python/paddle/v2/fluid/tests/test_regularizer.py b/python/paddle/v2/fluid/tests/unittests/test_regularizer.py similarity index 100% rename from python/paddle/v2/fluid/tests/test_regularizer.py rename to python/paddle/v2/fluid/tests/unittests/test_regularizer.py diff --git a/python/paddle/v2/fluid/tests/test_reorder_lod_tensor.py b/python/paddle/v2/fluid/tests/unittests/test_reorder_lod_tensor.py similarity index 100% rename from python/paddle/v2/fluid/tests/test_reorder_lod_tensor.py rename to python/paddle/v2/fluid/tests/unittests/test_reorder_lod_tensor.py diff --git a/python/paddle/v2/fluid/tests/test_reshape_op.py b/python/paddle/v2/fluid/tests/unittests/test_reshape_op.py similarity index 100% rename from python/paddle/v2/fluid/tests/test_reshape_op.py rename to python/paddle/v2/fluid/tests/unittests/test_reshape_op.py diff --git a/python/paddle/v2/fluid/tests/test_rmsprop_op.py b/python/paddle/v2/fluid/tests/unittests/test_rmsprop_op.py similarity index 100% rename from python/paddle/v2/fluid/tests/test_rmsprop_op.py rename to python/paddle/v2/fluid/tests/unittests/test_rmsprop_op.py diff --git a/python/paddle/v2/fluid/tests/test_rnn_memory_helper_op.py b/python/paddle/v2/fluid/tests/unittests/test_rnn_memory_helper_op.py similarity index 100% rename from python/paddle/v2/fluid/tests/test_rnn_memory_helper_op.py rename to python/paddle/v2/fluid/tests/unittests/test_rnn_memory_helper_op.py diff --git a/python/paddle/v2/fluid/tests/test_roi_pool_op.py b/python/paddle/v2/fluid/tests/unittests/test_roi_pool_op.py similarity index 100% rename from python/paddle/v2/fluid/tests/test_roi_pool_op.py rename to python/paddle/v2/fluid/tests/unittests/test_roi_pool_op.py diff --git a/python/paddle/v2/fluid/tests/test_row_conv_op.py b/python/paddle/v2/fluid/tests/unittests/test_row_conv_op.py similarity index 100% rename from python/paddle/v2/fluid/tests/test_row_conv_op.py rename to python/paddle/v2/fluid/tests/unittests/test_row_conv_op.py diff --git a/python/paddle/v2/fluid/tests/test_scale_op.py b/python/paddle/v2/fluid/tests/unittests/test_scale_op.py similarity index 100% rename from python/paddle/v2/fluid/tests/test_scale_op.py rename to python/paddle/v2/fluid/tests/unittests/test_scale_op.py diff --git a/python/paddle/v2/fluid/tests/test_scatter_op.py b/python/paddle/v2/fluid/tests/unittests/test_scatter_op.py similarity index 100% rename from python/paddle/v2/fluid/tests/test_scatter_op.py rename to python/paddle/v2/fluid/tests/unittests/test_scatter_op.py diff --git a/python/paddle/v2/fluid/tests/test_scope.py b/python/paddle/v2/fluid/tests/unittests/test_scope.py similarity index 100% rename from python/paddle/v2/fluid/tests/test_scope.py rename to python/paddle/v2/fluid/tests/unittests/test_scope.py diff --git a/python/paddle/v2/fluid/tests/test_selected_rows.py b/python/paddle/v2/fluid/tests/unittests/test_selected_rows.py similarity index 100% rename from python/paddle/v2/fluid/tests/test_selected_rows.py rename to python/paddle/v2/fluid/tests/unittests/test_selected_rows.py diff --git a/python/paddle/v2/fluid/tests/test_seq_concat_op.py b/python/paddle/v2/fluid/tests/unittests/test_seq_concat_op.py similarity index 99% rename from python/paddle/v2/fluid/tests/test_seq_concat_op.py rename to python/paddle/v2/fluid/tests/unittests/test_seq_concat_op.py index 1c9b61d8fdb..10592d127fa 100644 --- a/python/paddle/v2/fluid/tests/test_seq_concat_op.py +++ b/python/paddle/v2/fluid/tests/unittests/test_seq_concat_op.py @@ -16,7 +16,6 @@ import unittest import numpy as np import sys from op_test import OpTest -exit(0) def to_abs_lod(lod): diff --git a/python/paddle/v2/fluid/tests/test_seq_conv.py b/python/paddle/v2/fluid/tests/unittests/test_seq_conv.py similarity index 100% rename from python/paddle/v2/fluid/tests/test_seq_conv.py rename to python/paddle/v2/fluid/tests/unittests/test_seq_conv.py diff --git a/python/paddle/v2/fluid/tests/test_seq_pool.py b/python/paddle/v2/fluid/tests/unittests/test_seq_pool.py similarity index 100% rename from python/paddle/v2/fluid/tests/test_seq_pool.py rename to python/paddle/v2/fluid/tests/unittests/test_seq_pool.py diff --git a/python/paddle/v2/fluid/tests/test_sequence_erase_op.py b/python/paddle/v2/fluid/tests/unittests/test_sequence_erase_op.py similarity index 100% rename from python/paddle/v2/fluid/tests/test_sequence_erase_op.py rename to python/paddle/v2/fluid/tests/unittests/test_sequence_erase_op.py diff --git a/python/paddle/v2/fluid/tests/test_sequence_expand.py b/python/paddle/v2/fluid/tests/unittests/test_sequence_expand.py similarity index 100% rename from python/paddle/v2/fluid/tests/test_sequence_expand.py rename to python/paddle/v2/fluid/tests/unittests/test_sequence_expand.py diff --git a/python/paddle/v2/fluid/tests/test_sequence_reshape.py b/python/paddle/v2/fluid/tests/unittests/test_sequence_reshape.py similarity index 100% rename from python/paddle/v2/fluid/tests/test_sequence_reshape.py rename to python/paddle/v2/fluid/tests/unittests/test_sequence_reshape.py diff --git a/python/paddle/v2/fluid/tests/test_sequence_slice_op.py b/python/paddle/v2/fluid/tests/unittests/test_sequence_slice_op.py similarity index 100% rename from python/paddle/v2/fluid/tests/test_sequence_slice_op.py rename to python/paddle/v2/fluid/tests/unittests/test_sequence_slice_op.py diff --git a/python/paddle/v2/fluid/tests/test_sequence_softmax_op.py b/python/paddle/v2/fluid/tests/unittests/test_sequence_softmax_op.py similarity index 100% rename from python/paddle/v2/fluid/tests/test_sequence_softmax_op.py rename to python/paddle/v2/fluid/tests/unittests/test_sequence_softmax_op.py diff --git a/python/paddle/v2/fluid/tests/test_sgd_op.py b/python/paddle/v2/fluid/tests/unittests/test_sgd_op.py similarity index 100% rename from python/paddle/v2/fluid/tests/test_sgd_op.py rename to python/paddle/v2/fluid/tests/unittests/test_sgd_op.py diff --git a/python/paddle/v2/fluid/tests/test_shrink_rnn_memory.py b/python/paddle/v2/fluid/tests/unittests/test_shrink_rnn_memory.py similarity index 100% rename from python/paddle/v2/fluid/tests/test_shrink_rnn_memory.py rename to python/paddle/v2/fluid/tests/unittests/test_shrink_rnn_memory.py diff --git a/python/paddle/v2/fluid/tests/test_sigmoid_cross_entropy_with_logits_op.py b/python/paddle/v2/fluid/tests/unittests/test_sigmoid_cross_entropy_with_logits_op.py similarity index 100% rename from python/paddle/v2/fluid/tests/test_sigmoid_cross_entropy_with_logits_op.py rename to python/paddle/v2/fluid/tests/unittests/test_sigmoid_cross_entropy_with_logits_op.py diff --git a/python/paddle/v2/fluid/tests/test_sign_op.py b/python/paddle/v2/fluid/tests/unittests/test_sign_op.py similarity index 100% rename from python/paddle/v2/fluid/tests/test_sign_op.py rename to python/paddle/v2/fluid/tests/unittests/test_sign_op.py diff --git a/python/paddle/v2/fluid/tests/test_smooth_l1_loss_op.py b/python/paddle/v2/fluid/tests/unittests/test_smooth_l1_loss_op.py similarity index 100% rename from python/paddle/v2/fluid/tests/test_smooth_l1_loss_op.py rename to python/paddle/v2/fluid/tests/unittests/test_smooth_l1_loss_op.py diff --git a/python/paddle/v2/fluid/tests/test_softmax_op.py b/python/paddle/v2/fluid/tests/unittests/test_softmax_op.py similarity index 100% rename from python/paddle/v2/fluid/tests/test_softmax_op.py rename to python/paddle/v2/fluid/tests/unittests/test_softmax_op.py diff --git a/python/paddle/v2/fluid/tests/test_softmax_with_cross_entropy_op.py b/python/paddle/v2/fluid/tests/unittests/test_softmax_with_cross_entropy_op.py similarity index 100% rename from python/paddle/v2/fluid/tests/test_softmax_with_cross_entropy_op.py rename to python/paddle/v2/fluid/tests/unittests/test_softmax_with_cross_entropy_op.py diff --git a/python/paddle/v2/fluid/tests/test_split_and_merge_lod_tensor_op.py b/python/paddle/v2/fluid/tests/unittests/test_split_and_merge_lod_tensor_op.py similarity index 100% rename from python/paddle/v2/fluid/tests/test_split_and_merge_lod_tensor_op.py rename to python/paddle/v2/fluid/tests/unittests/test_split_and_merge_lod_tensor_op.py diff --git a/python/paddle/v2/fluid/tests/test_split_op.py b/python/paddle/v2/fluid/tests/unittests/test_split_op.py similarity index 100% rename from python/paddle/v2/fluid/tests/test_split_op.py rename to python/paddle/v2/fluid/tests/unittests/test_split_op.py diff --git a/python/paddle/v2/fluid/tests/test_split_selected_rows_op.py b/python/paddle/v2/fluid/tests/unittests/test_split_selected_rows_op.py similarity index 100% rename from python/paddle/v2/fluid/tests/test_split_selected_rows_op.py rename to python/paddle/v2/fluid/tests/unittests/test_split_selected_rows_op.py diff --git a/python/paddle/v2/fluid/tests/book_distribute/test_split_var.py b/python/paddle/v2/fluid/tests/unittests/test_split_var.py similarity index 100% rename from python/paddle/v2/fluid/tests/book_distribute/test_split_var.py rename to python/paddle/v2/fluid/tests/unittests/test_split_var.py diff --git a/python/paddle/v2/fluid/tests/test_spp_op.py b/python/paddle/v2/fluid/tests/unittests/test_spp_op.py similarity index 100% rename from python/paddle/v2/fluid/tests/test_spp_op.py rename to python/paddle/v2/fluid/tests/unittests/test_spp_op.py diff --git a/python/paddle/v2/fluid/tests/test_squared_l2_distance_op.py b/python/paddle/v2/fluid/tests/unittests/test_squared_l2_distance_op.py similarity index 100% rename from python/paddle/v2/fluid/tests/test_squared_l2_distance_op.py rename to python/paddle/v2/fluid/tests/unittests/test_squared_l2_distance_op.py diff --git a/python/paddle/v2/fluid/tests/test_squared_l2_norm_op.py b/python/paddle/v2/fluid/tests/unittests/test_squared_l2_norm_op.py similarity index 100% rename from python/paddle/v2/fluid/tests/test_squared_l2_norm_op.py rename to python/paddle/v2/fluid/tests/unittests/test_squared_l2_norm_op.py diff --git a/python/paddle/v2/fluid/tests/test_sum_op.py b/python/paddle/v2/fluid/tests/unittests/test_sum_op.py similarity index 100% rename from python/paddle/v2/fluid/tests/test_sum_op.py rename to python/paddle/v2/fluid/tests/unittests/test_sum_op.py diff --git a/python/paddle/v2/fluid/tests/test_switch.py b/python/paddle/v2/fluid/tests/unittests/test_switch.py similarity index 100% rename from python/paddle/v2/fluid/tests/test_switch.py rename to python/paddle/v2/fluid/tests/unittests/test_switch.py diff --git a/python/paddle/v2/fluid/tests/test_target_assign_op.py b/python/paddle/v2/fluid/tests/unittests/test_target_assign_op.py similarity index 100% rename from python/paddle/v2/fluid/tests/test_target_assign_op.py rename to python/paddle/v2/fluid/tests/unittests/test_target_assign_op.py diff --git a/python/paddle/v2/fluid/tests/test_tensor.py b/python/paddle/v2/fluid/tests/unittests/test_tensor.py similarity index 100% rename from python/paddle/v2/fluid/tests/test_tensor.py rename to python/paddle/v2/fluid/tests/unittests/test_tensor.py diff --git a/python/paddle/v2/fluid/tests/test_top_k_op.py b/python/paddle/v2/fluid/tests/unittests/test_top_k_op.py similarity index 100% rename from python/paddle/v2/fluid/tests/test_top_k_op.py rename to python/paddle/v2/fluid/tests/unittests/test_top_k_op.py diff --git a/python/paddle/v2/fluid/tests/test_transpose_op.py b/python/paddle/v2/fluid/tests/unittests/test_transpose_op.py similarity index 100% rename from python/paddle/v2/fluid/tests/test_transpose_op.py rename to python/paddle/v2/fluid/tests/unittests/test_transpose_op.py diff --git a/python/paddle/v2/fluid/tests/test_uniform_random_op.py b/python/paddle/v2/fluid/tests/unittests/test_uniform_random_op.py similarity index 100% rename from python/paddle/v2/fluid/tests/test_uniform_random_op.py rename to python/paddle/v2/fluid/tests/unittests/test_uniform_random_op.py diff --git a/python/paddle/v2/fluid/tests/test_unpool_op.py b/python/paddle/v2/fluid/tests/unittests/test_unpool_op.py similarity index 100% rename from python/paddle/v2/fluid/tests/test_unpool_op.py rename to python/paddle/v2/fluid/tests/unittests/test_unpool_op.py diff --git a/python/paddle/v2/fluid/tests/test_variable.py b/python/paddle/v2/fluid/tests/unittests/test_variable.py similarity index 100% rename from python/paddle/v2/fluid/tests/test_variable.py rename to python/paddle/v2/fluid/tests/unittests/test_variable.py diff --git a/python/paddle/v2/fluid/tests/test_warpctc_op.py b/python/paddle/v2/fluid/tests/unittests/test_warpctc_op.py similarity index 100% rename from python/paddle/v2/fluid/tests/test_warpctc_op.py rename to python/paddle/v2/fluid/tests/unittests/test_warpctc_op.py diff --git a/python/paddle/v2/fluid/tests/test_weight_normalization.py b/python/paddle/v2/fluid/tests/unittests/test_weight_normalization.py similarity index 100% rename from python/paddle/v2/fluid/tests/test_weight_normalization.py rename to python/paddle/v2/fluid/tests/unittests/test_weight_normalization.py diff --git a/python/paddle/v2/fluid/tests/test_while_op.py b/python/paddle/v2/fluid/tests/unittests/test_while_op.py similarity index 100% rename from python/paddle/v2/fluid/tests/test_while_op.py rename to python/paddle/v2/fluid/tests/unittests/test_while_op.py -- GitLab From 549c74a9378593d81222238f393b3831cb7f55f1 Mon Sep 17 00:00:00 2001 From: "Yang Yang(Tony)" Date: Mon, 12 Feb 2018 17:44:55 -0800 Subject: [PATCH 046/122] Create parallel_do.md --- doc/design/parallel_do.md | 83 +++++++++++++++++++++++++++++++++++++++ 1 file changed, 83 insertions(+) create mode 100644 doc/design/parallel_do.md diff --git a/doc/design/parallel_do.md b/doc/design/parallel_do.md new file mode 100644 index 00000000000..c41af8c4138 --- /dev/null +++ b/doc/design/parallel_do.md @@ -0,0 +1,83 @@ +# Design Doc: Parallel_Do in PaddlePaddle + +In PaddlePaddle, we use parallel_do primitive to represent multithread data parallel processing. + +## Design overview + +The definition of a parallel_do op looks like the following + +```c++ +AddInput(kInputs, "Inputs needed to be split onto different devices").AsDuplicable(); +AddInput(kParameters, "Parameters are duplicated over different devices") + .AsDuplicable(); +AddInput(kPlaces, "Devices used for parallel processing"); +AddOutput(kOutputs, "Outputs needed to be merged from different devices").AsDuplicable(); +AddOutput(kParallelScopes, + "Container for all local variables in forward pass."); +AddAttr(kParallelBlock, + "List of operaters to be executed in parallel"); +``` + +A vanilla implementation of parallel_do can be shown as the following (`|` means single thread and +`||||` means multiple threads) + +``` +In the forward pass + | Split input onto different devices + | Copy parameter to onto different devices + |||| Compute forward pass in parallel + | Merge output from different devices + +In the backward pass + | Split output@grad onto different devices + |||| Compute backward pass in parallel + | accumulate param@grad from different devices to the first device + | Merge input@grad from different devices +``` + +This implementation allows to write mixed device program like this + +```python +# get embedding feature on CPU +feature = some_cpu_only_op(data) + +# parallel processing on multiple GPUs +pd = ParallelDo(gpu_places) +with pd.do(): + read_input(feature) + prediction = my_net(feature) + write_output(activation) +prediction = pd() +loss = cross_entropy(prediction, label) +``` + +## Proformance Imporvement + +There are serial places we can make this parallel_do faster. + +### forward: split input onto different devices + +If the input of the parallel_do is independent from any prior opeartors, we can avoid this step by +prefetching the input onto different devices in a seperate background thread. And the python code +looks like this. +```python +pd = ParallelDo(gpu_places) +with pd.do(): + feature = pre_fetch(gpu_places) + prediction = my_net(feature) + write_output(activation) +``` + +### forward: Copy parameter to onto different devices + +We can avoid this step by making each device have a copy of the parameter. This requires: + +1. `fluid.default_start_up_program()` to be run on all devices +1. In the backward, allreduce param@grad at different devices, this requires + 1. `backward.py` add `allreduce` operators at parallel_do_grad + 1. `allreduce` operators need to be called in async mode to achieve maximum throughput +1. apply gradients related op(i.e. cliping, normalization, decay, sgd) on different devices in parallel + +By doing so, we also avoided "backward: accumulate param@grad from different devices to the first device" + + -- GitLab From ad2dfef4168b31048b777ca5eb328a0368bd74ba Mon Sep 17 00:00:00 2001 From: "Yang Yang(Tony)" Date: Mon, 12 Feb 2018 17:56:28 -0800 Subject: [PATCH 047/122] Update parallel_do.md --- doc/design/parallel_do.md | 76 ++++++++++++++++++++++++++++++++++++++- 1 file changed, 75 insertions(+), 1 deletion(-) diff --git a/doc/design/parallel_do.md b/doc/design/parallel_do.md index c41af8c4138..576d30329b6 100644 --- a/doc/design/parallel_do.md +++ b/doc/design/parallel_do.md @@ -41,6 +41,7 @@ This implementation allows to write mixed device program like this # get embedding feature on CPU feature = some_cpu_only_op(data) +gpu_places = get_place(use_gpu=True) # parallel processing on multiple GPUs pd = ParallelDo(gpu_places) with pd.do(): @@ -51,6 +52,38 @@ prediction = pd() loss = cross_entropy(prediction, label) ``` +And the programDesc are like the following + +``` +# start_program will be run by executor(CPUPlace), all w1, w2 will be allocated on CPU +start_program +{ + vars: w1, w2 + ops: init(w1), init(w2) +} + +main_program +{ +block0 { + vars: data, places, w1, w2 + ops: data, get_place, parallel_do(block1), + parallel_do_grad(block2), + sgd(w2, w2_grad), + sgd(w1, w1_grad) +} +block1 { + vars: data, h1, h2, loss + ops: fc, fc, softmax +} +block2 { + vars: data_grad, h1_grad, h2_grad, loss_gard, w1_grad, w2_grad + ops: softmax_grad, + fc_grad + fc_grad +} +} +``` + ## Proformance Imporvement There are serial places we can make this parallel_do faster. @@ -78,6 +111,47 @@ We can avoid this step by making each device have a copy of the parameter. This 1. `allreduce` operators need to be called in async mode to achieve maximum throughput 1. apply gradients related op(i.e. cliping, normalization, decay, sgd) on different devices in parallel -By doing so, we also avoided "backward: accumulate param@grad from different devices to the first device" +By doing so, we also avoided "backward: accumulate param@grad from different devices to the first device". +And the ProgramDesc looks like the following + +``` +# w1, w2 will be allocated on all GPUs +start_program +{ +block0 { + parallel_do(block1) +} +block1 { + vars: w1, w2 + ops: init(w1), init(w2) +} +} + +main_program +{ +block0 { + vars: data, places, w1, w2 + ops: data, get_place, parallel_do(block1), + parallel_do_grad(block2), # append_backward + parallel_do(block3) # append_optimization + +} +block1 { + vars: data, h1, h2, loss + ops: fc, fc, softmax +} +block2 { + vars: data_grad, h1_grad, h2_grad, loss_gard, w1_grad, w2_grad + ops: softmax_grad, + fc_grad, allreduce(places, scopes, w1_grad), + fc_grad, allreduce(places, scopes, w2_grad) +} +block3 { + vars: lr + ops: sgd(w2, w2_grad), + sgd(w1, w1_grad) +} +} +``` -- GitLab From ed5dc3d4ae705c879369774e1491aee6967426a2 Mon Sep 17 00:00:00 2001 From: fengjiayi Date: Tue, 13 Feb 2018 10:49:45 +0800 Subject: [PATCH 048/122] remove 'friend lod_tensor in tensor' --- paddle/fluid/framework/tensor.h | 2 -- 1 file changed, 2 deletions(-) diff --git a/paddle/fluid/framework/tensor.h b/paddle/fluid/framework/tensor.h index f95af384eb0..6f878541e6d 100644 --- a/paddle/fluid/framework/tensor.h +++ b/paddle/fluid/framework/tensor.h @@ -130,8 +130,6 @@ class Tensor { inline void set_layout(const DataLayout layout) { layout_ = layout; } private: - friend class LoDTensor; - /** * @note Placeholder hides type T, so it doesn't appear as a template * parameter of Variable. -- GitLab From 8b01546fe44c5c42bc4a72958ed06d04178854f5 Mon Sep 17 00:00:00 2001 From: QI JUN Date: Tue, 13 Feb 2018 11:48:20 +0800 Subject: [PATCH 049/122] fix compile warning (#8430) --- paddle/fluid/operators/detection_map_op.h | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/paddle/fluid/operators/detection_map_op.h b/paddle/fluid/operators/detection_map_op.h index 39d17a7cb3f..92e05108393 100644 --- a/paddle/fluid/operators/detection_map_op.h +++ b/paddle/fluid/operators/detection_map_op.h @@ -151,7 +151,7 @@ class DetectionMAPOpKernel : public framework::OpKernel { for (int n = 0; n < batch_size; ++n) { std::map> boxes; - for (int i = label_index[n]; i < label_index[n + 1]; ++i) { + for (size_t i = label_index[n]; i < label_index[n + 1]; ++i) { Box box(labels(i, 2), labels(i, 3), labels(i, 4), labels(i, 5)); int label = labels(i, 0); auto is_difficult = labels(i, 1); @@ -167,7 +167,7 @@ class DetectionMAPOpKernel : public framework::OpKernel { auto detect_index = detect_lod[0]; for (int n = 0; n < batch_size; ++n) { std::map>> boxes; - for (int i = detect_index[n]; i < detect_index[n + 1]; ++i) { + for (size_t i = detect_index[n]; i < detect_index[n + 1]; ++i) { Box box(detect(i, 2), detect(i, 3), detect(i, 4), detect(i, 5)); int label = detect(i, 0); auto score = detect(i, 1); @@ -269,8 +269,8 @@ class DetectionMAPOpKernel : public framework::OpKernel { std::map>>& pos) { const T* pos_data = pos_tensor.data(); auto pos_data_lod = pos_tensor.lod(); - for (int i = 0; i < pos_data_lod.size(); ++i) { - for (int j = pos_data_lod[0][i]; j < pos_data_lod[0][i + 1]; ++j) { + for (size_t i = 0; i < pos_data_lod.size(); ++i) { + for (size_t j = pos_data_lod[0][i]; j < pos_data_lod[0][i + 1]; ++j) { T score = pos_data[j * 2]; int flag = 1; if (pos_data[j * 2 + 1] < kEPS) flag = 0; -- GitLab From 8acad27e8d74ee17f7ded7c0d1f0dc0df1633637 Mon Sep 17 00:00:00 2001 From: typhoonzero Date: Tue, 13 Feb 2018 14:11:07 +0800 Subject: [PATCH 050/122] refine code --- paddle/fluid/operators/listen_and_serv_op.cc | 15 +- paddle/fluid/operators/recv_op.cc | 4 +- paddle/fluid/operators/send_op.cc | 4 +- .../paddle/v2/fluid/distribute_transpiler.py | 392 +++++++++--------- 4 files changed, 211 insertions(+), 204 deletions(-) diff --git a/paddle/fluid/operators/listen_and_serv_op.cc b/paddle/fluid/operators/listen_and_serv_op.cc index 9c336678471..4409df4995b 100644 --- a/paddle/fluid/operators/listen_and_serv_op.cc +++ b/paddle/fluid/operators/listen_and_serv_op.cc @@ -75,8 +75,8 @@ class ListenAndServOp : public framework::OperatorBase { server_thread_->join(); } - void Run(const framework::Scope &scope, - const platform::Place &dev_place) const override { + void RunImpl(const framework::Scope &scope, + const platform::Place &dev_place) const override { platform::DeviceContextPool &pool = platform::DeviceContextPool::Instance(); auto &dev_ctx = *pool.Get(dev_place); framework::Scope &recv_scope = scope.NewScope(); @@ -101,7 +101,6 @@ class ListenAndServOp : public framework::OperatorBase { // the gradients arrives, just add suffix 0~n and merge the gradient. rpc_service_->SetCond(0); size_t recv_var_cnt = 0; - size_t update_param_cnt = 0; int batch_barrier = 0; while (batch_barrier != fan_in) { const detail::MessageWithName &v = rpc_service_->Get(); @@ -128,29 +127,26 @@ class ListenAndServOp : public framework::OperatorBase { } } } - VLOG(3) << "recv " << recv_var_cnt << " parmeters for one barrier."; if (exit_flag) { rpc_service_->ShutDown(); } - VLOG(3) << "run optimize graph..."; try { executor.Run(*program, &recv_scope, block->ID(), /*global_block*/ false /*create_local_scope*/, false /*create_vars*/); } catch (std::exception &e) { LOG(ERROR) << "run sub program error " << e.what(); } - // Reset the received sparse variables, the sum operator would not // sum the input sparse variables which rows is empty at the next // mini-batch. - // TOOD(Yancey1989): move the reset action into an operator, we couldn't + // TODO(Yancey1989): move the reset action into an operator, we couldn't // have any hide logic in the operator. for (auto &var : sparse_vars) { var->GetMutable()->mutable_rows()->clear(); } rpc_service_->SetCond(1); - rpc_service_->WaitClientGet(update_param_cnt); - grads_counter_.clear(); + // FIXME(typhoonzero): use another condition to sync wait clients get. + rpc_service_->WaitClientGet(ins.size()); sparse_vars.clear(); } // while(true) } @@ -158,7 +154,6 @@ class ListenAndServOp : public framework::OperatorBase { protected: std::shared_ptr rpc_service_; std::shared_ptr server_thread_; - mutable std::unordered_map grads_counter_; }; class ListenAndServOpMaker : public framework::OpProtoAndCheckerMaker { diff --git a/paddle/fluid/operators/recv_op.cc b/paddle/fluid/operators/recv_op.cc index c093f60ceed..17b57b5d45a 100644 --- a/paddle/fluid/operators/recv_op.cc +++ b/paddle/fluid/operators/recv_op.cc @@ -32,8 +32,8 @@ class RecvOp : public framework::OperatorBase { const framework::AttributeMap& attrs) : OperatorBase(type, inputs, outputs, attrs) {} - void Run(const framework::Scope& scope, - const platform::Place& place) const override { + void RunImpl(const framework::Scope& scope, + const platform::Place& place) const override { auto outs = Outputs("Out"); std::vector epmap = Attr>("epmap"); diff --git a/paddle/fluid/operators/send_op.cc b/paddle/fluid/operators/send_op.cc index b241f738cbf..39b6c0e8c51 100644 --- a/paddle/fluid/operators/send_op.cc +++ b/paddle/fluid/operators/send_op.cc @@ -48,8 +48,8 @@ class SendOp : public framework::OperatorBase { const framework::AttributeMap& attrs) : OperatorBase(type, inputs, outputs, attrs) {} - void Run(const framework::Scope& scope, - const platform::Place& place) const override { + void RunImpl(const framework::Scope& scope, + const platform::Place& place) const override { auto ins = Inputs("X"); auto outs = Outputs("Out"); std::vector epmap = Attr>("epmap"); diff --git a/python/paddle/v2/fluid/distribute_transpiler.py b/python/paddle/v2/fluid/distribute_transpiler.py index 41630998cf5..81317df9834 100644 --- a/python/paddle/v2/fluid/distribute_transpiler.py +++ b/python/paddle/v2/fluid/distribute_transpiler.py @@ -147,6 +147,21 @@ class DistributeTranspiler: Use different methods to split trainable variables to different parameter servers. + Steps to transpile trainer: + 1. split variable to multiple blocks, aligned by product(dim[1:]) (width). + 2. rename splited grad variables to add trainer_id suffix ".trainer_%d". + 3. modify trainer program add split_op to each grad variable. + 4. append send_op to send splited variables to server and fetch + params(splited blocks or origin param) from server. + 5. append concat_op to merge splited blocks to update local weights. + + Steps to transpile pserver: + 1. create new program for parameter server. + 2. create params and grad variables that assigned to current server instance. + 3. create a sub-block in the server side program + 4. append ops that should run on current server instance. + 5. add listen_and_serv op + :param optimize_ops: op list of optimization, should be the return value of Optimizer.minimize :type optimize_ops: list @@ -154,7 +169,7 @@ class DistributeTranspiler: :type params_grads: list :param trainer_id: one unique id for each trainer in a job. :type trainer_id: int - :param program: program to optimize, default is default_main_program + :param program: program to transpile, default is default_main_program :type program: Program :param pservers: parameter server endpoints like "m1:6174,m2:6174" :type pservers: string @@ -174,27 +189,15 @@ class DistributeTranspiler: # like Kubernetes, we should port this to use etcd later when developing # fluid distributed training with fault-tolerance. self.trainer_id = trainer_id - - # steps to transpile: - # 1. split variable to multiple blocks, aligned by product(dim[1:]) (width). - # 2. modify trainer program add split_op to each Grad. - # 3. append send_op to trainer. - # 4. append concat_op to trainer to update local weights. - # 5. create new program for parameter server. - # 6. create parameter server program by split_method generated endpoint->VarBlock - # 7. update startup_program, rename variables to variables with trainer_id - pserver_endpoints = pservers.split(",") # step1 param_list = [pg[0] for pg in params_grads] grad_list = [pg[1] for pg in params_grads] - # TODO: add split selected rows support grad_blocks = split_dense_variable(grad_list, len(pserver_endpoints)) param_blocks = split_dense_variable(param_list, len(pserver_endpoints)) # step2 grad_var_mapping = self._append_split_op(program, grad_blocks) - # step3 send_inputs = [] send_outputs = [] @@ -222,12 +225,12 @@ class DistributeTranspiler: rpc_client_var = program.global_block().create_var( name="RPC_CLIENT_VAR", - psersistable=True, + persistable=True, dtype='float32', # dtype and shape is not used in fact shape=[0]) # create send_op - send_op = program.global_block().append_op( + program.global_block().append_op( type="send", inputs={"X": send_inputs}, outputs={"Out": send_outputs, @@ -239,23 +242,158 @@ class DistributeTranspiler: if len(splited_var) <= 1: continue orig_param = program.global_block().vars[varname] - concat = program.global_block().append_op( + program.global_block().append_op( type="concat", inputs={"X": splited_var}, outputs={"Out": [orig_param]}, attrs={"axis": 0}) - # step 7 - startup_prog = default_startup_program() - for varname in startup_prog.global_block().vars.keys(): - if varname in param_var_mapping and \ - len(param_var_mapping[varname]) == 1: - new_var_name = "%s.trainer_%d" % \ - (varname, self.trainer_id) - startup_prog.global_block().rename_var(varname, new_var_name) - - def _create_vars_from_blocklist(self, program, block_list): - # Create respective variables using the block_list + def get_trainer_program(self): + # remove optimize ops and add a send op to main_program + self.program.global_block().delete_ops(self.optimize_ops) + return self.program + + def get_pserver_program(self, endpoint): + """ + Get pserver side program using the endpoint. + NOTE: assume blocks of the same variable is not distributed + on the same pserver, only change param/grad varnames for + trainers to fetch. + """ + # step1 + pserver_program = Program() + # step2 + recv_inputs = [] + for v in self.param_grad_ep_mapping[endpoint]["params"]: + self._clone_var(pserver_program.global_block(), v) + for v in self.param_grad_ep_mapping[endpoint]["grads"]: + # create vars for each trainer in global scope, so + # we don't need to create them when grad arrives. + # change client side var name to origin name by + # removing ".trainer_%d" suffix + suff_idx = v.name.find(".trainer_") + if suff_idx >= 0: + orig_var_name = v.name[:suff_idx] + pserver_program.global_block().create_var( + name=orig_var_name, + persistable=True, + dtype=v.dtype, + shape=v.shape) + print("create origin var: ", orig_var_name) + for trainer_id in xrange(self.trainers): + var = pserver_program.global_block().create_var( + name="%s.trainer_%d" % (orig_var_name, trainer_id), + persistable=False, + dtype=v.dtype, + shape=v.shape) + recv_inputs.append(var) + print("create per trainer var: ", var.name) + # step3 + optimize_block = pserver_program.create_block(0) + # step 4 + # Create a union-find data struct from optimize ops, + # If two ops are connected, we could add these two ops + # into one set. + ufind = self._create_ufind(self.optimize_ops) + # step 4.2 + # Iterate through the ops and append optimize op which + # located on current pserver + opt_op_on_pserver = [] + for _, op in enumerate(self.optimize_ops): + if self._is_opt_op(op) and self._is_opt_op_on_pserver(endpoint, op): + opt_op_on_pserver.append(op) + # step 4.3 + # Iterate through the ops, and if an op and the optimize ops + # which located on current pserver are in one set, then + # append it into the sub program. + for _, op in enumerate(self.optimize_ops): + for _, opt_op in enumerate(opt_op_on_pserver): + if ufind.is_connected(op, opt_op): + if self._is_opt_op(op): + self._append_pserver_ops(optimize_block, op, endpoint) + else: + self._append_pserver_non_opt_ops(optimize_block, op) + break + # step5 append the listen_and_serv op + pserver_program.global_block().append_op( + type="listen_and_serv", + inputs={'X': recv_inputs}, + outputs={}, + attrs={ + "OptimizeBlock": optimize_block, + "endpoint": endpoint, + "Fanin": self.trainers + }) + pserver_program.sync_with_cpp() + return pserver_program + + def get_startup_program(self, endpoint, pserver_program): + """ + Get startup program for current parameter server. + Modify operator input variables if there are variables that + were split to several blocks. + """ + s_prog = Program() + orig_s_prog = framework.default_startup_program() + params = self.param_grad_ep_mapping[endpoint]["params"] + + def _get_splited_name_and_shape(varname): + for idx, splited_param in enumerate(params): + pname = splited_param.name + if same_or_split_var(pname, varname) and varname != pname: + return pname, splited_param.shape + return "", [] + + # 1. create vars in pserver program to startup program + pserver_vars = pserver_program.global_block().vars + created_var_map = dict() + for _, var in pserver_vars.iteritems(): + tmpvar = s_prog.global_block().create_var( + name=var.name, + persistable=var.persistable, + dtype=var.dtype, + shape=var.shape) + created_var_map[var.name] = tmpvar + + # 2. rename op outputs + for op in orig_s_prog.global_block().ops: + new_inputs = dict() + new_outputs = dict() + # do not append startup op if var is not on this pserver + op_on_pserver = False + for key in op.output_names: + newname, _ = _get_splited_name_and_shape(op.output(key)[0]) + if newname: + op_on_pserver = True + new_outputs[key] = created_var_map[newname] + elif op.output(key)[0] in pserver_vars: + op_on_pserver = True + new_outputs[key] = pserver_vars[op.output(key)[0]] + + # most startup program ops have no inputs + new_inputs = self._get_input_map_from_op(pserver_vars, op) + + if op_on_pserver: + if op.type in [ + "gaussian_random", "fill_constant", "uniform_random" + ]: + op.attrs["shape"] = new_outputs["Out"].shape + s_prog.global_block().append_op( + type=op.type, + inputs=new_inputs, + outputs=new_outputs, + attrs=op.attrs) + return s_prog + + # ====================== private transpiler functions ===================== + def _create_vars_from_blocklist(self, + program, + block_list, + add_trainer_suffix=False): + """ + NOTE: only grads need to be named for different trainers, use + add_trainer_suffix to rename the grad vars. + """ block_map = dict() var_mapping = dict() for block_str in block_list: @@ -266,12 +404,15 @@ class DistributeTranspiler: for varname, splited in block_map.iteritems(): orig_var = program.global_block().var(varname) if len(splited) == 1: - # rename var to the trainer_id var - new_var_name = "%s.trainer_%d" % \ - (orig_var.name, self.trainer_id) - program.global_block().rename_var(varname, new_var_name) - var_mapping[varname] = \ - [program.global_block().var(new_var_name)] + if add_trainer_suffix: + new_var_name = "%s.trainer_%d" % \ + (orig_var.name, self.trainer_id) + program.global_block().rename_var(varname, new_var_name) + var_mapping[varname] = \ + [program.global_block().var(new_var_name)] + else: + var_mapping[varname] = \ + [program.global_block().var(orig_var.name)] continue var_mapping[varname] = [] @@ -286,10 +427,16 @@ class DistributeTranspiler: splited_shape = [rows] if len(orig_shape) >= 2: splited_shape.extend(orig_shape[1:]) + new_var_name = "" + if add_trainer_suffix: + new_var_name = "%s.block%d.trainer_%d" % \ + (varname, i, self.trainer_id) + else: + new_var_name = "%s.block%d" % \ + (varname, i) var = program.global_block().create_var( - name="%s.block%d.trainer_%d" % - (varname, i, self.trainer_id), - psersistable=False, + name=new_var_name, + persistable=False, dtype=orig_var.dtype, type=orig_var.type, shape=splited_shape) # flattend splited var @@ -305,13 +452,12 @@ class DistributeTranspiler: dtype=var.dtype, type=var.type, lod_level=var.lod_level, - # HACK: let all param in pserver be persistable so the child - # program in recv can get them persistable=True) def _append_split_op(self, program, gradblocks): # Split variables that need to be split and append respective ops - var_mapping = self._create_vars_from_blocklist(program, gradblocks) + var_mapping = self._create_vars_from_blocklist( + program, gradblocks, add_trainer_suffix=True) for varname, splited_vars in var_mapping.iteritems(): # variable that don't need to split have empty splited_vars if len(splited_vars) <= 1: @@ -341,24 +487,6 @@ class DistributeTranspiler: "[LOD_TENSOR, SELECTED_ROWS]") return var_mapping - def get_trainer_program(self): - # remove optimize ops and add a send op to main_program - self.program.global_block().delete_ops(self.optimize_ops) - return self.program - - def _create_var_for_trainers(self, block, var, trainers): - # For each trainer, create the necessary variables - var_list = [] - for i in xrange(trainers): - var_each = block.create_var( - name="%s.trainer_%d" % (var.name, i), - psersistable=var.persistable, - dtype=var.dtype, - type=var.type, - shape=var.shape) - var_list.append(var_each) - return var_list - def _get_optimizer_input_shape(self, op_type, varkey, orig_shape, param_shape): """ @@ -386,6 +514,13 @@ class DistributeTranspiler: pass return orig_shape + def _orig_varname(self, varname): + suff_idx = varname.find(".trainer_") + orig_var_name = "" + if suff_idx >= 0: + orig_var_name = varname[:suff_idx] + return orig_var_name + def _append_pserver_ops(self, optimize_block, opt_op, endpoint): program = optimize_block.program pserver_block = program.global_block() @@ -396,18 +531,23 @@ class DistributeTranspiler: if key == "Grad": grad_block = None for g in self.param_grad_ep_mapping[endpoint]["grads"]: - if same_or_split_var(g.name, opt_op.input(key)[0]): + if same_or_split_var( + self._orig_varname(g.name), opt_op.input(key)[0]): grad_block = g break if not grad_block: # do not append this op if current endpoint # is not dealing with this grad block return - merged_var = pserver_block.vars[grad_block.name] - # append merging ops if trainers > 1 + merged_var = \ + pserver_block.vars[self._orig_varname(grad_block.name)] if self.trainers > 1: - vars2merge = self._create_var_for_trainers( - pserver_block, grad_block, self.trainers) + vars2merge = [] + for i in xrange(self.trainers): + per_trainer_name = "%s.trainer_%d" % \ + (self._orig_varname(grad_block.name), i) + vars2merge.append(pserver_block.vars[per_trainer_name]) + optimize_block.append_op( type="sum", inputs={"X": vars2merge}, @@ -550,76 +690,6 @@ class DistributeTranspiler: return False return False - def get_pserver_program(self, endpoint): - """ - Get pserver side program using the endpoint - - NOTE: assume blocks of the same variable is not distributed - on the same pserver, only change param/grad varnames for - trainers to fetch. For each pserver endpoint, server side - program must be a sub-set of the original optimization program. - """ - # step5 - pserver_program = Program() - recv_inputs = [] - for v in self.param_grad_ep_mapping[endpoint]["params"]: - self._clone_var(pserver_program.global_block(), v) - for v in self.param_grad_ep_mapping[endpoint]["grads"]: - # create vars for each trainer in global scope, so - # we don't need to create them when grad arrives. - pserver_program.global_block().create_var( - name=v.name, persistable=True, dtype=v.dtype, shape=v.shape) - for trainer_id in xrange(self.trainers): - # change client side var name to origin name by - # removing ".trainer_%d" suffix - suff_idx = v.name.find(".trainer_") - if suff_idx >= 0: - orig_var_name = v.name[:suff_idx] - var = pserver_program.global_block().create_var( - name="%s.trainer_%d" % (orig_var_name, trainer_id), - persistable=True, - dtype=v.dtype, - shape=v.shape) - recv_inputs.append(var) - # step6 - optimize_block = pserver_program.create_block(0) - # step 6.1 - # Create a union-find data struct by optimize ops, - # If two ops are connected, we could add these two ops - # into one set. - ufind = self._create_ufind(self.optimize_ops) - # step 6.2 - # Iterate through the ops and append optimize op which - # located on current pserver - opt_op_on_pserver = [] - for _, op in enumerate(self.optimize_ops): - if self._is_opt_op(op) and self._is_opt_op_on_pserver(endpoint, op): - opt_op_on_pserver.append(op) - # step 6.3 - # Iterate through the ops, and if an op and the optimize ops - # which located on current pserver are in one set, then - # append it into the sub program. - for _, op in enumerate(self.optimize_ops): - for _, opt_op in enumerate(opt_op_on_pserver): - if ufind.is_connected(op, opt_op): - if self._is_opt_op(op): - self._append_pserver_ops(optimize_block, op, endpoint) - else: - self._append_pserver_non_opt_ops(optimize_block, op) - break - # Append the listen_and_serv op - pserver_program.global_block().append_op( - type="listen_and_serv", - inputs={'X': recv_inputs}, - outputs={}, - attrs={ - "OptimizeBlock": optimize_block, - "endpoint": endpoint, - "Fanin": self.trainers - }) - pserver_program.sync_with_cpp() - return pserver_program - def _get_input_map_from_op(self, varmap, op): iomap = dict() for key in op.input_names: @@ -643,61 +713,3 @@ class DistributeTranspiler: else: iomap[key] = vars return iomap - - def get_startup_program(self, endpoint, pserver_program): - """ - Get startup program for current parameter server. - Modify operator input variables if there are variables that - were split to several blocks. - """ - s_prog = Program() - orig_s_prog = framework.default_startup_program() - params = self.param_grad_ep_mapping[endpoint]["params"] - - def _get_splited_name_and_shape(varname): - for idx, splited_param in enumerate(params): - pname = splited_param.name - if same_or_split_var(pname, varname) and varname != pname: - return pname, splited_param.shape - return "", [] - - # 1. create vars in pserver program to startup program - pserver_vars = pserver_program.global_block().vars - created_var_map = dict() - for _, var in pserver_vars.iteritems(): - tmpvar = s_prog.global_block().create_var( - name=var.name, - persistable=var.persistable, - dtype=var.dtype, - shape=var.shape) - created_var_map[var.name] = tmpvar - - # 2. rename op outputs - for op in orig_s_prog.global_block().ops: - new_inputs = dict() - new_outputs = dict() - # do not append startup op if var is not on this pserver - op_on_pserver = False - for key in op.output_names: - newname, _ = _get_splited_name_and_shape(op.output(key)[0]) - if newname: - op_on_pserver = True - new_outputs[key] = created_var_map[newname] - elif op.output(key)[0] in pserver_vars: - op_on_pserver = True - new_outputs[key] = pserver_vars[op.output(key)[0]] - - # most startup program ops have no inputs - new_inputs = self._get_input_map_from_op(pserver_vars, op) - - if op_on_pserver: - if op.type in [ - "gaussian_random", "fill_constant", "uniform_random" - ]: - op.attrs["shape"] = new_outputs["Out"].shape - s_prog.global_block().append_op( - type=op.type, - inputs=new_inputs, - outputs=new_outputs, - attrs=op.attrs) - return s_prog -- GitLab From ebb2bcfe0a8098a2c7b5b8646a4ca82cfddc1c30 Mon Sep 17 00:00:00 2001 From: typhoonzero Date: Tue, 13 Feb 2018 14:25:54 +0800 Subject: [PATCH 051/122] remove comments --- paddle/fluid/framework/block_desc.cc | 7 ------- 1 file changed, 7 deletions(-) diff --git a/paddle/fluid/framework/block_desc.cc b/paddle/fluid/framework/block_desc.cc index 11d1fbec4b3..fbedd6c825b 100644 --- a/paddle/fluid/framework/block_desc.cc +++ b/paddle/fluid/framework/block_desc.cc @@ -51,14 +51,7 @@ VarDesc *BlockDesc::RenameVar(const std::string &old_name, auto *var = this->Var(old_name); VarDesc *new_var = new VarDesc(*(var->Proto())); new_var->SetName(new_name); - // new_var->SetShape(var->GetShape()); - // new_var->SetType(var->GetType()); - // new_var->SetDataType(var->GetDataType()); - // new_var->SetLoDLevel(var->GetLoDLevel()); - // new_var->SetPersistable(var->Persistable()); - vars_[new_name].reset(new_var); - // rename inputs and outputs for (const auto &op : ops_) { auto *it = op.get(); -- GitLab From dafc7e3643798a13e32f20ee6c6014cfa40bbe0c Mon Sep 17 00:00:00 2001 From: emailweixu Date: Tue, 13 Feb 2018 09:52:18 -0800 Subject: [PATCH 052/122] Check data format consistency in data_feeder (#8417) --- python/paddle/v2/fluid/data_feeder.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/python/paddle/v2/fluid/data_feeder.py b/python/paddle/v2/fluid/data_feeder.py index f9e2f3e6a28..070bcadd710 100644 --- a/python/paddle/v2/fluid/data_feeder.py +++ b/python/paddle/v2/fluid/data_feeder.py @@ -107,6 +107,9 @@ class DataFeeder(object): dtype=dtype)) for each_sample in iterable: + assert len(each_sample) == len(converter), ( + "The number of fields in data (%s) does not match " + + "len(feed_list) (%s)") % (len(each_sample), len(converter)) for each_converter, each_slot in six.zip(converter, each_sample): each_converter.feed(each_slot) ret_dict = {} -- GitLab From c62ef22da37924d5cc08635b490c86910c474fa6 Mon Sep 17 00:00:00 2001 From: "Yang Yang(Tony)" Date: Tue, 13 Feb 2018 13:50:22 -0800 Subject: [PATCH 053/122] Update parallel_do.md --- doc/design/parallel_do.md | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/doc/design/parallel_do.md b/doc/design/parallel_do.md index 576d30329b6..5b90b507920 100644 --- a/doc/design/parallel_do.md +++ b/doc/design/parallel_do.md @@ -72,10 +72,12 @@ block0 { sgd(w1, w1_grad) } block1 { + parent_block: 0 vars: data, h1, h2, loss ops: fc, fc, softmax } block2 { + parent_block: 1 vars: data_grad, h1_grad, h2_grad, loss_gard, w1_grad, w2_grad ops: softmax_grad, fc_grad @@ -122,6 +124,7 @@ block0 { parallel_do(block1) } block1 { + parent_block: 0 vars: w1, w2 ops: init(w1), init(w2) } @@ -137,16 +140,19 @@ block0 { } block1 { + parent_block: 0 vars: data, h1, h2, loss ops: fc, fc, softmax } block2 { + parent_block: 1 vars: data_grad, h1_grad, h2_grad, loss_gard, w1_grad, w2_grad ops: softmax_grad, fc_grad, allreduce(places, scopes, w1_grad), fc_grad, allreduce(places, scopes, w2_grad) } block3 { + parent_block: 0 vars: lr ops: sgd(w2, w2_grad), sgd(w1, w1_grad) -- GitLab From 87f4311a88694284d95e81460a5adeda47e4367d Mon Sep 17 00:00:00 2001 From: "Yang Yang(Tony)" Date: Tue, 13 Feb 2018 14:05:33 -0800 Subject: [PATCH 054/122] compile with nccl2 (#8411) * compile with nccl2 * add ncclGroup; it is necessary in nccl2 * add back libnccl-dev --- CMakeLists.txt | 1 - paddle/fluid/platform/CMakeLists.txt | 2 +- paddle/fluid/platform/dynload/CMakeLists.txt | 2 +- paddle/fluid/platform/nccl_test.cu | 2 ++ paddle/scripts/docker/build.sh | 5 ++++- 5 files changed, 8 insertions(+), 4 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index fb91e3b369c..5db5c228be2 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -142,7 +142,6 @@ include(external/boost) # download boost include(external/any) # download libn::any include(external/eigen) # download eigen3 include(external/pybind11) # download pybind11 -include(external/nccl) include(external/cares) include(external/grpc) diff --git a/paddle/fluid/platform/CMakeLists.txt b/paddle/fluid/platform/CMakeLists.txt index 32e768fdf44..0d0cee21d14 100644 --- a/paddle/fluid/platform/CMakeLists.txt +++ b/paddle/fluid/platform/CMakeLists.txt @@ -1,5 +1,5 @@ if(WITH_GPU) - cc_library(enforce SRCS enforce.cc DEPS nccl) + cc_library(enforce SRCS enforce.cc DEPS) else() cc_library(enforce SRCS enforce.cc) endif() diff --git a/paddle/fluid/platform/dynload/CMakeLists.txt b/paddle/fluid/platform/dynload/CMakeLists.txt index cf2081b4349..264b4ebf2c0 100644 --- a/paddle/fluid/platform/dynload/CMakeLists.txt +++ b/paddle/fluid/platform/dynload/CMakeLists.txt @@ -1,4 +1,4 @@ cc_library(dynamic_loader SRCS dynamic_loader.cc DEPS glog gflags enforce) nv_library(dynload_cuda SRCS cublas.cc cudnn.cc curand.cc nccl.cc - DEPS dynamic_loader nccl) + DEPS dynamic_loader) cc_library(dynload_warpctc SRCS warpctc.cc DEPS dynamic_loader warpctc) diff --git a/paddle/fluid/platform/nccl_test.cu b/paddle/fluid/platform/nccl_test.cu index 71230353633..212ea8517e8 100644 --- a/paddle/fluid/platform/nccl_test.cu +++ b/paddle/fluid/platform/nccl_test.cu @@ -89,6 +89,7 @@ TEST(NCCL, all_reduce) { VLOG(1) << "Invoking ncclAllReduce"; + dynload::ncclGroupStart(); for (int i = 0; i < dev_count; ++i) { VLOG(1) << "Invoking ncclAllReduce with device " << i; SetDeviceId(i); @@ -97,6 +98,7 @@ TEST(NCCL, all_reduce) { ncclSum, comms[i], data[i]->dev_ctx.stream())); VLOG(1) << "Invoked ncclAllReduce for device " << i; } + dynload::ncclGroupEnd(); VLOG(1) << "Invoked ncclAllReduce"; diff --git a/paddle/scripts/docker/build.sh b/paddle/scripts/docker/build.sh index 442a7ea8830..56fa1387861 100644 --- a/paddle/scripts/docker/build.sh +++ b/paddle/scripts/docker/build.sh @@ -34,6 +34,7 @@ function cmake_gen() { Configuring cmake in /paddle/build ... -DCMAKE_BUILD_TYPE=${CMAKE_BUILD_TYPE:-Release} ${PYTHON_FLAGS} + -DWITH_DSO=ON -DWITH_DOC=OFF -DWITH_GPU=${WITH_GPU:-OFF} -DWITH_DISTRIBUTE=${WITH_DISTRIBUTE:-OFF} @@ -57,6 +58,7 @@ EOF cmake .. \ -DCMAKE_BUILD_TYPE=${CMAKE_BUILD_TYPE:-Release} \ ${PYTHON_FLAGS} \ + -DWITH_DSO=ON \ -DWITH_DOC=OFF \ -DWITH_GPU=${WITH_GPU:-OFF} \ -DWITH_DISTRIBUTE=${WITH_DISTRIBUTE:-OFF} \ @@ -171,7 +173,7 @@ EOF if [[ ${WITH_GPU} == "ON" ]]; then NCCL_DEPS="apt-get install -y libnccl-dev &&" else - NCCL_DEPS="" + NCCL_DEPS="" fi cat >> /paddle/build/Dockerfile < Date: Tue, 13 Feb 2018 22:09:05 +0000 Subject: [PATCH 055/122] pass compile --- paddle/fluid/framework/executor.cc | 2 +- paddle/fluid/operators/nccl_op.cc | 2 +- python/paddle/v2/fluid/backward.py | 27 +++++++++++++++------------ 3 files changed, 17 insertions(+), 14 deletions(-) diff --git a/paddle/fluid/framework/executor.cc b/paddle/fluid/framework/executor.cc index 1d7eccbc650..92b32b04d6b 100644 --- a/paddle/fluid/framework/executor.cc +++ b/paddle/fluid/framework/executor.cc @@ -55,7 +55,7 @@ static void CreateTensor(Variable* var, proto::VarType::Type var_type) { var->GetMutable(); } else if (var_type == proto::VarType::READER) { var->GetMutable(); - } else if (var_type == proto::VarDesc::NCCL_COM) { + } else if (var_type == proto::VarType::NCCL_COM) { // GetMutable will be called in ncclInit } else { PADDLE_THROW( diff --git a/paddle/fluid/operators/nccl_op.cc b/paddle/fluid/operators/nccl_op.cc index f61b5003bde..0994bba782b 100644 --- a/paddle/fluid/operators/nccl_op.cc +++ b/paddle/fluid/operators/nccl_op.cc @@ -65,7 +65,7 @@ class NCCLInitOpVarTypeInference : public framework::VarTypeInference { framework::BlockDesc *block) const override { auto out_var_name = op_desc.Output("Communicator").front(); auto &out_var = block->FindRecursiveOrCreateVar(out_var_name); - auto var_type = framework::proto::VarDesc::NCCL_COM; + auto var_type = framework::proto::VarType::NCCL_COM; out_var.SetType(var_type); } }; diff --git a/python/paddle/v2/fluid/backward.py b/python/paddle/v2/fluid/backward.py index cf32c6683b4..682df3301b6 100644 --- a/python/paddle/v2/fluid/backward.py +++ b/python/paddle/v2/fluid/backward.py @@ -269,7 +269,7 @@ def _append_backward_ops_(block, target_block, no_grad_dict, grad_to_var, - callback=None): + callbacks=None): """ Create all grad ops, and insert them into given block @@ -285,14 +285,13 @@ def _append_backward_ops_(block, val(str): corresponding forward variable name callback(callable object): a callable object used to decorate new generated grad ops """ - if callback is None: - - def empty_callback(block, context): - pass - - callback = empty_callback - elif not hasattr(callback, '__call__'): - raise ValueError("'callback' must be a callable object.") + if callbacks is None: + callbacks = [] + else: + assert (isinstance(callbacks, list)) + for cb in callbacks: + if not hasattr(cb, '__call__'): + raise ValueError("'callback' must be a callable object.") # grad_op_descs holds created grad_op, and will be appended to target_block grad_op_descs = [] @@ -303,9 +302,12 @@ def _append_backward_ops_(block, if op.has_attr("sub_block"): sub_block = program.block(op.block_attr("sub_block")) grad_sub_block = program.create_block(parent_idx=sub_block.idx) + if callbacks is None: + callbacks = [_callback_lookup_(op)] + else: + callbacks.append(_callback_lookup_(op)) _append_backward_ops_(sub_block, sub_block.ops, grad_sub_block, - no_grad_dict, grad_to_var, - _callback_lookup_(op)) + no_grad_dict, grad_to_var, callbacks) grad_sub_block_list.append(grad_sub_block.desc) # Getting op's corresponding grad_op @@ -325,7 +327,8 @@ def _append_backward_ops_(block, new_op_desc = target_block.desc.append_op() new_op_desc.copy_from(op_desc) grad_to_var["__current_op_desc__"] = new_op_desc - callback(block=target_block, context=grad_to_var) + for cb in callbacks: + cb(block=target_block, context=grad_to_var) def _append_backward_vars_(block, start_op_idx, grad_to_var, grad_info_map): -- GitLab From 00dff47cfa9a97db3b119b75fc43067f5e8dae38 Mon Sep 17 00:00:00 2001 From: Yang Yang Date: Tue, 13 Feb 2018 22:52:02 +0000 Subject: [PATCH 056/122] temp --- temp | 1 + 1 file changed, 1 insertion(+) create mode 100644 temp diff --git a/temp b/temp new file mode 100644 index 00000000000..9daeafb9864 --- /dev/null +++ b/temp @@ -0,0 +1 @@ +test -- GitLab From 0717ff8b900ce2a249c3b8178269bd7a0f8a142a Mon Sep 17 00:00:00 2001 From: Yang Yang Date: Wed, 14 Feb 2018 00:52:53 +0000 Subject: [PATCH 057/122] make boost library hosted on our server --- cmake/external/boost.cmake | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/cmake/external/boost.cmake b/cmake/external/boost.cmake index 9e135b2c0e6..906bed2f04c 100644 --- a/cmake/external/boost.cmake +++ b/cmake/external/boost.cmake @@ -17,7 +17,7 @@ include(ExternalProject) set(BOOST_PROJECT "extern_boost") set(BOOST_VER "1.41.0") set(BOOST_TAR "boost_1_41_0") -set(BOOST_URL "http://sourceforge.net/projects/boost/files/boost/${BOOST_VER}/${BOOST_TAR}.tar.gz") +set(BOOST_URL "http://paddlepaddledeps.s3-website-us-west-1.amazonaws.com/${BOOST_TAR}.tar.gz") set(BOOST_SOURCES_DIR ${THIRD_PARTY_PATH}/boost) set(BOOST_DOWNLOAD_DIR "${BOOST_SOURCES_DIR}/src/${BOOST_PROJECT}") set(BOOST_INCLUDE_DIR "${BOOST_DOWNLOAD_DIR}/${BOOST_TAR}" CACHE PATH "boost include directory." FORCE) -- GitLab From 481bd3c2de5f3cf9fea7f167b4df663fd568fb95 Mon Sep 17 00:00:00 2001 From: Yang Yang Date: Wed, 14 Feb 2018 00:54:42 +0000 Subject: [PATCH 058/122] clean up --- temp | 1 - 1 file changed, 1 deletion(-) delete mode 100644 temp diff --git a/temp b/temp deleted file mode 100644 index 9daeafb9864..00000000000 --- a/temp +++ /dev/null @@ -1 +0,0 @@ -test -- GitLab From 16a8def1cda1a46ed772d5e37e5f679822f55436 Mon Sep 17 00:00:00 2001 From: Yang Yang Date: Wed, 14 Feb 2018 01:50:39 +0000 Subject: [PATCH 059/122] fix style --- doc/design/parallel_do.md | 2 -- 1 file changed, 2 deletions(-) diff --git a/doc/design/parallel_do.md b/doc/design/parallel_do.md index 5b90b507920..d51b1014d4a 100644 --- a/doc/design/parallel_do.md +++ b/doc/design/parallel_do.md @@ -159,5 +159,3 @@ block3 { } } ``` - - -- GitLab From cfffb1a36251e7d06535dac6db220131e36fe9f8 Mon Sep 17 00:00:00 2001 From: Yi Wang Date: Wed, 14 Feb 2018 10:32:46 -0800 Subject: [PATCH 060/122] Update tensor_util.h (#8422) * Update tensor_util.h * Update with moved TensorDesc * Fix tensur_utils.cu * Update * Update * Update * Update * Make tensor_util.cu a symbolic link --- .../fluid/framework/data_device_transform.cc | 2 +- .../framework/data_device_transform_test.cu | 4 +- paddle/fluid/framework/executor.cc | 6 +- paddle/fluid/framework/lod_tensor.cc | 12 +- paddle/fluid/framework/lod_tensor.h | 4 +- paddle/fluid/framework/mixed_vector.h | 12 +- paddle/fluid/framework/reader.cc | 2 +- paddle/fluid/framework/selected_rows.cc | 4 +- paddle/fluid/framework/tensor_util.cc | 198 ++++++++++++- paddle/fluid/framework/tensor_util.cu | 120 +------- paddle/fluid/framework/tensor_util.h | 261 ++---------------- paddle/fluid/framework/tensor_util_test.cc | 65 ++--- paddle/fluid/framework/tensor_util_test.cu | 8 +- paddle/fluid/framework/threadpool.h | 2 +- paddle/fluid/operators/array_operator.h | 2 +- .../fluid/operators/array_to_lod_tensor_op.cc | 4 +- paddle/fluid/operators/assign_op.cc | 4 +- paddle/fluid/operators/assign_value_op.h | 2 +- .../fluid/operators/beam_search_decode_op.h | 4 +- paddle/fluid/operators/detection_output_op.h | 34 +-- paddle/fluid/operators/expand_op.h | 3 +- paddle/fluid/operators/feed_op.cc | 2 +- paddle/fluid/operators/fetch_op.cc | 2 +- paddle/fluid/operators/fill_op.cc | 2 +- paddle/fluid/operators/layer_norm_op.h | 4 +- paddle/fluid/operators/load_combine_op.cc | 2 +- paddle/fluid/operators/load_op.cc | 2 +- paddle/fluid/operators/lod_reset_op.h | 4 +- .../fluid/operators/lod_tensor_to_array_op.cc | 6 +- paddle/fluid/operators/math/context_project.h | 6 +- paddle/fluid/operators/math/im2col_test.cc | 14 +- .../operators/math/math_function_test.cu | 36 +-- .../math/selected_rows_functor_test.cu | 8 +- .../fluid/operators/math/sequence_padding.cu | 4 +- .../operators/math/sequence_padding_test.cc | 4 +- paddle/fluid/operators/math/vol2col_test.cc | 8 +- paddle/fluid/operators/merge_lod_tensor_op.cc | 7 +- .../fluid/operators/mine_hard_examples_op.cc | 3 +- paddle/fluid/operators/multiplex_op.cu | 4 +- paddle/fluid/operators/nccl_op_test.cu.cc | 2 +- paddle/fluid/operators/parallel_do_op.cc | 6 +- paddle/fluid/operators/print_op.cc | 2 +- paddle/fluid/operators/recurrent_op.cc | 8 +- .../reorder_lod_tensor_by_rank_op.cc | 2 +- paddle/fluid/operators/reshape_op.h | 4 +- paddle/fluid/operators/sequence_reshape_op.h | 4 +- paddle/fluid/operators/sequence_slice_op.h | 16 +- .../fluid/operators/shrink_rnn_memory_op.cc | 2 +- paddle/fluid/operators/split_lod_tensor_op.cc | 9 +- paddle/fluid/operators/sum_op.h | 4 +- .../operators/tensor_array_read_write_op.cc | 4 +- paddle/fluid/operators/warpctc_op.h | 5 +- paddle/fluid/pybind/tensor_py.h | 6 +- 53 files changed, 411 insertions(+), 534 deletions(-) mode change 100644 => 120000 paddle/fluid/framework/tensor_util.cu diff --git a/paddle/fluid/framework/data_device_transform.cc b/paddle/fluid/framework/data_device_transform.cc index 728a2fb6f33..85dbb39e6fb 100644 --- a/paddle/fluid/framework/data_device_transform.cc +++ b/paddle/fluid/framework/data_device_transform.cc @@ -37,7 +37,7 @@ void TransDataDevice(const Tensor& in, const platform::Place& dst_place, << " dst_place: " << dst_place; auto* dev_ctx = GetDeviceContext(in.place(), dst_place); dev_ctx->Wait(); - Copy(in, dst_place, *dev_ctx, out); + TensorCopy(in, dst_place, *dev_ctx, out); dev_ctx->Wait(); } diff --git a/paddle/fluid/framework/data_device_transform_test.cu b/paddle/fluid/framework/data_device_transform_test.cu index c9ba0711755..db6687985df 100644 --- a/paddle/fluid/framework/data_device_transform_test.cu +++ b/paddle/fluid/framework/data_device_transform_test.cu @@ -157,8 +157,8 @@ TEST(Operator, CPUtoGPU) { auto dev_ctx = pool.Get(cuda_place); paddle::framework::Tensor output_tensor; - Copy(output2->Get(), paddle::platform::CPUPlace(), *dev_ctx, - &output_tensor); + TensorCopy(output2->Get(), paddle::platform::CPUPlace(), *dev_ctx, + &output_tensor); dev_ctx->Wait(); float* output2_ptr = output_tensor.data(); diff --git a/paddle/fluid/framework/executor.cc b/paddle/fluid/framework/executor.cc index ebfd54fdc55..23eeb276c07 100644 --- a/paddle/fluid/framework/executor.cc +++ b/paddle/fluid/framework/executor.cc @@ -73,8 +73,10 @@ static void CheckTensorNANOrInf(const std::string& name, tensor.type().hash_code() != typeid(double).hash_code()) { return; } - PADDLE_ENFORCE(!framework::HasInf(tensor), "Tensor %s has Inf", name); - PADDLE_ENFORCE(!framework::HasNAN(tensor), "Tensor %s has NAN", name); + PADDLE_ENFORCE(!framework::TensorContainsInf(tensor), + "Tensor %s contains Inf", name); + PADDLE_ENFORCE(!framework::TensorContainsNAN(tensor), + "Tensor %s contains NAN", name); } void Executor::Run(const ProgramDesc& pdesc, Scope* scope, int block_id, diff --git a/paddle/fluid/framework/lod_tensor.cc b/paddle/fluid/framework/lod_tensor.cc index 89768bcfd51..4cf14c8da54 100644 --- a/paddle/fluid/framework/lod_tensor.cc +++ b/paddle/fluid/framework/lod_tensor.cc @@ -46,7 +46,7 @@ std::ostream &operator<<(std::ostream &os, const LoDTensor &t) { if (!platform::is_cpu_place(t.place())) { LoDTensor tt; - framework::Copy(t, platform::CPUPlace(), &tt); + framework::TensorCopy(t, platform::CPUPlace(), &tt); platform::DeviceContextPool &pool = platform::DeviceContextPool::Instance(); auto &dev_ctx = *pool.Get(t.place()); dev_ctx.Wait(); @@ -255,7 +255,7 @@ void SerializeToStream(std::ostream &os, const LoDTensor &tensor, } } // the 3st field, Tensor - SerializeToStream(os, static_cast(tensor), dev_ctx); + TensorToStream(os, static_cast(tensor), dev_ctx); } void DeserializeFromStream(std::istream &is, LoDTensor *tensor, @@ -282,7 +282,7 @@ void DeserializeFromStream(std::istream &is, LoDTensor *tensor, } } // the 3st filed, Tensor - DeserializeFromStream(is, static_cast(tensor), dev_ctx); + TensorFromStream(is, static_cast(tensor), dev_ctx); } std::vector LoDTensor::SplitLoDTensor( @@ -308,14 +308,14 @@ std::vector LoDTensor::SplitLoDTensor( if (lod().empty()) { auto src = Slice(begin, end); auto &dst_place = places[i]; - framework::Copy(src, dst_place, &dst); + framework::TensorCopy(src, dst_place, &dst); } else { auto lod_and_offset = GetSubLoDAndAbsoluteOffset(lod(), begin, end, 0); auto &offset = lod_and_offset.second; auto src = Slice(offset.first, offset.second); auto &dst_place = places[i]; - framework::Copy(src, dst_place, &dst); + framework::TensorCopy(src, dst_place, &dst); LoD my_lod; for (auto &l : lod_and_offset.first) { @@ -369,7 +369,7 @@ void LoDTensor::MergeLoDTensor( for (auto *src : lod_tensors) { int end = begin + src->dims()[0]; auto dst = Slice(begin, end); - framework::Copy(*src, dst_place, &dst); + framework::TensorCopy(*src, dst_place, &dst); begin = end; } } diff --git a/paddle/fluid/framework/lod_tensor.h b/paddle/fluid/framework/lod_tensor.h index 948389afb66..94d5a6e9fd9 100644 --- a/paddle/fluid/framework/lod_tensor.h +++ b/paddle/fluid/framework/lod_tensor.h @@ -175,8 +175,8 @@ LoDTensor LodExpand(const LoDTensor& source, const LoD& lod, size_t level, for (size_t ins = 0; ins < num_instances; ins++) { for (size_t elem = lod_level[ins]; elem < lod_level[ins + 1]; elem++) { auto slice = tensor.Slice(elem, elem + 1); - Copy(source.Slice(ins, ins + 1), platform::CPUPlace(), - platform::CPUDeviceContext(), &slice); + TensorCopy(source.Slice(ins, ins + 1), platform::CPUPlace(), + platform::CPUDeviceContext(), &slice); } } return tensor; diff --git a/paddle/fluid/framework/mixed_vector.h b/paddle/fluid/framework/mixed_vector.h index c1a89a1261c..6a6fa538718 100644 --- a/paddle/fluid/framework/mixed_vector.h +++ b/paddle/fluid/framework/mixed_vector.h @@ -291,7 +291,7 @@ class Vector { void CopyToCPU() const { // COPY GPU Data To CPU - Copy(cuda_vec_, platform::CPUPlace(), &cpu_vec_); + TensorCopy(cuda_vec_, platform::CPUPlace(), &cpu_vec_); WaitPlace(cuda_vec_.place()); } @@ -305,13 +305,14 @@ class Vector { void ImmutableCUDA(platform::Place place) const { if (IsDirty()) { if (IsInCPU()) { - Copy(cpu_vec_, boost::get(place), &cuda_vec_); + TensorCopy(cpu_vec_, boost::get(place), + &cuda_vec_); WaitPlace(place); UnsetFlag(kDirty); SetFlag(kDataInCUDA); } else if (IsInCUDA() && !(place == cuda_vec_.place())) { framework::Tensor tmp; - Copy(cuda_vec_, boost::get(place), &tmp); + TensorCopy(cuda_vec_, boost::get(place), &tmp); WaitPlace(cuda_vec_.place()); cuda_vec_.ShareDataWith(tmp); // Still dirty @@ -322,13 +323,14 @@ class Vector { } else { if (!IsInCUDA()) { // Even data is not dirty. However, data is not in CUDA. Copy data. - Copy(cpu_vec_, boost::get(place), &cuda_vec_); + TensorCopy(cpu_vec_, boost::get(place), + &cuda_vec_); WaitPlace(place); SetFlag(kDataInCUDA); } else if (!(place == cuda_vec_.place())) { framework::Tensor tmp; WaitPlace(cuda_vec_.place()); - Copy(cuda_vec_, boost::get(place), &tmp); + TensorCopy(cuda_vec_, boost::get(place), &tmp); WaitPlace(cuda_vec_.place()); WaitPlace(place); cuda_vec_.ShareDataWith(tmp); diff --git a/paddle/fluid/framework/reader.cc b/paddle/fluid/framework/reader.cc index 1ef0c482111..dc1caa72a4c 100644 --- a/paddle/fluid/framework/reader.cc +++ b/paddle/fluid/framework/reader.cc @@ -105,7 +105,7 @@ void BatchReader::ReadNext(std::vector* out) { } } Tensor dst = out_tensor.Slice(dst_offset, dst_offset + ins_shape[0]); - Copy(buffer_[i][j], platform::CPUPlace(), &dst); + TensorCopy(buffer_[i][j], platform::CPUPlace(), &dst); dst_offset += ins_shape[0]; } out_tensor.set_lod(batch_lod); diff --git a/paddle/fluid/framework/selected_rows.cc b/paddle/fluid/framework/selected_rows.cc index 08c319002d1..504344e937d 100644 --- a/paddle/fluid/framework/selected_rows.cc +++ b/paddle/fluid/framework/selected_rows.cc @@ -34,7 +34,7 @@ void SerializeToStream(std::ostream& os, const SelectedRows& selected_rows, os.write(reinterpret_cast(&height), sizeof(height)); } // the 4st field, Tensor data - SerializeToStream(os, selected_rows.value(), dev_ctx); + TensorToStream(os, selected_rows.value(), dev_ctx); } void DeserializeFromStream(std::istream& is, SelectedRows* selected_rows, @@ -62,7 +62,7 @@ void DeserializeFromStream(std::istream& is, SelectedRows* selected_rows, selected_rows->set_height(height); } // the 4st field, tensor which contains the data - DeserializeFromStream(is, selected_rows->mutable_value(), dev_ctx); + TensorFromStream(is, selected_rows->mutable_value(), dev_ctx); } } // namespace framework diff --git a/paddle/fluid/framework/tensor_util.cc b/paddle/fluid/framework/tensor_util.cc index 537fb4614ca..9b465b85b0a 100644 --- a/paddle/fluid/framework/tensor_util.cc +++ b/paddle/fluid/framework/tensor_util.cc @@ -16,6 +16,76 @@ namespace paddle { namespace framework { + +void TensorCopy(const Tensor& src, const platform::Place& dst_place, + const platform::DeviceContext& ctx, Tensor* dst) { + VLOG(3) << "TensorCopy " << src.dims() << " from " << src.place() << " to " + << dst_place; + src.check_memory_size(); + + dst->Resize(src.dims()); + dst->set_layout(src.layout()); + auto src_place = src.place(); + auto src_ptr = src.data(); + + auto dst_ptr = dst->mutable_data(dst_place, src.type()); + + auto size = src.numel() * SizeOfType(src.type()); + + if (platform::is_cpu_place(src_place) && platform::is_cpu_place(dst_place)) { + memory::Copy(boost::get(dst_place), dst_ptr, + boost::get(src_place), src_ptr, size); + } +#ifdef PADDLE_WITH_CUDA + else if (platform::is_gpu_place(src_place) && // NOLINT + platform::is_cpu_place(dst_place)) { + auto src_gpu_place = boost::get(src_place); + auto dst_cpu_place = boost::get(dst_place); + auto ctx_place = ctx.GetPlace(); + PADDLE_ENFORCE(platform::is_gpu_place(ctx_place)); + auto ctx_gpu_place = boost::get(ctx_place); + PADDLE_ENFORCE_EQ(src_gpu_place, ctx_gpu_place); + memory::Copy( + dst_cpu_place, dst_ptr, src_gpu_place, src_ptr, size, + reinterpret_cast(ctx).stream()); + } else if (platform::is_cpu_place(src_place) && + platform::is_gpu_place(dst_place)) { + auto src_cpu_place = boost::get(src_place); + auto dst_gpu_place = boost::get(dst_place); + auto ctx_place = ctx.GetPlace(); + PADDLE_ENFORCE(platform::is_gpu_place(ctx_place)); + auto ctx_gpu_place = boost::get(ctx_place); + PADDLE_ENFORCE_EQ(dst_gpu_place, ctx_gpu_place); + memory::Copy( + dst_gpu_place, dst_ptr, src_cpu_place, src_ptr, size, + reinterpret_cast(ctx).stream()); + } else if (platform::is_gpu_place(src_place) && + platform::is_gpu_place(dst_place)) { + auto src_gpu_place = boost::get(src_place); + auto dst_gpu_place = boost::get(dst_place); + auto ctx_place = ctx.GetPlace(); + PADDLE_ENFORCE(platform::is_gpu_place(ctx_place)); + auto ctx_gpu_place = boost::get(ctx_place); + PADDLE_ENFORCE_EQ(src_gpu_place, ctx_gpu_place); + memory::Copy( + dst_gpu_place, dst_ptr, src_gpu_place, src_ptr, size, + reinterpret_cast(ctx).stream()); + } +#endif +} + +void TensorCopy(const Tensor& src, const platform::Place& dst_place, + Tensor* dst) { + platform::DeviceContextPool& pool = platform::DeviceContextPool::Instance(); + const platform::DeviceContext* dev_ctx; + if (platform::is_gpu_place(src.place())) { + dev_ctx = pool.Get(src.place()); + } else { + dev_ctx = pool.Get(dst_place); + } + TensorCopy(src, dst_place, *dev_ctx, dst); +} + template struct AnyDTypeVisitor { Predicate predicate_; @@ -69,7 +139,7 @@ struct AnyVisitor : public boost::static_visitor { tmp.mutable_data(cpu); auto gpuctx = platform::DeviceContextPool::Instance().Get(gpu); gpuctx->Wait(); - Copy(out, cpu, *gpuctx, &tmp); + TensorCopy(out, cpu, *gpuctx, &tmp); gpuctx->Wait(); return GetResult(tmp, cpu); } @@ -87,7 +157,7 @@ inline bool Any(const framework::Tensor& tensor, Predicate predicate) { return platform::VisitPlace(place, visitor); } -struct HasNANPredicate { +struct ContainsNANPredicate { template auto operator()(const T& eigen_vec) const -> decltype(std::declval().isnan()) { @@ -96,12 +166,12 @@ struct HasNANPredicate { } }; -bool HasNAN(const framework::Tensor& tensor) { - HasNANPredicate predicate; +bool TensorContainsNAN(const framework::Tensor& tensor) { + ContainsNANPredicate predicate; return Any(tensor, predicate); } -struct HasInfPredicate { +struct ContainsInfPredicate { template auto operator()(const T& eigen_vec) const -> decltype(std::declval().isinf()) { @@ -110,10 +180,124 @@ struct HasInfPredicate { } }; -bool HasInf(const framework::Tensor& tensor) { - HasInfPredicate predicate; +bool TensorContainsInf(const framework::Tensor& tensor) { + ContainsInfPredicate predicate; return Any(tensor, predicate); } +void TensorToStream(std::ostream& os, const Tensor& tensor, + const platform::DeviceContext& dev_ctx) { + // TODO(typhoonzero): serialize to ostream + { // the 1st field, uint32_t version + constexpr uint32_t version = 0; + os.write(reinterpret_cast(&version), sizeof(version)); + } + { // the 2nd field, tensor description + // int32_t size + // void* protobuf message + proto::VarType::TensorDesc desc; + desc.set_data_type(framework::ToDataType(tensor.type())); + auto dims = framework::vectorize(tensor.dims()); + auto* pb_dims = desc.mutable_dims(); + pb_dims->Resize(static_cast(dims.size()), 0); + std::copy(dims.begin(), dims.end(), pb_dims->begin()); + int32_t size = desc.ByteSize(); + os.write(reinterpret_cast(&size), sizeof(size)); + auto out = desc.SerializeAsString(); + os.write(out.data(), size); + } + { // the 3rd field, tensor data + uint64_t size = tensor.memory_size(); + auto* data_ptr = tensor.data(); + PADDLE_ENFORCE(size < std::numeric_limits::max(), + "Index overflow when writing tensor"); + if (platform::is_gpu_place(tensor.place())) { +#ifdef PADDLE_WITH_CUDA + constexpr size_t kBufSize = 1024 * 1024 * 64; // 64MB + std::unique_ptr buf(new char[kBufSize]); + auto& gpu_dev_ctx = + static_cast(dev_ctx); + platform::CPUPlace cpu; + uintptr_t data = reinterpret_cast(data_ptr); + while (size != 0) { + size_t size_to_write = std::min(kBufSize, static_cast(size)); + memory::Copy(cpu, buf.get(), + boost::get(tensor.place()), + reinterpret_cast(data), size_to_write, + gpu_dev_ctx.stream()); + gpu_dev_ctx.Wait(); + os.write(buf.get(), size_to_write); + data += size_to_write; + size -= size_to_write; + } +#else + PADDLE_THROW("Unexpected branch"); +#endif + } else { + os.write(static_cast(data_ptr), + static_cast(size)); + } + } +} + +struct DeserializedDataFunctor { + DeserializedDataFunctor(void** buf, Tensor* tensor, + const platform::Place& place) + : buf_(buf), tensor_(tensor), place_(place) {} + + template + void operator()() { + *buf_ = tensor_->mutable_data(place_); + } + + void** buf_; + Tensor* tensor_; + platform::Place place_; +}; + +void TensorFromStream(std::istream& is, Tensor* tensor, + const platform::DeviceContext& dev_ctx) { + uint32_t version; + is.read(reinterpret_cast(&version), sizeof(version)); + PADDLE_ENFORCE_EQ(version, 0U, "Only version 0 is supported"); + proto::VarType::TensorDesc desc; + { // int32_t size + // proto buffer + int32_t size; + is.read(reinterpret_cast(&size), sizeof(size)); + std::unique_ptr buf(new char[size]); + is.read(reinterpret_cast(buf.get()), size); + PADDLE_ENFORCE(desc.ParseFromArray(buf.get(), size), + "Cannot parse tensor desc"); + } + { // read tensor + std::vector dims; + dims.reserve(static_cast(desc.dims().size())); + std::copy(desc.dims().begin(), desc.dims().end(), std::back_inserter(dims)); + tensor->Resize(framework::make_ddim(dims)); + void* buf; + auto ctx = platform::CPUDeviceContext(); + if (platform::is_gpu_place(dev_ctx.GetPlace())) { +#ifdef PADDLE_WITH_CUDA + Tensor cpu_tensor; + cpu_tensor.Resize(framework::make_ddim(dims)); + framework::VisitDataType( + desc.data_type(), + DeserializedDataFunctor(&buf, &cpu_tensor, ctx.GetPlace())); + is.read(static_cast(buf), cpu_tensor.memory_size()); + auto dst_place = dev_ctx.GetPlace(); + framework::TensorCopy(cpu_tensor, dst_place, dev_ctx, tensor); +#else + PADDLE_THROW("Unexpected branch"); +#endif + } else { + framework::VisitDataType( + desc.data_type(), + DeserializedDataFunctor(&buf, tensor, ctx.GetPlace())); + is.read(static_cast(buf), tensor->memory_size()); + } + } +} + } // namespace framework } // namespace paddle diff --git a/paddle/fluid/framework/tensor_util.cu b/paddle/fluid/framework/tensor_util.cu deleted file mode 100644 index 537fb4614ca..00000000000 --- a/paddle/fluid/framework/tensor_util.cu +++ /dev/null @@ -1,119 +0,0 @@ -/* Copyright (c) 2016 PaddlePaddle Authors. All Rights Reserved. - - Licensed under the Apache License, Version 2.0 (the "License"); - you may not use this file except in compliance with the License. - You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - - Unless required by applicable law or agreed to in writing, software - distributed under the License is distributed on an "AS IS" BASIS, - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - See the License for the specific language governing permissions and - limitations under the License. */ - -#include "paddle/fluid/framework/tensor_util.h" - -namespace paddle { -namespace framework { -template -struct AnyDTypeVisitor { - Predicate predicate_; - const Tensor& tensor_; - const DevCtx& ctx_; - Tensor* out_; - - AnyDTypeVisitor(Predicate predicate, const Tensor& tensor, const DevCtx& ctx, - Tensor* out) - : predicate_(predicate), tensor_(tensor), ctx_(ctx), out_(out) {} - - template - void operator()() const { - auto t = EigenVector::Flatten(tensor_); - auto o = EigenScalar::From(*out_); - // return any of predicate_(t) is true. - o.device(*ctx_.eigen_device()) = predicate_(t).any(); - } -}; - -template -inline void AnyImpl(Predicate predicate, const framework::Tensor& tensor, - const DevCtx& ctx, framework::Tensor* out) { - VisitDataType(ToDataType(tensor.type()), AnyDTypeVisitor( - predicate, tensor, ctx, out)); -} - -template -struct AnyVisitor : public boost::static_visitor { - const framework::Tensor& tensor_; - Predicate predicate_; - - AnyVisitor(const framework::Tensor& tensor, Predicate predicate) - : tensor_(tensor), predicate_(std::move(predicate)) {} - - template - bool operator()(const Place& place) const { - framework::Tensor out; - out.Resize({1}); - out.mutable_data(place); - auto* ctx = platform::DeviceContextPool::Instance().GetByPlace(place); - AnyImpl(predicate_, tensor_, *ctx, &out); - return this->GetResult(out, place); - } - - bool GetResult(const framework::Tensor& out, - const platform::CUDAPlace& gpu) const { - platform::CPUPlace cpu; - framework::Tensor tmp; - tmp.Resize({1}); - tmp.mutable_data(cpu); - auto gpuctx = platform::DeviceContextPool::Instance().Get(gpu); - gpuctx->Wait(); - Copy(out, cpu, *gpuctx, &tmp); - gpuctx->Wait(); - return GetResult(tmp, cpu); - } - - bool GetResult(const framework::Tensor& out, - const platform::CPUPlace& cpu) const { - return *out.data(); - } -}; - -template -inline bool Any(const framework::Tensor& tensor, Predicate predicate) { - AnyVisitor visitor(tensor, predicate); - auto place = tensor.place(); - return platform::VisitPlace(place, visitor); -} - -struct HasNANPredicate { - template - auto operator()(const T& eigen_vec) const - -> decltype(std::declval().isnan()) { - // Cast eigen_vector to vector of bool. true if is inf. - return eigen_vec.isnan(); - } -}; - -bool HasNAN(const framework::Tensor& tensor) { - HasNANPredicate predicate; - return Any(tensor, predicate); -} - -struct HasInfPredicate { - template - auto operator()(const T& eigen_vec) const - -> decltype(std::declval().isinf()) { - // Cast eigen_vector to vector of bool. true if is inf. - return eigen_vec.isinf(); - } -}; - -bool HasInf(const framework::Tensor& tensor) { - HasInfPredicate predicate; - return Any(tensor, predicate); -} - -} // namespace framework -} // namespace paddle diff --git a/paddle/fluid/framework/tensor_util.cu b/paddle/fluid/framework/tensor_util.cu new file mode 120000 index 00000000000..edd88c4e547 --- /dev/null +++ b/paddle/fluid/framework/tensor_util.cu @@ -0,0 +1 @@ +tensor_util.cc \ No newline at end of file diff --git a/paddle/fluid/framework/tensor_util.h b/paddle/fluid/framework/tensor_util.h index f0464d48078..38b6d1c5c46 100644 --- a/paddle/fluid/framework/tensor_util.h +++ b/paddle/fluid/framework/tensor_util.h @@ -22,106 +22,38 @@ limitations under the License. */ namespace paddle { namespace framework { -/** - * @brief Copy the content of external tensor to a new place. - * - * @param[in] src The external tensor. - * @param[in] dst_place The dst place. - * @param[in] ctx The device context contains device resources. - * - * @note Copy supports CPU <-> GPU, GPU <-> GPU. - */ -inline void Copy(const Tensor& src, const platform::Place& dst_place, - const platform::DeviceContext& ctx, Tensor* dst) { - VLOG(3) << "Copy " << src.dims() << " from " << src.place() << " to " - << dst_place; - src.check_memory_size(); +void TensorCopy(const Tensor& src, const platform::Place& dst_place, + const platform::DeviceContext& ctx, Tensor* dst); +void TensorCopy(const Tensor& src, const platform::Place& dst_place, + Tensor* dst); - dst->Resize(src.dims()); - dst->set_layout(src.layout()); - auto src_place = src.place(); - auto src_ptr = src.data(); +template +void TensorFromVector(const std::vector& src, + const platform::DeviceContext& ctx, Tensor* dst); +template +void TensorFromVector(const std::vector& src, Tensor* dst); - auto dst_ptr = dst->mutable_data(dst_place, src.type()); +template +void TensorToVector(const Tensor& src, const platform::DeviceContext& ctx, + std::vector* dst); +template +void TesnorToVector(const Tensor& src, std::vector* dst); - auto size = src.numel() * SizeOfType(src.type()); +bool TensorContainsNAN(const framework::Tensor& tensor); +bool TensorContainsInf(const framework::Tensor& tensor); - if (platform::is_cpu_place(src_place) && platform::is_cpu_place(dst_place)) { - memory::Copy(boost::get(dst_place), dst_ptr, - boost::get(src_place), src_ptr, size); - } -#ifdef PADDLE_WITH_CUDA - else if (platform::is_gpu_place(src_place) && // NOLINT - platform::is_cpu_place(dst_place)) { - auto src_gpu_place = boost::get(src_place); - auto dst_cpu_place = boost::get(dst_place); - auto ctx_place = ctx.GetPlace(); - PADDLE_ENFORCE(platform::is_gpu_place(ctx_place)); - auto ctx_gpu_place = boost::get(ctx_place); - PADDLE_ENFORCE_EQ(src_gpu_place, ctx_gpu_place); - memory::Copy( - dst_cpu_place, dst_ptr, src_gpu_place, src_ptr, size, - reinterpret_cast(ctx).stream()); - } else if (platform::is_cpu_place(src_place) && - platform::is_gpu_place(dst_place)) { - auto src_cpu_place = boost::get(src_place); - auto dst_gpu_place = boost::get(dst_place); - auto ctx_place = ctx.GetPlace(); - PADDLE_ENFORCE(platform::is_gpu_place(ctx_place)); - auto ctx_gpu_place = boost::get(ctx_place); - PADDLE_ENFORCE_EQ(dst_gpu_place, ctx_gpu_place); - memory::Copy( - dst_gpu_place, dst_ptr, src_cpu_place, src_ptr, size, - reinterpret_cast(ctx).stream()); - } else if (platform::is_gpu_place(src_place) && - platform::is_gpu_place(dst_place)) { - auto src_gpu_place = boost::get(src_place); - auto dst_gpu_place = boost::get(dst_place); - auto ctx_place = ctx.GetPlace(); - PADDLE_ENFORCE(platform::is_gpu_place(ctx_place)); - auto ctx_gpu_place = boost::get(ctx_place); - PADDLE_ENFORCE_EQ(src_gpu_place, ctx_gpu_place); - memory::Copy( - dst_gpu_place, dst_ptr, src_gpu_place, src_ptr, size, - reinterpret_cast(ctx).stream()); - } -#endif -} +void TensorToStream(std::ostream& os, const Tensor& tensor, + const platform::DeviceContext& dev_ctx); +void TensorFromStream(std::istream& is, Tensor* tensor, + const platform::DeviceContext& dev_ctx); -/** - * @brief Wrapper on - * Copy(const Tensor& src, const platform::Place& dst_place, - * const platform::DeviceContext& ctx, Tensor* dst); - * - * @param[in] src The external tensor. - * @param[in] dst_place The dst place. - * - * @note Copy supports CPU <-> GPU, GPU <-> GPU. - */ -inline void Copy(const Tensor& src, const platform::Place& dst_place, - Tensor* dst) { - platform::DeviceContextPool& pool = platform::DeviceContextPool::Instance(); - const platform::DeviceContext* dev_ctx; - if (platform::is_gpu_place(src.place())) { - dev_ctx = pool.Get(src.place()); - } else { - dev_ctx = pool.Get(dst_place); - } - Copy(src, dst_place, *dev_ctx, dst); -} +// +// The implementation of template functions. +// -/** - * @brief Copy the content of an external vector to a tensor. - * - * @param[in] src The external tensor. - * @param[in] ctx The device context contains device resources. - * - * * @note CopyFromVector will resize dst to an 1D tensor with the same - * size as src. - */ template -inline void CopyFromVector(const std::vector& src, - const platform::DeviceContext& ctx, Tensor* dst) { +void TensorFromVector(const std::vector& src, + const platform::DeviceContext& ctx, Tensor* dst) { auto dst_place = ctx.GetPlace(); auto src_ptr = static_cast(src.data()); platform::CPUPlace src_place; @@ -143,11 +75,8 @@ inline void CopyFromVector(const std::vector& src, #endif } -/** - * @brief CopyFromVector CPU vector -> CPU Tensor - */ template -inline void CopyFromVector(const std::vector& src, Tensor* dst) { +void TensorFromVector(const std::vector& src, Tensor* dst) { platform::CPUPlace dst_place = platform::CPUPlace(); auto src_ptr = static_cast(src.data()); platform::CPUPlace src_place; @@ -158,18 +87,9 @@ inline void CopyFromVector(const std::vector& src, Tensor* dst) { memory::Copy(dst_place, dst_ptr, src_place, src_ptr, size); } -/** - * @brief Copy the content of a tensor to a vector - * - * @param[in] src The external tensor. - * @param[in] ctx The device context contains device resources. - * - * * @note CopyFromVector assumes that the tensor has been resized - * before invoking. - */ template -inline void CopyToVector(const Tensor& src, const platform::DeviceContext& ctx, - std::vector* dst) { +void TensorToVector(const Tensor& src, const platform::DeviceContext& ctx, + std::vector* dst) { auto src_ptr = static_cast(src.data()); auto size = src.numel() * sizeof(T); @@ -191,11 +111,8 @@ inline void CopyToVector(const Tensor& src, const platform::DeviceContext& ctx, #endif } -/** - * @brief CopyToVector CPUTensor <-> CPU Vector - */ template -inline void CopyToVector(const Tensor& src, std::vector* dst) { +void TensorToVector(const Tensor& src, std::vector* dst) { auto src_ptr = static_cast(src.data()); auto size = src.numel() * sizeof(T); @@ -209,125 +126,5 @@ inline void CopyToVector(const Tensor& src, std::vector* dst) { src_ptr, size); } -// Returns true if a tensor contains NAN, i.e., Not A Number. -bool HasNAN(const framework::Tensor& tensor); - -// Returns true if a tensor contains Inf, i.e., Infinity. -bool HasInf(const framework::Tensor& tensor); - -inline void SerializeToStream(std::ostream& os, const Tensor& tensor, - const platform::DeviceContext& dev_ctx) { - // TODO(typhoonzero): serialize to ostream - { // the 1st field, uint32_t version - constexpr uint32_t version = 0; - os.write(reinterpret_cast(&version), sizeof(version)); - } - { // the 2nd field, tensor description - // int32_t size - // void* protobuf message - proto::VarType::TensorDesc desc; - desc.set_data_type(framework::ToDataType(tensor.type())); - auto dims = framework::vectorize(tensor.dims()); - auto* pb_dims = desc.mutable_dims(); - pb_dims->Resize(static_cast(dims.size()), 0); - std::copy(dims.begin(), dims.end(), pb_dims->begin()); - int32_t size = desc.ByteSize(); - os.write(reinterpret_cast(&size), sizeof(size)); - auto out = desc.SerializeAsString(); - os.write(out.data(), size); - } - { // the 3rd field, tensor data - uint64_t size = tensor.memory_size(); - auto* data_ptr = tensor.data(); - PADDLE_ENFORCE(size < std::numeric_limits::max(), - "Index overflow when writing tensor"); - if (platform::is_gpu_place(tensor.place())) { -#ifdef PADDLE_WITH_CUDA - constexpr size_t kBufSize = 1024 * 1024 * 64; // 64MB - std::unique_ptr buf(new char[kBufSize]); - auto& gpu_dev_ctx = - static_cast(dev_ctx); - platform::CPUPlace cpu; - uintptr_t data = reinterpret_cast(data_ptr); - while (size != 0) { - size_t size_to_write = std::min(kBufSize, static_cast(size)); - memory::Copy(cpu, buf.get(), - boost::get(tensor.place()), - reinterpret_cast(data), size_to_write, - gpu_dev_ctx.stream()); - gpu_dev_ctx.Wait(); - os.write(buf.get(), size_to_write); - data += size_to_write; - size -= size_to_write; - } -#else - PADDLE_THROW("Unexpected branch"); -#endif - } else { - os.write(static_cast(data_ptr), - static_cast(size)); - } - } -} - -struct DeserializedDataFunctor { - DeserializedDataFunctor(void** buf, Tensor* tensor, - const platform::Place& place) - : buf_(buf), tensor_(tensor), place_(place) {} - - template - void operator()() { - *buf_ = tensor_->mutable_data(place_); - } - - void** buf_; - Tensor* tensor_; - platform::Place place_; -}; - -inline void DeserializeFromStream(std::istream& is, Tensor* tensor, - const platform::DeviceContext& dev_ctx) { - uint32_t version; - is.read(reinterpret_cast(&version), sizeof(version)); - PADDLE_ENFORCE_EQ(version, 0U, "Only version 0 is supported"); - proto::VarType::TensorDesc desc; - { // int32_t size - // proto buffer - int32_t size; - is.read(reinterpret_cast(&size), sizeof(size)); - std::unique_ptr buf(new char[size]); - is.read(reinterpret_cast(buf.get()), size); - PADDLE_ENFORCE(desc.ParseFromArray(buf.get(), size), - "Cannot parse tensor desc"); - } - { // read tensor - std::vector dims; - dims.reserve(static_cast(desc.dims().size())); - std::copy(desc.dims().begin(), desc.dims().end(), std::back_inserter(dims)); - tensor->Resize(framework::make_ddim(dims)); - void* buf; - auto ctx = platform::CPUDeviceContext(); - if (platform::is_gpu_place(dev_ctx.GetPlace())) { -#ifdef PADDLE_WITH_CUDA - Tensor cpu_tensor; - cpu_tensor.Resize(framework::make_ddim(dims)); - framework::VisitDataType( - desc.data_type(), - DeserializedDataFunctor(&buf, &cpu_tensor, ctx.GetPlace())); - is.read(static_cast(buf), cpu_tensor.memory_size()); - auto dst_place = dev_ctx.GetPlace(); - framework::Copy(cpu_tensor, dst_place, dev_ctx, tensor); -#else - PADDLE_THROW("Unexpected branch"); -#endif - } else { - framework::VisitDataType( - desc.data_type(), - DeserializedDataFunctor(&buf, tensor, ctx.GetPlace())); - is.read(static_cast(buf), tensor->memory_size()); - } - } -} - } // namespace framework } // namespace paddle diff --git a/paddle/fluid/framework/tensor_util_test.cc b/paddle/fluid/framework/tensor_util_test.cc index dcdbf9d3958..8aebfcb3b62 100644 --- a/paddle/fluid/framework/tensor_util_test.cc +++ b/paddle/fluid/framework/tensor_util_test.cc @@ -20,7 +20,7 @@ namespace paddle { namespace framework { -TEST(Copy, Tensor) { +TEST(TensorCopy, Tensor) { Tensor src_tensor; Tensor dst_tensor; platform::CPUDeviceContext cpu_ctx((platform::CPUPlace())); @@ -33,7 +33,7 @@ TEST(Copy, Tensor) { src_tensor.set_layout(DataLayout::kAnyLayout); auto cpu_place = new platform::CPUPlace(); - Copy(src_tensor, *cpu_place, &dst_tensor); + TensorCopy(src_tensor, *cpu_place, &dst_tensor); const int* dst_ptr = dst_tensor.data(); ASSERT_NE(src_ptr, dst_ptr); @@ -44,7 +44,7 @@ TEST(Copy, Tensor) { EXPECT_TRUE(dst_tensor.layout() == src_tensor.layout()); Tensor slice_tensor = src_tensor.Slice(1, 2); - Copy(slice_tensor, *cpu_place, &dst_tensor); + TensorCopy(slice_tensor, *cpu_place, &dst_tensor); const int* slice_ptr = slice_tensor.data(); dst_ptr = dst_tensor.data(); ASSERT_NE(dst_ptr, slice_ptr); @@ -68,11 +68,11 @@ TEST(Copy, Tensor) { // CPU Tensor to GPU Tensor auto gpu_place = new platform::CUDAPlace(0); platform::CUDADeviceContext gpu_ctx(*gpu_place); - Copy(src_tensor, *gpu_place, gpu_ctx, &gpu_tensor); + TensorCopy(src_tensor, *gpu_place, gpu_ctx, &gpu_tensor); // GPU Tensor to CPU Tensor auto cpu_place = new platform::CPUPlace(); - Copy(gpu_tensor, *cpu_place, gpu_ctx, &dst_tensor); + TensorCopy(gpu_tensor, *cpu_place, gpu_ctx, &dst_tensor); // Sync before Compare Tensors gpu_ctx.Wait(); @@ -85,10 +85,10 @@ TEST(Copy, Tensor) { Tensor slice_tensor = src_tensor.Slice(1, 2); // CPU Slice Tensor to GPU Tensor - Copy(slice_tensor, *gpu_place, gpu_ctx, &gpu_tensor); + TensorCopy(slice_tensor, *gpu_place, gpu_ctx, &gpu_tensor); // GPU Tensor to CPU Tensor - Copy(gpu_tensor, *cpu_place, gpu_ctx, &dst_tensor); + TensorCopy(gpu_tensor, *cpu_place, gpu_ctx, &dst_tensor); // Sync before Compare Slice Tensors gpu_ctx.Wait(); @@ -104,7 +104,7 @@ TEST(Copy, Tensor) { #endif } -TEST(CopyFromVector, Tensor) { +TEST(TensorFromVector, Tensor) { using namespace paddle::framework; using namespace paddle::platform; { @@ -114,7 +114,7 @@ TEST(CopyFromVector, Tensor) { // Copy to CPU Tensor cpu_tensor.Resize(make_ddim({3, 3})); auto cpu_place = new paddle::platform::CPUPlace(); - CopyFromVector(src_vec, &cpu_tensor); + TensorFromVector(src_vec, &cpu_tensor); // Compare Tensors const int* cpu_ptr = cpu_tensor.data(); @@ -126,7 +126,7 @@ TEST(CopyFromVector, Tensor) { src_vec.erase(src_vec.begin(), src_vec.begin() + 5); cpu_tensor.Resize(make_ddim({2, 2})); - CopyFromVector(src_vec, &cpu_tensor); + TensorFromVector(src_vec, &cpu_tensor); cpu_ptr = cpu_tensor.data(); src_ptr = src_vec.data(); ASSERT_NE(src_ptr, cpu_ptr); @@ -148,15 +148,15 @@ TEST(CopyFromVector, Tensor) { cpu_tensor.Resize(make_ddim({3, 3})); auto cpu_place = new paddle::platform::CPUPlace(); CPUDeviceContext cpu_ctx(*cpu_place); - CopyFromVector(src_vec, cpu_ctx, &cpu_tensor); + TensorFromVector(src_vec, cpu_ctx, &cpu_tensor); // Copy to GPUTensor gpu_tensor.Resize(make_ddim({3, 3})); auto gpu_place = new paddle::platform::CUDAPlace(); CUDADeviceContext gpu_ctx(*gpu_place); - CopyFromVector(src_vec, gpu_ctx, &gpu_tensor); + TensorFromVector(src_vec, gpu_ctx, &gpu_tensor); // Copy from GPU to CPU tensor for comparison - Copy(gpu_tensor, *cpu_place, gpu_ctx, &dst_tensor); + TensorCopy(gpu_tensor, *cpu_place, gpu_ctx, &dst_tensor); // Sync before Compare Tensors gpu_ctx.Wait(); @@ -173,10 +173,10 @@ TEST(CopyFromVector, Tensor) { src_vec.erase(src_vec.begin(), src_vec.begin() + 5); cpu_tensor.Resize(make_ddim({2, 2})); - CopyFromVector(src_vec, cpu_ctx, &cpu_tensor); + TensorFromVector(src_vec, cpu_ctx, &cpu_tensor); gpu_tensor.Resize(make_ddim({2, 2})); - CopyFromVector(src_vec, gpu_ctx, &gpu_tensor); - Copy(gpu_tensor, *cpu_place, gpu_ctx, &dst_tensor); + TensorFromVector(src_vec, gpu_ctx, &gpu_tensor); + TensorCopy(gpu_tensor, *cpu_place, gpu_ctx, &dst_tensor); // Sync before Compare Tensors gpu_ctx.Wait(); @@ -196,7 +196,7 @@ TEST(CopyFromVector, Tensor) { #endif } -TEST(CopyToVector, Tensor) { +TEST(TensorToVector, Tensor) { using namespace paddle::framework; using namespace paddle::platform; { @@ -208,7 +208,7 @@ TEST(CopyToVector, Tensor) { CPUPlace place; std::vector dst; - CopyToVector(src, &dst); + TensorToVector(src, &dst); for (int i = 0; i < 3 * 3; ++i) { EXPECT_EQ(src_ptr[i], dst[i]); @@ -220,10 +220,10 @@ TEST(CopyToVector, Tensor) { Tensor gpu_tensor; CUDAPlace place; CUDADeviceContext gpu_ctx(place); - CopyFromVector(src_vec, gpu_ctx, &gpu_tensor); + TensorFromVector(src_vec, gpu_ctx, &gpu_tensor); std::vector dst; - CopyToVector(gpu_tensor, gpu_ctx, &dst); + TensorToVector(gpu_tensor, gpu_ctx, &dst); for (int i = 0; i < 3 * 3; ++i) { EXPECT_EQ(src_vec[i], dst[i]); @@ -232,7 +232,7 @@ TEST(CopyToVector, Tensor) { #endif } -TEST(HasNAN, CPU) { +TEST(TensorContainsNAN, CPU) { using namespace paddle::framework; using namespace paddle::platform; Tensor src; @@ -240,11 +240,12 @@ TEST(HasNAN, CPU) { buf[0] = 0.0; buf[1] = NAN; buf[2] = 0.0; - - ASSERT_TRUE(HasNAN(src)); + ASSERT_TRUE(TensorContainsNAN(src)); + buf[1] = 0.0; + ASSERT_FALSE(TensorContainsNAN(src)); } -TEST(HasInf, CPU) { +TEST(TensorContainsInf, CPU) { using namespace paddle::framework; using namespace paddle::platform; Tensor src; @@ -252,10 +253,12 @@ TEST(HasInf, CPU) { buf[0] = 1.0; buf[1] = INFINITY; buf[2] = 0.0; - ASSERT_TRUE(HasInf(src)); + ASSERT_TRUE(TensorContainsInf(src)); + buf[1] = 1.0; + ASSERT_FALSE(TensorContainsInf(src)); } -TEST(Tensor, SerializeAndDeserialize) { +TEST(Tensor, FromAndToStream) { framework::Tensor src_tensor; int array[6] = {1, 2, 3, 4, 5, 6}; src_tensor.Resize({2, 3}); @@ -268,10 +271,10 @@ TEST(Tensor, SerializeAndDeserialize) { auto place = new platform::CPUPlace(); platform::CPUDeviceContext cpu_ctx(*place); std::ostringstream oss; - SerializeToStream(oss, src_tensor, cpu_ctx); + TensorToStream(oss, src_tensor, cpu_ctx); std::istringstream iss(oss.str()); - DeserializeFromStream(iss, &dst_tensor, cpu_ctx); + TensorFromStream(iss, &dst_tensor, cpu_ctx); int* dst_ptr = dst_tensor.mutable_data(platform::CPUPlace()); for (int i = 0; i < 5; ++i) { ASSERT_EQ(dst_ptr[i], array[i]); @@ -288,13 +291,13 @@ TEST(Tensor, SerializeAndDeserialize) { auto gpu_place = new platform::CUDAPlace(); platform::CUDADeviceContext gpu_ctx(*gpu_place); - Copy(src_tensor, *gpu_place, gpu_ctx, &gpu_tensor); + TensorCopy(src_tensor, *gpu_place, gpu_ctx, &gpu_tensor); std::ostringstream oss; - SerializeToStream(oss, gpu_tensor, gpu_ctx); + TensorToStream(oss, gpu_tensor, gpu_ctx); std::istringstream iss(oss.str()); - DeserializeFromStream(iss, &dst_tensor, gpu_ctx); + TensorFromStream(iss, &dst_tensor, gpu_ctx); int* dst_ptr = dst_tensor.mutable_data(platform::CPUPlace()); for (int i = 0; i < 6; ++i) { diff --git a/paddle/fluid/framework/tensor_util_test.cu b/paddle/fluid/framework/tensor_util_test.cu index 1982b642bcd..d630ec44a2a 100644 --- a/paddle/fluid/framework/tensor_util_test.cu +++ b/paddle/fluid/framework/tensor_util_test.cu @@ -31,7 +31,7 @@ static __global__ void FillInf(float* buf) { buf[2] = 0.5; } -TEST(HasNAN, GPU) { +TEST(TensorContainsNAN, GPU) { Tensor tensor; platform::CUDAPlace gpu(0); auto& pool = platform::DeviceContextPool::Instance(); @@ -39,10 +39,10 @@ TEST(HasNAN, GPU) { float* buf = tensor.mutable_data({3}, gpu); FillNAN<<<1, 1, 0, cuda_ctx->stream()>>>(buf); cuda_ctx->Wait(); - ASSERT_TRUE(HasNAN(tensor)); + ASSERT_TRUE(TensorContainsNAN(tensor)); } -TEST(HasInf, GPU) { +TEST(TensorContainsInf, GPU) { Tensor tensor; platform::CUDAPlace gpu(0); auto& pool = platform::DeviceContextPool::Instance(); @@ -50,7 +50,7 @@ TEST(HasInf, GPU) { float* buf = tensor.mutable_data({3}, gpu); FillInf<<<1, 1, 0, cuda_ctx->stream()>>>(buf); cuda_ctx->Wait(); - ASSERT_TRUE(HasInf(tensor)); + ASSERT_TRUE(TensorContainsInf(tensor)); } } // namespace framework diff --git a/paddle/fluid/framework/threadpool.h b/paddle/fluid/framework/threadpool.h index 606a93e13be..3adc260caf5 100644 --- a/paddle/fluid/framework/threadpool.h +++ b/paddle/fluid/framework/threadpool.h @@ -64,7 +64,6 @@ class ThreadPool { Task task([fn]() -> std::unique_ptr { try { fn(); - return nullptr; } catch (platform::EnforceNotMet ex) { return std::unique_ptr( new platform::EnforceNotMet(ex)); @@ -73,6 +72,7 @@ class ThreadPool { << "Unexpected exception is catched in thread pool. All " "throwable exception in Fluid should be an EnforceNotMet."; } + return nullptr; }); std::future> f = task.get_future(); tasks_.push(std::move(task)); diff --git a/paddle/fluid/operators/array_operator.h b/paddle/fluid/operators/array_operator.h index d0fc1533470..dbcc7abb099 100644 --- a/paddle/fluid/operators/array_operator.h +++ b/paddle/fluid/operators/array_operator.h @@ -42,7 +42,7 @@ class ArrayOp : public framework::OperatorBase { if (platform::is_gpu_place(i_tensor.place())) { // FIXME: Avoid copy from GPU to CPU framework::Tensor t; - framework::Copy(i_tensor, platform::CPUPlace(), dev_ctx, &t); + framework::TensorCopy(i_tensor, platform::CPUPlace(), dev_ctx, &t); dev_ctx.Wait(); offset = static_cast(*t.data()); } else { diff --git a/paddle/fluid/operators/array_to_lod_tensor_op.cc b/paddle/fluid/operators/array_to_lod_tensor_op.cc index f59bfad6cca..5db2e4540ef 100644 --- a/paddle/fluid/operators/array_to_lod_tensor_op.cc +++ b/paddle/fluid/operators/array_to_lod_tensor_op.cc @@ -112,8 +112,8 @@ class ArrayToLoDTensorOp : public framework::OperatorBase { platform::DeviceContextPool::Instance(); auto &dev_ctx = *pool.Get(place); - framework::Copy(x[x_idx].Slice(start_offset, end_offset), place, - dev_ctx, &slice); + framework::TensorCopy(x[x_idx].Slice(start_offset, end_offset), place, + dev_ctx, &slice); out_offset += len; } } diff --git a/paddle/fluid/operators/assign_op.cc b/paddle/fluid/operators/assign_op.cc index e21dc6d77f3..39ae3c0040d 100644 --- a/paddle/fluid/operators/assign_op.cc +++ b/paddle/fluid/operators/assign_op.cc @@ -45,7 +45,7 @@ class AssignFunctor { out_rows.set_height(rows.height()); auto &t = rows.value(); auto *m = out_rows.mutable_value(); - framework::Copy(t, t.place(), dev_ctx_, m); + framework::TensorCopy(t, t.place(), dev_ctx_, m); } template @@ -57,7 +57,7 @@ class AssignFunctor { void copy_tensor(const framework::LoDTensor &lod_tensor, framework::LoDTensor *out) const { auto &out_tensor = *out; - Copy(lod_tensor, lod_tensor.place(), dev_ctx_, &out_tensor); + TensorCopy(lod_tensor, lod_tensor.place(), dev_ctx_, &out_tensor); out_tensor.set_lod(lod_tensor.lod()); } diff --git a/paddle/fluid/operators/assign_value_op.h b/paddle/fluid/operators/assign_value_op.h index 90c9496a3c1..d51b215a083 100644 --- a/paddle/fluid/operators/assign_value_op.h +++ b/paddle/fluid/operators/assign_value_op.h @@ -41,7 +41,7 @@ class AssignValueKernel : public framework::OpKernel { break; } auto values = ctx.Attr>(value_name); - framework::CopyFromVector(values, ctx.device_context(), out); + framework::TensorFromVector(values, ctx.device_context(), out); out->Resize(framework::make_ddim(shape)); } }; diff --git a/paddle/fluid/operators/beam_search_decode_op.h b/paddle/fluid/operators/beam_search_decode_op.h index 40147ce1eb2..3cc6ed31057 100644 --- a/paddle/fluid/operators/beam_search_decode_op.h +++ b/paddle/fluid/operators/beam_search_decode_op.h @@ -232,12 +232,12 @@ void BeamSearchDecoder::ConvertSentenceVectorToLodTensor( id_tensor->set_lod(lod); id_tensor->Resize({static_cast(id_data.size())}); id_tensor->mutable_data(paddle::platform::CPUPlace()); - framework::CopyFromVector(id_data, cpu_ctx, id_tensor); + framework::TensorFromVector(id_data, cpu_ctx, id_tensor); score_tensor->set_lod(lod); score_tensor->Resize({static_cast(score_data.size())}); score_tensor->mutable_data(paddle::platform::CPUPlace()); - framework::CopyFromVector(score_data, cpu_ctx, score_tensor); + framework::TensorFromVector(score_data, cpu_ctx, score_tensor); } template diff --git a/paddle/fluid/operators/detection_output_op.h b/paddle/fluid/operators/detection_output_op.h index 0aa5fc010de..af9081c9343 100644 --- a/paddle/fluid/operators/detection_output_op.h +++ b/paddle/fluid/operators/detection_output_op.h @@ -1,16 +1,16 @@ /* Copyright (c) 2016 PaddlePaddle Authors. All Rights Reserved. -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -Indicesou may obtain a copy of the License at + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + Indicesou may obtain a copy of the License at - http://www.apache.org/licenses/LICENSE-2.0 + http://www.apache.org/licenses/LICENSE-2.0 -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. */ + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. */ #pragma once #include "paddle/fluid/framework/op_registry.h" @@ -98,16 +98,16 @@ class DetectionOutputKernel : public framework::OpKernel { T* conf_data = conf_tensor.data(); if (platform::is_gpu_place(context.GetPlace())) { loc_cpu.mutable_data(loc_tensor.dims(), platform::CPUPlace()); - framework::Copy(loc_tensor, platform::CPUPlace(), - context.device_context(), &loc_cpu); + framework::TensorCopy(loc_tensor, platform::CPUPlace(), + context.device_context(), &loc_cpu); loc_data = loc_cpu.data(); conf_cpu.mutable_data(conf_tensor.dims(), platform::CPUPlace()); - framework::Copy(conf_tensor, platform::CPUPlace(), - context.device_context(), &conf_cpu); + framework::TensorCopy(conf_tensor, platform::CPUPlace(), + context.device_context(), &conf_cpu); conf_data = conf_cpu.data(); priorbox_cpu.mutable_data(in_priorbox->dims(), platform::CPUPlace()); - framework::Copy(*in_priorbox, platform::CPUPlace(), - context.device_context(), &priorbox_cpu); + framework::TensorCopy(*in_priorbox, platform::CPUPlace(), + context.device_context(), &priorbox_cpu); priorbox_data = priorbox_cpu.data(); } // get decode bboxes @@ -158,8 +158,8 @@ class DetectionOutputKernel : public framework::OpKernel { batch_size, all_indices, all_decoded_bboxes, out_data); if (platform::is_gpu_place(context.GetPlace())) { - framework::Copy(out_cpu, platform::CUDAPlace(), context.device_context(), - out); + framework::TensorCopy(out_cpu, platform::CUDAPlace(), + context.device_context(), out); } } }; diff --git a/paddle/fluid/operators/expand_op.h b/paddle/fluid/operators/expand_op.h index 953d75adae5..2c2d5c7c42c 100644 --- a/paddle/fluid/operators/expand_op.h +++ b/paddle/fluid/operators/expand_op.h @@ -126,7 +126,8 @@ class ExpandGradKernel : public framework::OpKernel { auto* in0 = context.Input(framework::GradVarName("Out")); auto* out0 = context.Output(framework::GradVarName("X")); out0->mutable_data(context.GetPlace()); - framework::Copy(*in0, context.GetPlace(), context.device_context(), out0); + framework::TensorCopy(*in0, context.GetPlace(), context.device_context(), + out0); } else { switch (dims) { REP_EXPAND_GRAD_TEMPLATE(72) diff --git a/paddle/fluid/operators/feed_op.cc b/paddle/fluid/operators/feed_op.cc index 438d9754298..90c31877f6a 100644 --- a/paddle/fluid/operators/feed_op.cc +++ b/paddle/fluid/operators/feed_op.cc @@ -57,7 +57,7 @@ class FeedOp : public framework::OperatorBase { if (platform::is_same_place(feed_item.place(), place)) { out_item->ShareDataWith(feed_item); } else { - framework::Copy(feed_item, place, dev_ctx, out_item); + framework::TensorCopy(feed_item, place, dev_ctx, out_item); } out_item->set_lod(feed_item.lod()); } diff --git a/paddle/fluid/operators/fetch_op.cc b/paddle/fluid/operators/fetch_op.cc index 2684e646340..d66f01d1b7c 100644 --- a/paddle/fluid/operators/fetch_op.cc +++ b/paddle/fluid/operators/fetch_op.cc @@ -56,7 +56,7 @@ class FetchOp : public framework::OperatorBase { platform::DeviceContextPool &pool = platform::DeviceContextPool::Instance(); auto &dev_ctx = *pool.Get(src_item.place()); - Copy(src_item, platform::CPUPlace(), dev_ctx, &dst_item); + TensorCopy(src_item, platform::CPUPlace(), dev_ctx, &dst_item); dev_ctx.Wait(); dst_item.set_lod(src_item.lod()); diff --git a/paddle/fluid/operators/fill_op.cc b/paddle/fluid/operators/fill_op.cc index c505c739d46..3b4b4092311 100644 --- a/paddle/fluid/operators/fill_op.cc +++ b/paddle/fluid/operators/fill_op.cc @@ -74,7 +74,7 @@ class FillOp : public framework::OperatorBase { platform::DeviceContextPool &pool = platform::DeviceContextPool::Instance(); auto &dev_ctx = *pool.Get(place); - framework::Copy(tensor, place, dev_ctx, &out); + framework::TensorCopy(tensor, place, dev_ctx, &out); } } }; diff --git a/paddle/fluid/operators/layer_norm_op.h b/paddle/fluid/operators/layer_norm_op.h index 84f5a40aacb..605b5c258ca 100644 --- a/paddle/fluid/operators/layer_norm_op.h +++ b/paddle/fluid/operators/layer_norm_op.h @@ -196,7 +196,7 @@ class LayerNormGradKernel : public framework::OpKernel { // dy_dx ElementwiseComputeEx, DeviceContext, T>( ctx, &d_y, scale, /*axis*/ 1, MulFunctor(), &temp); - framework::Copy(temp, ctx.GetPlace(), ctx.device_context(), d_x); + framework::TensorCopy(temp, ctx.GetPlace(), ctx.device_context(), d_x); // dy_dmean_dx row_mean(dev_ctx, temp, &temp_vec); @@ -208,7 +208,7 @@ class LayerNormGradKernel : public framework::OpKernel { ctx, &temp, &temp_norm, /*axis*/ 0, MulFunctor(), &temp); } else { // dy_dx - framework::Copy(d_y, ctx.GetPlace(), ctx.device_context(), d_x); + framework::TensorCopy(d_y, ctx.GetPlace(), ctx.device_context(), d_x); // dy_dmean_dx row_mean(dev_ctx, d_y, &temp_vec); diff --git a/paddle/fluid/operators/load_combine_op.cc b/paddle/fluid/operators/load_combine_op.cc index ba8fc4a6836..e5353144e91 100644 --- a/paddle/fluid/operators/load_combine_op.cc +++ b/paddle/fluid/operators/load_combine_op.cc @@ -69,7 +69,7 @@ class LoadCombineOp : public framework::OperatorBase { out_var->Clear(); tensor = out_var->GetMutable(); tensor->set_lod(cpu_tensor.lod()); - Copy(cpu_tensor, place, dev_ctx, tensor); + TensorCopy(cpu_tensor, place, dev_ctx, tensor); } } } diff --git a/paddle/fluid/operators/load_op.cc b/paddle/fluid/operators/load_op.cc index d72b7a7eb96..05f809ac562 100644 --- a/paddle/fluid/operators/load_op.cc +++ b/paddle/fluid/operators/load_op.cc @@ -55,7 +55,7 @@ class LoadOp : public framework::OperatorBase { out_var->Clear(); tensor = out_var->GetMutable(); tensor->set_lod(cpu_tensor.lod()); - Copy(cpu_tensor, place, dev_ctx, tensor); + TensorCopy(cpu_tensor, place, dev_ctx, tensor); } } }; diff --git a/paddle/fluid/operators/lod_reset_op.h b/paddle/fluid/operators/lod_reset_op.h index e612bc2d367..8186d4f8262 100644 --- a/paddle/fluid/operators/lod_reset_op.h +++ b/paddle/fluid/operators/lod_reset_op.h @@ -33,8 +33,8 @@ class LoDResetKernel : public framework::OpKernel { auto* lod = lod_t->data(); if (platform::is_gpu_place(ctx.GetPlace())) { framework::Tensor lod_cpu; - framework::Copy(*lod_t, platform::CPUPlace(), ctx.device_context(), - &lod_cpu); + framework::TensorCopy(*lod_t, platform::CPUPlace(), + ctx.device_context(), &lod_cpu); lod = lod_cpu.data(); } level0 = std::vector(lod, lod + lod_t->numel()); diff --git a/paddle/fluid/operators/lod_tensor_to_array_op.cc b/paddle/fluid/operators/lod_tensor_to_array_op.cc index b5e778a5811..543495ce4e6 100644 --- a/paddle/fluid/operators/lod_tensor_to_array_op.cc +++ b/paddle/fluid/operators/lod_tensor_to_array_op.cc @@ -94,9 +94,9 @@ class LoDTensorToArrayOp : public framework::OperatorBase { platform::DeviceContextPool::Instance(); auto &dev_ctx = *pool.Get(place); - framework::Copy(x.Slice(static_cast(each_range.begin), - static_cast(each_range.end)), - x.place(), dev_ctx, &slice); + framework::TensorCopy(x.Slice(static_cast(each_range.begin), + static_cast(each_range.end)), + x.place(), dev_ctx, &slice); offset += len; } } diff --git a/paddle/fluid/operators/math/context_project.h b/paddle/fluid/operators/math/context_project.h index 83f6ae45fca..4da94383af6 100644 --- a/paddle/fluid/operators/math/context_project.h +++ b/paddle/fluid/operators/math/context_project.h @@ -149,7 +149,8 @@ class ContextProjectFunctor { Tensor out_t_sub = out_t.Slice(k * context_length, k * context_length + padding_size); Tensor w_sub = padding_data.Slice(k, k + padding_size); - framework::Copy(w_sub, context.GetPlace(), context, &out_t_sub); + framework::TensorCopy(w_sub, context.GetPlace(), context, + &out_t_sub); } } if (down_pad > 0) { // add down pad @@ -179,7 +180,8 @@ class ContextProjectFunctor { (down_pad_begin_row + t) * context_length); Tensor w_sub = padding_data.Slice( up_pad + padding_idx, up_pad + padding_idx + padding_size); - framework::Copy(w_sub, context.GetPlace(), context, &out_t_sub); + framework::TensorCopy(w_sub, context.GetPlace(), context, + &out_t_sub); } } out_t.Resize({sequence_height, context_length * sequence_width}); diff --git a/paddle/fluid/operators/math/im2col_test.cc b/paddle/fluid/operators/math/im2col_test.cc index 30519253154..b3978536bca 100644 --- a/paddle/fluid/operators/math/im2col_test.cc +++ b/paddle/fluid/operators/math/im2col_test.cc @@ -62,7 +62,7 @@ void testIm2col() { if (paddle::platform::is_cpu_place(*place)) { input = input_tmp; } else { - Copy(input_tmp, *place, *context, &input); + TensorCopy(input_tmp, *place, *context, &input); } output_cfo.mutable_data( {1, filter_size, filter_size, output_height, output_width}, *place); @@ -87,7 +87,7 @@ void testIm2col() { if (paddle::platform::is_cpu_place(*place)) { out_cfo_ptr = output_cfo.data(); } else { - Copy(output_cfo, paddle::platform::CPUPlace(), *context, &output_tmp); + TensorCopy(output_cfo, paddle::platform::CPUPlace(), *context, &output_tmp); out_cfo_ptr = output_tmp.data(); } for (int i = 0; i < 6; ++i) { @@ -98,7 +98,7 @@ void testIm2col() { if (paddle::platform::is_cpu_place(*place)) { out_ocf_ptr = output_ocf.data(); } else { - Copy(output_ocf, paddle::platform::CPUPlace(), *context, &output_tmp); + TensorCopy(output_ocf, paddle::platform::CPUPlace(), *context, &output_tmp); out_ocf_ptr = output_tmp.data(); } @@ -119,7 +119,7 @@ void testIm2col() { if (paddle::platform::is_cpu_place(*place)) { input = input_tmp; } else { - Copy(input_tmp, *place, *context, &input); + TensorCopy(input_tmp, *place, *context, &input); } col2im(*context, output_cfo, dilation, stride, padding, &input); @@ -128,7 +128,7 @@ void testIm2col() { if (paddle::platform::is_cpu_place(*place)) { in_ptr = input.data(); } else { - Copy(input, paddle::platform::CPUPlace(), *context, &input_tmp); + TensorCopy(input, paddle::platform::CPUPlace(), *context, &input_tmp); in_ptr = input_tmp.data(); } for (int i = 0; i < 6; ++i) { @@ -140,7 +140,7 @@ void testIm2col() { if (paddle::platform::is_cpu_place(*place)) { input = input_tmp; } else { - Copy(input_tmp, *place, *context, &input); + TensorCopy(input_tmp, *place, *context, &input); } col2im_ocf(*context, output_ocf, dilation, stride, padding, &input); @@ -148,7 +148,7 @@ void testIm2col() { if (paddle::platform::is_cpu_place(*place)) { in_ptr = input.data(); } else { - Copy(input, paddle::platform::CPUPlace(), *context, &input_tmp); + TensorCopy(input, paddle::platform::CPUPlace(), *context, &input_tmp); in_ptr = input_tmp.data(); } for (int i = 0; i < 6; ++i) { diff --git a/paddle/fluid/operators/math/math_function_test.cu b/paddle/fluid/operators/math/math_function_test.cu index f333c6c98ed..207d6a87bce 100644 --- a/paddle/fluid/operators/math/math_function_test.cu +++ b/paddle/fluid/operators/math/math_function_test.cu @@ -29,15 +29,15 @@ TEST(math_function, notrans_mul_trans) { auto* gpu_place = new paddle::platform::CUDAPlace(0); paddle::platform::CUDADeviceContext context(*gpu_place); - paddle::framework::Copy(input1, *gpu_place, context, &input1_gpu); - paddle::framework::Copy(input1, *gpu_place, context, &input2_gpu); + paddle::framework::TensorCopy(input1, *gpu_place, context, &input1_gpu); + paddle::framework::TensorCopy(input1, *gpu_place, context, &input2_gpu); out_gpu.mutable_data({2, 2}, *gpu_place); paddle::operators::math::matmul( context, input1_gpu, false, input2_gpu, true, 1, &out_gpu, 0); - paddle::framework::Copy(out_gpu, *cpu_place, context, &out); + paddle::framework::TensorCopy(out_gpu, *cpu_place, context, &out); float* out_ptr = out.data(); context.Wait(); @@ -63,15 +63,15 @@ TEST(math_function, trans_mul_notrans) { auto* gpu_place = new paddle::platform::CUDAPlace(0); paddle::platform::CUDADeviceContext context(*gpu_place); - paddle::framework::Copy(input1, *gpu_place, context, &input1_gpu); - paddle::framework::Copy(input1, *gpu_place, context, &input2_gpu); + paddle::framework::TensorCopy(input1, *gpu_place, context, &input1_gpu); + paddle::framework::TensorCopy(input1, *gpu_place, context, &input2_gpu); out_gpu.mutable_data({3, 3}, *gpu_place); paddle::operators::math::matmul( context, input1_gpu, true, input2_gpu, false, 1, &out_gpu, 0); - paddle::framework::Copy(out_gpu, *cpu_place, context, &out); + paddle::framework::TensorCopy(out_gpu, *cpu_place, context, &out); float* out_ptr = out.data(); context.Wait(); @@ -112,9 +112,9 @@ TEST(math_function, gemm_notrans_cublas) { auto* gpu_place = new paddle::platform::CUDAPlace(0); paddle::platform::CUDADeviceContext context(*gpu_place); - paddle::framework::Copy(input1, *gpu_place, context, &input1_gpu); - paddle::framework::Copy(input2, *gpu_place, context, &input2_gpu); - paddle::framework::Copy(input3, *gpu_place, context, &input3_gpu); + paddle::framework::TensorCopy(input1, *gpu_place, context, &input1_gpu); + paddle::framework::TensorCopy(input2, *gpu_place, context, &input2_gpu); + paddle::framework::TensorCopy(input3, *gpu_place, context, &input3_gpu); float* a = input1_gpu.data(); float* b = input2_gpu.data(); float* c = input3_gpu.mutable_data(*gpu_place); @@ -122,7 +122,7 @@ TEST(math_function, gemm_notrans_cublas) { paddle::operators::math::gemm( context, false, false, m, n, k, 1, a, 3, b + 1, 4, 1, c + 1, 4); - paddle::framework::Copy(input3_gpu, *cpu_place, context, &input3); + paddle::framework::TensorCopy(input3_gpu, *cpu_place, context, &input3); // numpy code: // a = np.arange(6).reshape(2, 3) @@ -167,9 +167,9 @@ TEST(math_function, gemm_trans_cublas) { auto* gpu_place = new paddle::platform::CUDAPlace(0); paddle::platform::CUDADeviceContext context(*gpu_place); - paddle::framework::Copy(input1, *gpu_place, context, &input1_gpu); - paddle::framework::Copy(input2, *gpu_place, context, &input2_gpu); - paddle::framework::Copy(input3, *gpu_place, context, &input3_gpu); + paddle::framework::TensorCopy(input1, *gpu_place, context, &input1_gpu); + paddle::framework::TensorCopy(input2, *gpu_place, context, &input2_gpu); + paddle::framework::TensorCopy(input3, *gpu_place, context, &input3_gpu); float* a = input1_gpu.data(); float* b = input2_gpu.data(); float* c = input3_gpu.mutable_data(*gpu_place); @@ -177,7 +177,7 @@ TEST(math_function, gemm_trans_cublas) { paddle::operators::math::gemm( context, false, true, m, n, k, 1, a, 3, b + 3, 3, 1, c + 1, 4); - paddle::framework::Copy(input3_gpu, *cpu_place, context, &input3); + paddle::framework::TensorCopy(input3_gpu, *cpu_place, context, &input3); context.Wait(); EXPECT_EQ(input3_ptr[0], 0); @@ -218,15 +218,15 @@ void GemvTest(int m, int n, bool trans) { } paddle::platform::CUDADeviceContext context(*gpu_place); - paddle::framework::Copy(mat_a, *gpu_place, context, &g_mat_a); - paddle::framework::Copy(vec_b, *gpu_place, context, &g_vec_b); + paddle::framework::TensorCopy(mat_a, *gpu_place, context, &g_mat_a); + paddle::framework::TensorCopy(vec_b, *gpu_place, context, &g_vec_b); paddle::operators::math::gemv( context, trans, static_cast(m), static_cast(n), 1., g_data_a, g_data_b, 0., g_data_c); - paddle::framework::Copy(g_vec_c, paddle::platform::CPUPlace(), context, - &vec_c); + paddle::framework::TensorCopy(g_vec_c, paddle::platform::CPUPlace(), context, + &vec_c); if (!trans) { for (int i = 0; i < m; ++i) { diff --git a/paddle/fluid/operators/math/selected_rows_functor_test.cu b/paddle/fluid/operators/math/selected_rows_functor_test.cu index cefe239bd28..942d9b13fc1 100644 --- a/paddle/fluid/operators/math/selected_rows_functor_test.cu +++ b/paddle/fluid/operators/math/selected_rows_functor_test.cu @@ -67,7 +67,7 @@ TEST(selected_rows_functor, gpu_add) { EXPECT_EQ(out_rows[6], 9); Tensor out_cpu; - Copy(*out_value, cpu_place, ctx, &out_cpu); + TensorCopy(*out_value, cpu_place, ctx, &out_cpu); ctx.Wait(); auto* out_cpu_data = out_cpu.data(); @@ -94,7 +94,7 @@ TEST(selected_rows_functor, gpu_add) { add_tensor_functor(ctx, *output, *tensor1, tensor2.get()); Tensor tensor2_cpu; - Copy(*tensor2, cpu_place, ctx, &tensor2_cpu); + TensorCopy(*tensor2, cpu_place, ctx, &tensor2_cpu); ctx.Wait(); auto* tensor2_cpu_data = tensor2_cpu.data(); @@ -167,7 +167,7 @@ TEST(selected_rows_functor, gpu_add_to) { EXPECT_EQ(out_rows[6], 9); Tensor out_cpu; - Copy(*out_value, cpu_place, ctx, &out_cpu); + TensorCopy(*out_value, cpu_place, ctx, &out_cpu); ctx.Wait(); auto* out_cpu_data = out_cpu.data(); @@ -191,7 +191,7 @@ TEST(selected_rows_functor, gpu_add_to) { add_to_tensor_functor(ctx, *output, tensor1.get()); Tensor tensor1_cpu; - Copy(*tensor1, cpu_place, ctx, &tensor1_cpu); + TensorCopy(*tensor1, cpu_place, ctx, &tensor1_cpu); ctx.Wait(); auto* tensor1_cpu_data = tensor1_cpu.data(); diff --git a/paddle/fluid/operators/math/sequence_padding.cu b/paddle/fluid/operators/math/sequence_padding.cu index 9eb52f6fd92..c044e6fc32b 100644 --- a/paddle/fluid/operators/math/sequence_padding.cu +++ b/paddle/fluid/operators/math/sequence_padding.cu @@ -97,7 +97,7 @@ class PaddingLoDTensorFunctor { "width of sequence in LoDTensor seq."); if (!norm_by_times && num_sequences == 1UL) { - Copy(seq, context.GetPlace(), context, &padding); + TensorCopy(seq, context.GetPlace(), context, &padding); padding.Resize(padding_dims); return; } @@ -172,7 +172,7 @@ class UnpaddingLoDTensorFunctor { "width of sequence in LoDTensor seq."); if (!norm_by_times && num_sequences == 1UL) { - Copy(padding, context.GetPlace(), context, &seq); + TensorCopy(padding, context.GetPlace(), context, &seq); seq.Resize(seq_dims); return; } diff --git a/paddle/fluid/operators/math/sequence_padding_test.cc b/paddle/fluid/operators/math/sequence_padding_test.cc index e1177fb0d77..bece46e7537 100644 --- a/paddle/fluid/operators/math/sequence_padding_test.cc +++ b/paddle/fluid/operators/math/sequence_padding_test.cc @@ -40,7 +40,7 @@ void TestSequencePadding(const paddle::framework::LoD& lod, if (paddle::platform::is_cpu_place(*place)) { seq = cpu_seq; } else { - Copy(cpu_seq, *place, *context, &seq); + TensorCopy(cpu_seq, *place, *context, &seq); seq.set_lod(lod); } @@ -63,7 +63,7 @@ void TestSequencePadding(const paddle::framework::LoD& lod, if (paddle::platform::is_cpu_place(*place)) { cpu_seq_back = seq_back; } else { - Copy(seq_back, paddle::platform::CPUPlace(), *context, &cpu_seq_back); + TensorCopy(seq_back, paddle::platform::CPUPlace(), *context, &cpu_seq_back); cpu_seq_back.set_lod(lod); } diff --git a/paddle/fluid/operators/math/vol2col_test.cc b/paddle/fluid/operators/math/vol2col_test.cc index 751d3ef19a2..eb91f862e39 100644 --- a/paddle/fluid/operators/math/vol2col_test.cc +++ b/paddle/fluid/operators/math/vol2col_test.cc @@ -71,7 +71,7 @@ void testVol2col() { if (paddle::platform::is_cpu_place(*place)) { input = input_tmp; } else { - Copy(input_tmp, *place, *context, &input); + paddle::framework::TensorCopy(input_tmp, *place, *context, &input); } output.mutable_data({1, filter_size, filter_size, filter_size, output_depth, output_height, output_width}, @@ -85,7 +85,7 @@ void testVol2col() { if (paddle::platform::is_cpu_place(*place)) { out_cfo_ptr = output.data(); } else { - Copy(output, paddle::platform::CPUPlace(), *context, &output_tmp); + TensorCopy(output, paddle::platform::CPUPlace(), *context, &output_tmp); out_cfo_ptr = output_tmp.data(); } @@ -99,7 +99,7 @@ void testVol2col() { if (paddle::platform::is_cpu_place(*place)) { input = input_tmp; } else { - Copy(input_tmp, *place, *context, &input); + TensorCopy(input_tmp, *place, *context, &input); } paddle::operators::math::Col2VolFunctor col2vol; @@ -109,7 +109,7 @@ void testVol2col() { if (paddle::platform::is_cpu_place(*place)) { in_ptr = input.data(); } else { - Copy(input, paddle::platform::CPUPlace(), *context, &input_tmp); + TensorCopy(input, paddle::platform::CPUPlace(), *context, &input_tmp); in_ptr = input_tmp.data(); } diff --git a/paddle/fluid/operators/merge_lod_tensor_op.cc b/paddle/fluid/operators/merge_lod_tensor_op.cc index 42ebc8e471b..4ebf20cbba6 100644 --- a/paddle/fluid/operators/merge_lod_tensor_op.cc +++ b/paddle/fluid/operators/merge_lod_tensor_op.cc @@ -51,7 +51,8 @@ class MergeLoDTensorOp : public framework::OperatorBase { cpu_mask->ShareDataWith(mask); } else if (platform::is_gpu_place(mask.place())) { #ifdef PADDLE_WITH_CUDA - framework::Copy(mask, platform::CPUPlace(), dev_ctx, cpu_mask.get()); + framework::TensorCopy(mask, platform::CPUPlace(), dev_ctx, + cpu_mask.get()); #else PADDLE_THROW("Not supported GPU, Please compile WITH_GPU option"); #endif @@ -106,8 +107,8 @@ class MergeLoDTensorOp : public framework::OperatorBase { continue; } auto slice = out->Slice(out_offset, out_offset + len); - framework::Copy(input->Slice(start_offset, end_offset), place, dev_ctx, - &slice); + framework::TensorCopy(input->Slice(start_offset, end_offset), place, + dev_ctx, &slice); out_offset += len; (*in_idx) += 1; } diff --git a/paddle/fluid/operators/mine_hard_examples_op.cc b/paddle/fluid/operators/mine_hard_examples_op.cc index 2128979faee..b7e9f4e2248 100644 --- a/paddle/fluid/operators/mine_hard_examples_op.cc +++ b/paddle/fluid/operators/mine_hard_examples_op.cc @@ -67,7 +67,8 @@ class MineHardExamplesKernel : public framework::OpKernel { auto out_match_indices = ctx.Output("UpdatedMatchIndices"); - framework::Copy(*in_matched_indices, ctx.GetPlace(), out_match_indices); + framework::TensorCopy(*in_matched_indices, ctx.GetPlace(), + out_match_indices); int batch_size = in_matched_indices->dims()[0]; int prior_num = in_matched_indices->dims()[1]; diff --git a/paddle/fluid/operators/multiplex_op.cu b/paddle/fluid/operators/multiplex_op.cu index cb89eeecfb2..45a25507935 100644 --- a/paddle/fluid/operators/multiplex_op.cu +++ b/paddle/fluid/operators/multiplex_op.cu @@ -33,7 +33,7 @@ class MultiplexGPUKernel : public framework::OpKernel { auto cols = ins[0]->numel() / rows; // copy index to cpu Tensor index_t_cpu; - Copy(*ids, platform::CPUPlace(), ctx.device_context(), &index_t_cpu); + TensorCopy(*ids, platform::CPUPlace(), ctx.device_context(), &index_t_cpu); auto* index = index_t_cpu.data(); auto stream = ctx.cuda_device_context().stream(); platform::CUDAPlace place = boost::get(ctx.GetPlace()); @@ -69,7 +69,7 @@ class MultiplexGradGPUKernel : public framework::OpKernel { auto cols = ins[0]->numel() / rows; // copy index to cpu Tensor index_t_cpu; - Copy(*ids, platform::CPUPlace(), ctx.device_context(), &index_t_cpu); + TensorCopy(*ids, platform::CPUPlace(), ctx.device_context(), &index_t_cpu); auto* index = index_t_cpu.data(); auto stream = ctx.cuda_device_context().stream(); diff --git a/paddle/fluid/operators/nccl_op_test.cu.cc b/paddle/fluid/operators/nccl_op_test.cu.cc index 24e30f54a13..b4021a5dacd 100644 --- a/paddle/fluid/operators/nccl_op_test.cu.cc +++ b/paddle/fluid/operators/nccl_op_test.cu.cc @@ -98,7 +98,7 @@ class NCCLTester : public ::testing::Test { send_tensor->mutable_data(kDims, place); std::vector send_vector(f::product(kDims), gpu_id); - paddle::framework::CopyFromVector(send_vector, *ctx, send_tensor); + paddle::framework::TensorFromVector(send_vector, *ctx, send_tensor); ctx->Wait(); VLOG(1) << "Send Tensor filled with elements " << send_tensor->numel(); } diff --git a/paddle/fluid/operators/parallel_do_op.cc b/paddle/fluid/operators/parallel_do_op.cc index 88c83ee213f..b21f9937ef5 100644 --- a/paddle/fluid/operators/parallel_do_op.cc +++ b/paddle/fluid/operators/parallel_do_op.cc @@ -78,7 +78,7 @@ inline void CopyOrShare(const framework::Variable &src, dst->GetMutable()->ShareDataWith(src.Get()); dst->GetMutable()->set_lod(src.Get().lod()); } else { - Copy(src.Get(), dst_place, dst->GetMutable()); + TensorCopy(src.Get(), dst_place, dst->GetMutable()); } } else if (src.IsType()) { auto &src_sr = src.Get(); @@ -88,7 +88,7 @@ inline void CopyOrShare(const framework::Variable &src, dst_sr->mutable_value()->ShareDataWith(src_sr.value()); dst_sr->set_rows(src_sr.rows()); } else { - Copy(src_sr.value(), dst_place, dst_sr->mutable_value()); + TensorCopy(src_sr.value(), dst_place, dst_sr->mutable_value()); } } else { PADDLE_THROW("Expect LoDTensor/SelectedRows, get %s", src.Type().name()); @@ -146,7 +146,7 @@ class ParallelDoOp : public framework::OperatorBase { auto &place = places[i]; auto *sub_scope = sub_scopes[i]; auto *dst = sub_scope->Var(param)->GetMutable(); - framework::Copy(src, place, dst); + framework::TensorCopy(src, place, dst); } } WaitOnPlaces(places); diff --git a/paddle/fluid/operators/print_op.cc b/paddle/fluid/operators/print_op.cc index 7fa2b060afd..fc09b4aa1da 100644 --- a/paddle/fluid/operators/print_op.cc +++ b/paddle/fluid/operators/print_op.cc @@ -179,7 +179,7 @@ class TensorPrintOp : public framework::OperatorBase { } else { // copy data to cpu to print platform::CPUPlace place; - framework::Copy(in_tensor, place, &printed_tensor); + framework::TensorCopy(in_tensor, place, &printed_tensor); } Formater formater; diff --git a/paddle/fluid/operators/recurrent_op.cc b/paddle/fluid/operators/recurrent_op.cc index 8435d6bcf07..00241e76821 100644 --- a/paddle/fluid/operators/recurrent_op.cc +++ b/paddle/fluid/operators/recurrent_op.cc @@ -291,7 +291,7 @@ class RecurrentOp : public RecurrentBase { auto dst_out = dst_tensor->Slice(seq_offset, seq_offset + 1); // Explicit copy output since the local RNN scope can be destroyed // early. - framework::Copy(src_tensor, place, dev_ctx, &dst_out); + framework::TensorCopy(src_tensor, place, dev_ctx, &dst_out); }); scopes.Next(); @@ -378,7 +378,7 @@ class RecurrentGradOp : public RecurrentBase { auto *cur_grad_var = cur_scope.Var(cur_grad); auto cur_grad_tensor = cur_grad_var->GetMutable(); - framework::Copy(ex_tensor, place, dev_ctx, cur_grad_tensor); + framework::TensorCopy(ex_tensor, place, dev_ctx, cur_grad_tensor); } } @@ -452,7 +452,7 @@ class RecurrentGradOp : public RecurrentBase { } auto dst = outside->Slice(seq_offset, seq_offset + 1); - framework::Copy(inside, place, dev_ctx, &dst); + framework::TensorCopy(inside, place, dev_ctx, &dst); }); VLOG(5) << "Link outside gradient finished "; @@ -465,7 +465,7 @@ class RecurrentGradOp : public RecurrentBase { framework::LoDTensor *outside) { outside->Resize(inside.dims()); outside->mutable_data(place, inside.type()); - framework::Copy(inside, place, dev_ctx, outside); + framework::TensorCopy(inside, place, dev_ctx, outside); }); VLOG(5) << "Link initialize state gradient finished "; } diff --git a/paddle/fluid/operators/reorder_lod_tensor_by_rank_op.cc b/paddle/fluid/operators/reorder_lod_tensor_by_rank_op.cc index b0df932f436..5c3e1f5678d 100644 --- a/paddle/fluid/operators/reorder_lod_tensor_by_rank_op.cc +++ b/paddle/fluid/operators/reorder_lod_tensor_by_rank_op.cc @@ -170,7 +170,7 @@ class ReorderLoDTensorByRankTableBase : public framework::OperatorBase { platform::DeviceContextPool &pool = platform::DeviceContextPool::Instance(); auto &dev_ctx = *pool.Get(place); - framework::Copy(x_sliced, out_sliced.place(), dev_ctx, &out_sliced); + framework::TensorCopy(x_sliced, out_sliced.place(), dev_ctx, &out_sliced); out_offset += len; return out_offset; } diff --git a/paddle/fluid/operators/reshape_op.h b/paddle/fluid/operators/reshape_op.h index c01100ef4df..1357bce4b7e 100644 --- a/paddle/fluid/operators/reshape_op.h +++ b/paddle/fluid/operators/reshape_op.h @@ -28,7 +28,7 @@ class ReshapeKernel : public framework::OpKernel { auto* in = ctx.Input("X"); auto out_dims = out->dims(); out->mutable_data(ctx.GetPlace()); - framework::Copy(*in, ctx.GetPlace(), ctx.device_context(), out); + framework::TensorCopy(*in, ctx.GetPlace(), ctx.device_context(), out); out->Resize(out_dims); } }; @@ -42,7 +42,7 @@ class ReshapeGradKernel : public framework::OpKernel { d_x->mutable_data(ctx.GetPlace()); auto in_dims = d_x->dims(); - framework::Copy(*d_out, ctx.GetPlace(), ctx.device_context(), d_x); + framework::TensorCopy(*d_out, ctx.GetPlace(), ctx.device_context(), d_x); d_x->Resize(in_dims); } }; diff --git a/paddle/fluid/operators/sequence_reshape_op.h b/paddle/fluid/operators/sequence_reshape_op.h index f0b5be0218c..2893808ee9c 100644 --- a/paddle/fluid/operators/sequence_reshape_op.h +++ b/paddle/fluid/operators/sequence_reshape_op.h @@ -61,7 +61,7 @@ class SequenceReshapeKernel : public framework::OpKernel { } } - framework::Copy(*in, context.GetPlace(), out); + framework::TensorCopy(*in, context.GetPlace(), out); out->Resize({static_cast(out->lod()[0].back()), out_width}); } }; @@ -77,7 +77,7 @@ class SequenceReshapeGradKernel : public framework::OpKernel { context.Output(framework::GradVarName("X")); xg_tensor_ptr->mutable_data(context.GetPlace()); - framework::Copy(*outg_tensor_ptr, context.GetPlace(), xg_tensor_ptr); + framework::TensorCopy(*outg_tensor_ptr, context.GetPlace(), xg_tensor_ptr); xg_tensor_ptr->Resize(x_tensor_ptr->dims()); } }; diff --git a/paddle/fluid/operators/sequence_slice_op.h b/paddle/fluid/operators/sequence_slice_op.h index 4f6d70483ec..b9c565cac95 100644 --- a/paddle/fluid/operators/sequence_slice_op.h +++ b/paddle/fluid/operators/sequence_slice_op.h @@ -66,13 +66,13 @@ class SequenceSliceOpKernel : public framework::OpKernel { if (platform::is_gpu_place(ctx.GetPlace())) { offset_cpu.mutable_data(offset->dims(), platform::CPUPlace()); - framework::Copy(*offset, platform::CPUPlace(), ctx.device_context(), - &offset_cpu); + framework::TensorCopy(*offset, platform::CPUPlace(), ctx.device_context(), + &offset_cpu); offset_data = offset_cpu.data(); length_cpu.mutable_data(length->dims(), platform::CPUPlace()); - framework::Copy(*length, platform::CPUPlace(), ctx.device_context(), - &length_cpu); + framework::TensorCopy(*length, platform::CPUPlace(), ctx.device_context(), + &length_cpu); length_data = length_cpu.data(); } @@ -127,13 +127,13 @@ class SequenceSliceGradOpKernel : public framework::OpKernel { if (platform::is_gpu_place(ctx.GetPlace())) { offset_cpu.mutable_data(offset->dims(), platform::CPUPlace()); - framework::Copy(*offset, platform::CPUPlace(), ctx.device_context(), - &offset_cpu); + framework::TensorCopy(*offset, platform::CPUPlace(), ctx.device_context(), + &offset_cpu); offset_data = offset_cpu.data(); length_cpu.mutable_data(length->dims(), platform::CPUPlace()); - framework::Copy(*length, platform::CPUPlace(), ctx.device_context(), - &length_cpu); + framework::TensorCopy(*length, platform::CPUPlace(), ctx.device_context(), + &length_cpu); length_data = length_cpu.data(); } diff --git a/paddle/fluid/operators/shrink_rnn_memory_op.cc b/paddle/fluid/operators/shrink_rnn_memory_op.cc index 183982f90fb..a1871a8e7fb 100644 --- a/paddle/fluid/operators/shrink_rnn_memory_op.cc +++ b/paddle/fluid/operators/shrink_rnn_memory_op.cc @@ -133,7 +133,7 @@ class ShrinkRNNMemoryGradOp : public ArrayOp { auto &dout_tensor = dout_var->Get(); auto height = dout_tensor.dims()[0]; auto slice = dx_tensor.Slice(0, static_cast(height)); - framework::Copy(dout_tensor, dout_tensor.place(), dev_ctx, &slice); + framework::TensorCopy(dout_tensor, dout_tensor.place(), dev_ctx, &slice); if (dx_tensor.dims()[0] > height) { auto rest_tensor = dx_tensor.Slice( static_cast(height), static_cast(dx_tensor.dims()[0])); diff --git a/paddle/fluid/operators/split_lod_tensor_op.cc b/paddle/fluid/operators/split_lod_tensor_op.cc index 1c5d647600d..3222cce2399 100644 --- a/paddle/fluid/operators/split_lod_tensor_op.cc +++ b/paddle/fluid/operators/split_lod_tensor_op.cc @@ -55,7 +55,8 @@ class SplitLoDTensorOp : public framework::OperatorBase { cpu_mask->ShareDataWith(mask); } else if (platform::is_gpu_place(mask.place())) { #ifdef PADDLE_WITH_CUDA - framework::Copy(mask, platform::CPUPlace(), dev_ctx, cpu_mask.get()); + framework::TensorCopy(mask, platform::CPUPlace(), dev_ctx, + cpu_mask.get()); #else PADDLE_THROW("Not supported GPU, Please compile WITH_GPU option"); #endif @@ -113,9 +114,9 @@ class SplitLoDTensorOp : public framework::OperatorBase { // out[offset: offset+len] = x[each_range.begin: each_range.end] auto slice = out->Slice(static_cast(offset), static_cast(offset + len)); - framework::Copy(x.Slice(static_cast(each_range.begin), - static_cast(each_range.end)), - x.place(), dev_ctx, &slice); + framework::TensorCopy(x.Slice(static_cast(each_range.begin), + static_cast(each_range.end)), + x.place(), dev_ctx, &slice); offset += len; } } diff --git a/paddle/fluid/operators/sum_op.h b/paddle/fluid/operators/sum_op.h index c9f22237d93..48b2d2779ae 100644 --- a/paddle/fluid/operators/sum_op.h +++ b/paddle/fluid/operators/sum_op.h @@ -137,8 +137,8 @@ class SumKernel : public framework::OpKernel { out_array.resize(i + 1); } if (out_array[i].numel() == 0) { - framework::Copy(in_array[i], in_array[i].place(), - context.device_context(), &out_array[i]); + framework::TensorCopy(in_array[i], in_array[i].place(), + context.device_context(), &out_array[i]); out_array[i].set_lod(in_array[i].lod()); } else { PADDLE_ENFORCE(out_array[i].lod() == in_array[i].lod()); diff --git a/paddle/fluid/operators/tensor_array_read_write_op.cc b/paddle/fluid/operators/tensor_array_read_write_op.cc index 9b484cda121..2636812c429 100644 --- a/paddle/fluid/operators/tensor_array_read_write_op.cc +++ b/paddle/fluid/operators/tensor_array_read_write_op.cc @@ -45,7 +45,7 @@ class WriteToArrayOp : public ArrayOp { platform::DeviceContextPool::Instance(); auto &dev_ctx = *pool.Get(place); - Copy(x_tensor, place, dev_ctx, out_tensor); + TensorCopy(x_tensor, place, dev_ctx, out_tensor); out_tensor->set_lod(x_tensor.lod()); } else { VLOG(10) << "WARNING: The input tensor 'x_tensor' holds no memory, so " @@ -138,7 +138,7 @@ class ReadFromArrayOp : public ArrayOp { platform::DeviceContextPool &pool = platform::DeviceContextPool::Instance(); auto &dev_ctx = *pool.Get(place); - framework::Copy(x_array[offset], place, dev_ctx, out_tensor); + framework::TensorCopy(x_array[offset], place, dev_ctx, out_tensor); out_tensor->set_lod(x_array[offset].lod()); } else { VLOG(10) << "offset " << offset << " >= " << x_array.size(); diff --git a/paddle/fluid/operators/warpctc_op.h b/paddle/fluid/operators/warpctc_op.h index aefb58bdcd1..3e3e3089315 100644 --- a/paddle/fluid/operators/warpctc_op.h +++ b/paddle/fluid/operators/warpctc_op.h @@ -185,7 +185,8 @@ class WarpCTCKernel : public framework::OpKernel { // warpctc accesses labels in CPU memory Tensor warpctc_label; - Copy(*label, platform::CPUPlace(), ctx.device_context(), &warpctc_label); + TensorCopy(*label, platform::CPUPlace(), ctx.device_context(), + &warpctc_label); const int* warpctc_label_data = warpctc_label.data(); // warpctc stores loss in CPU memory Tensor warpctc_loss; @@ -200,7 +201,7 @@ class WarpCTCKernel : public framework::OpKernel { sequence_width, num_sequences, blank, warpctc_loss_data); // Copy the loss back - Copy(warpctc_loss, ctx.GetPlace(), ctx.device_context(), loss); + TensorCopy(warpctc_loss, ctx.GetPlace(), ctx.device_context(), loss); } }; diff --git a/paddle/fluid/pybind/tensor_py.h b/paddle/fluid/pybind/tensor_py.h index 7e7fb554ac1..1b0916ea037 100644 --- a/paddle/fluid/pybind/tensor_py.h +++ b/paddle/fluid/pybind/tensor_py.h @@ -101,7 +101,7 @@ T TensorGetElement(framework::Tensor &self, size_t offset) { return self.data()[offset]; } else { std::shared_ptr dst(new framework::Tensor); - framework::Copy(self, platform::CPUPlace(), dst.get()); + framework::TensorCopy(self, platform::CPUPlace(), dst.get()); return dst->data()[offset]; } } @@ -111,9 +111,9 @@ template void TensorSetElement(framework::Tensor &self, size_t offset, T elem) { if (platform::is_gpu_place(self.place())) { std::shared_ptr dst(new framework::Tensor); - framework::Copy(self, platform::CPUPlace(), dst.get()); + framework::TensorCopy(self, platform::CPUPlace(), dst.get()); dst->data()[offset] = elem; - framework::Copy(*dst.get(), self.place(), &self); + framework::TensorCopy(*dst.get(), self.place(), &self); } else if (platform::is_cpu_place(self.place())) { self.data()[offset] = elem; -- GitLab From ca126fcab7fdb37b96590f28f3a798657abab726 Mon Sep 17 00:00:00 2001 From: TomorrowIsAnOtherDay <2466956298@qq.com> Date: Thu, 15 Feb 2018 02:52:27 +0800 Subject: [PATCH 061/122] add python API for one_hot OP (#8444) * add python API for one_hot OP * fix code style * fix code style_2 --- python/paddle/v2/fluid/layers/nn.py | 38 +++++++++++++++++++++++++++++ 1 file changed, 38 insertions(+) diff --git a/python/paddle/v2/fluid/layers/nn.py b/python/paddle/v2/fluid/layers/nn.py index 5f1842f5fb9..d1ac6583dd4 100644 --- a/python/paddle/v2/fluid/layers/nn.py +++ b/python/paddle/v2/fluid/layers/nn.py @@ -68,6 +68,7 @@ __all__ = [ 'layer_norm', 'softmax_with_cross_entropy', 'smooth_l1', + 'one_hot', ] @@ -3212,3 +3213,40 @@ def smooth_l1(x, y, inside_weight=None, outside_weight=None, sigma=None): 'Out': loss}, attrs={'sigma': sigma}) return loss + + +def one_hot(input, depth): + """ + One Hot Operator. This operator creates the one-hot representations for input + index values. The following example will help to explain the function of this + operator. + + Args: + input(Tensor/LodTensor): A Tensor/LodTensor of indices, last dimension must be 1. + depth(scalar): an interger defining the depth of the one hot dimension. + + Returns: + The one-hot tensor or LodTensor, same as input. + + Examples: + X is a LoDTensor: + X.lod = [[0, 1, 4]] + X.shape = [4, 1] + X.data = [[1], [1], [3], [0]] + set depth = 4 + Out is a LoDTensor: + Out.lod = [[0, 1, 4]] + Out.shape = [4, 4] + Out.data = [[0., 1., 0., 0.], + [0., 1., 0., 0.], + [0., 0., 0., 1.], + [1., 0., 0., 0.]] + """ + helper = LayerHelper("one_hot", **locals()) + one_hot_out = helper.create_tmp_variable(dtype='float32') + helper.append_op( + type="one_hot", + inputs={'X': input}, + attrs={'depth': depth}, + outputs={'Out': one_hot_out}) + return one_hot_out -- GitLab From 9890bb5987739402f7f2cba76230e7967f8230ed Mon Sep 17 00:00:00 2001 From: Yi Wang Date: Wed, 14 Feb 2018 11:16:36 -0800 Subject: [PATCH 062/122] Explain why we choose an old version of boost (#7967) --- cmake/external/boost.cmake | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/cmake/external/boost.cmake b/cmake/external/boost.cmake index 906bed2f04c..d9cd264b49d 100644 --- a/cmake/external/boost.cmake +++ b/cmake/external/boost.cmake @@ -15,6 +15,13 @@ include(ExternalProject) set(BOOST_PROJECT "extern_boost") +# To release PaddlePaddle as a pip package, we have to follow the +# manylinux1 standard, which features as old Linux kernels and +# compilers as possible and recommends CentOS 5. Indeed, the earliest +# CentOS version that works with NVIDIA CUDA is CentOS 6. And a new +# version of boost, say, 1.66.0, doesn't build on CentOS 6. We +# checked that the devtools package of CentOS 6 installs boost 1.41.0. +# So we use 1.41.0 here. set(BOOST_VER "1.41.0") set(BOOST_TAR "boost_1_41_0") set(BOOST_URL "http://paddlepaddledeps.s3-website-us-west-1.amazonaws.com/${BOOST_TAR}.tar.gz") -- GitLab From 8b24bd4fe851a793521f88630f56e9d4afcf8263 Mon Sep 17 00:00:00 2001 From: "Yang Yang(Tony)" Date: Wed, 14 Feb 2018 11:56:46 -0800 Subject: [PATCH 063/122] Update parallel_do.md --- doc/design/parallel_do.md | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/doc/design/parallel_do.md b/doc/design/parallel_do.md index d51b1014d4a..221af6b6a48 100644 --- a/doc/design/parallel_do.md +++ b/doc/design/parallel_do.md @@ -13,7 +13,7 @@ AddInput(kParameters, "Parameters are duplicated over different devices") AddInput(kPlaces, "Devices used for parallel processing"); AddOutput(kOutputs, "Outputs needed to be merged from different devices").AsDuplicable(); AddOutput(kParallelScopes, - "Container for all local variables in forward pass."); + "Scopes for all local variables in forward pass. One scope for each device"); AddAttr(kParallelBlock, "List of operaters to be executed in parallel"); ``` @@ -33,6 +33,7 @@ In the backward pass |||| Compute backward pass in parallel | accumulate param@grad from different devices to the first device | Merge input@grad from different devices +  | Copy param@grad to the place of parallel_do_op ``` This implementation allows to write mixed device program like this @@ -47,7 +48,7 @@ pd = ParallelDo(gpu_places) with pd.do(): read_input(feature) prediction = my_net(feature) - write_output(activation) + write_output(prediction) prediction = pd() loss = cross_entropy(prediction, label) ``` @@ -98,7 +99,7 @@ looks like this. ```python pd = ParallelDo(gpu_places) with pd.do(): - feature = pre_fetch(gpu_places) +    feature = get_data_from_prefetch_queue(gpu_places) prediction = my_net(feature) write_output(activation) ``` -- GitLab From 9d26f1a3dfd03bbce40c52f0195d2ebba9ced22b Mon Sep 17 00:00:00 2001 From: Yang Yang Date: Thu, 15 Feb 2018 02:08:33 +0000 Subject: [PATCH 064/122] callback to list of callbacks --- paddle/fluid/framework/executor.cc | 3 +-- python/paddle/v2/fluid/backward.py | 33 +++++++++++++++++------------ python/paddle/v2/fluid/optimizer.py | 2 +- 3 files changed, 22 insertions(+), 16 deletions(-) diff --git a/paddle/fluid/framework/executor.cc b/paddle/fluid/framework/executor.cc index 92b32b04d6b..93a4883368a 100644 --- a/paddle/fluid/framework/executor.cc +++ b/paddle/fluid/framework/executor.cc @@ -120,12 +120,11 @@ void Executor::Run(const ProgramDesc& pdesc, Scope* scope, int block_id, for (auto& op_desc : block.AllOps()) { auto op = paddle::framework::OpRegistry::CreateOp(*op_desc); - // VLOG(3) << op->DebugStringEx(local_scope); + VLOG(3) << place_ << " " << op->DebugStringEx(local_scope); platform::DeviceContextPool& pool = platform::DeviceContextPool::Instance(); platform::RecordEvent record_event(op->Type(), pool.Get(place_)); - VLOG(3) << op->Type(); op->Run(*local_scope, place_); if (FLAGS_benchmark) { VLOG(2) << "Memory used after operator " + op->Type() + " running: " diff --git a/python/paddle/v2/fluid/backward.py b/python/paddle/v2/fluid/backward.py index 682df3301b6..4e494db93b8 100644 --- a/python/paddle/v2/fluid/backward.py +++ b/python/paddle/v2/fluid/backward.py @@ -234,7 +234,6 @@ def _callback_lookup_(op): "ncclInit", {"parallel_scopes": self.parallel_scopes_name}, {"Communicator": ['nccl_com__do_not_change_']}, {}) - print(serialize_op_decs(op_desc)) block.program.global_block().desc.append_op().copy_from( op_desc) self.has_inserted_nccl_init = True @@ -285,9 +284,7 @@ def _append_backward_ops_(block, val(str): corresponding forward variable name callback(callable object): a callable object used to decorate new generated grad ops """ - if callbacks is None: - callbacks = [] - else: + if callbacks is not None: assert (isinstance(callbacks, list)) for cb in callbacks: if not hasattr(cb, '__call__'): @@ -302,12 +299,17 @@ def _append_backward_ops_(block, if op.has_attr("sub_block"): sub_block = program.block(op.block_attr("sub_block")) grad_sub_block = program.create_block(parent_idx=sub_block.idx) - if callbacks is None: - callbacks = [_callback_lookup_(op)] + cb = _callback_lookup_(op) + if cb is not None: + if callbacks is None: + new_callbacks = [cb] + else: + new_callbacks = callbacks + [_callback_lookup_(op)] + _append_backward_ops_(sub_block, sub_block.ops, grad_sub_block, + no_grad_dict, grad_to_var, new_callbacks) else: - callbacks.append(_callback_lookup_(op)) - _append_backward_ops_(sub_block, sub_block.ops, grad_sub_block, - no_grad_dict, grad_to_var, callbacks) + _append_backward_ops_(sub_block, sub_block.ops, grad_sub_block, + no_grad_dict, grad_to_var, callbacks) grad_sub_block_list.append(grad_sub_block.desc) # Getting op's corresponding grad_op @@ -327,8 +329,10 @@ def _append_backward_ops_(block, new_op_desc = target_block.desc.append_op() new_op_desc.copy_from(op_desc) grad_to_var["__current_op_desc__"] = new_op_desc - for cb in callbacks: - cb(block=target_block, context=grad_to_var) + if callbacks is not None: + assert (isinstance(callbacks, list)) + for cb in callbacks: + cb(block=target_block, context=grad_to_var) def _append_backward_vars_(block, start_op_idx, grad_to_var, grad_info_map): @@ -408,7 +412,8 @@ def _get_stop_gradients_(program): return no_grad_dict -def append_backward(loss, parameter_list=None, no_grad_set=None, callback=None): +def append_backward(loss, parameter_list=None, no_grad_set=None, + callbacks=None): """ Append backward part to main_program @@ -424,6 +429,8 @@ def append_backward(loss, parameter_list=None, no_grad_set=None, callback=None): (list[(Variable,Variable)]): list of (parameter, gradient) pair. """ assert isinstance(loss, framework.Variable) + if callbacks is not None: + isinstance(callbacks, list) program = loss.block.program if no_grad_set is None: @@ -451,7 +458,7 @@ def append_backward(loss, parameter_list=None, no_grad_set=None, callback=None): no_grad_dict[0].update(map(_append_grad_suffix_, block_no_grad_set)) _append_backward_ops_(root_block, op_path, root_block, no_grad_dict, - grad_to_var, callback) + grad_to_var, callbacks) # Because calc_gradient may be called multiple times, # we need rename the internal gradient variables so that they have diff --git a/python/paddle/v2/fluid/optimizer.py b/python/paddle/v2/fluid/optimizer.py index 39391eb8e40..ecc42f6215b 100644 --- a/python/paddle/v2/fluid/optimizer.py +++ b/python/paddle/v2/fluid/optimizer.py @@ -225,7 +225,7 @@ class Optimizer(object): `create_optimization_pass()` into one. """ params_grads = append_backward(loss, parameter_list, no_grad_set, - error_clip_callback) + [error_clip_callback]) params_grads = append_gradient_clip_ops(params_grads) -- GitLab From 501f4bd2d08adcb0f9b03dca4c034c5e54556305 Mon Sep 17 00:00:00 2001 From: Xin Pan Date: Tue, 13 Feb 2018 21:05:07 -0800 Subject: [PATCH 065/122] Add a script to bisect to a culprit commit. I expect that we need it to: 1. Find flaky test commit. 2. Find regression commit. Disable test is dangerous. We should first try to find the culprit commit and fix it or revert it. I managed to find 3d1ac72a (between 279aa62 and 6773129) that causes the recent failure of test_rnn_encoder_decoder. --- tools/continuous_integration/bisect.py | 141 +++++++++++++++++++++++++ 1 file changed, 141 insertions(+) create mode 100644 tools/continuous_integration/bisect.py diff --git a/tools/continuous_integration/bisect.py b/tools/continuous_integration/bisect.py new file mode 100644 index 00000000000..21a46e5cef0 --- /dev/null +++ b/tools/continuous_integration/bisect.py @@ -0,0 +1,141 @@ +# Copyright (c) 2018 PaddlePaddle Authors. All Rights Reserved. +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# A script to bisect the mainline commits and find the culprit commit. +# The default 'git bisect' checks feature branches, which is not desired +# because commits in feature branch might not pass tests or compile. +# +# Example: +# python ../bisect.py --git_dir=$PWD/../Paddle --build_dir=$PWD \ +# --good_commit=3647ed6 --bad_commit=279aa6 \ +# --test_target=test_rnn_encoder_decoder + +import argparse +import os +import subprocess +import sys + +parser = argparse.ArgumentParser(description=__doc__) +parser.add_argument( + '--git_dir', type=str, default='', help='git repo root directory.') +parser.add_argument( + '--build_dir', type=str, default='', help='build directory.') +parser.add_argument( + '--good_commit', + type=str, + default='', + help='The old commit known to be good.') +parser.add_argument( + '--bad_commit', + type=str, + default='', + help='The new commit known to be bad.') +parser.add_argument( + '--test_target', type=str, default='', help='The test target to evaluate.') +parser.add_argument( + '--bisect_branch', + type=str, + default='develop', + help='The mainline branch to bisect (feature branch ignored.') +parser.add_argument( + '--log_file', type=str, default='', help='The file use to log outputs.') +parser.add_argument( + '--test_times', + type=int, + default=10, + help="Number of times to run the test target.") +parser.add_argument( + '--build_parallel', type=int, default=32, help="make parallelism.") +args = parser.parse_args() + +if not args.log_file: + args.log_file = '/tmp/%s...%s.log' % (args.good_commit, args.bad_commit) + + +def print_arguments(): + print('----------- Configuration Arguments -----------') + for arg, value in sorted(vars(args).iteritems()): + print('%s: %s' % (arg, value)) + print('------------------------------------------------') + + +print_arguments() + +# List the commits in mainline branch. +os.chdir(args.git_dir) +ret = subprocess.check_output( + [ + 'git rev-list --first-parent %s...%s' % (args.good_commit, + args.bad_commit) + ], + shell=True) +sys.stdout.write('commits found:\n%s\n' % ret) +commits = ret.strip().split('\n') +os.chdir(args.build_dir) +# Clean up previous logs. +subprocess.check_output(['echo "" > %s' % args.log_file], shell=True) + +last_culprit = '' +while True: + # Get to the mainline branch and clean up + os.chdir(args.git_dir) + subprocess.check_output( + [ + 'git checkout %s && git clean -fd && git checkout .' % + args.bisect_branch + ], + shell=True) + + if not commits: + sys.stdout.write('no commits to bisect\n') + exit() + # checkout the picked branch. + pick_idx = len(commits) / 2 + pick = commits[pick_idx] + os.chdir(args.git_dir) + subprocess.check_output(['git checkout %s' % pick], shell=True) + + # Clean builds and compile. + # We assume mainline commits should always compile. + os.chdir(args.build_dir) + sys.stdout.write('eval commit %d/%d: %s\n' % (pick_idx, len(commits), pick)) + # Link error can happen without complete clean up. + cmd = ('rm -rf * && ' + 'cmake -DWITH_TESTING=ON %s >> %s && make -j%s >> %s' % + (args.git_dir, args.log_file, args.build_parallel, args.log_file)) + sys.stdout.write('cmd: %s\n' % cmd) + try: + subprocess.check_output([cmd], shell=True) + except subprocess.CalledProcessError as e: + sys.stderr.write('failed to build commit: %s\n%s\n' % (pick, e)) + exit() + # test the selected branch. + passed = True + try: + cmd = ('ctest --repeat-until-fail %s -R %s >> %s' % + (args.test_times, args.test_target, args.log_file)) + sys.stdout.write('cmd: %s\n' % cmd) + subprocess.check_output([cmd], shell=True) + except subprocess.CalledProcessError as e: + passed = False + last_culprit = pick + sys.stdout.write('eval %s passed: %s\n' % (pick, passed)) + if passed: + if pick_idx == 0: break + commits = commits[:pick_idx] + else: + if pick_idx + 1 >= len(commits): break + commits = commits[pick_idx + 1:] + +sys.stdout.write('Culprit commit: %s\n' % last_culprit) -- GitLab From 6752b06f8cc6d67f00a6bafb39a164d1ffd39322 Mon Sep 17 00:00:00 2001 From: emailweixu Date: Thu, 15 Feb 2018 14:14:21 -0800 Subject: [PATCH 066/122] Generating random numbers with given batch size (#8337) * Generating random numbers with given batch size uniform_random_batch_size_like_op gaussian_random_batch_size_like_op * More comments about random seed. * Move test_*_random_batch_size_like_op to unittests --- paddle/fluid/operators/CMakeLists.txt | 14 ++++ paddle/fluid/operators/batch_size_like.cc | 64 ++++++++++++++++ paddle/fluid/operators/batch_size_like.h | 36 +++++++++ .../fill_constant_batch_size_like_op.cc | 52 ++----------- .../gaussian_random_batch_size_like_op.cc | 73 +++++++++++++++++++ paddle/fluid/operators/gaussian_random_op.cc | 10 ++- paddle/fluid/operators/gaussian_random_op.cu | 6 +- .../uniform_random_batch_size_like_op.cc | 72 ++++++++++++++++++ paddle/fluid/operators/uniform_random_op.cc | 9 ++- paddle/fluid/operators/uniform_random_op.cu | 3 + python/paddle/v2/fluid/layers/ops.py | 3 + .../v2/fluid/tests/unittests/op_test.py | 18 ++++- ...test_gaussian_random_batch_size_like_op.py | 46 ++++++++++++ .../test_uniform_random_batch_size_like_op.py | 42 +++++++++++ .../tests/unittests/test_uniform_random_op.py | 46 ++++-------- 15 files changed, 409 insertions(+), 85 deletions(-) create mode 100644 paddle/fluid/operators/batch_size_like.cc create mode 100644 paddle/fluid/operators/batch_size_like.h create mode 100644 paddle/fluid/operators/gaussian_random_batch_size_like_op.cc create mode 100644 paddle/fluid/operators/uniform_random_batch_size_like_op.cc create mode 100644 python/paddle/v2/fluid/tests/unittests/test_gaussian_random_batch_size_like_op.py create mode 100644 python/paddle/v2/fluid/tests/unittests/test_uniform_random_batch_size_like_op.py diff --git a/paddle/fluid/operators/CMakeLists.txt b/paddle/fluid/operators/CMakeLists.txt index cadfd735d7b..8f14fd376ae 100644 --- a/paddle/fluid/operators/CMakeLists.txt +++ b/paddle/fluid/operators/CMakeLists.txt @@ -176,6 +176,20 @@ op_library(pool_op SRCS pool_op.cc DEPS pooling) op_library(conv_transpose_op SRCS conv_transpose_op.cc DEPS vol2col) endif() +cc_library(batch_size_like SRCS batch_size_like.cc DEPS op_registry) + +op_library(fill_constant_batch_size_like_op + SRCS fill_constant_batch_size_like_op.cc fill_constant_batch_size_like_op.cu.cc + DEPS batch_size_like) + +op_library(uniform_random_batch_size_like_op + SRCS uniform_random_batch_size_like_op.cc + DEPS batch_size_like uniform_random_op) + +op_library(gaussian_random_batch_size_like_op + SRCS gaussian_random_batch_size_like_op.cc + DEPS batch_size_like gaussian_random_op) + # FIXME(typhoonzero): save/load depends lodtensor serialization functions op_library(save_op DEPS lod_tensor) op_library(load_op DEPS lod_tensor) diff --git a/paddle/fluid/operators/batch_size_like.cc b/paddle/fluid/operators/batch_size_like.cc new file mode 100644 index 00000000000..4d4a6d4c472 --- /dev/null +++ b/paddle/fluid/operators/batch_size_like.cc @@ -0,0 +1,64 @@ +/* Copyright (c) 2018 PaddlePaddle Authors. All Rights Reserve. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. */ + +#include "paddle/fluid/operators/batch_size_like.h" + +namespace paddle { +namespace operators { + +void BatchSizeLikeOp::InferShape(framework::InferShapeContext *ctx) const { + PADDLE_ENFORCE(ctx->HasInput("Input"), + "Input(Input) of %s should not be null.", Type()); + PADDLE_ENFORCE(ctx->HasOutput("Out"), "Output(Out) of %s should not be null.", + Type()); + + auto &shape = ctx->Attrs().Get>("shape"); + PADDLE_ENFORCE_GT(shape.size(), 0); + std::vector shape_int64(shape.size(), 0); + std::transform(shape.begin(), shape.end(), shape_int64.begin(), + [](int a) { return static_cast(a); }); + auto output_dim = framework::make_ddim(shape_int64); + + int input_dim_idx = ctx->Attrs().Get("input_dim_idx"); + PADDLE_ENFORCE_GE(input_dim_idx, 0); + PADDLE_ENFORCE_GT(ctx->GetInputDim("Input").size(), input_dim_idx); + + int output_dim_idx = ctx->Attrs().Get("output_dim_idx"); + PADDLE_ENFORCE_GE(output_dim_idx, 0); + PADDLE_ENFORCE_GT(static_cast(shape.size()), output_dim_idx); + + output_dim[output_dim_idx] = ctx->GetInputDim("Input")[input_dim_idx]; + ctx->SetOutputDim("Out", output_dim); +} + +BatchSizeLikeOpMaker::BatchSizeLikeOpMaker(OpProto *proto, + OpAttrChecker *op_checker) + : framework::OpProtoAndCheckerMaker(proto, op_checker) { + AddInput("Input", + "(Tensor) Tensor " + "whose input_dim_idx'th dimension specifies the batch_size"); + AddOutput("Out", + "(Tensor) Tensor of specified shape will be filled " + "with the specified value"); + AddAttr>("shape", "(vector) The shape of the output"); + AddAttr("input_dim_idx", + "(int, default 0) The index of input's batch size dimension") + .SetDefault(0); + AddAttr("output_dim_idx", + "(int, default 0) The index of output's batch size dimension") + .SetDefault(0); +} + +} // namespace operators +} // namespace paddle diff --git a/paddle/fluid/operators/batch_size_like.h b/paddle/fluid/operators/batch_size_like.h new file mode 100644 index 00000000000..87e8f053a73 --- /dev/null +++ b/paddle/fluid/operators/batch_size_like.h @@ -0,0 +1,36 @@ +/* Copyright (c) 2018 PaddlePaddle Authors. All Rights Reserve. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. */ + +#pragma once + +#include "paddle/fluid/framework/op_registry.h" +#include "paddle/fluid/operators/math/math_function.h" + +namespace paddle { +namespace operators { + +class BatchSizeLikeOp : public framework::OperatorWithKernel { + public: + using framework::OperatorWithKernel::OperatorWithKernel; + + void InferShape(framework::InferShapeContext *ctx) const override; +}; + +class BatchSizeLikeOpMaker : public framework::OpProtoAndCheckerMaker { + public: + BatchSizeLikeOpMaker(OpProto *proto, OpAttrChecker *op_checker); +}; + +} // namespace operators +} // namespace paddle diff --git a/paddle/fluid/operators/fill_constant_batch_size_like_op.cc b/paddle/fluid/operators/fill_constant_batch_size_like_op.cc index a36248531ef..55eca71c8bd 100644 --- a/paddle/fluid/operators/fill_constant_batch_size_like_op.cc +++ b/paddle/fluid/operators/fill_constant_batch_size_like_op.cc @@ -13,42 +13,14 @@ See the License for the specific language governing permissions and limitations under the License. */ #include "paddle/fluid/operators/fill_constant_batch_size_like_op.h" +#include "paddle/fluid/operators/batch_size_like.h" namespace paddle { namespace operators { -class FillConstantBatchSizeLikeOp : public framework::OperatorWithKernel { - public: - using framework::OperatorWithKernel::OperatorWithKernel; - - void InferShape(framework::InferShapeContext *ctx) const override { - PADDLE_ENFORCE( - ctx->HasInput("Input"), - "Input(Input) of FillConstantBatchSizeLikeOp should not be null."); - PADDLE_ENFORCE( - ctx->HasOutput("Out"), - "Output(Out) of FillConstantBatchSizeLikeOp should not be null."); - - auto &shape = ctx->Attrs().Get>("shape"); - PADDLE_ENFORCE_GT(shape.size(), 0); - std::vector shape_int64(shape.size(), 0); - std::transform(shape.begin(), shape.end(), shape_int64.begin(), - [](int a) { return static_cast(a); }); - auto output_dim = framework::make_ddim(shape_int64); - - int input_dim_idx = ctx->Attrs().Get("input_dim_idx"); - PADDLE_ENFORCE_GE(input_dim_idx, 0); - PADDLE_ENFORCE_GT(ctx->GetInputDim("Input").size(), input_dim_idx); - - int output_dim_idx = ctx->Attrs().Get("output_dim_idx"); - PADDLE_ENFORCE_GE(output_dim_idx, 0); - PADDLE_ENFORCE_GT(static_cast(shape.size()), output_dim_idx); - - output_dim[output_dim_idx] = ctx->GetInputDim("Input")[input_dim_idx]; - ctx->SetOutputDim("Out", output_dim); - } - +class FillConstantBatchSizeLikeOp : public BatchSizeLikeOp { protected: + using BatchSizeLikeOp::BatchSizeLikeOp; framework::OpKernelType GetExpectedKernelType( const framework::ExecutionContext &ctx) const override { return framework::OpKernelType( @@ -57,28 +29,14 @@ class FillConstantBatchSizeLikeOp : public framework::OperatorWithKernel { } }; -class FillConstantBatchSizeLikeOpMaker - : public framework::OpProtoAndCheckerMaker { +class FillConstantBatchSizeLikeOpMaker : public BatchSizeLikeOpMaker { public: FillConstantBatchSizeLikeOpMaker(OpProto *proto, OpAttrChecker *op_checker) - : framework::OpProtoAndCheckerMaker(proto, op_checker) { + : BatchSizeLikeOpMaker(proto, op_checker) { AddAttr("dtype", "(int, default 5 (FP32)) " "Output data type") .SetDefault(framework::proto::DataType::FP32); - AddInput("Input", - "(Tensor) Tensor " - "whose dim_idx th dimension is used to specify the batch_size"); - AddOutput("Out", - "(Tensor) Tensor of specified shape will be filled " - "with the specified value"); - AddAttr>("shape", "(vector) The shape of the output"); - AddAttr("input_dim_idx", - "(int, default 0) The index of input's batch size dimension") - .SetDefault(0); - AddAttr("output_dim_idx", - "(int, default 0) The index of output's batch size dimension") - .SetDefault(0); AddAttr("value", "(float, default 0) The value to be filled") .SetDefault(0.0f); AddComment(R"DOC( diff --git a/paddle/fluid/operators/gaussian_random_batch_size_like_op.cc b/paddle/fluid/operators/gaussian_random_batch_size_like_op.cc new file mode 100644 index 00000000000..ac516986add --- /dev/null +++ b/paddle/fluid/operators/gaussian_random_batch_size_like_op.cc @@ -0,0 +1,73 @@ +/* Copyright (c) 2016 PaddlePaddle Authors. All Rights Reserve. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. */ + +#include "paddle/fluid/framework/op_registry.h" +#include "paddle/fluid/framework/operator.h" +#include "paddle/fluid/operators/batch_size_like.h" + +namespace paddle { +namespace operators { + +class GaussianRandomBatchSizeLikeOp : public BatchSizeLikeOp { + protected: + using BatchSizeLikeOp::BatchSizeLikeOp; + + framework::OpKernelType GetExpectedKernelType( + const framework::ExecutionContext &ctx) const override { + return framework::OpKernelType( + static_cast(ctx.Attr("dtype")), + ctx.GetPlace()); + } +}; + +class GaussianRandomBatchSizeLikeOpMaker : public BatchSizeLikeOpMaker { + public: + GaussianRandomBatchSizeLikeOpMaker(OpProto *proto, OpAttrChecker *op_checker) + : BatchSizeLikeOpMaker(proto, op_checker) { + AddAttr("mean", + "(float, default 0.0) " + "mean of random tensor.") + .SetDefault(.0f); + AddAttr("std", + "(float, default 1.0) " + "std of random tensor.") + .SetDefault(1.0f); + AddAttr("seed", + "(int, default 0) " + "Random seed of generator." + "0 means use system wide seed." + "Note that if seed is not 0, this operator will always " + "generate the same random numbers every time.") + .SetDefault(0); + AddAttr("dtype", + "(int, default 5(FP32)) " + "Output data type.") + .SetDefault(framework::proto::DataType::FP32); + + AddComment(R"DOC( +GaussianRandom Operator. + +Used to initialize tensors with gaussian random generator. +)DOC"); + } +}; + +} // namespace operators +} // namespace paddle + +REGISTER_OP_WITHOUT_GRADIENT( + gaussian_random_batch_size_like, + paddle::operators::GaussianRandomBatchSizeLikeOp, + paddle::operators::GaussianRandomBatchSizeLikeOpMaker); +// Kernels are registered in gaussian_random_op.cc and gaussian_random_op.cu diff --git a/paddle/fluid/operators/gaussian_random_op.cc b/paddle/fluid/operators/gaussian_random_op.cc index cf3a528bdd0..7fb2b2c230e 100644 --- a/paddle/fluid/operators/gaussian_random_op.cc +++ b/paddle/fluid/operators/gaussian_random_op.cc @@ -88,7 +88,9 @@ class GaussianRandomOpMaker : public framework::OpProtoAndCheckerMaker { AddAttr("seed", "(int, default 0) " "Random seed of generator." - "0 means use system wide seed.") + "0 means use system wide seed." + "Note that if seed is not 0, this operator will always " + "generate the same random numbers every time.") .SetDefault(0); AddAttr("dtype", "(int, default 5(FP32)) " @@ -110,4 +112,8 @@ Used to initialize tensors with gaussian random generator. namespace ops = paddle::operators; REGISTER_OP_WITHOUT_GRADIENT(gaussian_random, ops::GaussianRandomOp, ops::GaussianRandomOpMaker); -REGISTER_OP_CPU_KERNEL(gaussian_random, ops::CPUGaussianRandomKernel); +REGISTER_OP_CPU_KERNEL(gaussian_random, ops::CPUGaussianRandomKernel, + ops::CPUGaussianRandomKernel); +REGISTER_OP_CPU_KERNEL(gaussian_random_batch_size_like, + ops::CPUGaussianRandomKernel, + ops::CPUGaussianRandomKernel); diff --git a/paddle/fluid/operators/gaussian_random_op.cu b/paddle/fluid/operators/gaussian_random_op.cu index 7340590c3ef..7784856417e 100644 --- a/paddle/fluid/operators/gaussian_random_op.cu +++ b/paddle/fluid/operators/gaussian_random_op.cu @@ -61,4 +61,8 @@ class GPUGaussianRandomKernel : public framework::OpKernel { } // namespace paddle REGISTER_OP_CUDA_KERNEL(gaussian_random, - paddle::operators::GPUGaussianRandomKernel); + paddle::operators::GPUGaussianRandomKernel, + paddle::operators::GPUGaussianRandomKernel); +REGISTER_OP_CUDA_KERNEL(gaussian_random_batch_size_like, + paddle::operators::GPUGaussianRandomKernel, + paddle::operators::GPUGaussianRandomKernel); diff --git a/paddle/fluid/operators/uniform_random_batch_size_like_op.cc b/paddle/fluid/operators/uniform_random_batch_size_like_op.cc new file mode 100644 index 00000000000..fa31dad513d --- /dev/null +++ b/paddle/fluid/operators/uniform_random_batch_size_like_op.cc @@ -0,0 +1,72 @@ +/* Copyright (c) 2016 PaddlePaddle Authors. All Rights Reserve. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. */ + +#include "paddle/fluid/framework/op_registry.h" +#include "paddle/fluid/framework/operator.h" +#include "paddle/fluid/operators/batch_size_like.h" + +namespace paddle { +namespace operators { + +class UniformRandomBatchSizeLikeOp : public BatchSizeLikeOp { + protected: + using BatchSizeLikeOp::BatchSizeLikeOp; + + framework::OpKernelType GetExpectedKernelType( + const framework::ExecutionContext &ctx) const override { + return framework::OpKernelType( + static_cast(ctx.Attr("dtype")), + ctx.GetPlace()); + } +}; + +class UniformRandomBatchSizeLikeOpMaker : public BatchSizeLikeOpMaker { + public: + UniformRandomBatchSizeLikeOpMaker(OpProto *proto, OpAttrChecker *op_checker) + : BatchSizeLikeOpMaker(proto, op_checker) { + AddComment(R"DOC( +Uniform random operator + +This operator initializes a tensor with the same batch_size as the Input tensor + with random values sampled from a uniform distribution. + +)DOC"); + AddAttr("min", + "(float, default -1.0) " + "Minimum value of uniform random") + .SetDefault(-1.0f); + AddAttr("max", + "(float, default 1.0) " + "Maximun value of uniform random") + .SetDefault(1.0f); + AddAttr("seed", + "(int, default 0) " + "Random seed used for generating samples. " + "0 means use a seed generated by the system." + "Note that if seed is not 0, this operator will always " + "generate the same random numbers every time.") + .SetDefault(0); + AddAttr("dtype", "(int, default 5(FP32)) Output tensor data type") + .SetDefault(framework::proto::DataType::FP32); + } +}; + +} // namespace operators +} // namespace paddle + +REGISTER_OP_WITHOUT_GRADIENT( + uniform_random_batch_size_like, + paddle::operators::UniformRandomBatchSizeLikeOp, + paddle::operators::UniformRandomBatchSizeLikeOpMaker); +// Kernels are registered in uniform_random_op.cc and uniform_random_op.cu diff --git a/paddle/fluid/operators/uniform_random_op.cc b/paddle/fluid/operators/uniform_random_op.cc index 6c0167deab5..3a0a0d6fcaf 100644 --- a/paddle/fluid/operators/uniform_random_op.cc +++ b/paddle/fluid/operators/uniform_random_op.cc @@ -79,7 +79,7 @@ class UniformRandomOpMaker : public framework::OpProtoAndCheckerMaker { AddComment(R"DOC( Uniform random operator. -This operator initializes a tensor with random values sampled from a +This operator initializes a tensor with random values sampled from a uniform distribution. )DOC"); @@ -96,7 +96,9 @@ uniform distribution. AddAttr("seed", "(int, default 0) " "Random seed used for generating samples. " - "0 means use a seed generated by the system.") + "0 means use a seed generated by the system." + "Note that if seed is not 0, this operator will always " + "generate the same random numbers every time.") .SetDefault(0); AddAttr("dtype", "(int, default 5(FP32)) Output tensor data type") .SetDefault(framework::proto::DataType::FP32); @@ -110,3 +112,6 @@ REGISTER_OP_WITHOUT_GRADIENT(uniform_random, paddle::operators::UniformRandomOp, REGISTER_OP_CPU_KERNEL(uniform_random, paddle::operators::CPUUniformRandomKernel, paddle::operators::CPUUniformRandomKernel); +REGISTER_OP_CPU_KERNEL(uniform_random_batch_size_like, + paddle::operators::CPUUniformRandomKernel, + paddle::operators::CPUUniformRandomKernel); diff --git a/paddle/fluid/operators/uniform_random_op.cu b/paddle/fluid/operators/uniform_random_op.cu index 877d81d5c48..1232cd1eb33 100644 --- a/paddle/fluid/operators/uniform_random_op.cu +++ b/paddle/fluid/operators/uniform_random_op.cu @@ -66,3 +66,6 @@ class GPUUniformRandomKernel : public framework::OpKernel { REGISTER_OP_CUDA_KERNEL(uniform_random, paddle::operators::GPUUniformRandomKernel, paddle::operators::GPUUniformRandomKernel); +REGISTER_OP_CUDA_KERNEL(uniform_random_batch_size_like, + paddle::operators::GPUUniformRandomKernel, + paddle::operators::GPUUniformRandomKernel); diff --git a/python/paddle/v2/fluid/layers/ops.py b/python/paddle/v2/fluid/layers/ops.py index 28265a57e6a..0b88b639629 100644 --- a/python/paddle/v2/fluid/layers/ops.py +++ b/python/paddle/v2/fluid/layers/ops.py @@ -66,6 +66,9 @@ __all__ = [ 'logical_xor', 'logical_not', 'uniform_random', + 'uniform_random_batch_size_like', + 'gaussian_random', + 'gaussian_random_batch_size_like', 'cumsum', ] + __activations__ diff --git a/python/paddle/v2/fluid/tests/unittests/op_test.py b/python/paddle/v2/fluid/tests/unittests/op_test.py index 940e2bfb16a..4761811f0a3 100644 --- a/python/paddle/v2/fluid/tests/unittests/op_test.py +++ b/python/paddle/v2/fluid/tests/unittests/op_test.py @@ -248,7 +248,11 @@ class OpTest(unittest.TestCase): return feed_map - def check_output_with_place(self, place, atol): + def calc_output(self, place): + outs, _ = self._calc_output(place) + return outs + + def _calc_output(self, place): op_proto = OpProtoHolder.instance().get_op_proto(self.op_type) program = Program() @@ -281,7 +285,10 @@ class OpTest(unittest.TestCase): feed=feed_map, fetch_list=fetch_list, return_numpy=False) + return outs, fetch_list + def check_output_with_place(self, place, atol): + outs, fetch_list = self._calc_output(place) for out_name, out_dup in Operator.get_op_outputs(self.op_type): if out_name not in self.outputs: continue @@ -340,6 +347,15 @@ class OpTest(unittest.TestCase): for place in places: self.check_output_with_place(place, atol) + def check_output_customized(self, checker): + places = [core.CPUPlace()] + if core.is_compiled_with_cuda() and core.op_support_gpu(self.op_type): + places.append(core.CUDAPlace(0)) + for place in places: + outs = self.calc_output(place) + outs = [np.array(out) for out in outs] + checker(outs) + def __assert_is_close(self, numeric_grads, analytic_grads, names, max_relative_error, msg_prefix): diff --git a/python/paddle/v2/fluid/tests/unittests/test_gaussian_random_batch_size_like_op.py b/python/paddle/v2/fluid/tests/unittests/test_gaussian_random_batch_size_like_op.py new file mode 100644 index 00000000000..1398166a74e --- /dev/null +++ b/python/paddle/v2/fluid/tests/unittests/test_gaussian_random_batch_size_like_op.py @@ -0,0 +1,46 @@ +# Copyright (c) 2018 PaddlePaddle Authors. All Rights Reserve. +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +import unittest +import numpy as np +from op_test import OpTest + + +class TestGaussianRandomBatchSizeLike(OpTest): + def setUp(self): + self.op_type = "gaussian_random_batch_size_like" + self.inputs = {'Input': np.zeros((500, 2000), dtype="float32")} + self.attrs = {'mean': 1., 'std': 2., 'shape': [-1, 2000]} + self.outputs = {'Out': np.zeros((500, 2000), dtype='float32')} + + def test_check_output(self): + self.check_output_customized(self.verify_output) + + def verify_output(self, outs): + self.assertEqual(outs[0].shape, (500, 2000)) + hist, _ = np.histogram(outs[0], range=(-3, 5)) + hist = hist.astype("float32") + hist /= float(outs[0].size) + data = np.random.normal(size=(500, 2000), loc=1, scale=2) + hist2, _ = np.histogram(data, range=(-3, 5)) + hist2 = hist2.astype("float32") + hist2 /= float(outs[0].size) + self.assertTrue( + np.allclose( + hist, hist2, rtol=0, atol=0.01), + "hist: " + str(hist) + " hist2: " + str(hist2)) + + +if __name__ == "__main__": + unittest.main() diff --git a/python/paddle/v2/fluid/tests/unittests/test_uniform_random_batch_size_like_op.py b/python/paddle/v2/fluid/tests/unittests/test_uniform_random_batch_size_like_op.py new file mode 100644 index 00000000000..e033e86114f --- /dev/null +++ b/python/paddle/v2/fluid/tests/unittests/test_uniform_random_batch_size_like_op.py @@ -0,0 +1,42 @@ +# Copyright (c) 2018 PaddlePaddle Authors. All Rights Reserve. +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +import unittest +import numpy as np +from op_test import OpTest + + +class TestUniformRandomBatchSizeLike(OpTest): + def setUp(self): + self.op_type = "uniform_random_batch_size_like" + self.inputs = {'Input': np.zeros((500, 2000), dtype="float32")} + self.attrs = {'min': 1., 'max': 2., 'shape': [-1, 2000]} + self.outputs = {'Out': np.zeros((500, 2000), dtype='float32')} + + def test_check_output(self): + self.check_output_customized(self.verify_output) + + def verify_output(self, outs): + self.assertEqual(outs[0].shape, (500, 2000)) + hist, _ = np.histogram(outs[0], range=(1, 2)) + hist = hist.astype("float32") + hist /= float(outs[0].size) + prob = 0.1 * np.ones((10)) + self.assertTrue( + np.allclose( + hist, prob, rtol=0, atol=0.01), "hist: " + str(hist)) + + +if __name__ == "__main__": + unittest.main() diff --git a/python/paddle/v2/fluid/tests/unittests/test_uniform_random_op.py b/python/paddle/v2/fluid/tests/unittests/test_uniform_random_op.py index 53227716efb..75ff85a55fc 100644 --- a/python/paddle/v2/fluid/tests/unittests/test_uniform_random_op.py +++ b/python/paddle/v2/fluid/tests/unittests/test_uniform_random_op.py @@ -13,14 +13,11 @@ # limitations under the License. import unittest -import numpy +import numpy as np +from op_test import OpTest -from paddle.v2.fluid.op import Operator -import paddle.v2.fluid.core as core -import paddle.v2.fluid as fluid - -class TestUniformRandomOp(unittest.TestCase): +class TestUniformRandomOp(OpTest): def setUp(self): self.op_type = "uniform_random" self.inputs = {} @@ -30,35 +27,20 @@ class TestUniformRandomOp(unittest.TestCase): "max": 10.0, "seed": 10 } - self.outputs = ["Out"] - - def test_cpu(self): - self.uniform_random_test(place=core.CPUPlace()) - - def test_gpu(self): - if core.is_compiled_with_cuda(): - self.uniform_random_test(place=core.CUDAPlace(0)) - - def uniform_random_test(self, place): - program = fluid.Program() - block = program.global_block() - vout = block.create_var(name="Out") - op = block.append_op( - type=self.op_type, outputs={"Out": vout}, attrs=self.attrs) + self.outputs = {"Out": np.zeros((1000, 784)).astype("float32")} - op.desc.infer_var_type(block.desc) - op.desc.infer_shape(block.desc) - - fetch_list = [] - for var_name in self.outputs: - fetch_list.append(block.var(var_name)) - - exe = fluid.Executor(place) - outs = exe.run(program, fetch_list=fetch_list) + def test_check_output(self): + self.check_output_customized(self.verify_output) + def verify_output(self, outs): tensor = outs[0] - - self.assertAlmostEqual(tensor.mean(), 2.5, delta=0.1) + hist, _ = np.histogram(outs[0], range=(-5, 10)) + hist = hist.astype("float32") + hist /= float(outs[0].size) + prob = 0.1 * np.ones((10)) + self.assertTrue( + np.allclose( + hist, prob, rtol=0, atol=0.01), "hist: " + str(hist)) if __name__ == "__main__": -- GitLab From 4f122c07600bea33a764dffef7524469d8f1890b Mon Sep 17 00:00:00 2001 From: emailweixu Date: Thu, 15 Feb 2018 15:36:40 -0800 Subject: [PATCH 067/122] Remove incorrect statement in compare_op.h (#8416) The type of tensor z should be bool. And there's no need to call mutable_data because ElementwiseComputeEx will do it. --- paddle/fluid/operators/compare_op.h | 1 - 1 file changed, 1 deletion(-) diff --git a/paddle/fluid/operators/compare_op.h b/paddle/fluid/operators/compare_op.h index d7b62782fc6..7e78269cf47 100644 --- a/paddle/fluid/operators/compare_op.h +++ b/paddle/fluid/operators/compare_op.h @@ -67,7 +67,6 @@ class CompareOpKernel auto* x = context.Input("X"); auto* y = context.Input("Y"); auto* z = context.Output("Out"); - z->mutable_data(context.GetPlace()); int axis = context.Attr("axis"); ElementwiseComputeEx(context, x, y, axis, Functor(), z); -- GitLab From 89ead8d15101ae20f0bfee2d81d4aecbb67f66dd Mon Sep 17 00:00:00 2001 From: Yu Yang Date: Fri, 16 Feb 2018 07:38:17 +0800 Subject: [PATCH 068/122] Feature/understand sentiment parallel do (#7994) * Support parallel test for understand_sentiment * Full test on understand_sentiment * Skip normal tests * Debug CI * Enable benchmark * Revert init.cc * Make CI pass --- paddle/fluid/framework/executor.cc | 1 + .../tests/book/test_understand_sentiment.py | 97 ++++++++++++++++--- 2 files changed, 82 insertions(+), 16 deletions(-) diff --git a/paddle/fluid/framework/executor.cc b/paddle/fluid/framework/executor.cc index 23eeb276c07..636f67e4a7a 100644 --- a/paddle/fluid/framework/executor.cc +++ b/paddle/fluid/framework/executor.cc @@ -126,6 +126,7 @@ void Executor::Run(const ProgramDesc& pdesc, Scope* scope, int block_id, platform::RecordEvent record_event(op->Type(), pool.Get(place_)); op->Run(*local_scope, place_); + // Wait current device context. VLOG(3) << op->DebugStringEx(local_scope); if (FLAGS_benchmark) { VLOG(2) << "Memory used after operator " + op->Type() + " running: " diff --git a/python/paddle/v2/fluid/tests/book/test_understand_sentiment.py b/python/paddle/v2/fluid/tests/book/test_understand_sentiment.py index 6e0206d41db..af917de8e33 100644 --- a/python/paddle/v2/fluid/tests/book/test_understand_sentiment.py +++ b/python/paddle/v2/fluid/tests/book/test_understand_sentiment.py @@ -11,6 +11,7 @@ # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. # See the License for the specific language governing permissions and # limitations under the License. +from __future__ import print_function import unittest import paddle.v2.fluid as fluid @@ -23,7 +24,8 @@ import sys def convolution_net(data, label, input_dim, class_dim=2, emb_dim=32, hid_dim=32): - emb = fluid.layers.embedding(input=data, size=[input_dim, emb_dim]) + emb = fluid.layers.embedding( + input=data, size=[input_dim, emb_dim], is_sparse=True) conv_3 = fluid.nets.sequence_conv_pool( input=emb, num_filters=hid_dim, @@ -41,8 +43,6 @@ def convolution_net(data, label, input_dim, class_dim=2, emb_dim=32, act="softmax") cost = fluid.layers.cross_entropy(input=prediction, label=label) avg_cost = fluid.layers.mean(x=cost) - adam_optimizer = fluid.optimizer.Adam(learning_rate=0.002) - adam_optimizer.minimize(avg_cost) accuracy = fluid.layers.accuracy(input=prediction, label=label) return avg_cost, accuracy, prediction @@ -56,7 +56,8 @@ def stacked_lstm_net(data, stacked_num=3): assert stacked_num % 2 == 1 - emb = fluid.layers.embedding(input=data, size=[input_dim, emb_dim]) + emb = fluid.layers.embedding( + input=data, size=[input_dim, emb_dim], is_sparse=True) # add bias attr # TODO(qijun) linear act @@ -79,8 +80,6 @@ def stacked_lstm_net(data, act='softmax') cost = fluid.layers.cross_entropy(input=prediction, label=label) avg_cost = fluid.layers.mean(x=cost) - adam_optimizer = fluid.optimizer.Adam(learning_rate=0.002) - adam_optimizer.minimize(avg_cost) accuracy = fluid.layers.accuracy(input=prediction, label=label) return avg_cost, accuracy, prediction @@ -93,7 +92,7 @@ def create_random_lodtensor(lod, place, low, high): return res -def train(word_dict, net_method, use_cuda, save_dirname=None): +def train(word_dict, net_method, use_cuda, parallel=False, save_dirname=None): BATCH_SIZE = 128 PASS_NUM = 5 dict_dim = len(word_dict) @@ -102,8 +101,30 @@ def train(word_dict, net_method, use_cuda, save_dirname=None): data = fluid.layers.data( name="words", shape=[1], dtype="int64", lod_level=1) label = fluid.layers.data(name="label", shape=[1], dtype="int64") - cost, acc_out, prediction = net_method( - data, label, input_dim=dict_dim, class_dim=class_dim) + + if not parallel: + cost, acc_out, prediction = net_method( + data, label, input_dim=dict_dim, class_dim=class_dim) + else: + places = fluid.layers.get_places() + pd = fluid.layers.ParallelDo(places) + with pd.do(): + cost, acc, _ = net_method( + pd.read_input(data), + pd.read_input(label), + input_dim=dict_dim, + class_dim=class_dim) + pd.write_output(cost) + pd.write_output(acc) + + cost, acc = pd() + cost = fluid.layers.mean(x=cost) + acc_out = fluid.layers.mean(x=acc) + prediction = None + assert save_dirname is None + + adagrad = fluid.optimizer.Adagrad(learning_rate=0.002) + adagrad.minimize(cost) train_data = paddle.batch( paddle.reader.shuffle( @@ -164,14 +185,16 @@ def infer(use_cuda, save_dirname=None): print("Inference results: ", np_data) -def main(word_dict, net_method, use_cuda): +def main(word_dict, net_method, use_cuda, parallel=False, save_dirname=None): if use_cuda and not fluid.core.is_compiled_with_cuda(): return - # Directory for saving the trained model - save_dirname = "understand_sentiment.inference.model" - - train(word_dict, net_method, use_cuda, save_dirname) + train( + word_dict, + net_method, + use_cuda, + parallel=parallel, + save_dirname=save_dirname) infer(use_cuda, save_dirname) @@ -191,20 +214,62 @@ class TestUnderstandSentiment(unittest.TestCase): def test_conv_cpu(self): with self.new_program_scope(): - main(self.word_dict, net_method=convolution_net, use_cuda=False) + main( + self.word_dict, + net_method=convolution_net, + use_cuda=False, + save_dirname="understand_sentiment.inference.model") + def test_conv_cpu_parallel(self): + with self.new_program_scope(): + main( + self.word_dict, + net_method=convolution_net, + use_cuda=False, + parallel=True) + + @unittest.skip(reason="make CI faster") def test_stacked_lstm_cpu(self): with self.new_program_scope(): main(self.word_dict, net_method=stacked_lstm_net, use_cuda=False) + def test_stacked_lstm_cpu_parallel(self): + with self.new_program_scope(): + main( + self.word_dict, + net_method=stacked_lstm_net, + use_cuda=False, + parallel=True) + def test_conv_gpu(self): with self.new_program_scope(): - main(self.word_dict, net_method=convolution_net, use_cuda=True) + main( + self.word_dict, + net_method=convolution_net, + use_cuda=True, + save_dirname="understand_sentiment.inference.model") + + def test_conv_gpu_parallel(self): + with self.new_program_scope(): + main( + self.word_dict, + net_method=convolution_net, + use_cuda=True, + parallel=True) + @unittest.skip(reason="make CI faster") def test_stacked_lstm_gpu(self): with self.new_program_scope(): main(self.word_dict, net_method=stacked_lstm_net, use_cuda=True) + def test_stacked_lstm_gpu_parallel(self): + with self.new_program_scope(): + main( + self.word_dict, + net_method=stacked_lstm_net, + use_cuda=True, + parallel=True) + if __name__ == '__main__': unittest.main() -- GitLab From 1d9fd1c0069beef175e9de9d2194a5f1620d3ed3 Mon Sep 17 00:00:00 2001 From: Yang Yang Date: Fri, 16 Feb 2018 00:10:28 +0000 Subject: [PATCH 069/122] pass test_recognize_digits --- paddle/fluid/operators/conv_op.cc | 5 +++-- paddle/fluid/operators/conv_op.h | 4 ++-- paddle/fluid/operators/parallel_do_op.cc | 7 +++++++ 3 files changed, 12 insertions(+), 4 deletions(-) diff --git a/paddle/fluid/operators/conv_op.cc b/paddle/fluid/operators/conv_op.cc index 6b378ec1bcb..2ecece70731 100644 --- a/paddle/fluid/operators/conv_op.cc +++ b/paddle/fluid/operators/conv_op.cc @@ -60,8 +60,9 @@ void ConvOp::InferShape(framework::InferShapeContext* ctx) const { "Due to the settings of paddings, filter_dims and " "dilations, the output size is less than 0, please check " "again."); - output_shape.push_back(OutputSize(in_dims[i + 2], filter_dims[i + 2], - dilations[i], paddings[i], strides[i])); + output_shape.push_back(ConvOutputSize(in_dims[i + 2], filter_dims[i + 2], + dilations[i], paddings[i], + strides[i])); } ctx->SetOutputDim("Output", framework::make_ddim(output_shape)); ctx->ShareLoD("Input", "Output"); diff --git a/paddle/fluid/operators/conv_op.h b/paddle/fluid/operators/conv_op.h index ecbe3d505ac..c93c2e73f72 100644 --- a/paddle/fluid/operators/conv_op.h +++ b/paddle/fluid/operators/conv_op.h @@ -28,8 +28,8 @@ using Tensor = framework::Tensor; // Base convolution operator definations for other conv // like operators to reuse the implementation. -inline int OutputSize(int input_size, int filter_size, int dilation, - int padding, int stride) { +inline int ConvOutputSize(int input_size, int filter_size, int dilation, + int padding, int stride) { const int dkernel = dilation * (filter_size - 1) + 1; const int output_size = (input_size + 2 * padding - dkernel) / stride + 1; return output_size; diff --git a/paddle/fluid/operators/parallel_do_op.cc b/paddle/fluid/operators/parallel_do_op.cc index d63962bb524..f09a79ffc52 100644 --- a/paddle/fluid/operators/parallel_do_op.cc +++ b/paddle/fluid/operators/parallel_do_op.cc @@ -256,6 +256,10 @@ class ParallelDoGradOp : public framework::OperatorBase { } } for (auto &s : Outputs(framework::GradVarName(kParameters))) { + if (s == "@EMPTY@") { + continue; + } + VLOG(3) << "Moving " << s; CopyOrShare(*sub_scopes[0]->FindVar(s), place, scope.FindVar(s)); } WaitOnPlaces(places); @@ -266,6 +270,9 @@ class ParallelDoGradOp : public framework::OperatorBase { const std::vector &sub_scopes, const platform::PlaceList &places) const { for (auto &s : Outputs(framework::GradVarName(kParameters))) { + if (s == "@EMPTY@") { + continue; + } VLOG(3) << "Accumulating " << s; if (s == framework::kEmptyVarName) continue; std::string tmp_name; -- GitLab From eb82b5ccc0c5519682ba2836c00e7e5f38426f95 Mon Sep 17 00:00:00 2001 From: Yang Yang Date: Fri, 16 Feb 2018 00:22:17 +0000 Subject: [PATCH 070/122] test error clip --- python/paddle/v2/fluid/tests/test_error_clip.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/python/paddle/v2/fluid/tests/test_error_clip.py b/python/paddle/v2/fluid/tests/test_error_clip.py index b331f16913d..3d6ffe80744 100644 --- a/python/paddle/v2/fluid/tests/test_error_clip.py +++ b/python/paddle/v2/fluid/tests/test_error_clip.py @@ -43,7 +43,7 @@ prog_clip.block(0).var(hidden1.name).set_error_clip( avg_cost_clip = prog_clip.block(0).var(avg_cost.name) fluid.backward.append_backward(loss=avg_cost) fluid.backward.append_backward( - loss=avg_cost_clip, callback=fluid.clip.error_clip_callback) + loss=avg_cost_clip, callbacks=fluid.clip.error_clip_callback) hidden1_grad = prog.block(0).var(hidden1.name + "@GRAD") hidden1_grad_clip = prog_clip.block(0).var(hidden1.name + "@GRAD") -- GitLab From 3494b79c4dee0e5382a2d7ea5f2754ff48893c79 Mon Sep 17 00:00:00 2001 From: Yang Yang Date: Fri, 16 Feb 2018 00:23:24 +0000 Subject: [PATCH 071/122] test error clip --- python/paddle/v2/fluid/tests/test_error_clip.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/python/paddle/v2/fluid/tests/test_error_clip.py b/python/paddle/v2/fluid/tests/test_error_clip.py index 3d6ffe80744..d577d0014dc 100644 --- a/python/paddle/v2/fluid/tests/test_error_clip.py +++ b/python/paddle/v2/fluid/tests/test_error_clip.py @@ -43,7 +43,7 @@ prog_clip.block(0).var(hidden1.name).set_error_clip( avg_cost_clip = prog_clip.block(0).var(avg_cost.name) fluid.backward.append_backward(loss=avg_cost) fluid.backward.append_backward( - loss=avg_cost_clip, callbacks=fluid.clip.error_clip_callback) + loss=avg_cost_clip, callbacks=[fluid.clip.error_clip_callback]) hidden1_grad = prog.block(0).var(hidden1.name + "@GRAD") hidden1_grad_clip = prog_clip.block(0).var(hidden1.name + "@GRAD") -- GitLab From cb06337f9e6503a14d8802ee2355e1aa64db9960 Mon Sep 17 00:00:00 2001 From: Yang Yang Date: Fri, 16 Feb 2018 01:07:36 +0000 Subject: [PATCH 072/122] change outputsize func name --- paddle/fluid/operators/conv_op.cc | 5 +++-- paddle/fluid/operators/conv_op.h | 4 ++-- paddle/fluid/operators/im2sequence_op.cc | 8 ++++---- paddle/fluid/operators/im2sequence_op.h | 20 ++++++++++---------- paddle/fluid/operators/pool_op.cc | 4 ++-- paddle/fluid/operators/pool_with_index_op.cc | 4 ++-- paddle/fluid/operators/unpool_op.cc | 6 +++--- 7 files changed, 26 insertions(+), 25 deletions(-) diff --git a/paddle/fluid/operators/conv_op.cc b/paddle/fluid/operators/conv_op.cc index 6b378ec1bcb..2ecece70731 100644 --- a/paddle/fluid/operators/conv_op.cc +++ b/paddle/fluid/operators/conv_op.cc @@ -60,8 +60,9 @@ void ConvOp::InferShape(framework::InferShapeContext* ctx) const { "Due to the settings of paddings, filter_dims and " "dilations, the output size is less than 0, please check " "again."); - output_shape.push_back(OutputSize(in_dims[i + 2], filter_dims[i + 2], - dilations[i], paddings[i], strides[i])); + output_shape.push_back(ConvOutputSize(in_dims[i + 2], filter_dims[i + 2], + dilations[i], paddings[i], + strides[i])); } ctx->SetOutputDim("Output", framework::make_ddim(output_shape)); ctx->ShareLoD("Input", "Output"); diff --git a/paddle/fluid/operators/conv_op.h b/paddle/fluid/operators/conv_op.h index ecbe3d505ac..c93c2e73f72 100644 --- a/paddle/fluid/operators/conv_op.h +++ b/paddle/fluid/operators/conv_op.h @@ -28,8 +28,8 @@ using Tensor = framework::Tensor; // Base convolution operator definations for other conv // like operators to reuse the implementation. -inline int OutputSize(int input_size, int filter_size, int dilation, - int padding, int stride) { +inline int ConvOutputSize(int input_size, int filter_size, int dilation, + int padding, int stride) { const int dkernel = dilation * (filter_size - 1) + 1; const int output_size = (input_size + 2 * padding - dkernel) / stride + 1; return output_size; diff --git a/paddle/fluid/operators/im2sequence_op.cc b/paddle/fluid/operators/im2sequence_op.cc index 5bc28e0a520..048391549dd 100644 --- a/paddle/fluid/operators/im2sequence_op.cc +++ b/paddle/fluid/operators/im2sequence_op.cc @@ -41,10 +41,10 @@ class Im2SequenceOp : public framework::OperatorWithKernel { int img_height = in_dim[2]; int img_width = in_dim[3]; - int output_height = OutputSize(img_height, kernels[0], paddings[0], - paddings[2], strides[0]); - int output_width = - OutputSize(img_width, kernels[1], paddings[1], paddings[3], strides[1]); + int output_height = Im2SeqOutputSize(img_height, kernels[0], paddings[0], + paddings[2], strides[0]); + int output_width = Im2SeqOutputSize(img_width, kernels[1], paddings[1], + paddings[3], strides[1]); ctx->SetOutputDim("Out", {batch_size * output_height * output_width, img_channels * kernels[0] * kernels[1]}); diff --git a/paddle/fluid/operators/im2sequence_op.h b/paddle/fluid/operators/im2sequence_op.h index 4193819b785..a6a83fefbc6 100644 --- a/paddle/fluid/operators/im2sequence_op.h +++ b/paddle/fluid/operators/im2sequence_op.h @@ -26,8 +26,8 @@ namespace operators { using Tensor = framework::Tensor; using LoDTensor = framework::LoDTensor; -inline int OutputSize(int input_size, int filter_size, int padding_0, - int padding_1, int stride) { +inline int Im2SeqOutputSize(int input_size, int filter_size, int padding_0, + int padding_1, int stride) { const int output_size = (input_size + padding_0 + padding_1 - filter_size) / stride + 1; return output_size; @@ -53,10 +53,10 @@ class Im2SequenceKernel : public framework::OpKernel { auto kernels = ctx.Attr>("kernels"); auto strides = ctx.Attr>("strides"); auto paddings = ctx.Attr>("paddings"); - int output_height = OutputSize(img_height, kernels[0], paddings[0], - paddings[2], strides[0]); - int output_width = - OutputSize(img_width, kernels[1], paddings[1], paddings[3], strides[1]); + int output_height = Im2SeqOutputSize(img_height, kernels[0], paddings[0], + paddings[2], strides[0]); + int output_width = Im2SeqOutputSize(img_width, kernels[1], paddings[1], + paddings[3], strides[1]); const std::vector dilations({1, 1}); @@ -109,10 +109,10 @@ class Im2SequenceGradKernel : public framework::OpKernel { auto kernels = ctx.Attr>("kernels"); auto strides = ctx.Attr>("strides"); auto paddings = ctx.Attr>("paddings"); - int output_height = OutputSize(img_height, kernels[0], paddings[0], - paddings[2], strides[0]); - int output_width = - OutputSize(img_width, kernels[1], paddings[1], paddings[3], strides[1]); + int output_height = Im2SeqOutputSize(img_height, kernels[0], paddings[0], + paddings[2], strides[0]); + int output_width = Im2SeqOutputSize(img_width, kernels[1], paddings[1], + paddings[3], strides[1]); const std::vector dilations({1, 1}); diff --git a/paddle/fluid/operators/pool_op.cc b/paddle/fluid/operators/pool_op.cc index a80b23b8ede..c7729ad1322 100644 --- a/paddle/fluid/operators/pool_op.cc +++ b/paddle/fluid/operators/pool_op.cc @@ -17,7 +17,7 @@ limitations under the License. */ namespace paddle { namespace operators { -int OutputSizePool(int input_size, int filter_size, int padding, int stride) { +int PoolOutputSize(int input_size, int filter_size, int padding, int stride) { int output_size = (input_size - filter_size + 2 * padding) / stride + 1; return output_size; } @@ -55,7 +55,7 @@ void PoolOp::InferShape(framework::InferShapeContext *ctx) const { std::vector output_shape({in_x_dims[0], in_x_dims[1]}); for (size_t i = 0; i < ksize.size(); ++i) { output_shape.push_back( - OutputSizePool(in_x_dims[i + 2], ksize[i], paddings[i], strides[i])); + PoolOutputSize(in_x_dims[i + 2], ksize[i], paddings[i], strides[i])); } ctx->SetOutputDim("Out", framework::make_ddim(output_shape)); ctx->ShareLoD("X", "Out"); diff --git a/paddle/fluid/operators/pool_with_index_op.cc b/paddle/fluid/operators/pool_with_index_op.cc index 3a59365d17f..4df0a14577c 100644 --- a/paddle/fluid/operators/pool_with_index_op.cc +++ b/paddle/fluid/operators/pool_with_index_op.cc @@ -17,7 +17,7 @@ limitations under the License. */ namespace paddle { namespace operators { -inline int OutputSizeMaxPool(int input_size, int filter_size, int padding, +inline int MaxPoolOutputSize(int input_size, int filter_size, int padding, int stride) { int output_size = (input_size - filter_size + 2 * padding) / stride + 1; return output_size; @@ -61,7 +61,7 @@ class MaxPoolWithIndexOp : public framework::OperatorWithKernel { std::vector output_shape({in_x_dims[0], in_x_dims[1]}); for (size_t i = 0; i < ksize.size(); ++i) { - output_shape.push_back(OutputSizeMaxPool(in_x_dims[i + 2], ksize[i], + output_shape.push_back(MaxPoolOutputSize(in_x_dims[i + 2], ksize[i], paddings[i], strides[i])); } ctx->SetOutputDim("Out", framework::make_ddim(output_shape)); diff --git a/paddle/fluid/operators/unpool_op.cc b/paddle/fluid/operators/unpool_op.cc index d3bd7fda09c..0ca7ea00faf 100644 --- a/paddle/fluid/operators/unpool_op.cc +++ b/paddle/fluid/operators/unpool_op.cc @@ -64,7 +64,7 @@ Paper: http://www.matthewzeiler.com/wp-content/uploads/2017/07/iccv2011.pdf } }; -int OutputSize(int input_size, int ksize, int padding, int stride) { +int UnpoolOutputSize(int input_size, int ksize, int padding, int stride) { int output_size = (input_size - 1) * stride - 2 * padding + ksize; return output_size; } @@ -101,8 +101,8 @@ class UnpoolOp : public framework::OperatorWithKernel { PADDLE_ENFORCE_EQ(in_x_dims, in_y_dims); std::vector output_shape({in_x_dims[0], in_x_dims[1]}); for (size_t i = 0; i < ksize.size(); ++i) { - output_shape.push_back( - OutputSize(in_x_dims[i + 2], ksize[i], paddings[i], strides[i])); + output_shape.push_back(UnpoolOutputSize(in_x_dims[i + 2], ksize[i], + paddings[i], strides[i])); } ctx->SetOutputDim("Out", framework::make_ddim(output_shape)); } -- GitLab From 74404fadcd5256d321f5440fec9fac44a3c8fc3e Mon Sep 17 00:00:00 2001 From: Abhinav Arora Date: Thu, 15 Feb 2018 17:08:57 -0800 Subject: [PATCH 073/122] Python implementation for a proposed Go Op. (#8434) * Adding Python boilerplate code for Go op * Add very basic test case * Adding the python logic for go routine * Fix syntax * Changing test to notest * Rename Routine to Go * Combining GoGuard and Go in one class * Modify test * Adding fluid close channel * Fixing __init__.py for calling fluid.go() * Adding stubs for channel methods and updating test case * Removing import * * Adding imports from concurrency --- python/paddle/v2/fluid/__init__.py | 4 +- python/paddle/v2/fluid/concurrency.py | 86 +++++++++++++++++++ .../v2/fluid/tests/notest_concurrency.py | 38 ++++++++ 3 files changed, 127 insertions(+), 1 deletion(-) create mode 100644 python/paddle/v2/fluid/concurrency.py create mode 100644 python/paddle/v2/fluid/tests/notest_concurrency.py diff --git a/python/paddle/v2/fluid/__init__.py b/python/paddle/v2/fluid/__init__.py index 9f710c4a4aa..361fb3f5ad9 100644 --- a/python/paddle/v2/fluid/__init__.py +++ b/python/paddle/v2/fluid/__init__.py @@ -34,13 +34,15 @@ from data_feeder import DataFeeder from core import LoDTensor, CPUPlace, CUDAPlace from distribute_transpiler import DistributeTranspiler from distribute_transpiler_simple import SimpleDistributeTranspiler +from concurrency import (Go, make_channel, channel_send, channel_recv, + channel_close) import clip from memory_optimization_transpiler import memory_optimize import profiler Tensor = LoDTensor -__all__ = framework.__all__ + executor.__all__ + [ +__all__ = framework.__all__ + executor.__all__ + concurrency.__all__ + [ 'io', 'initializer', 'layers', diff --git a/python/paddle/v2/fluid/concurrency.py b/python/paddle/v2/fluid/concurrency.py new file mode 100644 index 00000000000..5f868b6e86d --- /dev/null +++ b/python/paddle/v2/fluid/concurrency.py @@ -0,0 +1,86 @@ +# Copyright (c) 2018 PaddlePaddle Authors. All Rights Reserved. +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# TODO: Variables: make_channel +# TODO: Operators: send, close_channel, recv, go, select +from layers.control_flow import BlockGuard +from layer_helper import LayerHelper + +__all__ = [ + 'Go', + 'make_channel', + 'channel_send', + 'channel_recv', + 'channel_close', +] + + +class Go(BlockGuard): + def __init__(self, name=None): + self.helper = LayerHelper("go", name=name) + super(Go, self).__init__(self.helper.main_program) + + def __enter__(self): + super(Go, self).__enter__() + + def __exit__(self, exc_type, exc_val, exc_tb): + if exc_type is not None: + return False + self.construct_go_op() + return super(Go, self).__exit__(exc_type, exc_val, exc_tb) + + def construct_go_op(self): + main_program = self.helper.main_program + go_block = main_program.current_block() + parent_block = main_program.block(main_program.current_block() + .parent_idx) + + x_name_list = set() + out_vars = set() + for op in go_block.ops: + # Iterate over all operators, get all the inputs + # and add as input to the Go operator. + for iname in op.input_names: + for in_var_name in op.input(iname): + x_name_list.add(in_var_name) + + # Iterate over all operators , get all the outputs + # add to the output list of Go operator only if + # they exist in the parent block. + for oname in op.output_names: + for out_var_name in op.output(oname): + if out_var_name in parent_block.vars: + out_vars.add(parent_block.var(out_var_name)) + + parent_block.append_op( + type='go', + inputs={'X': [parent_block.var(x_name) for x_name in x_name_list]}, + outputs={'Out': out_vars}, + attrs={'sub_block': go_block}) + + +def make_channel(dtype, size=0): + return True + + +def channel_send(channel, value): + return True + + +def channel_recv(channel): + return True + + +def channel_close(channel): + return True diff --git a/python/paddle/v2/fluid/tests/notest_concurrency.py b/python/paddle/v2/fluid/tests/notest_concurrency.py new file mode 100644 index 00000000000..9d87ed9c073 --- /dev/null +++ b/python/paddle/v2/fluid/tests/notest_concurrency.py @@ -0,0 +1,38 @@ +# Copyright (c) 2018 PaddlePaddle Authors. All Rights Reserved. +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +import unittest +import paddle.v2.fluid as fluid +import paddle.v2.fluid.core as core +from paddle.v2.fluid.executor import Executor + + +class TestRoutineOp(unittest.TestCase): + def test_simple_routine(self): + ch = fluid.make_channel(dtype=bool) + with fluid.Go(): + fluid.channel_send(ch, True) + + result = fluid.channel_recv(ch) + fluid.channel_close(ch) + + cpu = core.CPUPlace() + exe = Executor(cpu) + + outs = exe.run(fetch_list=[result]) + self.assertEqual(outs[0], True) + + +if __name__ == '__main__': + unittest.main() -- GitLab From 74e0eb7267b4eae7016a44fb1fbc62bf2e952bde Mon Sep 17 00:00:00 2001 From: kexinzhao Date: Thu, 15 Feb 2018 17:10:29 -0800 Subject: [PATCH 074/122] make float16 a pod type (#8456) --- paddle/fluid/framework/tensor_impl.h | 5 +++- paddle/fluid/platform/float16.h | 43 ++++++++++++++++++++++----- paddle/fluid/platform/float16_test.cc | 32 ++++++++++++++++---- paddle/fluid/platform/float16_test.cu | 33 ++++++++++++++++++++ 4 files changed, 99 insertions(+), 14 deletions(-) diff --git a/paddle/fluid/framework/tensor_impl.h b/paddle/fluid/framework/tensor_impl.h index 59e6269ea04..638bd0db9d7 100644 --- a/paddle/fluid/framework/tensor_impl.h +++ b/paddle/fluid/framework/tensor_impl.h @@ -15,6 +15,7 @@ limitations under the License. */ #pragma once #include "paddle/fluid/memory/memcpy.h" #include "paddle/fluid/platform/enforce.h" +#include "paddle/fluid/platform/float16.h" namespace paddle { namespace framework { @@ -52,7 +53,9 @@ struct SizeOfTypeFunctor { }; static inline size_t SizeOfType(std::type_index type) { - SizeOfTypeFunctor functor; + SizeOfTypeFunctor + functor; size_t size = functor(type); PADDLE_ENFORCE(size != 0UL, "Cannot get size of type %s", type.name()); return size; diff --git a/paddle/fluid/platform/float16.h b/paddle/fluid/platform/float16.h index c36bfad4bc1..cf6a4b09dbd 100644 --- a/paddle/fluid/platform/float16.h +++ b/paddle/fluid/platform/float16.h @@ -62,6 +62,7 @@ limitations under the License. */ #define PADDLE_ALIGN(x) __attribute__((aligned(x))) namespace paddle { +namespace platform { // Use PADDLE_ALIGNED(2) to ensure that each float16 will be allocated // and aligned at least on a 2-byte boundary, which leads to efficient @@ -71,11 +72,21 @@ struct PADDLE_ALIGN(2) float16 { public: uint16_t x; - // Constructors - HOSTDEVICE inline float16() : x(0) {} + // The following defaulted special class member functions + // are added to make float16 pass the std::is_trivial test + HOSTDEVICE inline float16() = default; - HOSTDEVICE inline float16(const float16& h) : x(h.x) {} + HOSTDEVICE inline float16(const float16&) = default; + HOSTDEVICE inline float16& operator=(const float16&) = default; + + HOSTDEVICE inline float16(float16&&) = default; + + HOSTDEVICE inline float16& operator=(float16&&) = default; + + HOSTDEVICE inline ~float16() = default; + +// Constructors #ifdef PADDLE_CUDA_FP16 HOSTDEVICE inline explicit float16(const half& h) { #if CUDA_VERSION >= 9000 @@ -136,11 +147,6 @@ struct PADDLE_ALIGN(2) float16 { HOSTDEVICE inline explicit float16(const T& val) : x(float16(static_cast(val)).x) {} - HOSTDEVICE inline float16& operator=(const float16& rhs) { - x = rhs.x; - return *this; - } - // Assignment operators #ifdef PADDLE_CUDA_FP16 HOSTDEVICE inline float16& operator=(const half& rhs) { @@ -727,4 +733,25 @@ HOSTDEVICE inline bool operator>=(const float16& a, const float16& b) { return float(a) >= float(b); } #endif + +} // namespace platform } // namespace paddle + +namespace std { + +// Override the std::is_pod::value for float16 +// The reason is that different compilers implemented std::is_pod based on +// different C++ standards. float16 class is a plain old data in C++11 given +// that it is both trivial and standard_layout. +// However, std::is_pod in nvcc 8.0 host c++ compiler follows C++0x and is +// more restricted in that you cannot provide any customized +// constructor in float16. Hence, we override is_pod here following C++11 +// so that .cu files can be successfully compiled by nvcc. +template <> +struct is_pod { + static const bool value = + is_trivial::value && + is_standard_layout::value; +}; + +} // namespace std diff --git a/paddle/fluid/platform/float16_test.cc b/paddle/fluid/platform/float16_test.cc index bed29dbfa7e..b716ad9df41 100644 --- a/paddle/fluid/platform/float16_test.cc +++ b/paddle/fluid/platform/float16_test.cc @@ -10,10 +10,13 @@ See the License for the specific language governing permissions and limitations under the License. */ #include "paddle/fluid/platform/float16.h" +#include "paddle/fluid/framework/init.h" +#include "paddle/fluid/framework/lod_tensor.h" #include namespace paddle { +namespace platform { TEST(float16, conversion_cpu) { // Explicit conversion from Eigen::half @@ -54,13 +57,9 @@ TEST(float16, conversion_cpu) { EXPECT_EQ(float16(true).x, 0x3c00); EXPECT_EQ(float16(false).x, 0x0000); - // Default constructor - float16 v_def; - EXPECT_EQ(v_def.x, 0x0000); - // Assignment operator float16 v_assign; - v_assign = v_def; + v_assign = float16(0); EXPECT_EQ(v_assign.x, 0x0000); v_assign = Eigen::half(1.0f); EXPECT_EQ(v_assign.x, 0x3c00); @@ -116,4 +115,27 @@ TEST(float16, comparison_cpu) { EXPECT_FALSE(float16(-0.0f) > float16(0.0f)); } +TEST(float16, lod_tensor_cpu) { + framework::LoDTensor lod_tensor; + + std::vector input_data = {float16(1.0f), float16(0.5f), + float16(0.33333f), float16(0.0f)}; + EXPECT_EQ(input_data[0].x, 0x3c00); + EXPECT_EQ(input_data[1].x, 0x3800); + EXPECT_EQ(input_data[2].x, 0x3555); + EXPECT_EQ(input_data[3].x, 0x0000); + + lod_tensor.Resize({4, 1}); + lod_tensor.set_lod(framework::LoD({{0, 2, 4}})); + float16* data_ptr = lod_tensor.mutable_data(CPUPlace()); + + EXPECT_NE(data_ptr, nullptr); + EXPECT_EQ(input_data.size(), static_cast(lod_tensor.numel())); + for (size_t i = 0; i < input_data.size(); ++i) { + data_ptr[i] = input_data[i]; + EXPECT_EQ(data_ptr[i].x, input_data[i].x); + } +} + +} // namespace platform } // namespace paddle diff --git a/paddle/fluid/platform/float16_test.cu b/paddle/fluid/platform/float16_test.cu index 7e6c9f58aca..567209df4ed 100644 --- a/paddle/fluid/platform/float16_test.cu +++ b/paddle/fluid/platform/float16_test.cu @@ -13,6 +13,8 @@ limitations under the License. */ #include +#include "paddle/fluid/framework/lod_tensor.h" +#include "paddle/fluid/framework/tensor_util.h" #include "paddle/utils/Logging.h" #define ARITHMETIC_KERNEL(op_type, sign) \ @@ -108,6 +110,7 @@ limitations under the License. */ #ifdef PADDLE_CUDA_FP16 namespace paddle { +namespace platform { #if CUDA_VERSION < 9000 ARITHMETIC_KERNEL(Add, +) @@ -209,5 +212,35 @@ TEST(float16, conversion_on_gpu) { EXPECT_EQ(v_assign.x, 0x3c00); } +TEST(float16, lod_tensor_on_gpu) { + framework::LoDTensor src_tensor; + framework::LoDTensor gpu_tensor; + framework::LoDTensor dst_tensor; + + float16* src_ptr = src_tensor.mutable_data( + framework::make_ddim({2, 2}), CPUPlace()); + + float16 arr[4] = {float16(1.0f), float16(0.5f), float16(0.33333f), + float16(0.0f)}; + memcpy(src_ptr, arr, 4 * sizeof(float16)); + + // CPU LoDTensor to GPU LoDTensor + CUDAPlace gpu_place(0); + CUDADeviceContext gpu_ctx(gpu_place); + framework::TensorCopy(src_tensor, gpu_place, gpu_ctx, &gpu_tensor); + + // GPU LoDTensor to CPU LoDTensor + framework::TensorCopy(gpu_tensor, CPUPlace(), gpu_ctx, &dst_tensor); + + // Sync before comparing LoDTensors + gpu_ctx.Wait(); + const float16* dst_ptr = dst_tensor.data(); + ASSERT_NE(src_ptr, dst_ptr); + for (size_t i = 0; i < 4; ++i) { + EXPECT_EQ(src_ptr[i].x, dst_ptr[i].x); + } +} + +} // namespace platform } // namespace paddle #endif // PADDLE_CUDA_FP16 -- GitLab From c7ad26d6a4a37c6a2f0a59408e93fda23315cf94 Mon Sep 17 00:00:00 2001 From: Abhinav Arora Date: Thu, 15 Feb 2018 21:32:07 -0800 Subject: [PATCH 075/122] [WIP] Move DataType enum inside VarType (#8447) * Move Pod Types from DataType enum to Type enum * Fixed data_type.h * Fix type in TensorDesc * Add comment to framework.proto * Fixed type in data_type.h * Updated format of type in data_type.h * Fix var_desc.h * Fix op_kernel_type.h * Fixed data_type_transform_test.cc * Fix operator.h * Fixed data_type_transform.cc * Fixed op_kernel_type_test.cc * Fix operator.cc * Fixed data_layout_transform_test.cc * Fix var_desc.cc * Fixed assign_value_op.cc * Fixed assign_value_op.h * fixed protobuf.cc * Fix data_layout_transform_test.cc and op_kernel_type_test.cc * Fixed rnn_memory_helper_op.cc * Fix progrma_desc_test.cc * Fixed fill_constant_batch_size_like_op.cc * Fix operator_test.cc * Fixed fill_constant_op.cc * Fixed gaussian_random_op.cc * Fixed uniform_random_op.cc * Fixed edit_distance_op.cc * Fixed fill_constant_batch_size_like_op.cc * Fixed rnn_memory_helper_op.cc * Fixed chunk_eval_op.cc * Fixed assign_value_op.cc * Fixed assign_value_op.h * Fixed cast_op.h * Fixed cast_op.h * Fix fill constant op * Fixed clang for assign_value_op.cc * Fix one_hot_op.h * Fix one_hot_op.cc * Fix fill_op.cc * Fixed sum_op.cc * Fixed sum_op clang * Fix uniform_random_op.cc * Fix gaussian_random_op.cc * Fix backward.cc * Fix protobuf.cc * Fixed prune_test.cc * Fixed op_registry_test.cc * Fix data_device_transform_test.cu * Fix travis error * Fixed one_hot_op.cu * Fixed op_registry_test.cc * Fixed nccl_op.cc * Fixing python tests * Revert "Fixing python tests" This reverts commit fccaa4c5818ed9f379ea1ce4315066cc78076c64. * Fixing Pybind to remove data type * Fixing tensor.py * Updated the new files: * Resolve error in merge conflict of fill_constant_batch_size_like_op.cc --- paddle/fluid/framework/backward.cc | 2 +- .../framework/data_device_transform_test.cu | 4 +- .../framework/data_layout_transform_test.cc | 4 +- paddle/fluid/framework/data_type.h | 54 +++++++++---------- paddle/fluid/framework/data_type_transform.cc | 10 ++-- .../framework/data_type_transform_test.cc | 6 +-- paddle/fluid/framework/framework.proto | 41 +++++++------- paddle/fluid/framework/op_kernel_type.h | 6 +-- paddle/fluid/framework/op_kernel_type_test.cc | 4 +- paddle/fluid/framework/op_registry_test.cc | 8 +-- paddle/fluid/framework/operator.cc | 4 +- paddle/fluid/framework/operator.h | 4 +- paddle/fluid/framework/operator_test.cc | 2 +- paddle/fluid/framework/program_desc_test.cc | 8 +-- paddle/fluid/framework/prune_test.cc | 2 +- paddle/fluid/framework/var_desc.cc | 10 ++-- paddle/fluid/framework/var_desc.h | 9 ++-- paddle/fluid/operators/assign_value_op.cc | 7 +-- paddle/fluid/operators/assign_value_op.h | 4 +- paddle/fluid/operators/cast_op.h | 3 +- paddle/fluid/operators/chunk_eval_op.cc | 2 +- paddle/fluid/operators/edit_distance_op.cc | 2 +- .../fill_constant_batch_size_like_op.cc | 4 +- paddle/fluid/operators/fill_constant_op.cc | 4 +- paddle/fluid/operators/fill_op.cc | 5 +- .../gaussian_random_batch_size_like_op.cc | 4 +- paddle/fluid/operators/gaussian_random_op.cc | 4 +- paddle/fluid/operators/nccl_op.cc | 2 +- paddle/fluid/operators/one_hot_op.cc | 2 +- paddle/fluid/operators/one_hot_op.cu | 3 +- paddle/fluid/operators/one_hot_op.h | 3 +- .../fluid/operators/rnn_memory_helper_op.cc | 4 +- paddle/fluid/operators/sum_op.cc | 3 +- .../uniform_random_batch_size_like_op.cc | 4 +- paddle/fluid/operators/uniform_random_op.cc | 4 +- paddle/fluid/pybind/protobuf.cc | 16 +++--- python/paddle/v2/fluid/backward.py | 2 +- python/paddle/v2/fluid/data_feeder.py | 8 +-- python/paddle/v2/fluid/evaluator.py | 2 +- python/paddle/v2/fluid/framework.py | 29 +++++----- python/paddle/v2/fluid/layers/control_flow.py | 2 +- python/paddle/v2/fluid/layers/nn.py | 2 +- python/paddle/v2/fluid/layers/tensor.py | 14 ++--- .../fluid/memory_optimization_transpiler.py | 14 ++--- .../paddle/v2/fluid/tests/test_cpp_reader.py | 2 +- .../v2/fluid/tests/unittests/op_test.py | 4 +- .../tests/unittests/test_batch_norm_op.py | 4 +- .../v2/fluid/tests/unittests/test_cast_op.py | 4 +- .../v2/fluid/tests/unittests/test_fill_op.py | 2 +- .../tests/unittests/test_layer_norm_op.py | 4 +- .../fluid/tests/unittests/test_one_hot_op.py | 2 +- .../fluid/tests/unittests/test_parameter.py | 2 +- .../tests/unittests/test_protobuf_descs.py | 7 +-- .../v2/fluid/tests/unittests/test_variable.py | 6 +-- 54 files changed, 189 insertions(+), 179 deletions(-) diff --git a/paddle/fluid/framework/backward.cc b/paddle/fluid/framework/backward.cc index 68f4fd4424f..1314af2b3da 100644 --- a/paddle/fluid/framework/backward.cc +++ b/paddle/fluid/framework/backward.cc @@ -341,7 +341,7 @@ static void CreateGradVarInBlock( auto* param = block_desc->FindVarRecursive(pname); auto* grad = block_desc->FindVar(arg); if (param == nullptr) { - grad->SetDataType(proto::DataType::FP32); + grad->SetDataType(proto::VarType::FP32); } else { grad->SetDataType(param->GetDataType()); } diff --git a/paddle/fluid/framework/data_device_transform_test.cu b/paddle/fluid/framework/data_device_transform_test.cu index db6687985df..e896a061625 100644 --- a/paddle/fluid/framework/data_device_transform_test.cu +++ b/paddle/fluid/framework/data_device_transform_test.cu @@ -51,10 +51,10 @@ class TestOpWithKernel : public OperatorWithKernel { const ExecutionContext& ctx) const override { if (Attr("use_gpu")) { VLOG(3) << "force use gpu kernel"; - return OpKernelType(proto::DataType::FP32, platform::CUDAPlace(0)); + return OpKernelType(proto::VarType::FP32, platform::CUDAPlace(0)); } else { VLOG(3) << "use default kernel"; - return OpKernelType(proto::DataType::FP32, + return OpKernelType(proto::VarType::FP32, ctx.Input("input")->place()); } } diff --git a/paddle/fluid/framework/data_layout_transform_test.cc b/paddle/fluid/framework/data_layout_transform_test.cc index 73689cc9bc4..dd17cac0e10 100644 --- a/paddle/fluid/framework/data_layout_transform_test.cc +++ b/paddle/fluid/framework/data_layout_transform_test.cc @@ -27,9 +27,9 @@ TEST(DataTransform, DataLayoutFunction) { in.mutable_data(make_ddim({2, 3, 1, 2}), place); in.set_layout(DataLayout::kNHWC); - auto kernel_nhwc = OpKernelType(proto::DataType::FP32, place, + auto kernel_nhwc = OpKernelType(proto::VarType::FP32, place, DataLayout::kNHWC, LibraryType::kPlain); - auto kernel_ncwh = OpKernelType(proto::DataType::FP32, place, + auto kernel_ncwh = OpKernelType(proto::VarType::FP32, place, DataLayout::kNCHW, LibraryType::kPlain); TransDataLayout(kernel_nhwc, kernel_ncwh, in, &out); diff --git a/paddle/fluid/framework/data_type.h b/paddle/fluid/framework/data_type.h index 127bbcf5d00..1dec766a345 100644 --- a/paddle/fluid/framework/data_type.h +++ b/paddle/fluid/framework/data_type.h @@ -20,35 +20,35 @@ limitations under the License. */ namespace paddle { namespace framework { -inline proto::DataType ToDataType(std::type_index type) { +inline proto::VarType::Type ToDataType(std::type_index type) { using namespace paddle::framework::proto; if (typeid(float).hash_code() == type.hash_code()) { - return DataType::FP32; + return proto::VarType::FP32; } else if (typeid(double).hash_code() == type.hash_code()) { - return DataType::FP64; + return proto::VarType::FP64; } else if (typeid(int).hash_code() == type.hash_code()) { - return DataType::INT32; + return proto::VarType::INT32; } else if (typeid(int64_t).hash_code() == type.hash_code()) { - return DataType::INT64; + return proto::VarType::INT64; } else if (typeid(bool).hash_code() == type.hash_code()) { - return DataType::BOOL; + return proto::VarType::BOOL; } else { PADDLE_THROW("Not supported"); } } -inline std::type_index ToTypeIndex(proto::DataType type) { +inline std::type_index ToTypeIndex(proto::VarType::Type type) { using namespace paddle::framework::proto; switch (type) { - case DataType::FP32: + case proto::VarType::FP32: return typeid(float); - case DataType::FP64: + case proto::VarType::FP64: return typeid(double); - case DataType::INT32: + case proto::VarType::INT32: return typeid(int); - case DataType::INT64: + case proto::VarType::INT64: return typeid(int64_t); - case DataType::BOOL: + case proto::VarType::BOOL: return typeid(bool); default: PADDLE_THROW("Not support type %d", type); @@ -56,22 +56,22 @@ inline std::type_index ToTypeIndex(proto::DataType type) { } template -inline void VisitDataType(proto::DataType type, Visitor visitor) { +inline void VisitDataType(proto::VarType::Type type, Visitor visitor) { using namespace paddle::framework::proto; switch (type) { - case DataType::FP32: + case proto::VarType::FP32: visitor.template operator()(); break; - case DataType::FP64: + case proto::VarType::FP64: visitor.template operator()(); break; - case DataType::INT32: + case proto::VarType::INT32: visitor.template operator()(); break; - case DataType::INT64: + case proto::VarType::INT64: visitor.template operator()(); break; - case DataType::BOOL: + case proto::VarType::BOOL: visitor.template operator()(); break; default: @@ -79,22 +79,22 @@ inline void VisitDataType(proto::DataType type, Visitor visitor) { } } -inline std::string DataTypeToString(const proto::DataType type) { +inline std::string DataTypeToString(const proto::VarType::Type type) { using namespace paddle::framework::proto; switch (type) { - case DataType::FP16: + case proto::VarType::FP16: return "float16"; - case DataType::FP32: + case proto::VarType::FP32: return "float32"; - case DataType::FP64: + case proto::VarType::FP64: return "float64"; - case DataType::INT16: + case proto::VarType::INT16: return "int16"; - case DataType::INT32: + case proto::VarType::INT32: return "int32"; - case DataType::INT64: + case proto::VarType::INT64: return "int64"; - case DataType::BOOL: + case proto::VarType::BOOL: return "bool"; default: PADDLE_THROW("Not support type %d", type); @@ -102,7 +102,7 @@ inline std::string DataTypeToString(const proto::DataType type) { } inline std::ostream& operator<<(std::ostream& out, - const proto::DataType& type) { + const proto::VarType::Type& type) { out << DataTypeToString(type); return out; } diff --git a/paddle/fluid/framework/data_type_transform.cc b/paddle/fluid/framework/data_type_transform.cc index e5836998e23..54cc1575d88 100644 --- a/paddle/fluid/framework/data_type_transform.cc +++ b/paddle/fluid/framework/data_type_transform.cc @@ -65,19 +65,19 @@ void TransDataType(const OpKernelType& kernel_type_for_var, auto ctx = pool.Get(in.place()); switch (src_type) { - case proto::DataType::FP32: + case proto::VarType::FP32: framework::VisitDataType(dst_type, CastDataType(in, out, ctx)); break; - case proto::DataType::FP64: + case proto::VarType::FP64: framework::VisitDataType(dst_type, CastDataType(in, out, ctx)); break; - case proto::DataType::INT32: + case proto::VarType::INT32: framework::VisitDataType(dst_type, CastDataType(in, out, ctx)); break; - case proto::DataType::INT64: + case proto::VarType::INT64: framework::VisitDataType(dst_type, CastDataType(in, out, ctx)); break; - case proto::DataType::BOOL: + case proto::VarType::BOOL: framework::VisitDataType(dst_type, CastDataType(in, out, ctx)); break; default: diff --git a/paddle/fluid/framework/data_type_transform_test.cc b/paddle/fluid/framework/data_type_transform_test.cc index 444d3b823cf..724c8c301f2 100644 --- a/paddle/fluid/framework/data_type_transform_test.cc +++ b/paddle/fluid/framework/data_type_transform_test.cc @@ -32,11 +32,11 @@ TEST(DataTypeTransform, CPUTransform) { ptr[i] = i / 3; } - auto kernel_fp32 = OpKernelType(proto::DataType::FP32, place, + auto kernel_fp32 = OpKernelType(proto::VarType::FP32, place, DataLayout::kAnyLayout, LibraryType::kPlain); - auto kernel_fp64 = OpKernelType(proto::DataType::FP64, place, + auto kernel_fp64 = OpKernelType(proto::VarType::FP64, place, DataLayout::kAnyLayout, LibraryType::kPlain); - auto kernel_int32 = OpKernelType(proto::DataType::INT32, place, + auto kernel_int32 = OpKernelType(proto::VarType::INT32, place, DataLayout::kAnyLayout, LibraryType::kPlain); TransDataType(kernel_fp32, kernel_fp64, in, &out); diff --git a/paddle/fluid/framework/framework.proto b/paddle/fluid/framework/framework.proto index fa7f4378511..22d06923948 100644 --- a/paddle/fluid/framework/framework.proto +++ b/paddle/fluid/framework/framework.proto @@ -91,33 +91,34 @@ message OpProto { required string comment = 5; } -enum DataType { - BOOL = 0; - INT16 = 1; - INT32 = 2; - INT64 = 3; - FP16 = 4; - FP32 = 5; - FP64 = 6; -} - message VarType { enum Type { - LOD_TENSOR = 1; - SELECTED_ROWS = 2; - FEED_MINIBATCH = 3; - FETCH_LIST = 4; - STEP_SCOPES = 5; - LOD_RANK_TABLE = 6; - LOD_TENSOR_ARRAY = 7; - PLACE_LIST = 8; - READER = 9; + // Pod Types + BOOL = 0; + INT16 = 1; + INT32 = 2; + INT64 = 3; + FP16 = 4; + FP32 = 5; + FP64 = 6; + + // Other types that may need additional descriptions + LOD_TENSOR = 7; + SELECTED_ROWS = 8; + FEED_MINIBATCH = 9; + FETCH_LIST = 10; + STEP_SCOPES = 11; + LOD_RANK_TABLE = 12; + LOD_TENSOR_ARRAY = 13; + PLACE_LIST = 14; + READER = 15; } required Type type = 1; message TensorDesc { - required DataType data_type = 1; + // Should only be PODType. Is enforced in C++ + required Type data_type = 1; repeated int64 dims = 2; // [UNK, 640, 480] is saved as [-1, 640, 480] } optional TensorDesc selected_rows = 2; diff --git a/paddle/fluid/framework/op_kernel_type.h b/paddle/fluid/framework/op_kernel_type.h index 980e4eafaac..3a1036742c2 100644 --- a/paddle/fluid/framework/op_kernel_type.h +++ b/paddle/fluid/framework/op_kernel_type.h @@ -40,12 +40,12 @@ struct OpKernelType { // place, data_type, library_type kinds less than 2^8 constexpr static int LEFT_SHIFT = 8; - proto::DataType data_type_; + proto::VarType::Type data_type_; DataLayout data_layout_; platform::Place place_; LibraryType library_type_; - OpKernelType(proto::DataType data_type, platform::Place place, + OpKernelType(proto::VarType::Type data_type, platform::Place place, DataLayout data_layout = DataLayout::kAnyLayout, LibraryType library_type = LibraryType::kPlain) : data_type_(data_type), @@ -53,7 +53,7 @@ struct OpKernelType { place_(place), library_type_(library_type) {} - OpKernelType(proto::DataType data_type, + OpKernelType(proto::VarType::Type data_type, const platform::DeviceContext& dev_ctx, DataLayout data_layout = DataLayout::kAnyLayout, LibraryType library_type = LibraryType::kPlain) diff --git a/paddle/fluid/framework/op_kernel_type_test.cc b/paddle/fluid/framework/op_kernel_type_test.cc index e56fe35c01e..d37ce149ce3 100644 --- a/paddle/fluid/framework/op_kernel_type_test.cc +++ b/paddle/fluid/framework/op_kernel_type_test.cc @@ -18,7 +18,7 @@ limitations under the License. */ TEST(OpKernelType, ToString) { using OpKernelType = paddle::framework::OpKernelType; - using DataType = paddle::framework::proto::DataType; + using DataType = paddle::framework::proto::VarType; using CPUPlace = paddle::platform::CPUPlace; using DataLayout = paddle::framework::DataLayout; using LibraryType = paddle::framework::LibraryType; @@ -33,7 +33,7 @@ TEST(OpKernelType, ToString) { TEST(OpKernelType, Hash) { using OpKernelType = paddle::framework::OpKernelType; - using DataType = paddle::framework::proto::DataType; + using DataType = paddle::framework::proto::VarType; using CPUPlace = paddle::platform::CPUPlace; using CUDAPlace = paddle::platform::CUDAPlace; using DataLayout = paddle::framework::DataLayout; diff --git a/paddle/fluid/framework/op_registry_test.cc b/paddle/fluid/framework/op_registry_test.cc index b92647e892e..0d791c85835 100644 --- a/paddle/fluid/framework/op_registry_test.cc +++ b/paddle/fluid/framework/op_registry_test.cc @@ -226,7 +226,7 @@ class OpWithKernelTest : public OperatorWithKernel { framework::OpKernelType GetExpectedKernelType( const framework::ExecutionContext& ctx) const override { - return framework::OpKernelType(proto::DataType::FP32, ctx.device_context()); + return framework::OpKernelType(proto::VarType::FP32, ctx.device_context()); } }; @@ -290,9 +290,9 @@ class OpWithMultiKernelTest : public OperatorWithKernel { framework::OpKernelType GetExpectedKernelType( const framework::ExecutionContext& ctx) const override { - return framework::OpKernelType( - proto::DataType::FP32, platform::CUDAPlace(0), DataLayout::kAnyLayout, - framework::LibraryType::kCUDNN); + return framework::OpKernelType(proto::VarType::FP32, platform::CUDAPlace(0), + DataLayout::kAnyLayout, + framework::LibraryType::kCUDNN); } }; diff --git a/paddle/fluid/framework/operator.cc b/paddle/fluid/framework/operator.cc index ff90aba10ba..7debdd85257 100644 --- a/paddle/fluid/framework/operator.cc +++ b/paddle/fluid/framework/operator.cc @@ -569,7 +569,7 @@ void OperatorWithKernel::RunImpl(const Scope& scope, } } -proto::DataType OperatorWithKernel::IndicateDataType( +proto::VarType::Type OperatorWithKernel::IndicateDataType( const ExecutionContext& ctx) const { auto& scope = ctx.scope(); int data_type = -1; @@ -595,7 +595,7 @@ proto::DataType OperatorWithKernel::IndicateDataType( } } PADDLE_ENFORCE(data_type != -1, "DataType should be indicated by input"); - return static_cast(data_type); + return static_cast(data_type); } OpKernelType OperatorWithKernel::GetExpectedKernelType( diff --git a/paddle/fluid/framework/operator.h b/paddle/fluid/framework/operator.h index c2782066ce2..41214b41cb6 100644 --- a/paddle/fluid/framework/operator.h +++ b/paddle/fluid/framework/operator.h @@ -394,9 +394,9 @@ class OperatorWithKernel : public OperatorBase { const OpKernelType& expected_kernel_type) const; private: - // indicate kernel DataType by input data. Defaultly all input data must be + // indicate kernel DataType by input data. By default all input data must be // same. - proto::DataType IndicateDataType(const ExecutionContext& ctx) const; + proto::VarType::Type IndicateDataType(const ExecutionContext& ctx) const; void RunImpl(const Scope& scope, const platform::Place& place) const final; }; diff --git a/paddle/fluid/framework/operator_test.cc b/paddle/fluid/framework/operator_test.cc index 08a471e0a11..44ca4d7ca56 100644 --- a/paddle/fluid/framework/operator_test.cc +++ b/paddle/fluid/framework/operator_test.cc @@ -119,7 +119,7 @@ class OpWithKernelTest : public OperatorWithKernel { void InferShape(framework::InferShapeContext* ctx) const override {} OpKernelType GetExpectedKernelType( const ExecutionContext& ctx) const override { - return OpKernelType(proto::DataType::FP32, ctx.GetPlace()); + return OpKernelType(proto::VarType::FP32, ctx.GetPlace()); } }; diff --git a/paddle/fluid/framework/program_desc_test.cc b/paddle/fluid/framework/program_desc_test.cc index d9c4331da1d..66618a291b5 100644 --- a/paddle/fluid/framework/program_desc_test.cc +++ b/paddle/fluid/framework/program_desc_test.cc @@ -24,13 +24,13 @@ TEST(ProgramDesc, copy_ctor) { auto* x = global_block->Var("X"); x->SetType(proto::VarType::LOD_TENSOR); x->SetLoDLevel(0); - x->SetDataType(proto::FP32); + x->SetDataType(proto::VarType::FP32); x->SetShape({1000, 784}); auto* y = global_block->Var("Y"); y->SetType(proto::VarType::LOD_TENSOR); y->SetLoDLevel(0); - y->SetDataType(proto::FP32); + y->SetDataType(proto::VarType::FP32); y->SetShape({784, 100}); auto* op = global_block->AppendOp(); @@ -86,13 +86,13 @@ TEST(ProgramDescBind, serialize_and_deserialize) { auto* x = global_block->Var("X"); x->SetType(proto::VarType::LOD_TENSOR); x->SetLoDLevel(0); - x->SetDataType(proto::FP32); + x->SetDataType(proto::VarType::FP32); x->SetShape({1000, 784}); auto* y = global_block->Var("Y"); y->SetType(proto::VarType::LOD_TENSOR); y->SetLoDLevel(0); - y->SetDataType(proto::FP32); + y->SetDataType(proto::VarType::FP32); y->SetShape({784, 100}); auto* op = global_block->AppendOp(); diff --git a/paddle/fluid/framework/prune_test.cc b/paddle/fluid/framework/prune_test.cc index b612fe8ad58..0e44b343830 100644 --- a/paddle/fluid/framework/prune_test.cc +++ b/paddle/fluid/framework/prune_test.cc @@ -34,7 +34,7 @@ void AddOp(const std::string &type, const f::VariableNameMap &inputs, for (auto kv : outputs) { for (auto v : kv.second) { auto var = block->Var(v); - var->SetDataType(paddle::framework::proto::DataType::FP32); + var->SetDataType(paddle::framework::proto::VarType::FP32); } } diff --git a/paddle/fluid/framework/var_desc.cc b/paddle/fluid/framework/var_desc.cc index bb2be1ab50a..7e3f002b533 100644 --- a/paddle/fluid/framework/var_desc.cc +++ b/paddle/fluid/framework/var_desc.cc @@ -87,12 +87,12 @@ std::vector> VarDesc::GetShapes() const { return res; } -void VarDesc::SetDataType(proto::DataType data_type) { +void VarDesc::SetDataType(proto::VarType::Type data_type) { mutable_tensor_desc()->set_data_type(data_type); } void VarDesc::SetDataTypes( - const std::vector &multiple_data_type) { + const std::vector &multiple_data_type) { if (multiple_data_type.size() != GetTensorDescNum()) { VLOG(3) << "WARNING: The number of given data types(" << multiple_data_type.size() @@ -108,13 +108,13 @@ void VarDesc::SetDataTypes( } } -proto::DataType VarDesc::GetDataType() const { +proto::VarType::Type VarDesc::GetDataType() const { return tensor_desc().data_type(); } -std::vector VarDesc::GetDataTypes() const { +std::vector VarDesc::GetDataTypes() const { std::vector descs = tensor_descs(); - std::vector res; + std::vector res; res.reserve(descs.size()); for (const auto &tensor_desc : descs) { res.push_back(tensor_desc.data_type()); diff --git a/paddle/fluid/framework/var_desc.h b/paddle/fluid/framework/var_desc.h index 013ba446b94..19b8d890c1f 100644 --- a/paddle/fluid/framework/var_desc.h +++ b/paddle/fluid/framework/var_desc.h @@ -80,13 +80,14 @@ class VarDesc { std::vector> GetShapes() const; - void SetDataType(proto::DataType data_type); + void SetDataType(proto::VarType::Type data_type); - void SetDataTypes(const std::vector &multiple_data_type); + void SetDataTypes( + const std::vector &multiple_data_type); - proto::DataType GetDataType() const; + proto::VarType::Type GetDataType() const; - std::vector GetDataTypes() const; + std::vector GetDataTypes() const; void SetLoDLevel(int32_t lod_level); diff --git a/paddle/fluid/operators/assign_value_op.cc b/paddle/fluid/operators/assign_value_op.cc index 2985fc28a08..e8123cb1a49 100644 --- a/paddle/fluid/operators/assign_value_op.cc +++ b/paddle/fluid/operators/assign_value_op.cc @@ -36,7 +36,8 @@ class AssignValueOp : public framework::OperatorWithKernel { framework::OpKernelType GetExpectedKernelType( const framework::ExecutionContext &ctx) const override { return framework::OpKernelType( - framework::proto::DataType(ctx.Attr("dtype")), ctx.GetPlace()); + framework::proto::VarType::Type(ctx.Attr("dtype")), + ctx.GetPlace()); } }; @@ -49,8 +50,8 @@ class AssignValueOpMaker : public framework::OpProtoAndCheckerMaker { "(vector) " "Shape of values."); AddAttr("dtype", "data type of values") - .InEnum({framework::proto::DataType::INT32, - framework::proto::DataType::FP32}); + .InEnum({framework::proto::VarType::INT32, + framework::proto::VarType::FP32}); AddAttr>("fp32_values", "store the float values") .SetDefault({}); AddAttr>("int32_values", "store the int values") diff --git a/paddle/fluid/operators/assign_value_op.h b/paddle/fluid/operators/assign_value_op.h index d51b215a083..c7b1a55a5cd 100644 --- a/paddle/fluid/operators/assign_value_op.h +++ b/paddle/fluid/operators/assign_value_op.h @@ -30,10 +30,10 @@ class AssignValueKernel : public framework::OpKernel { int dtype = ctx.Attr("dtype"); const char* value_name = nullptr; switch (dtype) { - case framework::proto::DataType::INT32: + case framework::proto::VarType::INT32: value_name = "int32_values"; break; - case framework::proto::DataType::FP32: + case framework::proto::VarType::FP32: value_name = "fp32_values"; break; default: diff --git a/paddle/fluid/operators/cast_op.h b/paddle/fluid/operators/cast_op.h index ccfbd09a6b7..6220e57f594 100644 --- a/paddle/fluid/operators/cast_op.h +++ b/paddle/fluid/operators/cast_op.h @@ -55,7 +55,8 @@ class CastOpKernel : public framework::OpKernel { auto* in = context.Input("X"); auto* out = context.Output("Out"); framework::VisitDataType( - static_cast(context.Attr("out_dtype")), + static_cast( + context.Attr("out_dtype")), CastOpFunctor( in, out, context.template device_context())); } diff --git a/paddle/fluid/operators/chunk_eval_op.cc b/paddle/fluid/operators/chunk_eval_op.cc index 09d090e1877..77d3cffe7c1 100644 --- a/paddle/fluid/operators/chunk_eval_op.cc +++ b/paddle/fluid/operators/chunk_eval_op.cc @@ -57,7 +57,7 @@ class ChunkEvalOp : public framework::OperatorWithKernel { protected: framework::OpKernelType GetExpectedKernelType( const framework::ExecutionContext &ctx) const override { - return framework::OpKernelType(framework::proto::DataType::FP32, + return framework::OpKernelType(framework::proto::VarType::FP32, platform::CPUPlace()); } }; diff --git a/paddle/fluid/operators/edit_distance_op.cc b/paddle/fluid/operators/edit_distance_op.cc index dbcbfec9718..c7f037d2df4 100644 --- a/paddle/fluid/operators/edit_distance_op.cc +++ b/paddle/fluid/operators/edit_distance_op.cc @@ -42,7 +42,7 @@ class EditDistanceOp : public framework::OperatorWithKernel { protected: framework::OpKernelType GetExpectedKernelType( const framework::ExecutionContext &ctx) const override { - return framework::OpKernelType(framework::proto::DataType::FP32, + return framework::OpKernelType(framework::proto::VarType::FP32, ctx.device_context()); } }; diff --git a/paddle/fluid/operators/fill_constant_batch_size_like_op.cc b/paddle/fluid/operators/fill_constant_batch_size_like_op.cc index 55eca71c8bd..72da80baaf9 100644 --- a/paddle/fluid/operators/fill_constant_batch_size_like_op.cc +++ b/paddle/fluid/operators/fill_constant_batch_size_like_op.cc @@ -24,7 +24,7 @@ class FillConstantBatchSizeLikeOp : public BatchSizeLikeOp { framework::OpKernelType GetExpectedKernelType( const framework::ExecutionContext &ctx) const override { return framework::OpKernelType( - static_cast(ctx.Attr("dtype")), + static_cast(ctx.Attr("dtype")), ctx.device_context()); } }; @@ -36,7 +36,7 @@ class FillConstantBatchSizeLikeOpMaker : public BatchSizeLikeOpMaker { AddAttr("dtype", "(int, default 5 (FP32)) " "Output data type") - .SetDefault(framework::proto::DataType::FP32); + .SetDefault(framework::proto::VarType::FP32); AddAttr("value", "(float, default 0) The value to be filled") .SetDefault(0.0f); AddComment(R"DOC( diff --git a/paddle/fluid/operators/fill_constant_op.cc b/paddle/fluid/operators/fill_constant_op.cc index 0b65c83d3aa..07e0a80f8d6 100644 --- a/paddle/fluid/operators/fill_constant_op.cc +++ b/paddle/fluid/operators/fill_constant_op.cc @@ -38,7 +38,7 @@ class FillConstantOp : public framework::OperatorBase { void RunImpl(const framework::Scope &scope, const platform::Place &dev_place) const override { auto data_type = - static_cast(Attr("dtype")); + static_cast(Attr("dtype")); auto value = Attr("value"); auto force_cpu = Attr("force_cpu"); auto &out = @@ -64,7 +64,7 @@ class FillConstantOpMaker : public framework::OpProtoAndCheckerMaker { AddAttr("dtype", "(int, default 5 (FP32)) " "Output data type") - .SetDefault(framework::proto::DataType::FP32); + .SetDefault(framework::proto::VarType::FP32); AddAttr>("shape", "(vector) The shape of the output"); AddAttr("value", "(float, default 0) The value to be filled") .SetDefault(0.0f); diff --git a/paddle/fluid/operators/fill_op.cc b/paddle/fluid/operators/fill_op.cc index 3b4b4092311..ee8a2fc353f 100644 --- a/paddle/fluid/operators/fill_op.cc +++ b/paddle/fluid/operators/fill_op.cc @@ -51,7 +51,8 @@ class FillOp : public framework::OperatorBase { "Cannot find variable %s", Output("Out")) .GetMutable()); out.Resize(framework::make_ddim(Attr>("shape"))); - auto dtype = static_cast(Attr("dtype")); + auto dtype = + static_cast(Attr("dtype")); platform::CPUPlace cpu; auto force_cpu = Attr("force_cpu"); out.mutable_data(force_cpu ? cpu : place, framework::ToTypeIndex(dtype)); @@ -93,7 +94,7 @@ Fill an tensor with `value` and `shape`. The type of the tensor is specify by "value", "The float values of tensor, which are flatten in row major"); AddAttr>("shape", "The shape of output tensor"); AddAttr("dtype", "The data type of output tensor, Default is float") - .SetDefault(framework::proto::DataType::FP32); + .SetDefault(framework::proto::VarType::FP32); AddAttr("force_cpu", "Whether the output tensor must be at CPU memory or not. " "Default is false.") diff --git a/paddle/fluid/operators/gaussian_random_batch_size_like_op.cc b/paddle/fluid/operators/gaussian_random_batch_size_like_op.cc index ac516986add..53c706a83e5 100644 --- a/paddle/fluid/operators/gaussian_random_batch_size_like_op.cc +++ b/paddle/fluid/operators/gaussian_random_batch_size_like_op.cc @@ -26,7 +26,7 @@ class GaussianRandomBatchSizeLikeOp : public BatchSizeLikeOp { framework::OpKernelType GetExpectedKernelType( const framework::ExecutionContext &ctx) const override { return framework::OpKernelType( - static_cast(ctx.Attr("dtype")), + static_cast(ctx.Attr("dtype")), ctx.GetPlace()); } }; @@ -53,7 +53,7 @@ class GaussianRandomBatchSizeLikeOpMaker : public BatchSizeLikeOpMaker { AddAttr("dtype", "(int, default 5(FP32)) " "Output data type.") - .SetDefault(framework::proto::DataType::FP32); + .SetDefault(framework::proto::VarType::FP32); AddComment(R"DOC( GaussianRandom Operator. diff --git a/paddle/fluid/operators/gaussian_random_op.cc b/paddle/fluid/operators/gaussian_random_op.cc index 7fb2b2c230e..4d197637b3f 100644 --- a/paddle/fluid/operators/gaussian_random_op.cc +++ b/paddle/fluid/operators/gaussian_random_op.cc @@ -63,7 +63,7 @@ class GaussianRandomOp : public framework::OperatorWithKernel { framework::OpKernelType GetExpectedKernelType( const framework::ExecutionContext& ctx) const override { return framework::OpKernelType( - static_cast(ctx.Attr("dtype")), + static_cast(ctx.Attr("dtype")), ctx.device_context()); } }; @@ -95,7 +95,7 @@ class GaussianRandomOpMaker : public framework::OpProtoAndCheckerMaker { AddAttr("dtype", "(int, default 5(FP32)) " "Output data type.") - .SetDefault(framework::proto::DataType::FP32); + .SetDefault(framework::proto::VarType::FP32); AddComment(R"DOC( GaussianRandom Operator. diff --git a/paddle/fluid/operators/nccl_op.cc b/paddle/fluid/operators/nccl_op.cc index 7f1278f3a55..5ae50590dde 100644 --- a/paddle/fluid/operators/nccl_op.cc +++ b/paddle/fluid/operators/nccl_op.cc @@ -55,7 +55,7 @@ class NCCLInitOpMaker : public framework::OpProtoAndCheckerMaker { AddAttr("dtype", "(int, default 5 (FP32)) " "Output data type") - .SetDefault(framework::proto::DataType::FP32); + .SetDefault(framework::proto::VarType::FP32); AddComment(R"DOC( NCCLInit Operator. diff --git a/paddle/fluid/operators/one_hot_op.cc b/paddle/fluid/operators/one_hot_op.cc index 21d3405b70d..1d42dfdd765 100644 --- a/paddle/fluid/operators/one_hot_op.cc +++ b/paddle/fluid/operators/one_hot_op.cc @@ -60,7 +60,7 @@ class OneHotOpMaker : public framework::OpProtoAndCheckerMaker { AddAttr("dtype", "An integer to specify the data type of one-hot " "vector. The default value is FP32.") - .SetDefault(paddle::framework::proto::DataType::FP32); + .SetDefault(paddle::framework::proto::VarType::FP32); AddComment(R"DOC( One Hot Operator. This operator creates the one-hot representations for input index values. The following example will help to explain the function of this diff --git a/paddle/fluid/operators/one_hot_op.cu b/paddle/fluid/operators/one_hot_op.cu index 87c285df4e9..240ac895e2c 100644 --- a/paddle/fluid/operators/one_hot_op.cu +++ b/paddle/fluid/operators/one_hot_op.cu @@ -65,7 +65,8 @@ class OneHotCUDAKernel : public framework::OpKernel { int depth = context.Attr("depth"); framework::VisitDataType( - static_cast(context.Attr("dtype")), + static_cast( + context.Attr("dtype")), OneHotOpCUDAFunctor( in, out, depth, context.template device_context())); } diff --git a/paddle/fluid/operators/one_hot_op.h b/paddle/fluid/operators/one_hot_op.h index 1409f8af624..7e77f25089c 100644 --- a/paddle/fluid/operators/one_hot_op.h +++ b/paddle/fluid/operators/one_hot_op.h @@ -58,7 +58,8 @@ class OneHotKernel : public framework::OpKernel { int depth = context.Attr("depth"); framework::VisitDataType( - static_cast(context.Attr("dtype")), + static_cast( + context.Attr("dtype")), OneHotOpFunctor( in, out, depth, context.template device_context())); } diff --git a/paddle/fluid/operators/rnn_memory_helper_op.cc b/paddle/fluid/operators/rnn_memory_helper_op.cc index 8ab9f010a22..70f205d887e 100644 --- a/paddle/fluid/operators/rnn_memory_helper_op.cc +++ b/paddle/fluid/operators/rnn_memory_helper_op.cc @@ -66,7 +66,7 @@ class RNNMemoryHelperOpInfoMaker : public framework::OpProtoAndCheckerMaker { AddAttr("dtype", "(int, default 5 (FP32)) " "Output data type") - .SetDefault(framework::proto::DataType::FP32); + .SetDefault(framework::proto::VarType::FP32); AddComment(""); } }; @@ -126,7 +126,7 @@ class RNNMemoryHelperGradOpInfoMaker AddAttr("dtype", "(int, default 5 (FP32)) " "Output data type") - .SetDefault(framework::proto::DataType::FP32); + .SetDefault(framework::proto::VarType::FP32); AddComment(""); } }; diff --git a/paddle/fluid/operators/sum_op.cc b/paddle/fluid/operators/sum_op.cc index 7b88387c338..c3abb3ea4a5 100644 --- a/paddle/fluid/operators/sum_op.cc +++ b/paddle/fluid/operators/sum_op.cc @@ -73,7 +73,8 @@ class SumOp : public framework::OperatorWithKernel { "Sum operator should have at least one tensor"); return framework::OpKernelType( - static_cast(dtype), ctx.device_context()); + static_cast(dtype), + ctx.device_context()); } else if (x_vars[0]->IsType()) { return framework::OpKernelType( framework::ToDataType( diff --git a/paddle/fluid/operators/uniform_random_batch_size_like_op.cc b/paddle/fluid/operators/uniform_random_batch_size_like_op.cc index fa31dad513d..00f00bb403d 100644 --- a/paddle/fluid/operators/uniform_random_batch_size_like_op.cc +++ b/paddle/fluid/operators/uniform_random_batch_size_like_op.cc @@ -26,7 +26,7 @@ class UniformRandomBatchSizeLikeOp : public BatchSizeLikeOp { framework::OpKernelType GetExpectedKernelType( const framework::ExecutionContext &ctx) const override { return framework::OpKernelType( - static_cast(ctx.Attr("dtype")), + static_cast(ctx.Attr("dtype")), ctx.GetPlace()); } }; @@ -58,7 +58,7 @@ This operator initializes a tensor with the same batch_size as the Input tensor "generate the same random numbers every time.") .SetDefault(0); AddAttr("dtype", "(int, default 5(FP32)) Output tensor data type") - .SetDefault(framework::proto::DataType::FP32); + .SetDefault(framework::proto::VarType::FP32); } }; diff --git a/paddle/fluid/operators/uniform_random_op.cc b/paddle/fluid/operators/uniform_random_op.cc index 3a0a0d6fcaf..87699362b2b 100644 --- a/paddle/fluid/operators/uniform_random_op.cc +++ b/paddle/fluid/operators/uniform_random_op.cc @@ -66,7 +66,7 @@ class UniformRandomOp : public framework::OperatorWithKernel { framework::OpKernelType GetExpectedKernelType( const framework::ExecutionContext& ctx) const override { return framework::OpKernelType( - static_cast(ctx.Attr("dtype")), + static_cast(ctx.Attr("dtype")), ctx.GetPlace()); } }; @@ -101,7 +101,7 @@ uniform distribution. "generate the same random numbers every time.") .SetDefault(0); AddAttr("dtype", "(int, default 5(FP32)) Output tensor data type") - .SetDefault(framework::proto::DataType::FP32); + .SetDefault(framework::proto::VarType::FP32); } }; } // namespace operators diff --git a/paddle/fluid/pybind/protobuf.cc b/paddle/fluid/pybind/protobuf.cc index 9f97cc5007e..99716ccb240 100644 --- a/paddle/fluid/pybind/protobuf.cc +++ b/paddle/fluid/pybind/protobuf.cc @@ -195,15 +195,6 @@ void BindBlockDesc(py::module &m) { } void BindVarDsec(py::module &m) { - py::enum_(m, "DataType", "") - .value("BOOL", proto::DataType::BOOL) - .value("INT16", proto::DataType::INT16) - .value("INT32", proto::DataType::INT32) - .value("INT64", proto::DataType::INT64) - .value("FP16", proto::DataType::FP16) - .value("FP32", proto::DataType::FP32) - .value("FP64", proto::DataType::FP64); - py::class_ var_desc(m, "VarDesc", ""); var_desc .def("name", @@ -233,6 +224,13 @@ void BindVarDsec(py::module &m) { .def("set_persistable", &VarDesc::SetPersistable); py::enum_(var_desc, "VarType", "") + .value("BOOL", proto::VarType::BOOL) + .value("INT16", proto::VarType::INT16) + .value("INT32", proto::VarType::INT32) + .value("INT64", proto::VarType::INT64) + .value("FP16", proto::VarType::FP16) + .value("FP32", proto::VarType::FP32) + .value("FP64", proto::VarType::FP64) .value("LOD_TENSOR", proto::VarType::LOD_TENSOR) .value("SELECTED_ROWS", proto::VarType::SELECTED_ROWS) .value("FEED_MINIBATCH", proto::VarType::FEED_MINIBATCH) diff --git a/python/paddle/v2/fluid/backward.py b/python/paddle/v2/fluid/backward.py index a690c14300e..26b35cfc190 100644 --- a/python/paddle/v2/fluid/backward.py +++ b/python/paddle/v2/fluid/backward.py @@ -68,7 +68,7 @@ def _infer_var_data_type_(grad_var_name, block): fwd_var = block.desc.find_var_recursive(fwd_name.encode("ascii")) grad_var.set_dtype(fwd_var.dtype()) else: - grad_var.set_dtype(core.DataType.FP32) + grad_var.set_dtype(core.VarDesc.VarType.FP32) def _all_in_set_(cands, s): diff --git a/python/paddle/v2/fluid/data_feeder.py b/python/paddle/v2/fluid/data_feeder.py index 070bcadd710..ac02401c79b 100644 --- a/python/paddle/v2/fluid/data_feeder.py +++ b/python/paddle/v2/fluid/data_feeder.py @@ -27,13 +27,13 @@ class DataToLoDTensorConverter(object): self.place = place self.lod_level = lod_level self.shape = shape - if dtype == core.DataType.FP32: + if dtype == core.VarDesc.VarType.FP32: self.dtype = 'float32' - elif dtype == core.DataType.INT64: + elif dtype == core.VarDesc.VarType.INT64: self.dtype = 'int64' - elif dtype == core.DataType.FP64: + elif dtype == core.VarDesc.VarType.FP64: self.dtype = 'float64' - elif dtype == core.DataType.INT32: + elif dtype == core.VarDesc.VarType.INT32: self.dtype = 'int32' else: raise ValueError("dtype must be any of [int32, float32, int64, " diff --git a/python/paddle/v2/fluid/evaluator.py b/python/paddle/v2/fluid/evaluator.py index 30d87c76c28..1f4618310cb 100644 --- a/python/paddle/v2/fluid/evaluator.py +++ b/python/paddle/v2/fluid/evaluator.py @@ -89,7 +89,7 @@ class Evaluator(object): Args: suffix(str): the state suffix. - dtype(str|core.DataType): the state data type + dtype(str|core.VarDesc.VarType): the state data type shape(tuple|list): the shape of state Returns: State variable diff --git a/python/paddle/v2/fluid/framework.py b/python/paddle/v2/fluid/framework.py index dfd7e8047c1..fb4cd5b75ad 100644 --- a/python/paddle/v2/fluid/framework.py +++ b/python/paddle/v2/fluid/framework.py @@ -67,24 +67,24 @@ def convert_np_dtype_to_dtype_(np_dtype): Args: np_dtype(np.dtype): the data type in numpy - Returns(core.DataType): the data type in Paddle + Returns(core.VarDesc.VarType): the data type in Paddle """ dtype = np.dtype(np_dtype) if dtype == np.float32: - return core.DataType.FP32 + return core.VarDesc.VarType.FP32 elif dtype == np.float64: - return core.DataType.FP64 + return core.VarDesc.VarType.FP64 elif dtype == np.float16: - return core.DataType.FP16 + return core.VarDesc.VarType.FP16 elif dtype == np.int32: - return core.DataType.INT32 + return core.VarDesc.VarType.INT32 elif dtype == np.int16: - return core.DataType.INT16 + return core.VarDesc.VarType.INT16 elif dtype == np.int64: - return core.DataType.INT64 + return core.VarDesc.VarType.INT64 elif dtype == np.bool: - return core.DataType.BOOL + return core.VarDesc.VarType.BOOL else: raise ValueError("Not supported numpy dtype " + str(dtype)) @@ -93,16 +93,19 @@ def dtype_is_floating(dtype): """ Check the data type is floating or not. Args: - dtype(np.dtype|core.DataType): data type. + dtype(np.dtype|core.VarDesc.VarType): data type. Could be numpy format or Paddle format Returns(bool): True if data type is a float value """ - if not isinstance(dtype, core.DataType): + if not isinstance(dtype, core.VarDesc.VarType): dtype = convert_np_dtype_to_dtype_(dtype) - return dtype in [core.DataType.FP16, core.DataType.FP32, core.DataType.FP64] + return dtype in [ + core.VarDesc.VarType.FP16, core.VarDesc.VarType.FP32, + core.VarDesc.VarType.FP64 + ] def _debug_string_(proto, throw_on_error=True): @@ -148,7 +151,7 @@ class Variable(object): framework.proto for details. shape(tuple|list|None): The shape of variable. -1 means the batch size. Some kinds of variable do not contain shape, just set it to None. - dtype(np.dtype|core.DataType|str): The data type of variable. + dtype(np.dtype|core.VarDesc.VarType|str): The data type of variable. lod_level(int): The level of lod tensor. 0 means there is not a time series data. persistable(bool): True if the variable should be saved as check point. @@ -200,7 +203,7 @@ class Variable(object): "shape is {1}; the new shape is {2}. They are not " "matched.".format(self.name, old_shape, shape)) if dtype is not None: - if not isinstance(dtype, core.DataType): + if not isinstance(dtype, core.VarDesc.VarType): dtype = convert_np_dtype_to_dtype_(dtype) if is_new_var: self.desc.set_dtype(dtype) diff --git a/python/paddle/v2/fluid/layers/control_flow.py b/python/paddle/v2/fluid/layers/control_flow.py index 1ca11bb35b0..b56a391618b 100644 --- a/python/paddle/v2/fluid/layers/control_flow.py +++ b/python/paddle/v2/fluid/layers/control_flow.py @@ -612,7 +612,7 @@ class While(object): if not isinstance(cond, Variable): raise TypeError("condition should be a variable") assert isinstance(cond, Variable) - if cond.dtype != core.DataType.BOOL: + if cond.dtype != core.VarDesc.VarType.BOOL: raise TypeError("condition should be a bool variable") if reduce(lambda a, b: a * b, cond.shape, 1) != 1: raise TypeError("condition should be a bool scalar") diff --git a/python/paddle/v2/fluid/layers/nn.py b/python/paddle/v2/fluid/layers/nn.py index d1ac6583dd4..c4baa62ccd3 100644 --- a/python/paddle/v2/fluid/layers/nn.py +++ b/python/paddle/v2/fluid/layers/nn.py @@ -221,7 +221,7 @@ def embedding(input, :math:`padding_idx < 0`, the padding_idx to use in lookup is :math:`size[0] + dim`. param_attr(ParamAttr): Parameters for this layer - dtype(np.dtype|core.DataType|str): The type of data : float32, float_16, int etc + dtype(np.dtype|core.VarDesc.VarType|str): The type of data : float32, float_16, int etc Returns: Variable: The tensor variable storing the embeddings of the \ diff --git a/python/paddle/v2/fluid/layers/tensor.py b/python/paddle/v2/fluid/layers/tensor.py index db400aad37c..97e8f082cff 100644 --- a/python/paddle/v2/fluid/layers/tensor.py +++ b/python/paddle/v2/fluid/layers/tensor.py @@ -17,7 +17,7 @@ from ..param_attr import ParamAttr from ..framework import convert_np_dtype_to_dtype_ from ..framework import Variable from ..initializer import Constant, force_init_on_cpu -from ..core import DataType +from ..core import VarDesc import numpy __all__ = [ @@ -199,10 +199,10 @@ def assign(input, output): attrs={'scale': 1.0}) elif isinstance(input, numpy.ndarray): dtype = convert_np_dtype_to_dtype_(input.dtype) - if dtype == DataType.FP32: + if dtype == VarDesc.VarType.FP32: value_name = "fp32_values" values = [float(v) for v in input.flat] - elif dtype == DataType.INT32: + elif dtype == VarDesc.VarType.INT32: value_name = "int32_values" values = [int(v) for v in input.flat] else: @@ -236,7 +236,7 @@ def fill_constant(shape, dtype, value, force_cpu=False, out=None): Args: shape(tuple|list|None): Shape of the output tensor. - dtype(np.dtype|core.DataType|str): Data type of the output tensor. + dtype(np.dtype|core.VarDesc.VarType|str): Data type of the output tensor. value(float): The constant value used to initialize the output tensor. out(Variable): The output tensor. force_cpu(True|False): data should be on CPU if set true. @@ -285,7 +285,7 @@ def fill_constant_batch_size_like(input, Args: input(Variable): Tensor whose dimensions will be used to get batch size shape(tuple|list|None): Shape of output tensor - dtype(np.dtype|core.DataType|str): Data type of output tensor + dtype(np.dtype|core.VarDesc.VarType|str): Data type of output tensor value(float): Constant value to initialize the output tensor input_dim_idx(int): Index of input's batch size dimension output_dim_idx(int): Index of output's batch size dimension @@ -327,7 +327,7 @@ def ones(shape, dtype, force_cpu=False): Args: shape(tuple|list|None): Shape of output tensor - dtype(np.dtype|core.DataType|str): Data type of output tensor + dtype(np.dtype|core.VarDesc.VarType|str): Data type of output tensor Returns: Variable: The tensor variable storing the output @@ -351,7 +351,7 @@ def zeros(shape, dtype, force_cpu=False): Args: shape(tuple|list|None): Shape of output tensor - dtype(np.dtype|core.DataType|str): Data type of output tensor + dtype(np.dtype|core.VarDesc.VarType|str): Data type of output tensor Returns: Variable: The tensor variable storing the output diff --git a/python/paddle/v2/fluid/memory_optimization_transpiler.py b/python/paddle/v2/fluid/memory_optimization_transpiler.py index 78dc56f8490..ee56ccdcf11 100644 --- a/python/paddle/v2/fluid/memory_optimization_transpiler.py +++ b/python/paddle/v2/fluid/memory_optimization_transpiler.py @@ -20,13 +20,13 @@ from backward import _rename_arg_ from . import core dtype_to_size = { - core.DataType.FP16: 2, - core.DataType.FP32: 4, - core.DataType.FP64: 8, - core.DataType.INT16: 2, - core.DataType.INT32: 4, - core.DataType.INT64: 8, - core.DataType.BOOL: 1 + core.VarDesc.VarType.FP16: 2, + core.VarDesc.VarType.FP32: 4, + core.VarDesc.VarType.FP64: 8, + core.VarDesc.VarType.INT16: 2, + core.VarDesc.VarType.INT32: 4, + core.VarDesc.VarType.INT64: 8, + core.VarDesc.VarType.BOOL: 1 } diff --git a/python/paddle/v2/fluid/tests/test_cpp_reader.py b/python/paddle/v2/fluid/tests/test_cpp_reader.py index 8d4f454611c..6d2312dbcb5 100644 --- a/python/paddle/v2/fluid/tests/test_cpp_reader.py +++ b/python/paddle/v2/fluid/tests/test_cpp_reader.py @@ -22,7 +22,7 @@ block = prog.current_block() random_reader = block.create_var( type=fluid.core.VarDesc.VarType.READER, name="RandomDataGenerator") random_reader.desc.set_dtypes( - [fluid.core.DataType.FP32, fluid.core.DataType.FP32]) + [fluid.core.VarDesc.VarType.FP32, fluid.core.VarDesc.VarType.FP32]) create_random_data_generator_op = block.append_op( type="create_random_data_generator", diff --git a/python/paddle/v2/fluid/tests/unittests/op_test.py b/python/paddle/v2/fluid/tests/unittests/op_test.py index 4761811f0a3..d8867550cae 100644 --- a/python/paddle/v2/fluid/tests/unittests/op_test.py +++ b/python/paddle/v2/fluid/tests/unittests/op_test.py @@ -119,9 +119,9 @@ def get_numeric_gradient(place, tensor_to_check = scope.find_var(input_to_check).get_tensor() tensor_size = product(tensor_to_check.get_dims()) tensor_to_check_dtype = tensor_to_check.dtype() - if tensor_to_check_dtype == core.DataType.FP32: + if tensor_to_check_dtype == core.VarDesc.VarType.FP32: tensor_to_check_dtype = np.float32 - elif tensor_to_check_dtype == core.DataType.FP64: + elif tensor_to_check_dtype == core.VarDesc.VarType.FP64: tensor_to_check_dtype = np.float64 else: raise ValueError("Not supported data type " + str( diff --git a/python/paddle/v2/fluid/tests/unittests/test_batch_norm_op.py b/python/paddle/v2/fluid/tests/unittests/test_batch_norm_op.py index 778c7044ce8..b7c0cb521a3 100644 --- a/python/paddle/v2/fluid/tests/unittests/test_batch_norm_op.py +++ b/python/paddle/v2/fluid/tests/unittests/test_batch_norm_op.py @@ -140,9 +140,9 @@ def set_output_grad(scope, outputs, place, feed_dict=None): grad_tensor = scope.var(grad_var_name(name)).get_tensor() out_dtype = out_tensor.dtype() if data is None: - if out_dtype == core.DataType.FP64: + if out_dtype == core.VarDesc.VarType.FP64: data = np.ones(out_tensor.shape(), dtype=np.float64) - elif out_dtype == core.DataType.FP32: + elif out_dtype == core.VarDesc.VarType.FP32: data = np.ones(out_tensor.shape(), dtype=np.float32) else: raise ValueError("Not supported data type " + str(out_dtype)) diff --git a/python/paddle/v2/fluid/tests/unittests/test_cast_op.py b/python/paddle/v2/fluid/tests/unittests/test_cast_op.py index 44859e21556..3d05a319cd4 100644 --- a/python/paddle/v2/fluid/tests/unittests/test_cast_op.py +++ b/python/paddle/v2/fluid/tests/unittests/test_cast_op.py @@ -24,8 +24,8 @@ class TestCastOp(op_test.OpTest): self.inputs = {'X': ipt.astype('float32')} self.outputs = {'Out': ipt.astype('float64')} self.attrs = { - 'in_dtype': int(core.DataType.FP32), - 'out_dtype': int(core.DataType.FP64) + 'in_dtype': int(core.VarDesc.VarType.FP32), + 'out_dtype': int(core.VarDesc.VarType.FP64) } self.op_type = 'cast' diff --git a/python/paddle/v2/fluid/tests/unittests/test_fill_op.py b/python/paddle/v2/fluid/tests/unittests/test_fill_op.py index 34c64013779..c2e3cfe6f3c 100644 --- a/python/paddle/v2/fluid/tests/unittests/test_fill_op.py +++ b/python/paddle/v2/fluid/tests/unittests/test_fill_op.py @@ -26,7 +26,7 @@ class TestFillOp(OpTest): self.attrs = { 'value': val.flatten().tolist(), 'shape': [100, 200], - 'dtype': int(core.DataType.FP64) + 'dtype': int(core.VarDesc.VarType.FP64) } self.outputs = {'Out': val.astype('float64')} diff --git a/python/paddle/v2/fluid/tests/unittests/test_layer_norm_op.py b/python/paddle/v2/fluid/tests/unittests/test_layer_norm_op.py index b723b471bc8..a1206b3b858 100644 --- a/python/paddle/v2/fluid/tests/unittests/test_layer_norm_op.py +++ b/python/paddle/v2/fluid/tests/unittests/test_layer_norm_op.py @@ -97,9 +97,9 @@ def set_output_grad(scope, outputs, place, feed_dict=None): grad_tensor = scope.var(grad_var_name(name)).get_tensor() out_dtype = out_tensor.dtype() if data is None: - if out_dtype == core.DataType.FP64: + if out_dtype == core.VarDesc.VarType.FP64: data = np.ones(out_tensor.shape(), dtype=np.float64) - elif out_dtype == core.DataType.FP32: + elif out_dtype == core.VarDesc.VarType.FP32: data = np.ones(out_tensor.shape(), dtype=np.float32) else: raise ValueError("Not supported data type " + str(out_dtype)) diff --git a/python/paddle/v2/fluid/tests/unittests/test_one_hot_op.py b/python/paddle/v2/fluid/tests/unittests/test_one_hot_op.py index c93be0efda9..b7db30104a8 100644 --- a/python/paddle/v2/fluid/tests/unittests/test_one_hot_op.py +++ b/python/paddle/v2/fluid/tests/unittests/test_one_hot_op.py @@ -38,7 +38,7 @@ class TestOneHotOp(OpTest): out[i, x[i]] = 1.0 self.inputs = {'X': (x, x_lod)} - self.attrs = {'depth': depth, 'dtype': int(core.DataType.FP32)} + self.attrs = {'depth': depth, 'dtype': int(core.VarDesc.VarType.FP32)} self.outputs = {'Out': (out, x_lod)} def test_check_output(self): diff --git a/python/paddle/v2/fluid/tests/unittests/test_parameter.py b/python/paddle/v2/fluid/tests/unittests/test_parameter.py index 0ba9235fdb6..88356a7ea14 100644 --- a/python/paddle/v2/fluid/tests/unittests/test_parameter.py +++ b/python/paddle/v2/fluid/tests/unittests/test_parameter.py @@ -36,7 +36,7 @@ class TestParameter(unittest.TestCase): self.assertIsNotNone(param) self.assertEqual('fc.w', param.name) self.assertEqual((784, 100), param.shape) - self.assertEqual(core.DataType.FP32, param.dtype) + self.assertEqual(core.VarDesc.VarType.FP32, param.dtype) self.assertEqual(0, param.block.idx) exe = Executor(core.CPUPlace()) p = exe.run(main_program, fetch_list=[param])[0] diff --git a/python/paddle/v2/fluid/tests/unittests/test_protobuf_descs.py b/python/paddle/v2/fluid/tests/unittests/test_protobuf_descs.py index 55d18d2729a..c3bef958748 100644 --- a/python/paddle/v2/fluid/tests/unittests/test_protobuf_descs.py +++ b/python/paddle/v2/fluid/tests/unittests/test_protobuf_descs.py @@ -131,8 +131,8 @@ class TestVarDesc(unittest.TestCase): block = program_desc.block(0) var = block.var('my_var') var.set_type(core.VarDesc.VarType.LOD_TENSOR) - var.set_dtype(core.DataType.INT32) - self.assertEqual(core.DataType.INT32, var.dtype()) + var.set_dtype(core.VarDesc.VarType.INT32) + self.assertEqual(core.VarDesc.VarType.INT32, var.dtype()) self.assertEqual(core.VarDesc.VarType.LOD_TENSOR, var.type()) def test_multiple_dtype(self): @@ -141,7 +141,8 @@ class TestVarDesc(unittest.TestCase): var = block.var('my_reader') var.set_type(core.VarDesc.VarType.READER) src_types = [ - core.DataType.INT32, core.DataType.FP64, core.DataType.FP32 + core.VarDesc.VarType.INT32, core.VarDesc.VarType.FP64, + core.VarDesc.VarType.FP32 ] var.set_dtypes(src_types) self.assertEqual(src_types, var.dtypes()) diff --git a/python/paddle/v2/fluid/tests/unittests/test_variable.py b/python/paddle/v2/fluid/tests/unittests/test_variable.py index b06bcfb0759..4ae3909d274 100644 --- a/python/paddle/v2/fluid/tests/unittests/test_variable.py +++ b/python/paddle/v2/fluid/tests/unittests/test_variable.py @@ -20,7 +20,7 @@ import numpy as np class TestVariable(unittest.TestCase): def test_np_dtype_convert(self): - DT = core.DataType + DT = core.VarDesc.VarType convert = convert_np_dtype_to_dtype_ self.assertEqual(DT.FP32, convert(np.float32)) self.assertEqual(DT.FP16, convert("float16")) @@ -36,13 +36,13 @@ class TestVariable(unittest.TestCase): w = b.create_var( dtype="float64", shape=[784, 100], lod_level=0, name="fc.w") self.assertNotEqual(str(w), "") - self.assertEqual(core.DataType.FP64, w.dtype) + self.assertEqual(core.VarDesc.VarType.FP64, w.dtype) self.assertEqual((784, 100), w.shape) self.assertEqual("fc.w", w.name) self.assertEqual(0, w.lod_level) w = b.create_var(name='fc.w') - self.assertEqual(core.DataType.FP64, w.dtype) + self.assertEqual(core.VarDesc.VarType.FP64, w.dtype) self.assertEqual((784, 100), w.shape) self.assertEqual("fc.w", w.name) self.assertEqual(0, w.lod_level) -- GitLab From 56d5319261f94a7c1b135ffe904b415cdfe8f4e8 Mon Sep 17 00:00:00 2001 From: emailweixu Date: Fri, 16 Feb 2018 15:05:33 -0800 Subject: [PATCH 076/122] Fix typo Paddle/tools/manylinux1/README.md (#8463) --- tools/manylinux1/README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tools/manylinux1/README.md b/tools/manylinux1/README.md index cb0a9ac22cd..898e00bd37c 100644 --- a/tools/manylinux1/README.md +++ b/tools/manylinux1/README.md @@ -12,7 +12,7 @@ with newer version compilers cannot work with those with older versions. The suggested building environment is as old as CentOS 5. However, PaddlePaddle relies on CUDA, and the earlies version of [CentOS works with CUDA is 6](https://hub.docker.com/r/nvidia/cuda/). -So, here we provide a Docker image basing on CentOS 6 and CUDA for +So, here we provide a Docker image based on CentOS 6 and CUDA for building PaddlePaddle and making the release supports "as-manylinux as possible." or "sufficiently many Linux" according to [this discussion](https://mail.python.org/pipermail/wheel-builders/2016-July/000175.html). -- GitLab From bd58bf3e035b29c4f98afd49bce604d602412cb3 Mon Sep 17 00:00:00 2001 From: kavyasrinet Date: Fri, 16 Feb 2018 16:22:02 -0800 Subject: [PATCH 077/122] [WIP] Expose Channel in Python and add to VarType (#8465) Add Channel as a VarType --- paddle/fluid/framework/framework.proto | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/paddle/fluid/framework/framework.proto b/paddle/fluid/framework/framework.proto index 22d06923948..724d9793e58 100644 --- a/paddle/fluid/framework/framework.proto +++ b/paddle/fluid/framework/framework.proto @@ -112,6 +112,7 @@ message VarType { LOD_TENSOR_ARRAY = 13; PLACE_LIST = 14; READER = 15; + CHANNEL = 16; } required Type type = 1; @@ -137,6 +138,12 @@ message VarType { message ReaderDesc { repeated LoDTensorDesc lod_tensor = 1; } optional ReaderDesc reader = 5; + + message ChannelDesc { + required Type data_type = 1; + required int64 capacity = 2; + } + optional ChannelDesc channel = 6; } message VarDesc { -- GitLab From 65fd84a5d50877bdc9a6bcbcd3f4f29a1389bfd1 Mon Sep 17 00:00:00 2001 From: kavyasrinet Date: Fri, 16 Feb 2018 16:48:21 -0800 Subject: [PATCH 078/122] Updating Var_desc.md with the updated typing system in Fluid (#8462) * Updating Var_desc.md with the updated typing system in Fluid * Added Channel to VarType --- doc/design/var_desc.md | 46 ++++++++++++++++++++++++++---------------- 1 file changed, 29 insertions(+), 17 deletions(-) diff --git a/doc/design/var_desc.md b/doc/design/var_desc.md index 89fa95326c5..6a45af19954 100644 --- a/doc/design/var_desc.md +++ b/doc/design/var_desc.md @@ -1,10 +1,10 @@ ## Background PaddlePaddle divides the description of neural network computation into two stages: compile time and runtime. At compile time, the neural network computation is described as a `ProgramDesc` whereas at runtime an `Executor` interprets the `ProgramDesc` to compute the operations. -PaddlePaddle use proto message to describe compile time program because +PaddlePaddle uses proto message to describe compile time program because : 1. The computation program description must be serializable and saved in a file. -1. During distributed training, the sreialized program will be sent to multiple workers. It should also be possible to break the program into different components, each of which can be executed on different workers. +1. During distributed training, the serialized program will be sent to multiple workers. It should also be possible to break the program into different components, each of which can be executed on a different worker. The computation `Program` consists of nested `Blocks`. Each `Block` will consist of data(i.e. `Variable`) and `Operations`. The concept to represent them is in the table below. @@ -14,28 +14,33 @@ The computation `Program` consists of nested `Blocks`. Each `Block` will consist |Operation|OpDesc(proto)|Operator(cpp)| -## Definition of VarDesc +## Definition of VarType -A VarDesc should have a name, and value. The are two kinds of variable type in compile time, they are `LoDTensor` and `SelectedRows`. +A VarDesc should have a name, type and whether or not it is persistable. The are different kinds of variable types supported in PaddlePaddle, apart from the POD_Types like: `LOD_TENSOR`, `SELECTED_ROWS`, `FEED_MINIBATCH`, `FETCH_LIST`, `STEP_SCOPES`, `LOD_RANK_TABLE`, `LOD_TENSOR_ARRAY`, `PLACE_LIST`, `READER` and `CHANNEL`. These are declared inside `VarType`. A `VarDesc` then looks as the following: ```proto message VarDesc { required string name = 1; - enum VarType { - LOD_TENSOR = 0; - SELECTED_ROWS = 1; - } required VarType type = 2; - optional LoDTensorDesc lod_desc = 3; - optional TensorDesc selected_rows_desc = 4; - optional bool persistable = 5 [ default = false ]; + optional bool persistable = 3 [ default = false ]; } ``` ## Definition of TensorDesc ```proto -enum DataType { +message TensorDesc { + // Should only be PODType. Is enforced in C++ + required Type data_type = 1; + repeated int64 dims = 2; // [UNK, 640, 480] is saved as [-1, 640, 480] +} +``` + +The `Type` here comes from the enum defined inside of `VarType` : + +```proto +enum Type { + // Pod Types BOOL = 0; INT16 = 1; INT32 = 2; @@ -43,11 +48,18 @@ enum DataType { FP16 = 4; FP32 = 5; FP64 = 6; -} -message TensorDesc { - required DataType data_type = 1; - repeated int64 dims = 2; // [UNK, 640, 480] is saved as [-1, 640, 480] + // Other types that may need additional descriptions + LOD_TENSOR = 7; + SELECTED_ROWS = 8; + FEED_MINIBATCH = 9; + FETCH_LIST = 10; + STEP_SCOPES = 11; + LOD_RANK_TABLE = 12; + LOD_TENSOR_ARRAY = 13; + PLACE_LIST = 14; + READER = 15; + CHANNEL = 16; } ``` @@ -58,7 +70,7 @@ A TensorDesc describes `SelectedRows` and `LoDTensor`. For details of `SelectedR ```proto message LoDTensorDesc { required TensorDesc tensor = 1; - optional int lod_level = 2; + optional int32 lod_level = 2 [ default = 0 ]; } ``` -- GitLab From 4b957af2372c861942aa7193223d00f23a5a3318 Mon Sep 17 00:00:00 2001 From: Yang Yang Date: Sat, 17 Feb 2018 01:35:58 +0000 Subject: [PATCH 079/122] clean up --- .../v2/fluid/tests/book/test_recognize_digits.py | 11 +++-------- 1 file changed, 3 insertions(+), 8 deletions(-) diff --git a/python/paddle/v2/fluid/tests/book/test_recognize_digits.py b/python/paddle/v2/fluid/tests/book/test_recognize_digits.py index 442cf9604a1..a0b4774da5f 100644 --- a/python/paddle/v2/fluid/tests/book/test_recognize_digits.py +++ b/python/paddle/v2/fluid/tests/book/test_recognize_digits.py @@ -155,7 +155,6 @@ def train(nn_type, use_cuda, parallel, save_dirname, save_param_filename): float(avg_loss_val), float(acc_val))) if math.isnan(float(avg_loss_val)): sys.exit("got NaN loss, training failed.") - exit(0) raise AssertionError("Loss of recognize digits is too large") @@ -231,14 +230,10 @@ def inject_test_method(use_cuda, parallel, nn_type, combine): def inject_all_tests(): - for use_cuda in [True]: - for parallel in [True]: - for nn_type in ['mlp']: + for use_cuda in (False, True): + for parallel in (False, True): + for nn_type in ('mlp', 'conv'): inject_test_method(use_cuda, parallel, nn_type, True) - # for use_cuda in (False, True): - # for parallel in (False, True): - # for nn_type in ('mlp', 'conv'): - # inject_test_method(use_cuda, parallel, nn_type, True) # One unit-test for saving parameters as separate files inject_test_method(False, False, 'mlp', False) -- GitLab From a040239d3a438f48ee05491e9f7a56fa499a2fdb Mon Sep 17 00:00:00 2001 From: Siddharth Goyal Date: Fri, 16 Feb 2018 18:04:16 -0800 Subject: [PATCH 080/122] Add conv test case for inference-recognize digits (#8466) --- paddle/fluid/inference/tests/book/CMakeLists.txt | 2 +- .../inference/tests/book/test_inference_recognize_digits.cc | 2 +- python/paddle/v2/fluid/tests/book/test_recognize_digits.py | 5 +++-- 3 files changed, 5 insertions(+), 4 deletions(-) diff --git a/paddle/fluid/inference/tests/book/CMakeLists.txt b/paddle/fluid/inference/tests/book/CMakeLists.txt index cddd5a786c4..c0aba39b977 100644 --- a/paddle/fluid/inference/tests/book/CMakeLists.txt +++ b/paddle/fluid/inference/tests/book/CMakeLists.txt @@ -27,7 +27,7 @@ endfunction(inference_test) inference_test(fit_a_line) inference_test(image_classification ARGS vgg resnet) inference_test(label_semantic_roles) -inference_test(recognize_digits ARGS mlp) +inference_test(recognize_digits ARGS mlp conv) inference_test(recommender_system) #inference_test(rnn_encoder_decoder) inference_test(understand_sentiment) diff --git a/paddle/fluid/inference/tests/book/test_inference_recognize_digits.cc b/paddle/fluid/inference/tests/book/test_inference_recognize_digits.cc index bd719489161..99bee94cb82 100644 --- a/paddle/fluid/inference/tests/book/test_inference_recognize_digits.cc +++ b/paddle/fluid/inference/tests/book/test_inference_recognize_digits.cc @@ -77,7 +77,7 @@ TEST(inference, recognize_digits_combine) { // Use normilized image pixels as input data, // which should be in the range [-1.0, 1.0]. SetupTensor( - input, {1, 28, 28}, static_cast(-1), static_cast(1)); + input, {1, 1, 28, 28}, static_cast(-1), static_cast(1)); std::vector cpu_feeds; cpu_feeds.push_back(&input); diff --git a/python/paddle/v2/fluid/tests/book/test_recognize_digits.py b/python/paddle/v2/fluid/tests/book/test_recognize_digits.py index a0b4774da5f..2462d425e16 100644 --- a/python/paddle/v2/fluid/tests/book/test_recognize_digits.py +++ b/python/paddle/v2/fluid/tests/book/test_recognize_digits.py @@ -141,7 +141,7 @@ def train(nn_type, use_cuda, parallel, save_dirname, save_param_filename): # get test acc and loss acc_val = numpy.array(acc_set).mean() avg_loss_val = numpy.array(avg_loss_set).mean() - if float(acc_val) > 0.85: # test acc > 85% + if float(acc_val) > 0.2: # Smaller value to increase CI speed if save_dirname is not None: fluid.io.save_inference_model( save_dirname, ["img"], [prediction], @@ -235,8 +235,9 @@ def inject_all_tests(): for nn_type in ('mlp', 'conv'): inject_test_method(use_cuda, parallel, nn_type, True) - # One unit-test for saving parameters as separate files + # Two unit-test for saving parameters as separate files inject_test_method(False, False, 'mlp', False) + inject_test_method(False, False, 'conv', False) inject_all_tests() -- GitLab From 3c2cafbe1d04843803a6f449389d123ae216758d Mon Sep 17 00:00:00 2001 From: "Yang Yang(Tony)" Date: Tue, 20 Feb 2018 15:31:31 -0800 Subject: [PATCH 081/122] fix parallel do hard coded empty var name (#8469) --- paddle/fluid/operators/parallel_do_op.cc | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/paddle/fluid/operators/parallel_do_op.cc b/paddle/fluid/operators/parallel_do_op.cc index 6436efe42f1..bf4d0476df3 100644 --- a/paddle/fluid/operators/parallel_do_op.cc +++ b/paddle/fluid/operators/parallel_do_op.cc @@ -256,7 +256,7 @@ class ParallelDoGradOp : public framework::OperatorBase { } } for (auto &s : Outputs(framework::GradVarName(kParameters))) { - if (s == "@EMPTY@") { + if (s == framework::kEmptyVarName) { continue; } VLOG(3) << "Moving " << s; @@ -270,7 +270,7 @@ class ParallelDoGradOp : public framework::OperatorBase { const std::vector &sub_scopes, const platform::PlaceList &places) const { for (auto &s : Outputs(framework::GradVarName(kParameters))) { - if (s == "@EMPTY@") { + if (s == framework::kEmptyVarName) { continue; } VLOG(3) << "Accumulating " << s; -- GitLab From 46e4f6ffab80d25c549e8f730f8b2594e85ff0d6 Mon Sep 17 00:00:00 2001 From: dzhwinter Date: Wed, 21 Feb 2018 06:16:16 -0800 Subject: [PATCH 082/122] small fix --- paddle/fluid/platform/macros.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/paddle/fluid/platform/macros.h b/paddle/fluid/platform/macros.h index 02a2f53b49c..4cc04b09051 100644 --- a/paddle/fluid/platform/macros.h +++ b/paddle/fluid/platform/macros.h @@ -19,7 +19,7 @@ limitations under the License. */ #define DISABLE_COPY_AND_ASSIGN(classname) \ private: \ classname(const classname&) = delete; \ - classname(const classname&&) = delete; \ + classname(classname&&) = delete; \ classname& operator=(const classname&) = delete; \ - classname& operator=(const classname&&) = delete + classname& operator=(classname&&) = delete #endif -- GitLab From 14f8370738236fdd0de2e5f6c6bbf9c6d2d23e6a Mon Sep 17 00:00:00 2001 From: Yu Yang Date: Thu, 22 Feb 2018 11:13:23 +0800 Subject: [PATCH 083/122] Add block.fwd_block_id --- paddle/fluid/framework/block_desc.cc | 38 ++++++++++++++++++++------ paddle/fluid/framework/block_desc.h | 8 +++++- paddle/fluid/framework/framework.proto | 1 + paddle/fluid/framework/program_desc.h | 8 +++++- paddle/fluid/operators/while_op.cc | 7 +++-- paddle/fluid/pybind/protobuf.cc | 2 ++ python/paddle/v2/fluid/backward.py | 5 +++- python/paddle/v2/fluid/framework.py | 26 +++++++++++++++--- 8 files changed, 78 insertions(+), 17 deletions(-) diff --git a/paddle/fluid/framework/block_desc.cc b/paddle/fluid/framework/block_desc.cc index 0dd37e7df06..996aefd0479 100644 --- a/paddle/fluid/framework/block_desc.cc +++ b/paddle/fluid/framework/block_desc.cc @@ -46,11 +46,25 @@ VarDesc *BlockDesc::FindVarRecursive(const std::string &name) const { if (name == kEmptyVarName) return nullptr; auto it = vars_.find(name); - if (it == vars_.end()) { - return Parent() == kNoneBlockIndex ? nullptr - : ParentBlock()->FindVarRecursive(name); + if (it != vars_.end()) { + return it->second.get(); } - return it->second.get(); + + BlockDesc *tmp = ParentBlock(); + + if (tmp != nullptr) { + auto ptr = tmp->FindVarRecursive(name); + if (ptr != nullptr) { + return ptr; + } + } + + tmp = ForwardBlock(); + if (tmp != nullptr) { + return tmp->FindVarRecursive(name); + } + + return nullptr; } VarDesc &BlockDesc::FindRecursiveOrCreateVar(const std::string &name_bytes) { @@ -136,10 +150,7 @@ void BlockDesc::Flush() { } BlockDesc *BlockDesc::ParentBlock() const { - if (this->desc_->parent_idx() == kNoneBlockIndex) { - return nullptr; - } - return prog_->MutableBlock(static_cast(this->desc_->parent_idx())); + return prog_->MutableBlock(static_cast(desc_->parent_idx())); } proto::BlockDesc *BlockDesc::Proto() { @@ -186,5 +197,16 @@ void BlockDesc::ClearPBVars() { } } +void BlockDesc::SetForwardBlockID(int32_t forward_block_id) { + PADDLE_ENFORCE(!desc_->has_forward_block_idx(), + "Parent block ID has been set to %d. Cannot set to %d", + desc_->forward_block_idx(), forward_block_id); + desc_->set_forward_block_idx(forward_block_id); +} + +BlockDesc *BlockDesc::ForwardBlock() const { + return prog_->MutableBlock(static_cast(desc_->forward_block_idx())); +} + } // namespace framework } // namespace paddle diff --git a/paddle/fluid/framework/block_desc.h b/paddle/fluid/framework/block_desc.h index 4e2b03e245f..8345934a71c 100644 --- a/paddle/fluid/framework/block_desc.h +++ b/paddle/fluid/framework/block_desc.h @@ -49,6 +49,8 @@ class BlockDesc { int32_t Parent() const { return desc_->parent_idx(); } + int32_t ForwardBlockID() const { return desc_->forward_block_idx(); } + VarDesc *Var(const std::string &name_bytes); VarDesc *FindVar(const std::string &name_bytes) const; @@ -73,6 +75,10 @@ class BlockDesc { BlockDesc *ParentBlock() const; + BlockDesc *ForwardBlock() const; + + void SetForwardBlockID(int32_t forward_block_id); + OpDesc *AppendOp(); void AppendAllocatedOp(std::unique_ptr &&op_desc); @@ -91,7 +97,7 @@ class BlockDesc { proto::BlockDesc *Proto(); - ProgramDesc *Program() { return this->prog_; } + ProgramDesc *Program() const { return this->prog_; } private: void ClearPBOps(); diff --git a/paddle/fluid/framework/framework.proto b/paddle/fluid/framework/framework.proto index 4eb18b4e4d6..5b43f5a8a4a 100644 --- a/paddle/fluid/framework/framework.proto +++ b/paddle/fluid/framework/framework.proto @@ -158,6 +158,7 @@ message BlockDesc { required int32 parent_idx = 2; repeated VarDesc vars = 3; repeated OpDesc ops = 4; + optional int32 forward_block_idx = 5 [ default = -1 ]; } // Please refer to diff --git a/paddle/fluid/framework/program_desc.h b/paddle/fluid/framework/program_desc.h index 8d4b999ad2f..538a0372116 100644 --- a/paddle/fluid/framework/program_desc.h +++ b/paddle/fluid/framework/program_desc.h @@ -38,7 +38,13 @@ class ProgramDesc { BlockDesc *AppendBlock(const BlockDesc &parent); - BlockDesc *MutableBlock(size_t idx) { return blocks_[idx].get(); } + BlockDesc *MutableBlock(size_t idx) { + if (idx == static_cast(kNoneBlockIndex)) { + return nullptr; + } else { + return blocks_[idx].get(); + } + } const BlockDesc &Block(size_t idx) const { return *blocks_[idx]; } diff --git a/paddle/fluid/operators/while_op.cc b/paddle/fluid/operators/while_op.cc index 3d5cdeda26a..5f51a273dd4 100644 --- a/paddle/fluid/operators/while_op.cc +++ b/paddle/fluid/operators/while_op.cc @@ -231,7 +231,8 @@ class WhileGradOpDescMaker : public framework::SingleGradOpDescMaker { while_grad->SetInput(kStepScopes, Output(kStepScopes)); auto *grad_block = this->grad_block_[0]; - auto *fwd_block = grad_block->ParentBlock(); + auto *fwd_block = grad_block->ForwardBlock(); + auto *parent_block = grad_block->ParentBlock(); // Not all of IGs will be generated by inner gradient operators of while op. // Ignore IGs that is not generated by the inside block. @@ -265,8 +266,10 @@ class WhileGradOpDescMaker : public framework::SingleGradOpDescMaker { for (auto &input_name : op->InputArgumentNames()) { // If the input of Op has been recorded or is generated by the forward // block, do not make it as input again. + if (block_ins.find(input_name) != block_ins.end() || - fwd_block->FindVar(input_name) != nullptr) { + fwd_block->FindVar(input_name) != nullptr || + parent_block->FindVar(input_name) != nullptr) { continue; } extra_inputs.insert(input_name); diff --git a/paddle/fluid/pybind/protobuf.cc b/paddle/fluid/pybind/protobuf.cc index 131971099ef..01dc53de78b 100644 --- a/paddle/fluid/pybind/protobuf.cc +++ b/paddle/fluid/pybind/protobuf.cc @@ -155,6 +155,8 @@ void BindBlockDesc(py::module &m) { py::class_(m, "BlockDesc", "") .def_property_readonly("id", &BlockDesc::ID) .def_property_readonly("parent", &BlockDesc::Parent) + .def("get_forward_block_idx", &BlockDesc::ForwardBlockID) + .def("set_forward_block_idx", &BlockDesc::SetForwardBlockID) .def("append_op", &BlockDesc::AppendOp, py::return_value_policy::reference) .def("prepend_op", &BlockDesc::PrependOp, diff --git a/python/paddle/v2/fluid/backward.py b/python/paddle/v2/fluid/backward.py index 33ff43f6930..ba27aaa2460 100644 --- a/python/paddle/v2/fluid/backward.py +++ b/python/paddle/v2/fluid/backward.py @@ -298,7 +298,8 @@ def _append_backward_ops_(block, # If the op has its own sub-block, deal with the sub-block first if op.has_attr("sub_block"): sub_block = program.block(op.block_attr("sub_block")) - grad_sub_block = program.create_block(parent_idx=sub_block.idx) + grad_sub_block = program.create_block() + grad_sub_block.set_forward_block_idx(sub_block.idx) cb = _callback_lookup_(op) if cb is not None: if callbacks is None: @@ -310,6 +311,8 @@ def _append_backward_ops_(block, else: _append_backward_ops_(sub_block, sub_block.ops, grad_sub_block, no_grad_dict, grad_to_var, callbacks) + + program.rollback() grad_sub_block_list.append(grad_sub_block.desc) # Getting op's corresponding grad_op diff --git a/python/paddle/v2/fluid/framework.py b/python/paddle/v2/fluid/framework.py index 0e11709296a..7ec04013c91 100644 --- a/python/paddle/v2/fluid/framework.py +++ b/python/paddle/v2/fluid/framework.py @@ -678,6 +678,13 @@ class Block(object): def parent_idx(self): return self.desc.parent + @property + def forward_block_idx(self): + return self.desc.get_forward_block_idx() + + def set_forward_block_idx(self, idx): + self.desc.set_forward_block_idx(idx) + @property def idx(self): return self.desc.id @@ -695,11 +702,22 @@ class Block(object): return self.var(name) else: if self.idx == 0: - raise ValueError("var %s is not in block(%d) nor its parents." % - name, self.idx) + raise ValueError( + "var {0} is not in block({1}) nor its parents.".format( + name, self.idx)) else: - parent_block = self.program.block(self.parent_idx) - return parent_block.var_recursive(name) + # DFS + try: + parent_block = self.program.block(self.parent_idx) + return parent_block.var_recursive(name) + except ValueError: + fwd_block = self.program.block( + self.forward_block_idx + ) if self.forward_block_idx != -1 else None + if fwd_block is not None: + return fwd_block.var_recursive(name) + else: + raise def all_parameters(self): return list(self.iter_parameters()) -- GitLab From d50016b2a74dc9b5ae42012232a3f1cef29f2f8f Mon Sep 17 00:00:00 2001 From: Yu Yang Date: Fri, 23 Feb 2018 01:51:44 +0800 Subject: [PATCH 084/122] Remove build warnings in float16.h (#8481) --- paddle/fluid/platform/float16.h | 17 ++++++----------- 1 file changed, 6 insertions(+), 11 deletions(-) diff --git a/paddle/fluid/platform/float16.h b/paddle/fluid/platform/float16.h index cf6a4b09dbd..5832bd9ce30 100644 --- a/paddle/fluid/platform/float16.h +++ b/paddle/fluid/platform/float16.h @@ -74,17 +74,12 @@ struct PADDLE_ALIGN(2) float16 { // The following defaulted special class member functions // are added to make float16 pass the std::is_trivial test - HOSTDEVICE inline float16() = default; - - HOSTDEVICE inline float16(const float16&) = default; - - HOSTDEVICE inline float16& operator=(const float16&) = default; - - HOSTDEVICE inline float16(float16&&) = default; - - HOSTDEVICE inline float16& operator=(float16&&) = default; - - HOSTDEVICE inline ~float16() = default; + float16() = default; + float16(const float16& o) = default; + float16& operator=(const float16& o) = default; + float16(float16&& o) = default; + float16& operator=(float16&& o) = default; + ~float16() = default; // Constructors #ifdef PADDLE_CUDA_FP16 -- GitLab From 59bfa3e85063ea832b1f48e1bb549a6bc0fbdf5a Mon Sep 17 00:00:00 2001 From: haonanyu Date: Thu, 22 Feb 2018 11:58:26 -0800 Subject: [PATCH 085/122] fix a bug of sub() in layer_math.py --- python/paddle/trainer_config_helpers/layer_math.py | 2 +- .../tests/configs/protostr/math_ops.protostr | 3 +-- 2 files changed, 2 insertions(+), 3 deletions(-) diff --git a/python/paddle/trainer_config_helpers/layer_math.py b/python/paddle/trainer_config_helpers/layer_math.py index e1c8f0c3500..ee84188bacc 100644 --- a/python/paddle/trainer_config_helpers/layer_math.py +++ b/python/paddle/trainer_config_helpers/layer_math.py @@ -75,7 +75,7 @@ LayerOutput.__add__ = add def sub(layeroutput, other): if is_compatible_with(other, float): - return slope_intercept_layer(input=layeroutput, intercept=other) + return slope_intercept_layer(input=layeroutput, intercept=-other) if not isinstance(other, LayerOutput): logger.fatal("LayerOutput can only be subtracted with" " another Layeroutput or a number") diff --git a/python/paddle/trainer_config_helpers/tests/configs/protostr/math_ops.protostr b/python/paddle/trainer_config_helpers/tests/configs/protostr/math_ops.protostr index eaaf7fd6f5b..582207741ab 100644 --- a/python/paddle/trainer_config_helpers/tests/configs/protostr/math_ops.protostr +++ b/python/paddle/trainer_config_helpers/tests/configs/protostr/math_ops.protostr @@ -230,7 +230,7 @@ layers { input_layer_name: "__mixed_1__" } slope: 1.0 - intercept: 2 + intercept: -2 } layers { name: "__slope_intercept_layer_4__" @@ -411,4 +411,3 @@ sub_models { output_layer_names: "__mixed_3__" is_recurrent_layer_group: false } - -- GitLab From d3162339f6637114d515b4bc448fe4ae8cc81125 Mon Sep 17 00:00:00 2001 From: "Yang Yang(Tony)" Date: Thu, 22 Feb 2018 13:13:49 -0800 Subject: [PATCH 086/122] Update parallel_do.md (#8498) --- doc/design/parallel_do.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/doc/design/parallel_do.md b/doc/design/parallel_do.md index 221af6b6a48..45f77319965 100644 --- a/doc/design/parallel_do.md +++ b/doc/design/parallel_do.md @@ -24,7 +24,7 @@ A vanilla implementation of parallel_do can be shown as the following (`|` means ``` In the forward pass | Split input onto different devices - | Copy parameter to onto different devices + | Copy parameter onto different devices |||| Compute forward pass in parallel | Merge output from different devices @@ -87,7 +87,7 @@ block2 { } ``` -## Proformance Imporvement +## Performance Imporvement There are serial places we can make this parallel_do faster. -- GitLab From 88c22e9d1a809778a7bd83de71c370688cece0b2 Mon Sep 17 00:00:00 2001 From: Yu Yang Date: Fri, 23 Feb 2018 07:22:07 +0800 Subject: [PATCH 087/122] Speed up elemwise grad (#8402) * Speed up elemwise grad * Fix bug * Add macro for MAX_BLOCK_DIM --- paddle/fluid/operators/elementwise_add_op.h | 62 +---- .../fluid/operators/elementwise_op_function.h | 254 ++++++++++++++++++ 2 files changed, 259 insertions(+), 57 deletions(-) diff --git a/paddle/fluid/operators/elementwise_add_op.h b/paddle/fluid/operators/elementwise_add_op.h index 3c546bf3e4c..253964562c8 100644 --- a/paddle/fluid/operators/elementwise_add_op.h +++ b/paddle/fluid/operators/elementwise_add_op.h @@ -41,59 +41,8 @@ class ElementwiseAddKernel : public framework::OpKernel { }; template -struct ElementwiseAddGradFunctor { - template - void operator()(Device d, X x, Y y, Z z, dX dx, dY dy, dZ dz) { - auto dz_e = framework::EigenVector::Flatten(*dz); - if (dx) { - auto dx_e = framework::EigenVector::Flatten(*dx); - dx_e.device(d) = dz_e; - } - if (dy) { - auto dy_e = framework::EigenVector::Flatten(*dy); - dy_e.device(d) = dz_e; - } - } -}; - -template -struct ElementwiseAddBroadCastGradFunctor { - template - void operator()(Device d, X x, Y y, Z z, dX dx, dY dy, dZ dz, Pre pre, N n) { - auto dz_e = framework::EigenVector::Flatten(*dz); - if (dx) { - auto dx_e = framework::EigenVector::Flatten(*dx); - dx_e.device(d) = dz_e; - } - - if (dy) { - auto dy_e = framework::EigenVector::Flatten(*dy); - dy_e.device(d) = dz_e.reshape(Eigen::DSizes(pre, n)) - .sum(Eigen::array{{0}}); - } - } -}; - -template -struct ElementwiseAddBroadCast2GradFunctor { - template - void operator()(Device d, X x, Y y, Z z, dX dx, dY dy, dZ dz, Pre pre, N n, - Post post) { - auto dz_e = framework::EigenVector::Flatten(*dz); - if (dx) { - auto dx_e = framework::EigenVector::Flatten(*dx); - dx_e.device(d) = dz_e; - } - - if (dy) { - auto dy_e = framework::EigenVector::Flatten(*dy); - dy_e.device(d) = dz_e.reshape(Eigen::DSizes(pre, n, post)) - .sum(Eigen::array{{0, 2}}); - } - } +struct IdentityGrad { + HOSTDEVICE T operator()(T x, T y, T out, T dout) const { return dout; } }; template @@ -109,10 +58,9 @@ class ElementwiseAddGradKernel : public framework::OpKernel { auto* dx = ctx.Output(framework::GradVarName("X")); auto* dy = ctx.Output(framework::GradVarName("Y")); int axis = ctx.Attr("axis"); - ElementwiseGradCompute, - ElementwiseAddBroadCastGradFunctor, - ElementwiseAddBroadCast2GradFunctor>( - ctx, x, y, out, dout, axis, dx, dy); + ElemwiseGradCompute, IdentityGrad>( + ctx, *x, *y, *out, *dout, axis, dx, dy, IdentityGrad(), + IdentityGrad()); } }; diff --git a/paddle/fluid/operators/elementwise_op_function.h b/paddle/fluid/operators/elementwise_op_function.h index 2a4a6115111..2da8c10322e 100644 --- a/paddle/fluid/operators/elementwise_op_function.h +++ b/paddle/fluid/operators/elementwise_op_function.h @@ -20,9 +20,11 @@ limitations under the License. */ #ifdef __NVCC__ #include +constexpr int ELEMWISE_MAX_BLOCK_DIM = 1024; #endif #include "paddle/fluid/operators/math/math_function.h" +#include "paddle/fluid/platform/for_range.h" namespace paddle { namespace operators { @@ -311,6 +313,258 @@ EIGEN_FUNCTOR(Mul, EIGEN_MUL); #define EIGEN_DIV(x, y) ((x) / (y)) EIGEN_FUNCTOR(Div, EIGEN_DIV); +template +struct ElemwiseGradNoBroadcast { + const T* x_; + const T* y_; + const T* out_; + const T* dout_; + + HOSTDEVICE void operator()(size_t i) { + if (dx_ != nullptr) { + dx_[i] = dx_op_(x_[i], y_[i], out_[i], dout_[i]); + } + if (dy_ != nullptr) { + dy_[i] = dx_op_(x_[i], y_[i], out_[i], dout_[i]); + } + } + + DX_OP dx_op_; + DY_OP dy_op_; + T* dx_; + T* dy_; +}; + +template +static void ElemwiseGradBroadcast1CPU(const T* x, const T* y, const T* out, + const T* dout, int h, int w, DX_OP dx_op, + DY_OP dy_op, T* dx, T* dy) { + for (int i = 0; i < h; ++i) { + for (int j = 0; j < w; ++j) { + int x_offset = i * w + j; + if (dx != nullptr) { + dx[x_offset] = dx_op(x[x_offset], y[j], out[x_offset], dout[x_offset]); + } + if (dy != nullptr) { + T tmp = dy_op(x[x_offset], y[j], out[x_offset], dout[x_offset]); + if (i == 0) { + dy[j] = tmp; + } else { + dy[j] += tmp; + } + } + } + } +} +#ifdef __NVCC__ +template +static __global__ void ElemwiseGradBroadcast1CUDAKernel( + const T* x, const T* y, const T* out, const T* dout, int h, int w, + DX_OP dx_op, DY_OP dy_op, T* dx, T* dy) { + extern __shared__ char shm_buffer[]; + T* shm = reinterpret_cast(shm_buffer); + + int j = blockIdx.x; + int i = threadIdx.x; + int tid = threadIdx.x; + shm[tid] = 0; + + do { + int x_offset = i * w + j; + if (dx) { + dx[x_offset] = dx_op(x[x_offset], y[j], out[x_offset], dout[x_offset]); + } + if (dy) { + shm[tid] += dy_op(x[x_offset], y[j], out[x_offset], dout[x_offset]); + } + i += ELEMWISE_MAX_BLOCK_DIM; + } while (i < h); + + if (dy) { + __syncthreads(); + + h = h > ELEMWISE_MAX_BLOCK_DIM ? ELEMWISE_MAX_BLOCK_DIM : h; + + // Sum, could be optimized + if (threadIdx.x == 0) { + for (int k = 1; k < h; ++k) { + shm[0] += shm[k]; + } + dy[j] = shm[0]; + } + } +} + +template +static void ElemwiseGradBroadcast1CUDA(cudaStream_t stream, const T* x, + const T* y, const T* out, const T* dout, + int h, int w, DX_OP dx_op, DY_OP dy_op, + T* dx, T* dy) { + int block_size = std::min(ELEMWISE_MAX_BLOCK_DIM, h); + int gird_size = w; + int shared_mem_size = block_size * sizeof(T); + ElemwiseGradBroadcast1CUDAKernel<<>>(x, y, out, dout, h, w, dx_op, + dy_op, dx, dy); +} + +#endif + +template +static void ElemwiseGradBroadcast2CPU(const T* x, const T* y, const T* out, + const T* dout, int pre, int n, int post, + DX_OP dx_op, DY_OP dy_op, T* dx, T* dy) { + for (int i = 0; i < pre; ++i) { + for (int j = 0; j < n; ++j) { + for (int k = 0; k < post; ++k) { + int x_offset = i * n * post + j * post + k; + if (dx != nullptr) { + dx[x_offset] = + dx_op(x[x_offset], y[j], out[x_offset], dout[x_offset]); + } + if (dy != nullptr) { + T tmp = dy_op(x[x_offset], y[j], out[x_offset], dout[x_offset]); + if (i == 0 && k == 0) { + dy[j] = tmp; + } else { + dy[j] += tmp; + } + } + } + } + } +} + +#ifdef __NVCC__ + +template +static __global__ void ElemwiseGradBroadcast2CUDAKernel( + const T* x, const T* y, const T* out, const T* dout, int pre, int n, + int post, DX_OP dx_op, DY_OP dy_op, T* dx, T* dy) { + int tid = threadIdx.x; + int j = blockIdx.x; + + extern __shared__ char shm_buffer[]; + T* shm = reinterpret_cast(shm_buffer); + shm[tid] = 0; + int ttid = tid; + + while (true) { + int i = ttid / post; + int k = ttid % post; + if (i >= pre) break; + + int x_offset = i * n * post + j * post + k; + + if (dx != nullptr) { + dx[x_offset] = dx_op(x[x_offset], y[j], out[x_offset], dout[x_offset]); + } + + if (dy != nullptr) { + shm[tid] += dy_op(x[x_offset], y[j], out[x_offset], dout[x_offset]); + } + + ttid += ELEMWISE_MAX_BLOCK_DIM; + } + + if (dy) { + __syncthreads(); + int h = pre * post; + h = h > ELEMWISE_MAX_BLOCK_DIM ? ELEMWISE_MAX_BLOCK_DIM : h; + + // Sum, could be optimized + if (tid == 0) { + for (int i = 1; i < h; ++i) { + shm[0] += shm[i]; + } + dy[j] = shm[0]; + } + } +} + +template +static void ElemwiseGradBroadcast2CUDA(cudaStream_t stream, const T* x, + const T* y, const T* out, const T* dout, + int pre, int n, int post, DX_OP dx_op, + DY_OP dy_op, T* dx, T* dy) { + int block_size = std::min(ELEMWISE_MAX_BLOCK_DIM, pre * post); + int gird_size = n; + int shared_mem_size = block_size * sizeof(T); + ElemwiseGradBroadcast2CUDAKernel<<>>(x, y, out, dout, pre, n, post, + dx_op, dy_op, dx, dy); +} + +#endif + +template +void ElemwiseGradCompute(const framework::ExecutionContext& ctx, + const framework::Tensor& x, const framework::Tensor& y, + const framework::Tensor& out, + const framework::Tensor& dout, int axis, + framework::Tensor* dx, framework::Tensor* dy, + DX_OP dx_op, DY_OP dy_op) { + if (x.dims() == y.dims()) { + size_t N = static_cast(framework::product(x.dims())); + platform::ForRange for_range( + ctx.template device_context(), N); + for_range(ElemwiseGradNoBroadcast{ + x.data(), y.data(), out.data(), dout.data(), dx_op, dy_op, + dx == nullptr ? nullptr : dx->mutable_data(ctx.GetPlace()), + dy == nullptr ? nullptr : dy->mutable_data(ctx.GetPlace())}); + } else { // Y is a scalar + auto x_dim = x.dims(); + auto y_dim = y.dims(); + + if (y_dim.size() == 1 && y_dim[0] == 1) { + // y is a scalar + auto extended_dims = framework::vectorize(x_dim); + extended_dims.push_back(1); + x_dim = framework::make_ddim(extended_dims); + } + + axis = (axis == -1 ? x_dim.size() - y_dim.size() : axis); + int pre, n, post; + get_mid_dims(x_dim, y_dim, axis, pre, n, post); + if (post == 1) { + int h = pre; + int w = n; + if (platform::is_gpu_place(ctx.GetPlace())) { +#ifdef __NVCC__ + ElemwiseGradBroadcast1CUDA( + ctx.template device_context().stream(), x.data(), + y.data(), out.data(), dout.data(), h, w, dx_op, dy_op, + dx == nullptr ? nullptr : dx->mutable_data(ctx.GetPlace()), + dy == nullptr ? nullptr : dy->mutable_data(ctx.GetPlace())); +#endif + } else { + ElemwiseGradBroadcast1CPU( + x.data(), y.data(), out.data(), dout.data(), h, w, + dx_op, dy_op, + dx == nullptr ? nullptr : dx->mutable_data(ctx.GetPlace()), + dy == nullptr ? nullptr : dy->mutable_data(ctx.GetPlace())); + } + } else { + if (platform::is_gpu_place(ctx.GetPlace())) { +#ifdef __NVCC__ + ElemwiseGradBroadcast2CUDA( + ctx.template device_context().stream(), x.data(), + y.data(), out.data(), dout.data(), pre, n, post, dx_op, + dy_op, + dx == nullptr ? nullptr : dx->mutable_data(ctx.GetPlace()), + dy == nullptr ? nullptr : dy->mutable_data(ctx.GetPlace())); +#endif + } else { + ElemwiseGradBroadcast2CPU( + x.data(), y.data(), out.data(), dout.data(), pre, n, + post, dx_op, dy_op, + dx == nullptr ? nullptr : dx->mutable_data(ctx.GetPlace()), + dy == nullptr ? nullptr : dy->mutable_data(ctx.GetPlace())); + } + } + } +}; + template void ElementwiseGradCompute(const framework::ExecutionContext& ctx, -- GitLab From 77ee8fb2409ab8ff626c2a9456417e47a90c9fe2 Mon Sep 17 00:00:00 2001 From: kavyasrinet Date: Thu, 22 Feb 2018 16:05:41 -0800 Subject: [PATCH 088/122] Exposing Channel to be used as a Variable and integrating with Fluid (#8486) * Adding set_capacity method support * Adding Python for make_channel * Updating notest_concurrency * Write python for make_channel method * Write python for make_channel method * Fix make_channel and test * Placeholder ops for channel send, recv and close * Adding ToTypeIndex method to var_type.h * Add var_type.h to channel: * Added POD_Type to the method * Add CHANNEL to executor * Updated get and set DataType to accomodate Channels * Updating get and set to incorporate channels * Adding CHANNEL as supported VarType in protobuf * Removing unecessary import * Fixing VarDesc to adapt to Channel as VarType * Add channel.h to executor * Remove innclude from channel * Updated var_type to support Channel as var type * Adding get_channel to pybind * Added ChannelHolder * Adding make_channel as an op * Adding ChannelHolder in channel * Fixing typo * Commenting out operators in concurrency * Removing totypeid right now since we don't need it. * Reverting python changes * Fixing typo in framework.py * Modify comments for ReaderHolder --- paddle/fluid/framework/channel.h | 73 ++++++++++++++++++++++++++++++ paddle/fluid/framework/executor.cc | 5 +- paddle/fluid/framework/var_desc.cc | 54 +++++++++++++++++++++- paddle/fluid/framework/var_desc.h | 4 ++ paddle/fluid/framework/var_type.h | 6 +++ paddle/fluid/pybind/protobuf.cc | 2 + paddle/fluid/pybind/pybind.cc | 1 + 7 files changed, 142 insertions(+), 3 deletions(-) diff --git a/paddle/fluid/framework/channel.h b/paddle/fluid/framework/channel.h index 5acf4fb39bb..8ca1f2aa47b 100644 --- a/paddle/fluid/framework/channel.h +++ b/paddle/fluid/framework/channel.h @@ -15,6 +15,8 @@ limitations under the License. */ #pragma once #include // for size_t +#include +#include "paddle/fluid/platform/enforce.h" namespace paddle { namespace framework { @@ -51,6 +53,77 @@ void CloseChannel(Channel* ch) { ch->Close(); } +/* + * The ChannelHolder class serves two main purposes: + * 1. It acts as a unified wrapper for the different kinds of + * channels, i.e. Buffered and Unbuffered channels. This is + * similar to the ReaderHolder class. + * 2. It also helps us in TypeHiding. This is similar to the + * PlaceHolder implementations in variable.h and tensor.h. + */ +class ChannelHolder { + public: + template + void Reset(size_t buffer_size) { + holder_.reset(new PlaceholderImpl(buffer_size)); + } + + template + bool Send(T* data) { + if (!IsInitialized()) return false; + PADDLE_ENFORCE_EQ(holder_->Type(), std::type_index(typeid(T))); + // Static cast should be safe because we have ensured that types are same + Channel* channel = static_cast*>(holder_->Ptr()); + return channel != nullptr ? channel->Send(data) : false; + } + + template + bool Receive(T* data) { + if (!IsInitialized()) return false; + PADDLE_ENFORCE_EQ(holder_->Type(), std::type_index(typeid(T))); + Channel* channel = static_cast*>(holder_->Ptr()); + return channel != nullptr ? channel->Receive(data) : false; + } + + void close() { + if (IsInitialized()) holder_->Close(); + } + + inline bool IsInitialized() const { return holder_ != nullptr; } + + private: + /** + * @note Placeholder hides type T, so it doesn't appear as a template + * parameter of ChannelHolder. + */ + struct Placeholder { + virtual ~Placeholder() {} + virtual const std::type_index Type() const = 0; + virtual void* Ptr() const = 0; + virtual void Close() const = 0; + std::type_info type_; + }; + + template + struct PlaceholderImpl : public Placeholder { + PlaceholderImpl(size_t buffer_size) : type_(std::type_index(typeid(T))) { + channel_.reset(MakeChannel(buffer_size)); + } + + virtual const std::type_index Type() const { return type_; } + virtual void* Ptr() const { return static_cast(channel_.get()); } + virtual void Close() { + if (channel_) channel_->Close(); + } + + std::unique_ptr*> channel_; + const std::type_index type_; + }; + + // Pointer to a PlaceholderImpl object + std::unique_ptr holder_; +}; + } // namespace framework } // namespace paddle diff --git a/paddle/fluid/framework/executor.cc b/paddle/fluid/framework/executor.cc index 6fd19e804af..0d2691e8115 100644 --- a/paddle/fluid/framework/executor.cc +++ b/paddle/fluid/framework/executor.cc @@ -17,6 +17,7 @@ limitations under the License. */ #include #include "gflags/gflags.h" +#include "paddle/fluid/framework/channel.h" #include "paddle/fluid/framework/feed_fetch_method.h" #include "paddle/fluid/framework/feed_fetch_type.h" #include "paddle/fluid/framework/lod_rank_table.h" @@ -55,13 +56,15 @@ static void CreateTensor(Variable* var, proto::VarType::Type var_type) { var->GetMutable(); } else if (var_type == proto::VarType::READER) { var->GetMutable(); + } else if (var_type == proto::VarType::CHANNEL) { + var->GetMutable(); } else if (var_type == proto::VarType::NCCL_COM) { // GetMutable will be called in ncclInit } else { PADDLE_THROW( "Variable type %d is not in " "[LOD_TENSOR, SELECTED_ROWS, FEED_MINIBATCH, FETCH_LIST, " - "LOD_RANK_TABLE, PLACE_LIST, READER, NCCL_COM]", + "LOD_RANK_TABLE, PLACE_LIST, READER, CHANNEL, NCCL_COM]", var_type); } } diff --git a/paddle/fluid/framework/var_desc.cc b/paddle/fluid/framework/var_desc.cc index 7e3f002b533..1aa0ae0f7c1 100644 --- a/paddle/fluid/framework/var_desc.cc +++ b/paddle/fluid/framework/var_desc.cc @@ -88,7 +88,13 @@ std::vector> VarDesc::GetShapes() const { } void VarDesc::SetDataType(proto::VarType::Type data_type) { - mutable_tensor_desc()->set_data_type(data_type); + switch (desc_.type().type()) { + case proto::VarType::CHANNEL: + mutable_channel_desc()->set_data_type(data_type); + break; + default: + mutable_tensor_desc()->set_data_type(data_type); + } } void VarDesc::SetDataTypes( @@ -109,7 +115,13 @@ void VarDesc::SetDataTypes( } proto::VarType::Type VarDesc::GetDataType() const { - return tensor_desc().data_type(); + switch (desc_.type().type()) { + case proto::VarType::CHANNEL: + return channel_desc().data_type(); + break; + default: + return tensor_desc().data_type(); + } } std::vector VarDesc::GetDataTypes() const { @@ -122,6 +134,17 @@ std::vector VarDesc::GetDataTypes() const { return res; } +void VarDesc::SetCapacity(int64_t capacity) { + switch (desc_.type().type()) { + case proto::VarType::CHANNEL: + desc_.mutable_type()->mutable_channel()->set_capacity(capacity); + break; + default: + PADDLE_THROW("Setting 'capacity' is not supported by the type of var %s.", + this->Name()); + } +} + void VarDesc::SetLoDLevel(int32_t lod_level) { switch (desc_.type().type()) { case proto::VarType::LOD_TENSOR: @@ -191,6 +214,19 @@ std::vector VarDesc::GetLoDLevels() const { } } +const proto::VarType::ChannelDesc &VarDesc::channel_desc() const { + PADDLE_ENFORCE(desc_.has_type(), "The var's type hasn't been set."); + PADDLE_ENFORCE(desc_.type().has_type(), "The var type hasn't been set."); + switch (desc_.type().type()) { + case proto::VarType::CHANNEL: + return desc_.type().channel(); + default: + PADDLE_THROW( + "Getting 'channel_desc' is not supported by the type of var %s.", + this->Name()); + } +} + const proto::VarType::TensorDesc &VarDesc::tensor_desc() const { PADDLE_ENFORCE(desc_.has_type(), "The var's type hasn't been set."); PADDLE_ENFORCE(desc_.type().has_type(), "The var type hasn't been set."); @@ -226,6 +262,20 @@ std::vector VarDesc::tensor_descs() const { } } +proto::VarType::ChannelDesc *VarDesc::mutable_channel_desc() { + PADDLE_ENFORCE(desc_.has_type(), "The var type hasn't been set."); + PADDLE_ENFORCE(desc_.type().has_type(), "The var type hasn't been set."); + switch (desc_.type().type()) { + case proto::VarType::CHANNEL: + return desc_.mutable_type()->mutable_channel(); + default: + PADDLE_THROW( + "Getting 'mutable_channel_desc' is not supported by the type of var " + "%s.", + this->Name()); + } +} + proto::VarType::TensorDesc *VarDesc::mutable_tensor_desc() { PADDLE_ENFORCE(desc_.has_type(), "The var type hasn't been set."); PADDLE_ENFORCE(desc_.type().has_type(), "The var type hasn't been set."); diff --git a/paddle/fluid/framework/var_desc.h b/paddle/fluid/framework/var_desc.h index 19b8d890c1f..f62415fda67 100644 --- a/paddle/fluid/framework/var_desc.h +++ b/paddle/fluid/framework/var_desc.h @@ -85,6 +85,8 @@ class VarDesc { void SetDataTypes( const std::vector &multiple_data_type); + void SetCapacity(int64_t capacity); + proto::VarType::Type GetDataType() const; std::vector GetDataTypes() const; @@ -106,8 +108,10 @@ class VarDesc { void SetPersistable(bool persistable) { desc_.set_persistable(persistable); } private: + const proto::VarType::ChannelDesc &channel_desc() const; const proto::VarType::TensorDesc &tensor_desc() const; std::vector tensor_descs() const; + proto::VarType::ChannelDesc *mutable_channel_desc(); proto::VarType::TensorDesc *mutable_tensor_desc(); std::vector mutable_tensor_descs(); diff --git a/paddle/fluid/framework/var_type.h b/paddle/fluid/framework/var_type.h index 960ebff9d7d..2b646d78f0b 100644 --- a/paddle/fluid/framework/var_type.h +++ b/paddle/fluid/framework/var_type.h @@ -13,6 +13,7 @@ See the License for the specific language governing permissions and limitations under the License. */ #pragma once +#include "paddle/fluid/framework/channel.h" #include "paddle/fluid/framework/framework.pb.h" #include "paddle/fluid/framework/lod_rank_table.h" #include "paddle/fluid/framework/lod_tensor.h" @@ -34,6 +35,8 @@ inline proto::VarType::Type ToVarType(std::type_index type) { return proto::VarType_Type_SELECTED_ROWS; } else if (type.hash_code() == typeid(ReaderHolder).hash_code()) { return proto::VarType_Type_READER; + } else if (type.hash_code() == typeid(ChannelHolder).hash_code()) { + return proto::VarType_Type_CHANNEL; } else { PADDLE_THROW("ToVarType:Unsupported type %s", type.name()); } @@ -57,6 +60,9 @@ inline void VisitVarType(const framework::Variable& var, Visitor visitor) { case proto::VarType_Type_READER: visitor(var.Get()); return; + case proto::VarType_Type_CHANNEL: + visitor(var.Get()); + return; default: PADDLE_THROW("Not supported visit type, %d", ToVarType(var.Type())); } diff --git a/paddle/fluid/pybind/protobuf.cc b/paddle/fluid/pybind/protobuf.cc index 4e04151c6ad..1a9d7c421b7 100644 --- a/paddle/fluid/pybind/protobuf.cc +++ b/paddle/fluid/pybind/protobuf.cc @@ -216,6 +216,7 @@ void BindVarDsec(py::module &m) { .def("set_shapes", &VarDesc::SetShapes) .def("set_dtype", &VarDesc::SetDataType) .def("set_dtypes", &VarDesc::SetDataTypes) + .def("set_capacity", &VarDesc::SetCapacity) .def("shape", &VarDesc::GetShape, py::return_value_policy::reference) .def("shapes", &VarDesc::GetShapes, py::return_value_policy::reference) .def("dtype", &VarDesc::GetDataType, py::return_value_policy::reference) @@ -246,6 +247,7 @@ void BindVarDsec(py::module &m) { .value("STEP_SCOPES", proto::VarType::STEP_SCOPES) .value("LOD_RANK_TABLE", proto::VarType::LOD_RANK_TABLE) .value("LOD_TENSOR_ARRAY", proto::VarType::LOD_TENSOR_ARRAY) + .value("CHANNEL", proto::VarType::CHANNEL) .value("PLACE_LIST", proto::VarType::PLACE_LIST) .value("READER", proto::VarType::READER) .value("NCCL_COM", proto::VarType::NCCL_COM); diff --git a/paddle/fluid/pybind/pybind.cc b/paddle/fluid/pybind/pybind.cc index 56c1a935d98..abe2b114492 100644 --- a/paddle/fluid/pybind/pybind.cc +++ b/paddle/fluid/pybind/pybind.cc @@ -17,6 +17,7 @@ limitations under the License. */ #include // for call_once #include #include "paddle/fluid/framework/backward.h" +#include "paddle/fluid/framework/channel.h" #include "paddle/fluid/framework/executor.h" #include "paddle/fluid/framework/feed_fetch_method.h" #include "paddle/fluid/framework/framework.pb.h" -- GitLab From 0e187bc93e76051e70f0c506e0df5f2359c3d0cc Mon Sep 17 00:00:00 2001 From: chengduo Date: Fri, 23 Feb 2018 08:58:01 +0800 Subject: [PATCH 089/122] fix get_mid_dims annotation (#8490) --- paddle/fluid/operators/elementwise_op_function.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/paddle/fluid/operators/elementwise_op_function.h b/paddle/fluid/operators/elementwise_op_function.h index 2da8c10322e..5c783035309 100644 --- a/paddle/fluid/operators/elementwise_op_function.h +++ b/paddle/fluid/operators/elementwise_op_function.h @@ -35,10 +35,10 @@ namespace operators { * For example: * 1. shape(X) = (2, 3, 4, 5), shape(Y) = (3, 4), with axis=1 * pre=2, n=3*4, post=5 - * x.shape(2, 12, 5) * y.shape(1,12,1).broadcast(2,12,5) + * x.shape(2, 12, 5) * y.shape(1, 12, 1).broadcast(2, 12, 5) * 2. shape(X) = (2, 3, 4, 5), shape(Y) = (4,5) * pre=2*3, n=4*5, post=1 - * x.shape(2, 3, 20) * y.shape(1,1,20).broadcast(2,3,20) + * x.shape(6, 20, 1) * y.shape(1, 20, 1).broadcast(6, 20, 1) */ inline void get_mid_dims(const framework::DDim& x_dims, const framework::DDim& y_dims, const int axis, -- GitLab From bf92706c58f8c89db9b670523e8aa4fcd2c067a7 Mon Sep 17 00:00:00 2001 From: qijun Date: Fri, 23 Feb 2018 11:40:30 +0800 Subject: [PATCH 090/122] fix bug in memory optimization transpiler --- .../fluid/memory_optimization_transpiler.py | 20 +++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) diff --git a/python/paddle/v2/fluid/memory_optimization_transpiler.py b/python/paddle/v2/fluid/memory_optimization_transpiler.py index ee56ccdcf11..6952ca7fe49 100644 --- a/python/paddle/v2/fluid/memory_optimization_transpiler.py +++ b/python/paddle/v2/fluid/memory_optimization_transpiler.py @@ -223,15 +223,15 @@ def get_cfgs(input_program): # Find while/while_grad block pair for grad_id in while_grad_sub_block_ids: - parent_id = pdesc.block(grad_id).parent - if parent_id in while_sub_block_ids: - while_block_id_pair.append((parent_id, grad_id)) - while_sub_block_ids.remove(parent_id) + forward_id = pdesc.block(grad_id).get_forward_block_idx() + if forward_id in while_sub_block_ids: + while_block_id_pair.append((forward_id, grad_id)) + while_sub_block_ids.remove(forward_id) # Get while/while_grad block ops - for parent_id, grad_id in while_block_id_pair: + for forward_id, grad_id in while_block_id_pair: while_block_ops = [] - while_block = pdesc.block(parent_id) + while_block = pdesc.block(forward_id) while_block_op_size = while_block.op_size() for i in range(while_block_op_size): while_block_ops.append(while_block.op(i)) @@ -242,21 +242,21 @@ def get_cfgs(input_program): while_block_ops.append(while_grad_block.op(i)) while_op_output = set() - while_op_output.update(while_op_dict[parent_id].output_arg_names()) + while_op_output.update(while_op_dict[forward_id].output_arg_names()) while_op_output.update(while_op_dict[grad_id].output_arg_names()) ops_list.append((while_block_ops, while_block_op_size, while_op_output)) # Process rest while block ops - for parent_id in while_sub_block_ids: + for forward_id in while_sub_block_ids: while_block_ops = [] - while_block = pdesc.block(parent_id) + while_block = pdesc.block(forward_id) while_block_op_size = while_block.op_size() for i in range(while_block_op_size): while_block_ops.append(while_block.op(i)) while_op_output = set() - while_op_output.update(while_op_dict[parent_id].output_arg_names()) + while_op_output.update(while_op_dict[forward_id].output_arg_names()) ops_list.append((while_block_ops, while_block_op_size, while_op_output)) -- GitLab From 65058cfb7ac07204cbd2dcdc05e845a447fc54f8 Mon Sep 17 00:00:00 2001 From: Yu Yang Date: Fri, 23 Feb 2018 12:58:32 +0800 Subject: [PATCH 091/122] Change DFS to BFS --- paddle/fluid/framework/block_desc.cc | 38 +++++++++++++++-------- python/paddle/v2/fluid/framework.py | 46 ++++++++++++++++------------ 2 files changed, 51 insertions(+), 33 deletions(-) diff --git a/paddle/fluid/framework/block_desc.cc b/paddle/fluid/framework/block_desc.cc index 996aefd0479..1efb775cdca 100644 --- a/paddle/fluid/framework/block_desc.cc +++ b/paddle/fluid/framework/block_desc.cc @@ -16,6 +16,8 @@ limitations under the License. */ #include "paddle/fluid/framework/operator.h" #include "paddle/fluid/framework/program_desc.h" +#include + namespace paddle { namespace framework { @@ -45,23 +47,33 @@ bool BlockDesc::HasVar(const std::string &name) const { VarDesc *BlockDesc::FindVarRecursive(const std::string &name) const { if (name == kEmptyVarName) return nullptr; - auto it = vars_.find(name); - if (it != vars_.end()) { - return it->second.get(); - } + std::queue frontier; + std::unordered_set visited; - BlockDesc *tmp = ParentBlock(); + frontier.push(this); - if (tmp != nullptr) { - auto ptr = tmp->FindVarRecursive(name); - if (ptr != nullptr) { - return ptr; + while (!frontier.empty()) { // BFS + auto cur = frontier.front(); + frontier.pop(); + if (visited.count(cur) != 0) { + continue; + } + auto var = cur->FindVar(name); + if (var != nullptr) { + return var; + } + + auto fwd = cur->ForwardBlock(); + auto parent = cur->ParentBlock(); + + if (fwd != nullptr) { + frontier.push(fwd); + } + if (parent != nullptr) { + frontier.push(parent); } - } - tmp = ForwardBlock(); - if (tmp != nullptr) { - return tmp->FindVarRecursive(name); + visited.insert(cur); } return nullptr; diff --git a/python/paddle/v2/fluid/framework.py b/python/paddle/v2/fluid/framework.py index 7ec04013c91..3ec8d978140 100644 --- a/python/paddle/v2/fluid/framework.py +++ b/python/paddle/v2/fluid/framework.py @@ -698,26 +698,32 @@ class Block(object): return v def var_recursive(self, name): - if self.has_var(name): - return self.var(name) - else: - if self.idx == 0: - raise ValueError( - "var {0} is not in block({1}) nor its parents.".format( - name, self.idx)) - else: - # DFS - try: - parent_block = self.program.block(self.parent_idx) - return parent_block.var_recursive(name) - except ValueError: - fwd_block = self.program.block( - self.forward_block_idx - ) if self.forward_block_idx != -1 else None - if fwd_block is not None: - return fwd_block.var_recursive(name) - else: - raise + frontier = list() + visited = set() + + frontier.append(self) + + prog = self.program + + while len(frontier) != 0: # BFS + cur = frontier[0] + frontier = frontier[1:] + + if id(cur) in visited: + continue + + if cur.has_var(name): + return cur.var(name) + + if cur.parent_idx != -1: + frontier.append(prog.block(cur.parent_idx)) + + if cur.forward_block_idx != -1: + frontier.append(prog.block(cur.forward_block_idx)) + + visited.add(id(cur)) + + raise ValueError("Var {0} is not found recursively".format(name)) def all_parameters(self): return list(self.iter_parameters()) -- GitLab From 574bcdab42c8db34f0f082ffba69aacbea36c36d Mon Sep 17 00:00:00 2001 From: Yu Yang Date: Fri, 23 Feb 2018 13:13:38 +0800 Subject: [PATCH 092/122] Add comments --- paddle/fluid/operators/while_op.cc | 22 ++++++++++++---------- 1 file changed, 12 insertions(+), 10 deletions(-) diff --git a/paddle/fluid/operators/while_op.cc b/paddle/fluid/operators/while_op.cc index 5f51a273dd4..8b62b242cf8 100644 --- a/paddle/fluid/operators/while_op.cc +++ b/paddle/fluid/operators/while_op.cc @@ -261,35 +261,37 @@ class WhileGradOpDescMaker : public framework::SingleGradOpDescMaker { for (auto &o : Output(kOutputs)) { block_ins.insert(o); } - std::unordered_set extra_inputs; + std::unordered_set output_grads; for (const auto *op : grad_block->AllOps()) { for (auto &input_name : op->InputArgumentNames()) { // If the input of Op has been recorded or is generated by the forward // block, do not make it as input again. + // The input is located in I/O or other op's outputs or the variable is + // located in grad_block's parents if (block_ins.find(input_name) != block_ins.end() || - fwd_block->FindVar(input_name) != nullptr || - parent_block->FindVar(input_name) != nullptr) { + (fwd_block->FindVarRecursive(input_name) != nullptr || + parent_block->FindVarRecursive(input_name) != nullptr)) { continue; } - extra_inputs.insert(input_name); + output_grads.insert(input_name); } for (auto &output_name : op->OutputArgumentNames()) { block_ins.insert(output_name); } } - std::vector extra_inputs_list; - extra_inputs_list.resize(extra_inputs.size()); - std::copy(extra_inputs.begin(), extra_inputs.end(), - extra_inputs_list.begin()); - while_grad->SetInput(framework::GradVarName(kOutputs), extra_inputs_list); + std::vector output_grads_list; + output_grads_list.resize(output_grads.size()); + std::copy(output_grads.begin(), output_grads.end(), + output_grads_list.begin()); + while_grad->SetInput(framework::GradVarName(kOutputs), output_grads_list); while_grad->SetAttrMap(this->Attrs()); while_grad->SetBlockAttr(kStepBlock, *grad_block); // record the original output gradient names, since the gradient name of // while operator could be renamed. - while_grad->SetAttr("original_output_grad", extra_inputs_list); + while_grad->SetAttr("original_output_grad", output_grads_list); return std::unique_ptr(while_grad); } -- GitLab From 71053063a105bf64e08ae5826019c05cb7639b3b Mon Sep 17 00:00:00 2001 From: Yu Yang Date: Fri, 23 Feb 2018 14:32:35 +0800 Subject: [PATCH 093/122] test Parallel.Do and DynRNN --- python/paddle/v2/fluid/layers/control_flow.py | 3 +- .../tests/book/test_understand_sentiment.py | 57 +++++++++++++++++++ 2 files changed, 59 insertions(+), 1 deletion(-) diff --git a/python/paddle/v2/fluid/layers/control_flow.py b/python/paddle/v2/fluid/layers/control_flow.py index b9ab28a86a2..72056cc7cdf 100644 --- a/python/paddle/v2/fluid/layers/control_flow.py +++ b/python/paddle/v2/fluid/layers/control_flow.py @@ -652,7 +652,8 @@ class While(object): parent_block.append_op( type='while', inputs={ - 'X': [parent_block.var(x_name) for x_name in x_name_list], + 'X': + [parent_block.var_recursive(x_name) for x_name in x_name_list], 'Condition': [self.cond_var] }, outputs={'Out': out_vars, diff --git a/python/paddle/v2/fluid/tests/book/test_understand_sentiment.py b/python/paddle/v2/fluid/tests/book/test_understand_sentiment.py index af917de8e33..61f46b51c44 100644 --- a/python/paddle/v2/fluid/tests/book/test_understand_sentiment.py +++ b/python/paddle/v2/fluid/tests/book/test_understand_sentiment.py @@ -47,6 +47,46 @@ def convolution_net(data, label, input_dim, class_dim=2, emb_dim=32, return avg_cost, accuracy, prediction +def dyn_rnn_lstm(data, label, input_dim, class_dim=2, emb_dim=32, + lstm_size=128): + emb = fluid.layers.embedding( + input=data, size=[input_dim, emb_dim], is_sparse=True) + sentence = fluid.layers.fc(input=emb, size=lstm_size, act='tanh') + + rnn = fluid.layers.DynamicRNN() + with rnn.block(): + word = rnn.step_input(sentence) + prev_hidden = rnn.memory(value=0.0, shape=[lstm_size]) + prev_cell = rnn.memory(value=0.0, shape=[lstm_size]) + + def gate_common(ipt, hidden, size): + gate0 = fluid.layers.fc(input=ipt, size=size, bias_attr=True) + gate1 = fluid.layers.fc(input=hidden, size=size, bias_attr=False) + return gate0 + gate1 + + forget_gate = fluid.layers.sigmoid(x=gate_common(word, prev_hidden, + lstm_size)) + input_gate = fluid.layers.sigmoid(x=gate_common(word, prev_hidden, + lstm_size)) + output_gate = fluid.layers.sigmoid(x=gate_common(word, prev_hidden, + lstm_size)) + cell_gate = fluid.layers.sigmoid(x=gate_common(word, prev_hidden, + lstm_size)) + + cell = forget_gate * prev_cell + input_gate * cell_gate + hidden = output_gate * fluid.layers.tanh(x=cell) + rnn.update_memory(prev_cell, cell) + rnn.update_memory(prev_hidden, hidden) + rnn.output(hidden) + + last = fluid.layers.sequence_last_step(rnn()) + prediction = fluid.layers.fc(input=last, size=class_dim, act="softmax") + cost = fluid.layers.cross_entropy(input=prediction, label=label) + avg_cost = fluid.layers.mean(x=cost) + accuracy = fluid.layers.accuracy(input=prediction, label=label) + return avg_cost, accuracy, prediction + + def stacked_lstm_net(data, label, input_dim, @@ -270,6 +310,23 @@ class TestUnderstandSentiment(unittest.TestCase): use_cuda=True, parallel=True) + @unittest.skip(reason='make CI faster') + def test_dynrnn_lstm_gpu(self): + with self.new_program_scope(): + main( + self.word_dict, + net_method=dyn_rnn_lstm, + use_cuda=True, + parallel=False) + + def test_dynrnn_lstm_gpu_parallel(self): + with self.new_program_scope(): + main( + self.word_dict, + net_method=dyn_rnn_lstm, + use_cuda=True, + parallel=True) + if __name__ == '__main__': unittest.main() -- GitLab From bc0f04df4e84f1a79ca97fba362c581a26ac4c86 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=AD=A6=E6=AF=85?= Date: Fri, 23 Feb 2018 15:02:33 +0800 Subject: [PATCH 094/122] Fix fluid dist benchmark document errors (#8512) Fix fluid dist benchmark document errors --- benchmark/cluster/vgg16/README.md | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/benchmark/cluster/vgg16/README.md b/benchmark/cluster/vgg16/README.md index 11d00b8f853..201d38928c4 100644 --- a/benchmark/cluster/vgg16/README.md +++ b/benchmark/cluster/vgg16/README.md @@ -8,10 +8,12 @@ - cpu MHz : 2101.000 - cache size : 20480 KB +### Blas settings + +Setting environment variable: `MKL_NUM_THREADS=1`. + ### Single Node Single Thread -- PServer Count: 10 -- Trainer Count: 20 - Metrics: samples / sec | Batch Size | 32 | 64 | 128 | 256 | @@ -24,7 +26,6 @@ - PServer Count: 10 - Trainer Count: 20 -- Per trainer CPU Core: 1 - Metrics: samples / sec | Batch Size | 32 | 64 | 128 | 256 | -- GitLab From 6e7fee0ee17e47786ca60f37a58133a612272893 Mon Sep 17 00:00:00 2001 From: Abhinav Arora Date: Thu, 22 Feb 2018 23:51:49 -0800 Subject: [PATCH 095/122] Add unit tests for ChannelHolder (#8510) --- paddle/fluid/framework/channel.h | 5 ++-- paddle/fluid/framework/channel_test.cc | 34 ++++++++++++++++++++++++++ 2 files changed, 36 insertions(+), 3 deletions(-) diff --git a/paddle/fluid/framework/channel.h b/paddle/fluid/framework/channel.h index 8ca1f2aa47b..be578059388 100644 --- a/paddle/fluid/framework/channel.h +++ b/paddle/fluid/framework/channel.h @@ -100,8 +100,7 @@ class ChannelHolder { virtual ~Placeholder() {} virtual const std::type_index Type() const = 0; virtual void* Ptr() const = 0; - virtual void Close() const = 0; - std::type_info type_; + virtual void Close() = 0; }; template @@ -116,7 +115,7 @@ class ChannelHolder { if (channel_) channel_->Close(); } - std::unique_ptr*> channel_; + std::unique_ptr> channel_; const std::type_index type_; }; diff --git a/paddle/fluid/framework/channel_test.cc b/paddle/fluid/framework/channel_test.cc index 953fa40fec8..2c4e622bd78 100644 --- a/paddle/fluid/framework/channel_test.cc +++ b/paddle/fluid/framework/channel_test.cc @@ -20,6 +20,7 @@ limitations under the License. */ #include "gtest/gtest.h" using paddle::framework::Channel; +using paddle::framework::ChannelHolder; using paddle::framework::MakeChannel; using paddle::framework::CloseChannel; using paddle::framework::details::Buffered; @@ -508,3 +509,36 @@ TEST(Channel, UnbufferedChannelDestroyUnblocksSendersTest) { auto ch = MakeChannel(0); ChannelDestroyUnblockSenders(ch); } + +void ChannelHolderSendReceive(ChannelHolder *ch) { + unsigned sum_send = 0; + std::thread t([&]() { + for (int i = 0; i < 5; i++) { + EXPECT_EQ(ch->Send(&i), true); + sum_send += i; + } + }); + for (int i = 0; i < 5; i++) { + int recv; + EXPECT_EQ(ch->Receive(&recv), true); + EXPECT_EQ(recv, i); + } + + ch->close(); + t.join(); + EXPECT_EQ(sum_send, 10U); +} + +TEST(ChannelHolder, ChannelHolderBufferedSendReceiveTest) { + ChannelHolder *ch = new ChannelHolder(); + ch->Reset(10); + ChannelHolderSendReceive(ch); + delete ch; +} + +TEST(ChannelHolder, ChannelHolderUnBufferedSendReceiveTest) { + ChannelHolder *ch = new ChannelHolder(); + ch->Reset(0); + ChannelHolderSendReceive(ch); + delete ch; +} -- GitLab From 8c0434c318edcc129e3ca9861aab05e717fda098 Mon Sep 17 00:00:00 2001 From: gongweibao Date: Fri, 23 Feb 2018 16:07:32 +0800 Subject: [PATCH 096/122] Add single node tensorflow benchmark. (#8513) Add single node tensorflow benchmark --- benchmark/cluster/vgg16/README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/benchmark/cluster/vgg16/README.md b/benchmark/cluster/vgg16/README.md index 201d38928c4..cd681a1a282 100644 --- a/benchmark/cluster/vgg16/README.md +++ b/benchmark/cluster/vgg16/README.md @@ -20,7 +20,7 @@ Setting environment variable: `MKL_NUM_THREADS=1`. | -- | -- | -- | -- | -- | | PaddlePaddle Fluid | 15.44 | 16.32 | 16.74 | 16.79 | | PaddlePaddle v2 | 15.97 | 17.04 | 17.60 | 17.83 | -| TensorFlow | - | - | - | - | +| TensorFlow | 9.09 | 9.10 | 9.24 | 8.66 | ### Different Batch Size -- GitLab From 7a9098a60e6f65bc714640f1cc94b89f89cfd8fe Mon Sep 17 00:00:00 2001 From: Yu Yang Date: Sat, 24 Feb 2018 05:14:57 +0800 Subject: [PATCH 097/122] Add block.fwd_block_id (#8489) * Add block.fwd_block_id * fix bug in memory optimization transpiler * Change DFS to BFS * Add comments --- paddle/fluid/framework/block_desc.cc | 52 +++++++++++++++---- paddle/fluid/framework/block_desc.h | 8 ++- paddle/fluid/framework/framework.proto | 1 + paddle/fluid/framework/program_desc.h | 8 ++- paddle/fluid/operators/while_op.cc | 25 +++++---- paddle/fluid/pybind/protobuf.cc | 2 + python/paddle/v2/fluid/backward.py | 5 +- python/paddle/v2/fluid/framework.py | 42 +++++++++++---- .../fluid/memory_optimization_transpiler.py | 20 +++---- 9 files changed, 122 insertions(+), 41 deletions(-) diff --git a/paddle/fluid/framework/block_desc.cc b/paddle/fluid/framework/block_desc.cc index fbedd6c825b..d72b64700f7 100644 --- a/paddle/fluid/framework/block_desc.cc +++ b/paddle/fluid/framework/block_desc.cc @@ -16,6 +16,8 @@ limitations under the License. */ #include "paddle/fluid/framework/operator.h" #include "paddle/fluid/framework/program_desc.h" +#include + namespace paddle { namespace framework { @@ -64,12 +66,36 @@ VarDesc *BlockDesc::RenameVar(const std::string &old_name, VarDesc *BlockDesc::FindVarRecursive(const std::string &name) const { if (name == kEmptyVarName) return nullptr; - auto it = vars_.find(name); - if (it == vars_.end()) { - return Parent() == kNoneBlockIndex ? nullptr - : ParentBlock()->FindVarRecursive(name); + std::queue frontier; + std::unordered_set visited; + + frontier.push(this); + + while (!frontier.empty()) { // BFS + auto cur = frontier.front(); + frontier.pop(); + if (visited.count(cur) != 0) { + continue; + } + auto var = cur->FindVar(name); + if (var != nullptr) { + return var; + } + + auto fwd = cur->ForwardBlock(); + auto parent = cur->ParentBlock(); + + if (fwd != nullptr) { + frontier.push(fwd); + } + if (parent != nullptr) { + frontier.push(parent); + } + + visited.insert(cur); } - return it->second.get(); + + return nullptr; } VarDesc &BlockDesc::FindRecursiveOrCreateVar(const std::string &name_bytes) { @@ -155,10 +181,7 @@ void BlockDesc::Flush() { } BlockDesc *BlockDesc::ParentBlock() const { - if (this->desc_->parent_idx() == kNoneBlockIndex) { - return nullptr; - } - return prog_->MutableBlock(static_cast(this->desc_->parent_idx())); + return prog_->MutableBlock(static_cast(desc_->parent_idx())); } proto::BlockDesc *BlockDesc::Proto() { @@ -205,5 +228,16 @@ void BlockDesc::ClearPBVars() { } } +void BlockDesc::SetForwardBlockID(int32_t forward_block_id) { + PADDLE_ENFORCE(!desc_->has_forward_block_idx(), + "Parent block ID has been set to %d. Cannot set to %d", + desc_->forward_block_idx(), forward_block_id); + desc_->set_forward_block_idx(forward_block_id); +} + +BlockDesc *BlockDesc::ForwardBlock() const { + return prog_->MutableBlock(static_cast(desc_->forward_block_idx())); +} + } // namespace framework } // namespace paddle diff --git a/paddle/fluid/framework/block_desc.h b/paddle/fluid/framework/block_desc.h index b2375b53e3a..3bd90f38907 100644 --- a/paddle/fluid/framework/block_desc.h +++ b/paddle/fluid/framework/block_desc.h @@ -49,6 +49,8 @@ class BlockDesc { int32_t Parent() const { return desc_->parent_idx(); } + int32_t ForwardBlockID() const { return desc_->forward_block_idx(); } + VarDesc *Var(const std::string &name_bytes); VarDesc *FindVar(const std::string &name_bytes) const; @@ -75,6 +77,10 @@ class BlockDesc { BlockDesc *ParentBlock() const; + BlockDesc *ForwardBlock() const; + + void SetForwardBlockID(int32_t forward_block_id); + OpDesc *AppendOp(); void AppendAllocatedOp(std::unique_ptr &&op_desc); @@ -93,7 +99,7 @@ class BlockDesc { proto::BlockDesc *Proto(); - ProgramDesc *Program() { return this->prog_; } + ProgramDesc *Program() const { return this->prog_; } private: void ClearPBOps(); diff --git a/paddle/fluid/framework/framework.proto b/paddle/fluid/framework/framework.proto index 4eb18b4e4d6..5b43f5a8a4a 100644 --- a/paddle/fluid/framework/framework.proto +++ b/paddle/fluid/framework/framework.proto @@ -158,6 +158,7 @@ message BlockDesc { required int32 parent_idx = 2; repeated VarDesc vars = 3; repeated OpDesc ops = 4; + optional int32 forward_block_idx = 5 [ default = -1 ]; } // Please refer to diff --git a/paddle/fluid/framework/program_desc.h b/paddle/fluid/framework/program_desc.h index 8d4b999ad2f..538a0372116 100644 --- a/paddle/fluid/framework/program_desc.h +++ b/paddle/fluid/framework/program_desc.h @@ -38,7 +38,13 @@ class ProgramDesc { BlockDesc *AppendBlock(const BlockDesc &parent); - BlockDesc *MutableBlock(size_t idx) { return blocks_[idx].get(); } + BlockDesc *MutableBlock(size_t idx) { + if (idx == static_cast(kNoneBlockIndex)) { + return nullptr; + } else { + return blocks_[idx].get(); + } + } const BlockDesc &Block(size_t idx) const { return *blocks_[idx]; } diff --git a/paddle/fluid/operators/while_op.cc b/paddle/fluid/operators/while_op.cc index 3d5cdeda26a..8b62b242cf8 100644 --- a/paddle/fluid/operators/while_op.cc +++ b/paddle/fluid/operators/while_op.cc @@ -231,7 +231,8 @@ class WhileGradOpDescMaker : public framework::SingleGradOpDescMaker { while_grad->SetInput(kStepScopes, Output(kStepScopes)); auto *grad_block = this->grad_block_[0]; - auto *fwd_block = grad_block->ParentBlock(); + auto *fwd_block = grad_block->ForwardBlock(); + auto *parent_block = grad_block->ParentBlock(); // Not all of IGs will be generated by inner gradient operators of while op. // Ignore IGs that is not generated by the inside block. @@ -260,33 +261,37 @@ class WhileGradOpDescMaker : public framework::SingleGradOpDescMaker { for (auto &o : Output(kOutputs)) { block_ins.insert(o); } - std::unordered_set extra_inputs; + std::unordered_set output_grads; for (const auto *op : grad_block->AllOps()) { for (auto &input_name : op->InputArgumentNames()) { // If the input of Op has been recorded or is generated by the forward // block, do not make it as input again. + + // The input is located in I/O or other op's outputs or the variable is + // located in grad_block's parents if (block_ins.find(input_name) != block_ins.end() || - fwd_block->FindVar(input_name) != nullptr) { + (fwd_block->FindVarRecursive(input_name) != nullptr || + parent_block->FindVarRecursive(input_name) != nullptr)) { continue; } - extra_inputs.insert(input_name); + output_grads.insert(input_name); } for (auto &output_name : op->OutputArgumentNames()) { block_ins.insert(output_name); } } - std::vector extra_inputs_list; - extra_inputs_list.resize(extra_inputs.size()); - std::copy(extra_inputs.begin(), extra_inputs.end(), - extra_inputs_list.begin()); - while_grad->SetInput(framework::GradVarName(kOutputs), extra_inputs_list); + std::vector output_grads_list; + output_grads_list.resize(output_grads.size()); + std::copy(output_grads.begin(), output_grads.end(), + output_grads_list.begin()); + while_grad->SetInput(framework::GradVarName(kOutputs), output_grads_list); while_grad->SetAttrMap(this->Attrs()); while_grad->SetBlockAttr(kStepBlock, *grad_block); // record the original output gradient names, since the gradient name of // while operator could be renamed. - while_grad->SetAttr("original_output_grad", extra_inputs_list); + while_grad->SetAttr("original_output_grad", output_grads_list); return std::unique_ptr(while_grad); } diff --git a/paddle/fluid/pybind/protobuf.cc b/paddle/fluid/pybind/protobuf.cc index 1a9d7c421b7..b725be79529 100644 --- a/paddle/fluid/pybind/protobuf.cc +++ b/paddle/fluid/pybind/protobuf.cc @@ -155,6 +155,8 @@ void BindBlockDesc(py::module &m) { py::class_(m, "BlockDesc", "") .def_property_readonly("id", &BlockDesc::ID) .def_property_readonly("parent", &BlockDesc::Parent) + .def("get_forward_block_idx", &BlockDesc::ForwardBlockID) + .def("set_forward_block_idx", &BlockDesc::SetForwardBlockID) .def("append_op", &BlockDesc::AppendOp, py::return_value_policy::reference) .def("prepend_op", &BlockDesc::PrependOp, diff --git a/python/paddle/v2/fluid/backward.py b/python/paddle/v2/fluid/backward.py index 33ff43f6930..ba27aaa2460 100644 --- a/python/paddle/v2/fluid/backward.py +++ b/python/paddle/v2/fluid/backward.py @@ -298,7 +298,8 @@ def _append_backward_ops_(block, # If the op has its own sub-block, deal with the sub-block first if op.has_attr("sub_block"): sub_block = program.block(op.block_attr("sub_block")) - grad_sub_block = program.create_block(parent_idx=sub_block.idx) + grad_sub_block = program.create_block() + grad_sub_block.set_forward_block_idx(sub_block.idx) cb = _callback_lookup_(op) if cb is not None: if callbacks is None: @@ -310,6 +311,8 @@ def _append_backward_ops_(block, else: _append_backward_ops_(sub_block, sub_block.ops, grad_sub_block, no_grad_dict, grad_to_var, callbacks) + + program.rollback() grad_sub_block_list.append(grad_sub_block.desc) # Getting op's corresponding grad_op diff --git a/python/paddle/v2/fluid/framework.py b/python/paddle/v2/fluid/framework.py index 1cb06c52a43..78318dc6d63 100644 --- a/python/paddle/v2/fluid/framework.py +++ b/python/paddle/v2/fluid/framework.py @@ -696,6 +696,13 @@ class Block(object): def parent_idx(self): return self.desc.parent + @property + def forward_block_idx(self): + return self.desc.get_forward_block_idx() + + def set_forward_block_idx(self, idx): + self.desc.set_forward_block_idx(idx) + @property def idx(self): return self.desc.id @@ -709,15 +716,32 @@ class Block(object): return v def var_recursive(self, name): - if self.has_var(name): - return self.var(name) - else: - if self.idx == 0: - raise ValueError("var %s is not in block(%d) nor its parents." % - name, self.idx) - else: - parent_block = self.program.block(self.parent_idx) - return parent_block.var_recursive(name) + frontier = list() + visited = set() + + frontier.append(self) + + prog = self.program + + while len(frontier) != 0: # BFS + cur = frontier[0] + frontier = frontier[1:] + + if id(cur) in visited: + continue + + if cur.has_var(name): + return cur.var(name) + + if cur.parent_idx != -1: + frontier.append(prog.block(cur.parent_idx)) + + if cur.forward_block_idx != -1: + frontier.append(prog.block(cur.forward_block_idx)) + + visited.add(id(cur)) + + raise ValueError("Var {0} is not found recursively".format(name)) def all_parameters(self): return list(self.iter_parameters()) diff --git a/python/paddle/v2/fluid/memory_optimization_transpiler.py b/python/paddle/v2/fluid/memory_optimization_transpiler.py index ee56ccdcf11..6952ca7fe49 100644 --- a/python/paddle/v2/fluid/memory_optimization_transpiler.py +++ b/python/paddle/v2/fluid/memory_optimization_transpiler.py @@ -223,15 +223,15 @@ def get_cfgs(input_program): # Find while/while_grad block pair for grad_id in while_grad_sub_block_ids: - parent_id = pdesc.block(grad_id).parent - if parent_id in while_sub_block_ids: - while_block_id_pair.append((parent_id, grad_id)) - while_sub_block_ids.remove(parent_id) + forward_id = pdesc.block(grad_id).get_forward_block_idx() + if forward_id in while_sub_block_ids: + while_block_id_pair.append((forward_id, grad_id)) + while_sub_block_ids.remove(forward_id) # Get while/while_grad block ops - for parent_id, grad_id in while_block_id_pair: + for forward_id, grad_id in while_block_id_pair: while_block_ops = [] - while_block = pdesc.block(parent_id) + while_block = pdesc.block(forward_id) while_block_op_size = while_block.op_size() for i in range(while_block_op_size): while_block_ops.append(while_block.op(i)) @@ -242,21 +242,21 @@ def get_cfgs(input_program): while_block_ops.append(while_grad_block.op(i)) while_op_output = set() - while_op_output.update(while_op_dict[parent_id].output_arg_names()) + while_op_output.update(while_op_dict[forward_id].output_arg_names()) while_op_output.update(while_op_dict[grad_id].output_arg_names()) ops_list.append((while_block_ops, while_block_op_size, while_op_output)) # Process rest while block ops - for parent_id in while_sub_block_ids: + for forward_id in while_sub_block_ids: while_block_ops = [] - while_block = pdesc.block(parent_id) + while_block = pdesc.block(forward_id) while_block_op_size = while_block.op_size() for i in range(while_block_op_size): while_block_ops.append(while_block.op(i)) while_op_output = set() - while_op_output.update(while_op_dict[parent_id].output_arg_names()) + while_op_output.update(while_op_dict[forward_id].output_arg_names()) ops_list.append((while_block_ops, while_block_op_size, while_op_output)) -- GitLab From d4dabe3e0bc3db35f8599aed5351a4c308014f1a Mon Sep 17 00:00:00 2001 From: "Yang Yang(Tony)" Date: Fri, 23 Feb 2018 15:37:32 -0800 Subject: [PATCH 098/122] framework.py enhancement (#8471) * framework.py enhancement * polish * clean up * enforce the inputs of Operator __init__ of type Variable * python2 assert * reverse assert --- python/paddle/v2/fluid/framework.py | 27 ++++++++++++++++----------- python/paddle/v2/fluid/layers/nn.py | 2 +- 2 files changed, 17 insertions(+), 12 deletions(-) diff --git a/python/paddle/v2/fluid/framework.py b/python/paddle/v2/fluid/framework.py index 78318dc6d63..0f6cb90e27c 100644 --- a/python/paddle/v2/fluid/framework.py +++ b/python/paddle/v2/fluid/framework.py @@ -152,7 +152,7 @@ class Variable(object): shape(tuple|list|None): The shape of variable. -1 means the batch size. Some kinds of variable do not contain shape, just set it to None. dtype(np.dtype|core.VarDesc.VarType|str): The data type of variable. - lod_level(int): The level of lod tensor. 0 means there is not a time + lod_level(int): The level of lod tensor. 0 means it is not a time series data. persistable(bool): True if the variable should be saved as check point. Defaults to False. @@ -346,7 +346,7 @@ class OpProtoHolder(object): def __init__(self): assert not hasattr( self.__class__, - '_instance'), 'Please use `instance()` to get OpProtoHolder opject!' + '_instance'), 'Please use `instance()` to get OpProtoHolder object!' op_protos = get_all_op_protos() self.op_proto_map = {} for proto in op_protos: @@ -368,8 +368,8 @@ class OpProtoHolder(object): class Operator(object): """ - Python Operator class. The operator represents the build in instructs in a - Block. Users can use the build in instructs to describe their neural + Python Operator class. The operator represents the build in instructions in a + Block. Users can use the build in instructions to describe their neural network. """ @@ -478,7 +478,7 @@ class Operator(object): raise TypeError("'attrs' should be a dict.") for attr in proto.attrs: attr_name = attr.name - if (not attr_name in attrs) or (attrs[attr_name] is None): + if (attr_name not in attrs) or (attrs[attr_name] is None): continue if isinstance(attrs[attr_name], Block): self.desc.set_block_attr(attr_name, attrs[attr_name].desc) @@ -751,7 +751,7 @@ class Block(object): if isinstance(item[1], Parameter)) def create_var(self, *args, **kwargs): - var = Variable(self, *args, **kwargs) + var = Variable(block=self, *args, **kwargs) if 'initializer' in kwargs: kwargs['initializer'](var, self) return var @@ -822,13 +822,13 @@ class Block(object): def append_op(self, *args, **kwargs): op_desc = self.desc.append_op() - op = Operator(self, op_desc, *args, **kwargs) + op = Operator(block=self, desc=op_desc, *args, **kwargs) self.ops.append(op) return op def delete_ops(self, ops): # remove from cpp - # FIXME(typhoonzero): remove only the first occuracy. + # FIXME(typhoonzero): remove only the first occurrence. try: start = list(self.ops).index(ops[0]) end = list(self.ops).index(ops[-1]) @@ -846,6 +846,11 @@ class Block(object): return op def sync_with_cpp(self): + """ + Sync with the desc on the c++ end. + + This method is used to synchronize the c++ desc instance generated by backward. + """ # sync variables from cpp for var in self.desc.all_vars(): if not self.has_var(var.name()): @@ -891,9 +896,9 @@ class Block(object): def copy_param_info_from(self, other): """ - Copy the information of parameters from other block + Copy the information of parameters from the other block Args: - other(Block): other block + other(Block): the other block Returns: None @@ -1239,6 +1244,6 @@ def get_var(name, program=None): if program is None: program = default_main_program() assert isinstance(name, str) - assert isinstance(name, Program) + assert isinstance(program, Program) return program.global_block().var(name) diff --git a/python/paddle/v2/fluid/layers/nn.py b/python/paddle/v2/fluid/layers/nn.py index c4baa62ccd3..e8b4cec6ee6 100644 --- a/python/paddle/v2/fluid/layers/nn.py +++ b/python/paddle/v2/fluid/layers/nn.py @@ -104,7 +104,7 @@ def fc(input, * :math:`X_i`: The input tensor. * :math:`W`: The weights created by this layer. * :math:`b`: The bias parameter created by this layer (if needed). - * :math:`Act`: The activation funtion. + * :math:`Act`: The activation function. * :math:`Out`: The output tensor. Args: -- GitLab From e8cb97b8a2b46b379571c5681359c68576fb3909 Mon Sep 17 00:00:00 2001 From: Yu Yang Date: Sat, 24 Feb 2018 11:34:05 +0800 Subject: [PATCH 099/122] Moving unique_name to python * Add reset and guard to unique_name --- paddle/fluid/pybind/pybind.cc | 6 -- python/paddle/v2/fluid/__init__.py | 26 ++----- python/paddle/v2/fluid/backward.py | 3 +- python/paddle/v2/fluid/evaluator.py | 5 +- python/paddle/v2/fluid/framework.py | 23 +----- python/paddle/v2/fluid/layer_helper.py | 29 +++++--- python/paddle/v2/fluid/layers/control_flow.py | 36 +++++---- python/paddle/v2/fluid/layers/device.py | 3 +- .../paddle/v2/fluid/layers/math_op_patch.py | 2 +- python/paddle/v2/fluid/optimizer.py | 13 ++-- python/paddle/v2/fluid/unique_name.py | 74 +++++++++++++++++++ 11 files changed, 134 insertions(+), 86 deletions(-) create mode 100644 python/paddle/v2/fluid/unique_name.py diff --git a/paddle/fluid/pybind/pybind.cc b/paddle/fluid/pybind/pybind.cc index 56c1a935d98..ef495a0deae 100644 --- a/paddle/fluid/pybind/pybind.cc +++ b/paddle/fluid/pybind/pybind.cc @@ -48,11 +48,6 @@ PYBIND11_MAKE_OPAQUE(paddle::framework::LoDTensorArray); namespace paddle { namespace pybind { -static size_t UniqueIntegerGenerator(const std::string &prefix) { - static std::unordered_map> generators; - return generators[prefix].fetch_add(1); -} - bool IsCompiledWithCUDA() { #ifndef PADDLE_WITH_CUDA return false; @@ -409,7 +404,6 @@ All parameter, weight, gradient are variables in Paddle. (void (Executor::*)(const ProgramDesc &, Scope *, int, bool, bool)) & Executor::Run); - m.def("unique_integer", UniqueIntegerGenerator); m.def("init_gflags", framework::InitGflags); m.def("init_glog", framework::InitGLOG); m.def("init_devices", &framework::InitDevices); diff --git a/python/paddle/v2/fluid/__init__.py b/python/paddle/v2/fluid/__init__.py index 361fb3f5ad9..032dd2683d8 100644 --- a/python/paddle/v2/fluid/__init__.py +++ b/python/paddle/v2/fluid/__init__.py @@ -39,30 +39,16 @@ from concurrency import (Go, make_channel, channel_send, channel_recv, import clip from memory_optimization_transpiler import memory_optimize import profiler +import unique_name Tensor = LoDTensor __all__ = framework.__all__ + executor.__all__ + concurrency.__all__ + [ - 'io', - 'initializer', - 'layers', - 'nets', - 'optimizer', - 'learning_rate_decay', - 'backward', - 'regularizer', - 'LoDTensor', - 'CPUPlace', - 'CUDAPlace', - 'Tensor', - 'ParamAttr', - 'WeightNormParamAttr', - 'DataFeeder', - 'clip', - 'SimpleDistributeTranspiler', - 'DistributeTranspiler', - 'memory_optimize', - 'profiler', + 'io', 'initializer', 'layers', 'nets', 'optimizer', 'learning_rate_decay', + 'backward', 'regularizer', 'LoDTensor', 'CPUPlace', 'CUDAPlace', 'Tensor', + 'ParamAttr', 'WeightNormParamAttr', 'DataFeeder', 'clip', + 'SimpleDistributeTranspiler', 'DistributeTranspiler', 'memory_optimize', + 'profiler', 'unique_name' ] diff --git a/python/paddle/v2/fluid/backward.py b/python/paddle/v2/fluid/backward.py index 33ff43f6930..f2e345a0536 100644 --- a/python/paddle/v2/fluid/backward.py +++ b/python/paddle/v2/fluid/backward.py @@ -16,6 +16,7 @@ from paddle.v2.fluid import framework as framework from . import core import collections import copy +import unique_name __all__ = [ 'append_backward', @@ -388,7 +389,7 @@ def _rename_grad_(block, start_op_idx, grad_to_var, target_grad_map): for name in op_desc.output_arg_names(): if block.desc.find_var(name.encode("ascii")): - new_name = "%s_%s" % (name, core.unique_integer(name)) + new_name = unique_name.generate(name) op_desc.rename_output(name, new_name) var_map[name] = new_name diff --git a/python/paddle/v2/fluid/evaluator.py b/python/paddle/v2/fluid/evaluator.py index 1f4618310cb..8cc49053337 100644 --- a/python/paddle/v2/fluid/evaluator.py +++ b/python/paddle/v2/fluid/evaluator.py @@ -15,7 +15,8 @@ import numpy as np import layers -from framework import Program, unique_name, Variable, program_guard +from framework import Program, Variable, program_guard +import unique_name from layer_helper import LayerHelper __all__ = [ @@ -96,7 +97,7 @@ class Evaluator(object): """ state = self.helper.create_variable( - name="_".join([unique_name(self.helper.name), suffix]), + name="_".join([unique_name.generate(self.helper.name), suffix]), persistable=True, dtype=dtype, shape=shape) diff --git a/python/paddle/v2/fluid/framework.py b/python/paddle/v2/fluid/framework.py index 0e11709296a..f92e9560289 100644 --- a/python/paddle/v2/fluid/framework.py +++ b/python/paddle/v2/fluid/framework.py @@ -20,6 +20,7 @@ import numpy as np import proto.framework_pb2 as framework_pb2 from . import core +import unique_name __all__ = [ 'Block', @@ -47,20 +48,6 @@ def grad_var_name(var_name): return var_name + GRAD_VAR_SUFFIX -def unique_name(prefix): - """ - Generate unique names with prefix - - Args: - prefix(str): The prefix of return string - - Returns(str): A unique string with the prefix - - """ - uid = core.unique_integer(prefix) # unique during whole process. - return "_".join([prefix, str(uid)]) - - def convert_np_dtype_to_dtype_(np_dtype): """ Convert the data type in numpy to the data type in Paddle @@ -175,7 +162,7 @@ class Variable(object): self.error_clip = error_clip if name is None: - name = Variable._unique_var_name_() + name = unique_name.generate('_generated_var') is_new_var = False self.desc = self.block.desc.find_var(name) @@ -303,12 +290,6 @@ class Variable(object): def type(self): return self.desc.type() - @staticmethod - def _unique_var_name_(): - prefix = "_generated_var" - uid = core.unique_integer(prefix) # unique during whole process. - return "_".join([prefix, str(uid)]) - def set_error_clip(self, error_clip): self.error_clip = error_clip diff --git a/python/paddle/v2/fluid/layer_helper.py b/python/paddle/v2/fluid/layer_helper.py index e7abc23f2f1..dc4f992ddc3 100644 --- a/python/paddle/v2/fluid/layer_helper.py +++ b/python/paddle/v2/fluid/layer_helper.py @@ -15,8 +15,8 @@ import copy import itertools -from framework import Variable, Parameter, default_main_program, default_startup_program, \ - unique_name, dtype_is_floating +from framework import Variable, Parameter, default_main_program, default_startup_program, dtype_is_floating +import unique_name from paddle.v2.fluid.initializer import Constant, Xavier from param_attr import ParamAttr, WeightNormParamAttr @@ -27,7 +27,7 @@ class LayerHelper(object): self.layer_type = layer_type name = self.kwargs.get('name', None) if name is None: - self.kwargs['name'] = unique_name(self.layer_type) + self.kwargs['name'] = unique_name.generate(self.layer_type) @property def name(self): @@ -117,17 +117,20 @@ class LayerHelper(object): block=self.startup_program.global_block()): if out is None: out = block.create_var( - name=unique_name(".".join([self.name, 'weight_norm_norm'])), + name=unique_name.generate(".".join( + [self.name, 'weight_norm_norm'])), dtype=dtype, persistable=False) abs_out = block.create_var( - name=unique_name(".".join([self.name, 'weight_norm_abs'])), + name=unique_name.generate(".".join( + [self.name, 'weight_norm_abs'])), dtype=dtype, persistable=False) block.append_op( type='abs', inputs={'X': x}, outputs={'Out': abs_out}) pow_out = block.create_var( - name=unique_name(".".join([self.name, 'weight_norm_pow'])), + name=unique_name.generate(".".join( + [self.name, 'weight_norm_pow'])), dtype=dtype, persistable=False) block.append_op( @@ -136,7 +139,8 @@ class LayerHelper(object): outputs={'Out': pow_out}, attrs={'factor': float(p)}) sum_out = block.create_var( - name=unique_name(".".join([self.name, 'weight_norm_sum'])), + name=unique_name.generate(".".join( + [self.name, 'weight_norm_sum'])), dtype=dtype, persistable=False) block.append_op( @@ -161,7 +165,7 @@ class LayerHelper(object): block=self.startup_program.global_block()): if out is None: out = block.create_var( - name=unique_name(".".join( + name=unique_name.generate(".".join( [self.name, 'weight_norm_reshape'])), dtype=dtype, persistable=False) @@ -178,7 +182,7 @@ class LayerHelper(object): block=self.startup_program.global_block()): if out is None: out = block.create_var( - name=unique_name(".".join( + name=unique_name.generate(".".join( [self.name, 'weight_norm_transpose'])), dtype=dtype, persistable=False) @@ -196,7 +200,8 @@ class LayerHelper(object): """Computes the norm over all dimensions except dim""" if out is None: out = block.create_var( - name=unique_name(".".join([self.name, 'weight_norm_norm'])), + name=unique_name.generate(".".join( + [self.name, 'weight_norm_norm'])), dtype=dtype, persistable=False) if dim is None: @@ -286,7 +291,7 @@ class LayerHelper(object): assert isinstance(attr, ParamAttr) suffix = 'b' if is_bias else 'w' if attr.name is None: - attr.name = unique_name(".".join([self.name, suffix])) + attr.name = unique_name.generate(".".join([self.name, suffix])) if default_initializer is None and attr.initializer is None: if is_bias: @@ -316,7 +321,7 @@ class LayerHelper(object): def create_tmp_variable(self, dtype, stop_gradient=False): return self.main_program.current_block().create_var( - name=unique_name(".".join([self.name, 'tmp'])), + name=unique_name.generate(".".join([self.name, 'tmp'])), dtype=dtype, persistable=False, stop_gradient=stop_gradient) diff --git a/python/paddle/v2/fluid/layers/control_flow.py b/python/paddle/v2/fluid/layers/control_flow.py index b9ab28a86a2..29edf064ba7 100644 --- a/python/paddle/v2/fluid/layers/control_flow.py +++ b/python/paddle/v2/fluid/layers/control_flow.py @@ -428,7 +428,8 @@ class StaticRNN(object): raise ValueError( "if init is None, memory at least need shape and batch_ref") parent_block = self.parent_block() - var_name = unique_name("@".join([self.helper.name, "memory_boot"])) + var_name = unique_name.generate("@".join( + [self.helper.name, "memory_boot"])) boot_var = parent_block.create_var( name=var_name, shape=shape, @@ -450,7 +451,7 @@ class StaticRNN(object): return self.memory(init=boot_var) else: pre_mem = self.helper.create_variable( - name=unique_name("@".join([self.helper.name, "mem"])), + name=unique_name.generate("@".join([self.helper.name, "mem"])), dtype=init.dtype, shape=init.shape) self.memories[pre_mem.name] = StaticRNNMemoryLink( @@ -709,7 +710,7 @@ def lod_rank_table(x, level=0): helper = LayerHelper("lod_rank_table", **locals()) table = helper.create_variable( type=core.VarDesc.VarType.LOD_RANK_TABLE, - name=unique_name("lod_rank_table")) + name=unique_name.generate("lod_rank_table")) helper.append_op( type='lod_rank_table', inputs={'X': x}, @@ -807,7 +808,7 @@ def lod_tensor_to_array(x, table): """ helper = LayerHelper("lod_tensor_to_array", **locals()) array = helper.create_variable( - name=unique_name("lod_tensor_to_array"), + name=unique_name.generate("lod_tensor_to_array"), type=core.VarDesc.VarType.LOD_TENSOR_ARRAY, dtype=x.dtype) helper.append_op( @@ -1264,11 +1265,11 @@ class IfElse(object): if id(x) not in self.input_table: parent_block = self.parent_block() out_true = parent_block.create_var( - name=unique_name('ifelse_input' + self.helper.name), + name=unique_name.generate('ifelse_input' + self.helper.name), dtype=x.dtype) out_false = parent_block.create_var( - name=unique_name('ifelse_input' + self.helper.name), + name=unique_name.generate('ifelse_input' + self.helper.name), dtype=x.dtype) parent_block.append_op( type='split_lod_tensor', @@ -1310,7 +1311,8 @@ class IfElse(object): raise TypeError("Each output should be a variable") # create outside tensor outside_out = parent_block.create_var( - name=unique_name("_".join([self.helper.name, 'output'])), + name=unique_name.generate("_".join( + [self.helper.name, 'output'])), dtype=each_out.dtype) out_table.append(outside_out) @@ -1373,7 +1375,7 @@ class DynamicRNN(object): parent_block = self._parent_block_() if self.lod_rank_table is None: self.lod_rank_table = parent_block.create_var( - name=unique_name('lod_rank_table'), + name=unique_name.generate('lod_rank_table'), type=core.VarDesc.VarType.LOD_RANK_TABLE) self.lod_rank_table.stop_gradient = True parent_block.append_op( @@ -1381,7 +1383,8 @@ class DynamicRNN(object): inputs={"X": x}, outputs={"Out": self.lod_rank_table}) self.max_seq_len = parent_block.create_var( - name=unique_name('dynamic_rnn_max_seq_len'), dtype='int64') + name=unique_name.generate('dynamic_rnn_max_seq_len'), + dtype='int64') self.max_seq_len.stop_gradient = False parent_block.append_op( type='max_sequence_len', @@ -1395,7 +1398,7 @@ class DynamicRNN(object): outputs={'Out': self.cond}) input_array = parent_block.create_var( - name=unique_name('dynamic_rnn_input_array'), + name=unique_name.generate('dynamic_rnn_input_array'), type=core.VarDesc.VarType.LOD_TENSOR_ARRAY, dtype=x.dtype) self.input_array.append((input_array, x.dtype)) @@ -1416,7 +1419,7 @@ class DynamicRNN(object): "static_input() must be called after step_input().") parent_block = self._parent_block_() x_reordered = parent_block.create_var( - name=unique_name("dynamic_rnn_static_input_reordered"), + name=unique_name.generate("dynamic_rnn_static_input_reordered"), type=core.VarDesc.VarType.LOD_TENSOR, dtype=x.dtype) parent_block.append_op( @@ -1478,7 +1481,7 @@ class DynamicRNN(object): 'invoked before ' 'memory(init=init, need_reordered=True, ...).') init_reordered = parent_block.create_var( - name=unique_name('dynamic_rnn_mem_init_reordered'), + name=unique_name.generate('dynamic_rnn_mem_init_reordered'), type=core.VarDesc.VarType.LOD_TENSOR, dtype=init.dtype) parent_block.append_op( @@ -1490,7 +1493,7 @@ class DynamicRNN(object): outputs={'Out': [init_reordered]}) init_tensor = init_reordered mem_array = parent_block.create_var( - name=unique_name('dynamic_rnn_mem_array'), + name=unique_name.generate('dynamic_rnn_mem_array'), type=core.VarDesc.VarType.LOD_TENSOR_ARRAY, dtype=init.dtype) parent_block.append_op( @@ -1510,9 +1513,10 @@ class DynamicRNN(object): ) parent_block = self._parent_block_() init = parent_block.create_var( - name=unique_name('mem_init'), dtype=dtype) + name=unique_name.generate('mem_init'), dtype=dtype) arr, dtype = self.input_array[0] - in0 = parent_block.create_var(name=unique_name('in0'), dtype=dtype) + in0 = parent_block.create_var( + name=unique_name.generate('in0'), dtype=dtype) parent_block.append_op( type='read_from_array', inputs={'X': [arr], @@ -1551,7 +1555,7 @@ class DynamicRNN(object): parent_block = self._parent_block_() for each in outputs: outside_array = parent_block.create_var( - name=unique_name("_".join( + name=unique_name.generate("_".join( [self.helper.name, "output_array", each.name])), type=core.VarDesc.VarType.LOD_TENSOR_ARRAY, dtype=each.dtype) diff --git a/python/paddle/v2/fluid/layers/device.py b/python/paddle/v2/fluid/layers/device.py index 3fee263ac0f..e0c1aab230a 100644 --- a/python/paddle/v2/fluid/layers/device.py +++ b/python/paddle/v2/fluid/layers/device.py @@ -25,7 +25,8 @@ __all__ = ['get_places'] @autodoc() def get_places(device_count=None, device_type=None): helper = LayerHelper('get_places', **locals()) - out_places = helper.create_variable(name=unique_name(helper.name + ".out")) + out_places = helper.create_variable( + name=unique_name.generate(helper.name + ".out")) attrs = dict() if device_count is not None: attrs['device_count'] = int(device_count) diff --git a/python/paddle/v2/fluid/layers/math_op_patch.py b/python/paddle/v2/fluid/layers/math_op_patch.py index 417a01b76f1..beebc1a85f8 100644 --- a/python/paddle/v2/fluid/layers/math_op_patch.py +++ b/python/paddle/v2/fluid/layers/math_op_patch.py @@ -21,7 +21,7 @@ __all__ = ['monkey_patch_variable'] def monkey_patch_variable(): def unique_tmp_name(): - return unique_name("tmp") + return unique_name.generate("tmp") def safe_get_dtype(var): try: diff --git a/python/paddle/v2/fluid/optimizer.py b/python/paddle/v2/fluid/optimizer.py index ecc42f6215b..61febc4e383 100644 --- a/python/paddle/v2/fluid/optimizer.py +++ b/python/paddle/v2/fluid/optimizer.py @@ -17,7 +17,8 @@ from collections import defaultdict import framework import layers from backward import append_backward -from framework import unique_name, program_guard +from framework import program_guard +import unique_name from initializer import Constant from layer_helper import LayerHelper from regularizer import append_regularization_ops @@ -49,7 +50,7 @@ class Optimizer(object): def _create_global_learning_rate(self): if isinstance(self._global_learning_rate, float): self._global_learning_rate = layers.create_global_var( - name=unique_name("learning_rate"), + name=unique_name.generate("learning_rate"), shape=[1], value=float(self._global_learning_rate), dtype='float32', @@ -118,7 +119,7 @@ class Optimizer(object): assert isinstance(self.helper, LayerHelper) var = self.helper.create_global_variable( - name=unique_name(name), + name=unique_name.generate(name), persistable=True, dtype=dtype or param.dtype, type=param.type, @@ -379,7 +380,7 @@ class AdamOptimizer(Optimizer): # Create beta1 and beta2 power tensors beta_shape = [1] self._beta1_pow_acc = self.helper.create_global_variable( - name=unique_name('beta1_pow_acc'), + name=unique_name.generate('beta1_pow_acc'), dtype='float32', shape=beta_shape, lod_level=0, @@ -388,7 +389,7 @@ class AdamOptimizer(Optimizer): self._beta1_pow_acc, initializer=Constant(self._beta1)) self._beta2_pow_acc = self.helper.create_global_variable( - name=unique_name('beta2_pow_acc'), + name=unique_name.generate('beta2_pow_acc'), dtype='float32', shape=beta_shape, lod_level=0, @@ -481,7 +482,7 @@ class AdamaxOptimizer(Optimizer): # Create beta1 power accumulator tensor beta_shape = [1] self._beta1_pow_acc = self.helper.create_global_variable( - name=unique_name('beta1_pow_acc'), + name=unique_name.generate('beta1_pow_acc'), dtype='float32', shape=beta_shape, lod_level=0, diff --git a/python/paddle/v2/fluid/unique_name.py b/python/paddle/v2/fluid/unique_name.py new file mode 100644 index 00000000000..034caac9626 --- /dev/null +++ b/python/paddle/v2/fluid/unique_name.py @@ -0,0 +1,74 @@ +# Copyright (c) 2018 PaddlePaddle Authors. All Rights Reserved. +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +import collections +import contextlib +import sys + +__all__ = ['generate', 'switch', 'guard', 'UniqueNameGenerator'] + + +class UniqueNameGenerator(object): + """ + Generate unique name with prefix. + + Args: + prefix(str): The generated name prefix. All generated name will be + started with this prefix. + """ + + def __init__(self, prefix=None): + self.ids = collections.defaultdict(int) + if prefix is None: + prefix = "" + self.prefix = prefix + + def __call__(self, key): + """ + Generate unique names with prefix + + Args: + key(str): The key of return string. + + Returns(str): A unique string with the prefix + """ + tmp = self.ids[key] + self.ids[key] += 1 + return self.prefix + "_".join([key, str(tmp)]) + + +generator = UniqueNameGenerator() + + +def generate(prefix): + return generator(prefix) + + +def switch(new_generator=None): + global generator + old = generator + if new_generator is None: + generator = UniqueNameGenerator() + else: + generator = new_generator + return old + + +@contextlib.contextmanager +def guard(new_generator=None): + if isinstance(new_generator, basestring): + new_generator = UniqueNameGenerator(new_generator) + old = switch(new_generator) + yield + switch(old) -- GitLab From bad01596f9bae92d2b3bd0b29be582d0ecad3705 Mon Sep 17 00:00:00 2001 From: qiaolongfei Date: Sat, 24 Feb 2018 12:47:57 +0800 Subject: [PATCH 100/122] rename register macro --- paddle/fluid/operators/compare_op.cc | 18 +++++++++--------- paddle/fluid/operators/compare_op.cu | 8 ++++---- paddle/fluid/operators/compare_op.h | 2 +- 3 files changed, 14 insertions(+), 14 deletions(-) diff --git a/paddle/fluid/operators/compare_op.cc b/paddle/fluid/operators/compare_op.cc index cdeb28cc1db..46d6d0fd862 100644 --- a/paddle/fluid/operators/compare_op.cc +++ b/paddle/fluid/operators/compare_op.cc @@ -83,7 +83,7 @@ class CompareOp : public framework::OperatorWithKernel { } // namespace operators } // namespace paddle -#define REGISTER_LOGICAL_OP(op_type, _equation) \ +#define REGISTER_COMPARE_OP(op_type, _equation) \ struct _##op_type##Comment { \ static char type[]; \ static char equation[]; \ @@ -96,11 +96,11 @@ class CompareOp : public framework::OperatorWithKernel { ::paddle::operators::CompareOpInferShape<_##op_type##Comment>, \ ::paddle::framework::EmptyGradOpMaker); -REGISTER_LOGICAL_OP(less_than, "Out = X < Y"); -REGISTER_LOGICAL_KERNEL(less_than, CPU, paddle::operators::LessThanFunctor); -REGISTER_LOGICAL_OP(less_equal, "Out = X <= Y"); -REGISTER_LOGICAL_KERNEL(less_equal, CPU, paddle::operators::LessEqualFunctor); -REGISTER_LOGICAL_OP(equal, "Out = X == Y"); -REGISTER_LOGICAL_KERNEL(equal, CPU, paddle::operators::EqualFunctor); -REGISTER_LOGICAL_OP(not_equal, "Out = X != Y"); -REGISTER_LOGICAL_KERNEL(not_equal, CPU, paddle::operators::NotEqualFunctor); +REGISTER_COMPARE_OP(less_than, "Out = X < Y"); +REGISTER_COMPARE_KERNEL(less_than, CPU, paddle::operators::LessThanFunctor); +REGISTER_COMPARE_OP(less_equal, "Out = X <= Y"); +REGISTER_COMPARE_KERNEL(less_equal, CPU, paddle::operators::LessEqualFunctor); +REGISTER_COMPARE_OP(equal, "Out = X == Y"); +REGISTER_COMPARE_KERNEL(equal, CPU, paddle::operators::EqualFunctor); +REGISTER_COMPARE_OP(not_equal, "Out = X != Y"); +REGISTER_COMPARE_KERNEL(not_equal, CPU, paddle::operators::NotEqualFunctor); diff --git a/paddle/fluid/operators/compare_op.cu b/paddle/fluid/operators/compare_op.cu index 2cc0c7c5725..c6c83b44b8a 100644 --- a/paddle/fluid/operators/compare_op.cu +++ b/paddle/fluid/operators/compare_op.cu @@ -14,7 +14,7 @@ limitations under the License. */ #include "paddle/fluid/operators/compare_op.h" -REGISTER_LOGICAL_KERNEL(less_than, CUDA, paddle::operators::LessThanFunctor); -REGISTER_LOGICAL_KERNEL(less_equal, CUDA, paddle::operators::LessEqualFunctor); -REGISTER_LOGICAL_KERNEL(equal, CUDA, paddle::operators::EqualFunctor); -REGISTER_LOGICAL_KERNEL(not_equal, CUDA, paddle::operators::NotEqualFunctor); +REGISTER_COMPARE_KERNEL(less_than, CUDA, paddle::operators::LessThanFunctor); +REGISTER_COMPARE_KERNEL(less_equal, CUDA, paddle::operators::LessEqualFunctor); +REGISTER_COMPARE_KERNEL(equal, CUDA, paddle::operators::EqualFunctor); +REGISTER_COMPARE_KERNEL(not_equal, CUDA, paddle::operators::NotEqualFunctor); diff --git a/paddle/fluid/operators/compare_op.h b/paddle/fluid/operators/compare_op.h index 7e78269cf47..6638e5ae9e6 100644 --- a/paddle/fluid/operators/compare_op.h +++ b/paddle/fluid/operators/compare_op.h @@ -76,7 +76,7 @@ class CompareOpKernel } // namespace operators } // namespace paddle -#define REGISTER_LOGICAL_KERNEL(op_type, dev, functor) \ +#define REGISTER_COMPARE_KERNEL(op_type, dev, functor) \ REGISTER_OP_##dev##_KERNEL( \ op_type, ::paddle::operators::CompareOpKernel< \ ::paddle::platform::dev##DeviceContext, functor>, \ -- GitLab From ff544169318af1ade478602fccf977c34354f495 Mon Sep 17 00:00:00 2001 From: Yu Yang Date: Sat, 24 Feb 2018 12:51:24 +0800 Subject: [PATCH 101/122] Add unittest of unique_name * Also follow comments, change prefix to key --- .../fluid/tests/unittests/test_unique_name.py | 43 +++++++++++++++++++ python/paddle/v2/fluid/unique_name.py | 4 +- 2 files changed, 45 insertions(+), 2 deletions(-) create mode 100644 python/paddle/v2/fluid/tests/unittests/test_unique_name.py diff --git a/python/paddle/v2/fluid/tests/unittests/test_unique_name.py b/python/paddle/v2/fluid/tests/unittests/test_unique_name.py new file mode 100644 index 00000000000..e28810c96b8 --- /dev/null +++ b/python/paddle/v2/fluid/tests/unittests/test_unique_name.py @@ -0,0 +1,43 @@ +# Copyright (c) 2018 PaddlePaddle Authors. All Rights Reserved. +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +import unittest +import paddle.v2.fluid as fluid + + +class TestUniqueName(unittest.TestCase): + def test_guard(self): + with fluid.unique_name.guard(): + name_1 = fluid.unique_name.generate('') + + with fluid.unique_name.guard(): + name_2 = fluid.unique_name.generate('') + + self.assertEqual(name_1, name_2) + + with fluid.unique_name.guard("A"): + name_1 = fluid.unique_name.generate('') + + with fluid.unique_name.guard('B'): + name_2 = fluid.unique_name.generate('') + + self.assertNotEqual(name_1, name_2) + + def test_generate(self): + with fluid.unique_name.guard(): + name1 = fluid.unique_name.generate('fc') + name2 = fluid.unique_name.generate('fc') + name3 = fluid.unique_name.generate('tmp') + self.assertNotEqual(name1, name2) + self.assertEqual(name1[-2:], name3[-2:]) diff --git a/python/paddle/v2/fluid/unique_name.py b/python/paddle/v2/fluid/unique_name.py index 034caac9626..33c53113ae7 100644 --- a/python/paddle/v2/fluid/unique_name.py +++ b/python/paddle/v2/fluid/unique_name.py @@ -51,8 +51,8 @@ class UniqueNameGenerator(object): generator = UniqueNameGenerator() -def generate(prefix): - return generator(prefix) +def generate(key): + return generator(key) def switch(new_generator=None): -- GitLab From 63563b2fec9be26af1c73c97e94d455a1f45f5d0 Mon Sep 17 00:00:00 2001 From: Yu Yang Date: Sat, 24 Feb 2018 13:00:21 +0800 Subject: [PATCH 102/122] Follow comments --- python/paddle/v2/fluid/__init__.py | 26 +++++++++++++++++++++----- 1 file changed, 21 insertions(+), 5 deletions(-) diff --git a/python/paddle/v2/fluid/__init__.py b/python/paddle/v2/fluid/__init__.py index 032dd2683d8..39d13d3ab5f 100644 --- a/python/paddle/v2/fluid/__init__.py +++ b/python/paddle/v2/fluid/__init__.py @@ -44,11 +44,27 @@ import unique_name Tensor = LoDTensor __all__ = framework.__all__ + executor.__all__ + concurrency.__all__ + [ - 'io', 'initializer', 'layers', 'nets', 'optimizer', 'learning_rate_decay', - 'backward', 'regularizer', 'LoDTensor', 'CPUPlace', 'CUDAPlace', 'Tensor', - 'ParamAttr', 'WeightNormParamAttr', 'DataFeeder', 'clip', - 'SimpleDistributeTranspiler', 'DistributeTranspiler', 'memory_optimize', - 'profiler', 'unique_name' + 'io', + 'initializer', + 'layers', + 'nets', + 'optimizer', + 'learning_rate_decay', + 'backward', + 'regularizer', + 'LoDTensor', + 'CPUPlace', + 'CUDAPlace', + 'Tensor', + 'ParamAttr', + 'WeightNormParamAttr', + 'DataFeeder', + 'clip', + 'SimpleDistributeTranspiler', + 'DistributeTranspiler', + 'memory_optimize', + 'profiler', + 'unique_name', ] -- GitLab From d4e3495cf5978fff9eb80b944c948598cdf48d3a Mon Sep 17 00:00:00 2001 From: qiaolongfei Date: Sat, 24 Feb 2018 13:07:46 +0800 Subject: [PATCH 103/122] add larger_than and larger_equal op and kernel --- paddle/fluid/operators/compare_op.cc | 5 +++++ paddle/fluid/operators/compare_op.cu | 4 ++++ paddle/fluid/operators/compare_op.h | 12 ++++++++++++ 3 files changed, 21 insertions(+) diff --git a/paddle/fluid/operators/compare_op.cc b/paddle/fluid/operators/compare_op.cc index 46d6d0fd862..a5f40d54829 100644 --- a/paddle/fluid/operators/compare_op.cc +++ b/paddle/fluid/operators/compare_op.cc @@ -100,6 +100,11 @@ REGISTER_COMPARE_OP(less_than, "Out = X < Y"); REGISTER_COMPARE_KERNEL(less_than, CPU, paddle::operators::LessThanFunctor); REGISTER_COMPARE_OP(less_equal, "Out = X <= Y"); REGISTER_COMPARE_KERNEL(less_equal, CPU, paddle::operators::LessEqualFunctor); +REGISTER_COMPARE_OP(larger_than, "Out = X > Y"); +REGISTER_COMPARE_KERNEL(larger_than, CPU, paddle::operators::LargerThanFunctor); +REGISTER_COMPARE_OP(larger_equal, "Out = X >= Y"); +REGISTER_COMPARE_KERNEL(larger_equal, CPU, + paddle::operators::LargerEqualFunctor); REGISTER_COMPARE_OP(equal, "Out = X == Y"); REGISTER_COMPARE_KERNEL(equal, CPU, paddle::operators::EqualFunctor); REGISTER_COMPARE_OP(not_equal, "Out = X != Y"); diff --git a/paddle/fluid/operators/compare_op.cu b/paddle/fluid/operators/compare_op.cu index c6c83b44b8a..32d92a90666 100644 --- a/paddle/fluid/operators/compare_op.cu +++ b/paddle/fluid/operators/compare_op.cu @@ -16,5 +16,9 @@ limitations under the License. */ REGISTER_COMPARE_KERNEL(less_than, CUDA, paddle::operators::LessThanFunctor); REGISTER_COMPARE_KERNEL(less_equal, CUDA, paddle::operators::LessEqualFunctor); +REGISTER_COMPARE_KERNEL(larger_than, CUDA, + paddle::operators::LargerThanFunctor); +REGISTER_COMPARE_KERNEL(larger_equal, CUDA, + paddle::operators::LargerEqualFunctor); REGISTER_COMPARE_KERNEL(equal, CUDA, paddle::operators::EqualFunctor); REGISTER_COMPARE_KERNEL(not_equal, CUDA, paddle::operators::NotEqualFunctor); diff --git a/paddle/fluid/operators/compare_op.h b/paddle/fluid/operators/compare_op.h index 6638e5ae9e6..b4546f27b1e 100644 --- a/paddle/fluid/operators/compare_op.h +++ b/paddle/fluid/operators/compare_op.h @@ -34,6 +34,18 @@ struct LessEqualFunctor { HOSTDEVICE bool operator()(const T& a, const T& b) const { return a <= b; } }; +template +struct LargerThanFunctor { + using ELEM_TYPE = T; + HOSTDEVICE bool operator()(const T& a, const T& b) const { return a > b; } +}; + +template +struct LargerEqualFunctor { + using ELEM_TYPE = T; + HOSTDEVICE bool operator()(const T& a, const T& b) const { return a >= b; } +}; + template struct EqualFunctor { using ELEM_TYPE = T; -- GitLab From 28d07e3cb88737a0abe95d3ed4b4660e3a832dc2 Mon Sep 17 00:00:00 2001 From: qiaolongfei Date: Sat, 24 Feb 2018 13:15:05 +0800 Subject: [PATCH 104/122] add python part of compare op --- paddle/fluid/operators/compare_op.cc | 11 ++++++----- paddle/fluid/operators/compare_op.cu | 8 ++++---- paddle/fluid/operators/compare_op.h | 4 ++-- python/paddle/v2/fluid/layers/math_op_patch.py | 4 +++- .../v2/fluid/tests/unittests/test_compare_op.py | 3 +++ 5 files changed, 18 insertions(+), 12 deletions(-) diff --git a/paddle/fluid/operators/compare_op.cc b/paddle/fluid/operators/compare_op.cc index a5f40d54829..86f7046058c 100644 --- a/paddle/fluid/operators/compare_op.cc +++ b/paddle/fluid/operators/compare_op.cc @@ -100,11 +100,12 @@ REGISTER_COMPARE_OP(less_than, "Out = X < Y"); REGISTER_COMPARE_KERNEL(less_than, CPU, paddle::operators::LessThanFunctor); REGISTER_COMPARE_OP(less_equal, "Out = X <= Y"); REGISTER_COMPARE_KERNEL(less_equal, CPU, paddle::operators::LessEqualFunctor); -REGISTER_COMPARE_OP(larger_than, "Out = X > Y"); -REGISTER_COMPARE_KERNEL(larger_than, CPU, paddle::operators::LargerThanFunctor); -REGISTER_COMPARE_OP(larger_equal, "Out = X >= Y"); -REGISTER_COMPARE_KERNEL(larger_equal, CPU, - paddle::operators::LargerEqualFunctor); +REGISTER_COMPARE_OP(greater_than, "Out = X > Y"); +REGISTER_COMPARE_KERNEL(greater_than, CPU, + paddle::operators::GreaterThanFunctor); +REGISTER_COMPARE_OP(greater_equal, "Out = X >= Y"); +REGISTER_COMPARE_KERNEL(greater_equal, CPU, + paddle::operators::GreaterEqualFunctor); REGISTER_COMPARE_OP(equal, "Out = X == Y"); REGISTER_COMPARE_KERNEL(equal, CPU, paddle::operators::EqualFunctor); REGISTER_COMPARE_OP(not_equal, "Out = X != Y"); diff --git a/paddle/fluid/operators/compare_op.cu b/paddle/fluid/operators/compare_op.cu index 32d92a90666..1bf85c64fb5 100644 --- a/paddle/fluid/operators/compare_op.cu +++ b/paddle/fluid/operators/compare_op.cu @@ -16,9 +16,9 @@ limitations under the License. */ REGISTER_COMPARE_KERNEL(less_than, CUDA, paddle::operators::LessThanFunctor); REGISTER_COMPARE_KERNEL(less_equal, CUDA, paddle::operators::LessEqualFunctor); -REGISTER_COMPARE_KERNEL(larger_than, CUDA, - paddle::operators::LargerThanFunctor); -REGISTER_COMPARE_KERNEL(larger_equal, CUDA, - paddle::operators::LargerEqualFunctor); +REGISTER_COMPARE_KERNEL(greater_than, CUDA, + paddle::operators::GreaterThanFunctor); +REGISTER_COMPARE_KERNEL(greater_equal, CUDA, + paddle::operators::GreaterEqualFunctor); REGISTER_COMPARE_KERNEL(equal, CUDA, paddle::operators::EqualFunctor); REGISTER_COMPARE_KERNEL(not_equal, CUDA, paddle::operators::NotEqualFunctor); diff --git a/paddle/fluid/operators/compare_op.h b/paddle/fluid/operators/compare_op.h index b4546f27b1e..1cbabdaf676 100644 --- a/paddle/fluid/operators/compare_op.h +++ b/paddle/fluid/operators/compare_op.h @@ -35,13 +35,13 @@ struct LessEqualFunctor { }; template -struct LargerThanFunctor { +struct GreaterThanFunctor { using ELEM_TYPE = T; HOSTDEVICE bool operator()(const T& a, const T& b) const { return a > b; } }; template -struct LargerEqualFunctor { +struct GreaterEqualFunctor { using ELEM_TYPE = T; HOSTDEVICE bool operator()(const T& a, const T& b) const { return a >= b; } }; diff --git a/python/paddle/v2/fluid/layers/math_op_patch.py b/python/paddle/v2/fluid/layers/math_op_patch.py index 417a01b76f1..c92eb94f09c 100644 --- a/python/paddle/v2/fluid/layers/math_op_patch.py +++ b/python/paddle/v2/fluid/layers/math_op_patch.py @@ -157,7 +157,9 @@ def monkey_patch_variable(): ("__eq__", "equal", False), ("__ne__", "not_equal", False), ("__lt__", "less_than", False), - ("__le__", "less_equal", False)): + ("__le__", "less_equal", False), + ("__gt__", "greater_than", False), + ("__ge__", "greater_equal", False)): setattr(Variable, method_name, _elemwise_method_creator_(method_name, op_type, reverse)) diff --git a/python/paddle/v2/fluid/tests/unittests/test_compare_op.py b/python/paddle/v2/fluid/tests/unittests/test_compare_op.py index 83d57639ca4..405afebae85 100644 --- a/python/paddle/v2/fluid/tests/unittests/test_compare_op.py +++ b/python/paddle/v2/fluid/tests/unittests/test_compare_op.py @@ -38,7 +38,10 @@ def create_test_class(op_type, typename, callback): for _type_name in {'float32', 'float64', 'int32', 'int64'}: create_test_class('less_than', _type_name, lambda _a, _b: _a < _b) create_test_class('less_equal', _type_name, lambda _a, _b: _a <= _b) + create_test_class('greater_than', _type_name, lambda _a, _b: _a > _b) + create_test_class('greater_equal', _type_name, lambda _a, _b: _a >= _b) create_test_class('equal', _type_name, lambda _a, _b: _a == _b) + create_test_class('not_equal', _type_name, lambda _a, _b: _a != _b) if __name__ == '__main__': unittest.main() -- GitLab From cf7c745c486bfc89543c6c9c6abc19ce1374548b Mon Sep 17 00:00:00 2001 From: fengjiayi Date: Sat, 24 Feb 2018 14:49:04 +0800 Subject: [PATCH 105/122] change type of BN's 'mean' and 'variance' from persistable variable to Parameter --- python/paddle/v2/fluid/layers/nn.py | 24 ++++++++++++------------ 1 file changed, 12 insertions(+), 12 deletions(-) diff --git a/python/paddle/v2/fluid/layers/nn.py b/python/paddle/v2/fluid/layers/nn.py index e8b4cec6ee6..3453dd945d5 100644 --- a/python/paddle/v2/fluid/layers/nn.py +++ b/python/paddle/v2/fluid/layers/nn.py @@ -1519,21 +1519,21 @@ def batch_norm(input, bias = helper.create_parameter( attr=helper.bias_attr, shape=param_shape, dtype=dtype, is_bias=True) - mean = helper.create_global_variable( - name=moving_mean_name, - dtype=input.dtype, + mean = helper.create_parameter( + attr=ParamAttr( + name=moving_mean_name, initializer=Constant(0.0), trainable=False), shape=param_shape, - persistable=True, - stop_gradient=True) - helper.set_variable_initializer(var=mean, initializer=Constant(0.0)) + dtype=input.dtype) + mean.stop_gradient = True - variance = helper.create_global_variable( - name=moving_variance_name, - dtype=input.dtype, + variance = helper.create_parameter( + attr=ParamAttr( + name=moving_variance_name, + initializer=Constant(1.0), + trainable=False), shape=param_shape, - persistable=True, - stop_gradient=True) - helper.set_variable_initializer(var=variance, initializer=Constant(1.0)) + dtype=input.dtype) + variance.stop_gradient = True # create output # mean and mean_out share the same memory -- GitLab From c4e8f6c65ba655afa367ceaf8bd7a493c2780a89 Mon Sep 17 00:00:00 2001 From: Luo Tao Date: Sat, 24 Feb 2018 15:17:02 +0800 Subject: [PATCH 106/122] add an introduction of API --- doc/api/index_cn.rst | 10 ---------- doc/api/index_en.rst | 1 + doc/api/overview.rst | 4 ++++ 3 files changed, 5 insertions(+), 10 deletions(-) delete mode 100644 doc/api/index_cn.rst create mode 100644 doc/api/overview.rst diff --git a/doc/api/index_cn.rst b/doc/api/index_cn.rst deleted file mode 100644 index 84f9097a6cd..00000000000 --- a/doc/api/index_cn.rst +++ /dev/null @@ -1,10 +0,0 @@ -API -=== - -.. toctree:: - :maxdepth: 1 - - 模型配置 - 数据访问 - 训练与应用 - v2/fluid.rst diff --git a/doc/api/index_en.rst b/doc/api/index_en.rst index e6f632e1a5b..77337982be1 100644 --- a/doc/api/index_en.rst +++ b/doc/api/index_en.rst @@ -4,6 +4,7 @@ API .. toctree:: :maxdepth: 1 + overview.rst v2/model_configs.rst v2/data.rst v2/run_logic.rst diff --git a/doc/api/overview.rst b/doc/api/overview.rst new file mode 100644 index 00000000000..953d2db2b30 --- /dev/null +++ b/doc/api/overview.rst @@ -0,0 +1,4 @@ +API Overview +============ + +TBD -- GitLab From 44e301541256b966104bc1c67cab8638a0dafcfe Mon Sep 17 00:00:00 2001 From: QI JUN Date: Sat, 24 Feb 2018 16:29:59 +0800 Subject: [PATCH 107/122] fix nccl version (#8540) * fix nccl version * enable nccl test --- Dockerfile | 3 ++- paddle/fluid/platform/nccl_test.cu | 3 --- paddle/scripts/docker/build.sh | 2 +- 3 files changed, 3 insertions(+), 5 deletions(-) diff --git a/Dockerfile b/Dockerfile index 6ac9901ac6c..60e76c7f2ed 100644 --- a/Dockerfile +++ b/Dockerfile @@ -22,7 +22,8 @@ COPY ./paddle/scripts/docker/root/ /root/ RUN apt-get update && \ apt-get install -y \ - git python-pip python-dev openssh-server bison libnccl-dev \ + git python-pip python-dev openssh-server bison \ + libnccl2=2.1.2-1+cuda8.0 libnccl-dev=2.1.2-1+cuda8.0 \ wget unzip unrar tar xz-utils bzip2 gzip coreutils ntp \ curl sed grep graphviz libjpeg-dev zlib1g-dev \ python-matplotlib gcc-4.8 g++-4.8 \ diff --git a/paddle/fluid/platform/nccl_test.cu b/paddle/fluid/platform/nccl_test.cu index 212ea8517e8..32a293796c0 100644 --- a/paddle/fluid/platform/nccl_test.cu +++ b/paddle/fluid/platform/nccl_test.cu @@ -129,9 +129,6 @@ TEST(NCCL, all_reduce) { } // namespace paddle int main(int argc, char** argv) { - // FIXME(tonyyang-svail): - // Due to the driver issue on our CI, disable for now - return 0; dev_count = paddle::platform::GetCUDADeviceCount(); if (dev_count <= 1) { LOG(WARNING) diff --git a/paddle/scripts/docker/build.sh b/paddle/scripts/docker/build.sh index 56fa1387861..8ec3d0c6574 100644 --- a/paddle/scripts/docker/build.sh +++ b/paddle/scripts/docker/build.sh @@ -171,7 +171,7 @@ EOF EOF if [[ ${WITH_GPU} == "ON" ]]; then - NCCL_DEPS="apt-get install -y libnccl-dev &&" + NCCL_DEPS="apt-get install -y libnccl2=2.1.2-1+cuda8.0 libnccl-dev=2.1.2-1+cuda8.0 &&" else NCCL_DEPS="" fi -- GitLab From 28ff1cdaa6d0d6f6dabb0668218d99fc88260008 Mon Sep 17 00:00:00 2001 From: qiaolongfei Date: Sat, 24 Feb 2018 16:42:17 +0800 Subject: [PATCH 108/122] create learning rate for each program --- python/paddle/v2/fluid/optimizer.py | 50 ++++++++++++++++++----------- 1 file changed, 31 insertions(+), 19 deletions(-) diff --git a/python/paddle/v2/fluid/optimizer.py b/python/paddle/v2/fluid/optimizer.py index 61febc4e383..0b3e019d805 100644 --- a/python/paddle/v2/fluid/optimizer.py +++ b/python/paddle/v2/fluid/optimizer.py @@ -36,10 +36,15 @@ class Optimizer(object): """ def __init__(self, learning_rate, global_step=None, regularization=None): - assert learning_rate is not None + if not isinstance(learning_rate, float) and \ + not isinstance(learning_rate, framework.Variable): + raise ValueError("learning rate should be float or Variable") self._global_step = global_step self.regularization = regularization - self._global_learning_rate = learning_rate + self._learning_rate = learning_rate + # each program should have a independent learning rate + # program -> Variable(learning_rate) + self._learning_rate_map = defaultdict(lambda: None) # Dictionary of accumulators. Some optimizer subclasses need to # allocate and manage extra variables associated with the parameters # to train. These variables are called accumulators. @@ -48,26 +53,33 @@ class Optimizer(object): self.helper = None def _create_global_learning_rate(self): - if isinstance(self._global_learning_rate, float): - self._global_learning_rate = layers.create_global_var( - name=unique_name.generate("learning_rate"), - shape=[1], - value=float(self._global_learning_rate), - dtype='float32', - persistable=True) - - if not isinstance(self._global_learning_rate, framework.Variable): - raise ValueError("learning rate should be a Variable, " - "actual type is %s", - type(self._global_learning_rate)) - - @property - def global_learning_rate(self): + lr = self.global_learning_rate() + + if isinstance(lr, framework.Variable): + return + else: + if not isinstance(self._learning_rate, float): + raise ValueError( + "learning rate variable is create outside optimizer," + "can not create new learning rate variable for new program") + + # create learning rate in the current main program + self._learning_rate_map[framework.default_main_program( + )] = layers.create_global_var( + name=unique_name.generate("learning_rate"), + shape=[1], + value=float(self._learning_rate), + dtype='float32', + persistable=True) + + def global_learning_rate(self, program=None): """ get global decayed learning rate :return: """ - return self._global_learning_rate + if program is None: + program = framework.default_main_program() + return self._learning_rate_map[program] def _append_optimize_op(self, block, param_and_grad): """ append optimize operator to block and return all the added optimize_op @@ -78,7 +90,7 @@ class Optimizer(object): # create learning rate variable for every parameter param = param_and_grad[0] param_lr = param.optimize_attr['learning_rate'] - return self._global_learning_rate * param_lr + return self.global_learning_rate() * param_lr def _create_accumulators(self, block, parameters): """Create all accumulators needed by the parameters -- GitLab From b11956a0b56a293cfcf96e9810e1490c33ea7b07 Mon Sep 17 00:00:00 2001 From: Luo Tao Date: Sat, 24 Feb 2018 17:10:24 +0800 Subject: [PATCH 109/122] move Fluid API code out of V2 API code --- python/paddle/{v2 => }/fluid/.gitignore | 0 python/paddle/{v2 => }/fluid/__init__.py | 0 python/paddle/{v2 => }/fluid/backward.py | 0 python/paddle/{v2 => }/fluid/clip.py | 0 python/paddle/{v2 => }/fluid/concurrency.py | 0 python/paddle/{v2 => }/fluid/data_feeder.py | 0 python/paddle/{v2 => }/fluid/debuger.py | 0 python/paddle/{v2 => }/fluid/default_scope_funcs.py | 0 python/paddle/{v2 => }/fluid/distribute_transpiler.py | 0 python/paddle/{v2 => }/fluid/distribute_transpiler_simple.py | 0 python/paddle/{v2 => }/fluid/distributed_spliter.py | 0 python/paddle/{v2 => }/fluid/evaluator.py | 0 python/paddle/{v2 => }/fluid/executor.py | 0 python/paddle/{v2 => }/fluid/framework.py | 0 python/paddle/{v2 => }/fluid/graphviz.py | 0 python/paddle/{v2 => }/fluid/initializer.py | 0 python/paddle/{v2 => }/fluid/io.py | 0 python/paddle/{v2 => }/fluid/layer_helper.py | 0 python/paddle/{v2 => }/fluid/layers/__init__.py | 0 python/paddle/{v2 => }/fluid/layers/control_flow.py | 0 python/paddle/{v2 => }/fluid/layers/detection.py | 0 python/paddle/{v2 => }/fluid/layers/device.py | 0 python/paddle/{v2 => }/fluid/layers/io.py | 0 python/paddle/{v2 => }/fluid/layers/layer_function_generator.py | 0 python/paddle/{v2 => }/fluid/layers/math_op_patch.py | 0 python/paddle/{v2 => }/fluid/layers/nn.py | 0 python/paddle/{v2 => }/fluid/layers/ops.py | 0 python/paddle/{v2 => }/fluid/layers/tensor.py | 0 python/paddle/{v2 => }/fluid/learning_rate_decay.py | 0 python/paddle/{v2 => }/fluid/memory_optimization_transpiler.py | 0 python/paddle/{v2 => }/fluid/net_drawer.py | 0 python/paddle/{v2 => }/fluid/nets.py | 0 python/paddle/{v2 => }/fluid/op.py | 0 python/paddle/{v2 => }/fluid/optimizer.py | 0 python/paddle/{v2 => }/fluid/param_attr.py | 0 python/paddle/{v2 => }/fluid/profiler.py | 0 python/paddle/{v2 => }/fluid/regularizer.py | 0 python/paddle/{v2 => }/fluid/tests/.gitignore | 0 python/paddle/{v2 => }/fluid/tests/CMakeLists.txt | 0 python/paddle/{v2 => }/fluid/tests/__init__.py | 0 python/paddle/{v2 => }/fluid/tests/book/.gitignore | 0 python/paddle/{v2 => }/fluid/tests/book/CMakeLists.txt | 0 python/paddle/{v2 => }/fluid/tests/book/__init__.py | 0 .../paddle/{v2 => }/fluid/tests/book/notest_rnn_encoder_decoer.py | 0 python/paddle/{v2 => }/fluid/tests/book/test_fit_a_line.py | 0 .../paddle/{v2 => }/fluid/tests/book/test_image_classification.py | 0 .../paddle/{v2 => }/fluid/tests/book/test_label_semantic_roles.py | 0 .../paddle/{v2 => }/fluid/tests/book/test_machine_translation.py | 0 python/paddle/{v2 => }/fluid/tests/book/test_recognize_digits.py | 0 .../paddle/{v2 => }/fluid/tests/book/test_recommender_system.py | 0 .../paddle/{v2 => }/fluid/tests/book/test_understand_sentiment.py | 0 python/paddle/{v2 => }/fluid/tests/book/test_word2vec.py | 0 python/paddle/{v2 => }/fluid/tests/book_distribute/CMakeLists.txt | 0 .../fluid/tests/book_distribute/notest_dist_fit_a_line.py | 0 .../tests/book_distribute/notest_dist_image_classification.py | 0 .../tests/book_distribute/notest_dist_label_semantic_roles.py | 0 .../{v2 => }/fluid/tests/book_distribute/notest_dist_word2vec.py | 0 .../fluid/tests/book_distribute/notest_machine_translation.py | 0 .../tests/book_distribute/notest_recognize_digits_conv_dist.py | 0 .../tests/book_distribute/notest_recognize_digits_mlp_dist.py | 0 .../fluid/tests/book_distribute/notest_recommender_system_dist.py | 0 .../book_distribute/notest_understand_sentiment_conv_dist.py | 0 .../book_distribute/notest_understand_sentiment_dynamic_lstm.py | 0 .../{v2 => }/fluid/tests/book_memory_optimization/CMakeLists.txt | 0 .../tests/book_memory_optimization/test_memopt_fit_a_line.py | 0 .../test_memopt_image_classification_train.py | 0 .../book_memory_optimization/test_memopt_machine_translation.py | 0 python/paddle/{v2 => }/fluid/tests/demo/fc_gan.py | 0 python/paddle/{v2 => }/fluid/tests/notest_concurrency.py | 0 python/paddle/{v2 => }/fluid/tests/notest_csp.py | 0 python/paddle/{v2 => }/fluid/tests/test_cpp_reader.py | 0 python/paddle/{v2 => }/fluid/tests/test_data_feeder.py | 0 python/paddle/{v2 => }/fluid/tests/test_detection.py | 0 python/paddle/{v2 => }/fluid/tests/test_error_clip.py | 0 python/paddle/{v2 => }/fluid/tests/test_gradient_clip.py | 0 python/paddle/{v2 => }/fluid/tests/test_mnist_if_else_op.py | 0 .../{v2 => }/fluid/tests/test_python_operator_overriding.py | 0 python/paddle/{v2 => }/fluid/tests/unittests/CMakeLists.txt | 0 python/paddle/{v2 => }/fluid/tests/unittests/__init__.py | 0 python/paddle/{v2 => }/fluid/tests/unittests/decorators.py | 0 python/paddle/{v2 => }/fluid/tests/unittests/op_test.py | 0 python/paddle/{v2 => }/fluid/tests/unittests/test_accuracy_op.py | 0 .../paddle/{v2 => }/fluid/tests/unittests/test_activation_op.py | 0 python/paddle/{v2 => }/fluid/tests/unittests/test_adadelta_op.py | 0 python/paddle/{v2 => }/fluid/tests/unittests/test_adagrad_op.py | 0 python/paddle/{v2 => }/fluid/tests/unittests/test_adam_op.py | 0 python/paddle/{v2 => }/fluid/tests/unittests/test_adamax_op.py | 0 .../{v2 => }/fluid/tests/unittests/test_array_read_write_op.py | 0 python/paddle/{v2 => }/fluid/tests/unittests/test_assign_op.py | 0 .../paddle/{v2 => }/fluid/tests/unittests/test_assign_value_op.py | 0 python/paddle/{v2 => }/fluid/tests/unittests/test_auc_op.py | 0 .../paddle/{v2 => }/fluid/tests/unittests/test_batch_norm_op.py | 0 .../{v2 => }/fluid/tests/unittests/test_beam_search_decode_op.py | 0 .../paddle/{v2 => }/fluid/tests/unittests/test_beam_search_op.py | 0 .../fluid/tests/unittests/test_bilinear_tensor_product_op.py | 0 .../{v2 => }/fluid/tests/unittests/test_bipartite_match_op.py | 0 python/paddle/{v2 => }/fluid/tests/unittests/test_box_coder_op.py | 0 .../paddle/{v2 => }/fluid/tests/unittests/test_calc_gradient.py | 0 python/paddle/{v2 => }/fluid/tests/unittests/test_cast_op.py | 0 .../paddle/{v2 => }/fluid/tests/unittests/test_chunk_eval_op.py | 0 .../paddle/{v2 => }/fluid/tests/unittests/test_clip_by_norm_op.py | 0 python/paddle/{v2 => }/fluid/tests/unittests/test_clip_op.py | 0 python/paddle/{v2 => }/fluid/tests/unittests/test_compare_op.py | 0 python/paddle/{v2 => }/fluid/tests/unittests/test_concat_op.py | 0 python/paddle/{v2 => }/fluid/tests/unittests/test_cond_op.py | 0 .../{v2 => }/fluid/tests/unittests/test_conditional_block.py | 0 python/paddle/{v2 => }/fluid/tests/unittests/test_const_value.py | 0 python/paddle/{v2 => }/fluid/tests/unittests/test_conv2d_op.py | 0 .../{v2 => }/fluid/tests/unittests/test_conv2d_transpose_op.py | 0 python/paddle/{v2 => }/fluid/tests/unittests/test_conv3d_op.py | 0 .../{v2 => }/fluid/tests/unittests/test_conv3d_transpose_op.py | 0 .../paddle/{v2 => }/fluid/tests/unittests/test_conv_shift_op.py | 0 python/paddle/{v2 => }/fluid/tests/unittests/test_cos_sim_op.py | 0 .../{v2 => }/fluid/tests/unittests/test_create_op_doc_string.py | 0 .../paddle/{v2 => }/fluid/tests/unittests/test_crf_decoding_op.py | 0 python/paddle/{v2 => }/fluid/tests/unittests/test_crop_op.py | 0 .../{v2 => }/fluid/tests/unittests/test_cross_entropy_op.py | 0 python/paddle/{v2 => }/fluid/tests/unittests/test_ctc_align.py | 0 python/paddle/{v2 => }/fluid/tests/unittests/test_cumsum_op.py | 0 .../{v2 => }/fluid/tests/unittests/test_decayed_adagrad_op.py | 0 .../{v2 => }/fluid/tests/unittests/test_default_scope_funcs.py | 0 .../{v2 => }/fluid/tests/unittests/test_detection_map_op.py | 0 .../{v2 => }/fluid/tests/unittests/test_detection_output_op.py | 0 python/paddle/{v2 => }/fluid/tests/unittests/test_dropout_op.py | 0 python/paddle/{v2 => }/fluid/tests/unittests/test_dyn_rnn.py | 0 .../{v2 => }/fluid/tests/unittests/test_dynrnn_gradient_check.py | 0 .../{v2 => }/fluid/tests/unittests/test_dynrnn_static_input.py | 0 .../{v2 => }/fluid/tests/unittests/test_edit_distance_op.py | 0 .../{v2 => }/fluid/tests/unittests/test_elementwise_add_op.py | 0 .../{v2 => }/fluid/tests/unittests/test_elementwise_div_op.py | 0 .../{v2 => }/fluid/tests/unittests/test_elementwise_max_op.py | 0 .../{v2 => }/fluid/tests/unittests/test_elementwise_min_op.py | 0 .../{v2 => }/fluid/tests/unittests/test_elementwise_mul_op.py | 0 .../{v2 => }/fluid/tests/unittests/test_elementwise_pow_op.py | 0 .../{v2 => }/fluid/tests/unittests/test_elementwise_sub_op.py | 0 python/paddle/{v2 => }/fluid/tests/unittests/test_exception.py | 0 .../{v2 => }/fluid/tests/unittests/test_executor_and_mul.py | 0 python/paddle/{v2 => }/fluid/tests/unittests/test_expand_op.py | 0 .../{v2 => }/fluid/tests/unittests/test_feed_fetch_method.py | 0 python/paddle/{v2 => }/fluid/tests/unittests/test_fetch_var.py | 0 .../tests/unittests/test_fill_constant_batch_size_like_op.py | 0 .../{v2 => }/fluid/tests/unittests/test_fill_constant_op.py | 0 python/paddle/{v2 => }/fluid/tests/unittests/test_fill_op.py | 0 .../{v2 => }/fluid/tests/unittests/test_fill_zeros_like_op.py | 0 .../{v2 => }/fluid/tests/unittests/test_framework_debug_str.py | 0 python/paddle/{v2 => }/fluid/tests/unittests/test_ftrl_op.py | 0 python/paddle/{v2 => }/fluid/tests/unittests/test_gather_op.py | 0 .../tests/unittests/test_gaussian_random_batch_size_like_op.py | 0 .../{v2 => }/fluid/tests/unittests/test_gaussian_random_op.py | 0 .../paddle/{v2 => }/fluid/tests/unittests/test_get_places_op.py | 0 python/paddle/{v2 => }/fluid/tests/unittests/test_gru_op.py | 0 python/paddle/{v2 => }/fluid/tests/unittests/test_gru_unit_op.py | 0 .../paddle/{v2 => }/fluid/tests/unittests/test_hinge_loss_op.py | 0 .../paddle/{v2 => }/fluid/tests/unittests/test_huber_loss_op.py | 0 .../paddle/{v2 => }/fluid/tests/unittests/test_im2sequence_op.py | 0 .../fluid/tests/unittests/test_image_classification_layer.py | 0 python/paddle/{v2 => }/fluid/tests/unittests/test_infer_shape.py | 0 .../{v2 => }/fluid/tests/unittests/test_inference_model_io.py | 0 python/paddle/{v2 => }/fluid/tests/unittests/test_initializer.py | 0 .../{v2 => }/fluid/tests/unittests/test_iou_similarity_op.py | 0 python/paddle/{v2 => }/fluid/tests/unittests/test_is_empty_op.py | 0 python/paddle/{v2 => }/fluid/tests/unittests/test_l1_norm_op.py | 0 .../paddle/{v2 => }/fluid/tests/unittests/test_label_smooth_op.py | 0 .../paddle/{v2 => }/fluid/tests/unittests/test_layer_norm_op.py | 0 python/paddle/{v2 => }/fluid/tests/unittests/test_layers.py | 0 .../{v2 => }/fluid/tests/unittests/test_learning_rate_decay.py | 0 .../{v2 => }/fluid/tests/unittests/test_linear_chain_crf_op.py | 0 .../{v2 => }/fluid/tests/unittests/test_lod_array_length_op.py | 0 .../paddle/{v2 => }/fluid/tests/unittests/test_lod_rank_table.py | 0 python/paddle/{v2 => }/fluid/tests/unittests/test_lod_reset_op.py | 0 .../{v2 => }/fluid/tests/unittests/test_lod_tensor_array.py | 0 .../{v2 => }/fluid/tests/unittests/test_lod_tensor_array_ops.py | 0 python/paddle/{v2 => }/fluid/tests/unittests/test_log_loss_op.py | 0 python/paddle/{v2 => }/fluid/tests/unittests/test_logical_op.py | 0 .../paddle/{v2 => }/fluid/tests/unittests/test_lookup_table_op.py | 0 python/paddle/{v2 => }/fluid/tests/unittests/test_lrn_op.py | 0 python/paddle/{v2 => }/fluid/tests/unittests/test_lstm_op.py | 0 python/paddle/{v2 => }/fluid/tests/unittests/test_lstm_unit_op.py | 0 python/paddle/{v2 => }/fluid/tests/unittests/test_lstmp_op.py | 0 .../{v2 => }/fluid/tests/unittests/test_margin_rank_loss_op.py | 0 .../paddle/{v2 => }/fluid/tests/unittests/test_math_op_patch.py | 0 python/paddle/{v2 => }/fluid/tests/unittests/test_matmul_op.py | 0 python/paddle/{v2 => }/fluid/tests/unittests/test_maxout_op.py | 0 python/paddle/{v2 => }/fluid/tests/unittests/test_mean_op.py | 0 .../fluid/tests/unittests/test_memory_optimization_transpiler.py | 0 .../{v2 => }/fluid/tests/unittests/test_mine_hard_examples_op.py | 0 python/paddle/{v2 => }/fluid/tests/unittests/test_minus_op.py | 0 .../{v2 => }/fluid/tests/unittests/test_modified_huber_loss_op.py | 0 python/paddle/{v2 => }/fluid/tests/unittests/test_momentum_op.py | 0 python/paddle/{v2 => }/fluid/tests/unittests/test_mul_op.py | 0 .../{v2 => }/fluid/tests/unittests/test_multiclass_nms_op.py | 0 .../{v2 => }/fluid/tests/unittests/test_multihead_attention.py | 0 python/paddle/{v2 => }/fluid/tests/unittests/test_multiplex_op.py | 0 python/paddle/{v2 => }/fluid/tests/unittests/test_nce.py | 0 python/paddle/{v2 => }/fluid/tests/unittests/test_net.py | 0 python/paddle/{v2 => }/fluid/tests/unittests/test_norm_op.py | 0 .../{v2 => }/fluid/tests/unittests/test_normalization_wrapper.py | 0 python/paddle/{v2 => }/fluid/tests/unittests/test_one_hot_op.py | 0 .../paddle/{v2 => }/fluid/tests/unittests/test_op_support_gpu.py | 0 python/paddle/{v2 => }/fluid/tests/unittests/test_operator.py | 0 .../paddle/{v2 => }/fluid/tests/unittests/test_operator_desc.py | 0 python/paddle/{v2 => }/fluid/tests/unittests/test_optimizer.py | 0 python/paddle/{v2 => }/fluid/tests/unittests/test_pad_op.py | 0 python/paddle/{v2 => }/fluid/tests/unittests/test_parallel_op.py | 0 python/paddle/{v2 => }/fluid/tests/unittests/test_parameter.py | 0 python/paddle/{v2 => }/fluid/tests/unittests/test_pool2d_op.py | 0 python/paddle/{v2 => }/fluid/tests/unittests/test_pool3d_op.py | 0 python/paddle/{v2 => }/fluid/tests/unittests/test_pool_max_op.py | 0 .../fluid/tests/unittests/test_positive_negative_pair_op.py | 0 .../{v2 => }/fluid/tests/unittests/test_precision_recall_op.py | 0 python/paddle/{v2 => }/fluid/tests/unittests/test_prelu_op.py | 0 python/paddle/{v2 => }/fluid/tests/unittests/test_print_op.py | 0 python/paddle/{v2 => }/fluid/tests/unittests/test_prior_box_op.py | 0 python/paddle/{v2 => }/fluid/tests/unittests/test_profiler.py | 0 python/paddle/{v2 => }/fluid/tests/unittests/test_program.py | 0 python/paddle/{v2 => }/fluid/tests/unittests/test_protobuf.py | 0 .../paddle/{v2 => }/fluid/tests/unittests/test_protobuf_descs.py | 0 .../{v2 => }/fluid/tests/unittests/test_proximal_adagrad_op.py | 0 .../paddle/{v2 => }/fluid/tests/unittests/test_proximal_gd_op.py | 0 python/paddle/{v2 => }/fluid/tests/unittests/test_rank_loss_op.py | 0 python/paddle/{v2 => }/fluid/tests/unittests/test_recurrent_op.py | 0 python/paddle/{v2 => }/fluid/tests/unittests/test_recv_op.py | 0 python/paddle/{v2 => }/fluid/tests/unittests/test_reduce_op.py | 0 python/paddle/{v2 => }/fluid/tests/unittests/test_registry.py | 0 python/paddle/{v2 => }/fluid/tests/unittests/test_regularizer.py | 0 .../{v2 => }/fluid/tests/unittests/test_reorder_lod_tensor.py | 0 python/paddle/{v2 => }/fluid/tests/unittests/test_reshape_op.py | 0 python/paddle/{v2 => }/fluid/tests/unittests/test_rmsprop_op.py | 0 .../{v2 => }/fluid/tests/unittests/test_rnn_memory_helper_op.py | 0 python/paddle/{v2 => }/fluid/tests/unittests/test_roi_pool_op.py | 0 python/paddle/{v2 => }/fluid/tests/unittests/test_row_conv_op.py | 0 python/paddle/{v2 => }/fluid/tests/unittests/test_scale_op.py | 0 python/paddle/{v2 => }/fluid/tests/unittests/test_scatter_op.py | 0 python/paddle/{v2 => }/fluid/tests/unittests/test_scope.py | 0 .../paddle/{v2 => }/fluid/tests/unittests/test_selected_rows.py | 0 .../paddle/{v2 => }/fluid/tests/unittests/test_seq_concat_op.py | 0 python/paddle/{v2 => }/fluid/tests/unittests/test_seq_conv.py | 0 python/paddle/{v2 => }/fluid/tests/unittests/test_seq_pool.py | 0 .../{v2 => }/fluid/tests/unittests/test_sequence_erase_op.py | 0 .../paddle/{v2 => }/fluid/tests/unittests/test_sequence_expand.py | 0 .../{v2 => }/fluid/tests/unittests/test_sequence_reshape.py | 0 .../{v2 => }/fluid/tests/unittests/test_sequence_slice_op.py | 0 .../{v2 => }/fluid/tests/unittests/test_sequence_softmax_op.py | 0 python/paddle/{v2 => }/fluid/tests/unittests/test_sgd_op.py | 0 .../{v2 => }/fluid/tests/unittests/test_shrink_rnn_memory.py | 0 .../tests/unittests/test_sigmoid_cross_entropy_with_logits_op.py | 0 python/paddle/{v2 => }/fluid/tests/unittests/test_sign_op.py | 0 .../{v2 => }/fluid/tests/unittests/test_smooth_l1_loss_op.py | 0 python/paddle/{v2 => }/fluid/tests/unittests/test_softmax_op.py | 0 .../fluid/tests/unittests/test_softmax_with_cross_entropy_op.py | 0 .../fluid/tests/unittests/test_split_and_merge_lod_tensor_op.py | 0 python/paddle/{v2 => }/fluid/tests/unittests/test_split_op.py | 0 .../{v2 => }/fluid/tests/unittests/test_split_selected_rows_op.py | 0 python/paddle/{v2 => }/fluid/tests/unittests/test_split_var.py | 0 python/paddle/{v2 => }/fluid/tests/unittests/test_spp_op.py | 0 .../{v2 => }/fluid/tests/unittests/test_squared_l2_distance_op.py | 0 .../{v2 => }/fluid/tests/unittests/test_squared_l2_norm_op.py | 0 python/paddle/{v2 => }/fluid/tests/unittests/test_sum_op.py | 0 python/paddle/{v2 => }/fluid/tests/unittests/test_switch.py | 0 .../{v2 => }/fluid/tests/unittests/test_target_assign_op.py | 0 python/paddle/{v2 => }/fluid/tests/unittests/test_tensor.py | 0 python/paddle/{v2 => }/fluid/tests/unittests/test_top_k_op.py | 0 python/paddle/{v2 => }/fluid/tests/unittests/test_transpose_op.py | 0 .../tests/unittests/test_uniform_random_batch_size_like_op.py | 0 .../{v2 => }/fluid/tests/unittests/test_uniform_random_op.py | 0 python/paddle/{v2 => }/fluid/tests/unittests/test_unique_name.py | 0 python/paddle/{v2 => }/fluid/tests/unittests/test_unpool_op.py | 0 python/paddle/{v2 => }/fluid/tests/unittests/test_variable.py | 0 python/paddle/{v2 => }/fluid/tests/unittests/test_warpctc_op.py | 0 .../{v2 => }/fluid/tests/unittests/test_weight_normalization.py | 0 python/paddle/{v2 => }/fluid/tests/unittests/test_while_op.py | 0 python/paddle/{v2 => }/fluid/unique_name.py | 0 272 files changed, 0 insertions(+), 0 deletions(-) rename python/paddle/{v2 => }/fluid/.gitignore (100%) rename python/paddle/{v2 => }/fluid/__init__.py (100%) rename python/paddle/{v2 => }/fluid/backward.py (100%) rename python/paddle/{v2 => }/fluid/clip.py (100%) rename python/paddle/{v2 => }/fluid/concurrency.py (100%) rename python/paddle/{v2 => }/fluid/data_feeder.py (100%) rename python/paddle/{v2 => }/fluid/debuger.py (100%) rename python/paddle/{v2 => }/fluid/default_scope_funcs.py (100%) rename python/paddle/{v2 => }/fluid/distribute_transpiler.py (100%) rename python/paddle/{v2 => }/fluid/distribute_transpiler_simple.py (100%) rename python/paddle/{v2 => }/fluid/distributed_spliter.py (100%) rename python/paddle/{v2 => }/fluid/evaluator.py (100%) rename python/paddle/{v2 => }/fluid/executor.py (100%) rename python/paddle/{v2 => }/fluid/framework.py (100%) rename python/paddle/{v2 => }/fluid/graphviz.py (100%) rename python/paddle/{v2 => }/fluid/initializer.py (100%) rename python/paddle/{v2 => }/fluid/io.py (100%) rename python/paddle/{v2 => }/fluid/layer_helper.py (100%) rename python/paddle/{v2 => }/fluid/layers/__init__.py (100%) rename python/paddle/{v2 => }/fluid/layers/control_flow.py (100%) rename python/paddle/{v2 => }/fluid/layers/detection.py (100%) rename python/paddle/{v2 => }/fluid/layers/device.py (100%) rename python/paddle/{v2 => }/fluid/layers/io.py (100%) rename python/paddle/{v2 => }/fluid/layers/layer_function_generator.py (100%) rename python/paddle/{v2 => }/fluid/layers/math_op_patch.py (100%) rename python/paddle/{v2 => }/fluid/layers/nn.py (100%) rename python/paddle/{v2 => }/fluid/layers/ops.py (100%) rename python/paddle/{v2 => }/fluid/layers/tensor.py (100%) rename python/paddle/{v2 => }/fluid/learning_rate_decay.py (100%) rename python/paddle/{v2 => }/fluid/memory_optimization_transpiler.py (100%) rename python/paddle/{v2 => }/fluid/net_drawer.py (100%) rename python/paddle/{v2 => }/fluid/nets.py (100%) rename python/paddle/{v2 => }/fluid/op.py (100%) rename python/paddle/{v2 => }/fluid/optimizer.py (100%) rename python/paddle/{v2 => }/fluid/param_attr.py (100%) rename python/paddle/{v2 => }/fluid/profiler.py (100%) rename python/paddle/{v2 => }/fluid/regularizer.py (100%) rename python/paddle/{v2 => }/fluid/tests/.gitignore (100%) rename python/paddle/{v2 => }/fluid/tests/CMakeLists.txt (100%) rename python/paddle/{v2 => }/fluid/tests/__init__.py (100%) rename python/paddle/{v2 => }/fluid/tests/book/.gitignore (100%) rename python/paddle/{v2 => }/fluid/tests/book/CMakeLists.txt (100%) rename python/paddle/{v2 => }/fluid/tests/book/__init__.py (100%) rename python/paddle/{v2 => }/fluid/tests/book/notest_rnn_encoder_decoer.py (100%) rename python/paddle/{v2 => }/fluid/tests/book/test_fit_a_line.py (100%) rename python/paddle/{v2 => }/fluid/tests/book/test_image_classification.py (100%) rename python/paddle/{v2 => }/fluid/tests/book/test_label_semantic_roles.py (100%) rename python/paddle/{v2 => }/fluid/tests/book/test_machine_translation.py (100%) rename python/paddle/{v2 => }/fluid/tests/book/test_recognize_digits.py (100%) rename python/paddle/{v2 => }/fluid/tests/book/test_recommender_system.py (100%) rename python/paddle/{v2 => }/fluid/tests/book/test_understand_sentiment.py (100%) rename python/paddle/{v2 => }/fluid/tests/book/test_word2vec.py (100%) rename python/paddle/{v2 => }/fluid/tests/book_distribute/CMakeLists.txt (100%) rename python/paddle/{v2 => }/fluid/tests/book_distribute/notest_dist_fit_a_line.py (100%) rename python/paddle/{v2 => }/fluid/tests/book_distribute/notest_dist_image_classification.py (100%) rename python/paddle/{v2 => }/fluid/tests/book_distribute/notest_dist_label_semantic_roles.py (100%) rename python/paddle/{v2 => }/fluid/tests/book_distribute/notest_dist_word2vec.py (100%) rename python/paddle/{v2 => }/fluid/tests/book_distribute/notest_machine_translation.py (100%) rename python/paddle/{v2 => }/fluid/tests/book_distribute/notest_recognize_digits_conv_dist.py (100%) rename python/paddle/{v2 => }/fluid/tests/book_distribute/notest_recognize_digits_mlp_dist.py (100%) rename python/paddle/{v2 => }/fluid/tests/book_distribute/notest_recommender_system_dist.py (100%) rename python/paddle/{v2 => }/fluid/tests/book_distribute/notest_understand_sentiment_conv_dist.py (100%) rename python/paddle/{v2 => }/fluid/tests/book_distribute/notest_understand_sentiment_dynamic_lstm.py (100%) rename python/paddle/{v2 => }/fluid/tests/book_memory_optimization/CMakeLists.txt (100%) rename python/paddle/{v2 => }/fluid/tests/book_memory_optimization/test_memopt_fit_a_line.py (100%) rename python/paddle/{v2 => }/fluid/tests/book_memory_optimization/test_memopt_image_classification_train.py (100%) rename python/paddle/{v2 => }/fluid/tests/book_memory_optimization/test_memopt_machine_translation.py (100%) rename python/paddle/{v2 => }/fluid/tests/demo/fc_gan.py (100%) rename python/paddle/{v2 => }/fluid/tests/notest_concurrency.py (100%) rename python/paddle/{v2 => }/fluid/tests/notest_csp.py (100%) rename python/paddle/{v2 => }/fluid/tests/test_cpp_reader.py (100%) rename python/paddle/{v2 => }/fluid/tests/test_data_feeder.py (100%) rename python/paddle/{v2 => }/fluid/tests/test_detection.py (100%) rename python/paddle/{v2 => }/fluid/tests/test_error_clip.py (100%) rename python/paddle/{v2 => }/fluid/tests/test_gradient_clip.py (100%) rename python/paddle/{v2 => }/fluid/tests/test_mnist_if_else_op.py (100%) rename python/paddle/{v2 => }/fluid/tests/test_python_operator_overriding.py (100%) rename python/paddle/{v2 => }/fluid/tests/unittests/CMakeLists.txt (100%) rename python/paddle/{v2 => }/fluid/tests/unittests/__init__.py (100%) rename python/paddle/{v2 => }/fluid/tests/unittests/decorators.py (100%) rename python/paddle/{v2 => }/fluid/tests/unittests/op_test.py (100%) rename python/paddle/{v2 => }/fluid/tests/unittests/test_accuracy_op.py (100%) rename python/paddle/{v2 => }/fluid/tests/unittests/test_activation_op.py (100%) rename python/paddle/{v2 => }/fluid/tests/unittests/test_adadelta_op.py (100%) rename python/paddle/{v2 => }/fluid/tests/unittests/test_adagrad_op.py (100%) rename python/paddle/{v2 => }/fluid/tests/unittests/test_adam_op.py (100%) rename python/paddle/{v2 => }/fluid/tests/unittests/test_adamax_op.py (100%) rename python/paddle/{v2 => }/fluid/tests/unittests/test_array_read_write_op.py (100%) rename python/paddle/{v2 => }/fluid/tests/unittests/test_assign_op.py (100%) rename python/paddle/{v2 => }/fluid/tests/unittests/test_assign_value_op.py (100%) rename python/paddle/{v2 => }/fluid/tests/unittests/test_auc_op.py (100%) rename python/paddle/{v2 => }/fluid/tests/unittests/test_batch_norm_op.py (100%) rename python/paddle/{v2 => }/fluid/tests/unittests/test_beam_search_decode_op.py (100%) rename python/paddle/{v2 => }/fluid/tests/unittests/test_beam_search_op.py (100%) rename python/paddle/{v2 => }/fluid/tests/unittests/test_bilinear_tensor_product_op.py (100%) rename python/paddle/{v2 => }/fluid/tests/unittests/test_bipartite_match_op.py (100%) rename python/paddle/{v2 => }/fluid/tests/unittests/test_box_coder_op.py (100%) rename python/paddle/{v2 => }/fluid/tests/unittests/test_calc_gradient.py (100%) rename python/paddle/{v2 => }/fluid/tests/unittests/test_cast_op.py (100%) rename python/paddle/{v2 => }/fluid/tests/unittests/test_chunk_eval_op.py (100%) rename python/paddle/{v2 => }/fluid/tests/unittests/test_clip_by_norm_op.py (100%) rename python/paddle/{v2 => }/fluid/tests/unittests/test_clip_op.py (100%) rename python/paddle/{v2 => }/fluid/tests/unittests/test_compare_op.py (100%) rename python/paddle/{v2 => }/fluid/tests/unittests/test_concat_op.py (100%) rename python/paddle/{v2 => }/fluid/tests/unittests/test_cond_op.py (100%) rename python/paddle/{v2 => }/fluid/tests/unittests/test_conditional_block.py (100%) rename python/paddle/{v2 => }/fluid/tests/unittests/test_const_value.py (100%) rename python/paddle/{v2 => }/fluid/tests/unittests/test_conv2d_op.py (100%) rename python/paddle/{v2 => }/fluid/tests/unittests/test_conv2d_transpose_op.py (100%) rename python/paddle/{v2 => }/fluid/tests/unittests/test_conv3d_op.py (100%) rename python/paddle/{v2 => }/fluid/tests/unittests/test_conv3d_transpose_op.py (100%) rename python/paddle/{v2 => }/fluid/tests/unittests/test_conv_shift_op.py (100%) rename python/paddle/{v2 => }/fluid/tests/unittests/test_cos_sim_op.py (100%) rename python/paddle/{v2 => }/fluid/tests/unittests/test_create_op_doc_string.py (100%) rename python/paddle/{v2 => }/fluid/tests/unittests/test_crf_decoding_op.py (100%) rename python/paddle/{v2 => }/fluid/tests/unittests/test_crop_op.py (100%) rename python/paddle/{v2 => }/fluid/tests/unittests/test_cross_entropy_op.py (100%) rename python/paddle/{v2 => }/fluid/tests/unittests/test_ctc_align.py (100%) rename python/paddle/{v2 => }/fluid/tests/unittests/test_cumsum_op.py (100%) rename python/paddle/{v2 => }/fluid/tests/unittests/test_decayed_adagrad_op.py (100%) rename python/paddle/{v2 => }/fluid/tests/unittests/test_default_scope_funcs.py (100%) rename python/paddle/{v2 => }/fluid/tests/unittests/test_detection_map_op.py (100%) rename python/paddle/{v2 => }/fluid/tests/unittests/test_detection_output_op.py (100%) rename python/paddle/{v2 => }/fluid/tests/unittests/test_dropout_op.py (100%) rename python/paddle/{v2 => }/fluid/tests/unittests/test_dyn_rnn.py (100%) rename python/paddle/{v2 => }/fluid/tests/unittests/test_dynrnn_gradient_check.py (100%) rename python/paddle/{v2 => }/fluid/tests/unittests/test_dynrnn_static_input.py (100%) rename python/paddle/{v2 => }/fluid/tests/unittests/test_edit_distance_op.py (100%) rename python/paddle/{v2 => }/fluid/tests/unittests/test_elementwise_add_op.py (100%) rename python/paddle/{v2 => }/fluid/tests/unittests/test_elementwise_div_op.py (100%) rename python/paddle/{v2 => }/fluid/tests/unittests/test_elementwise_max_op.py (100%) rename python/paddle/{v2 => }/fluid/tests/unittests/test_elementwise_min_op.py (100%) rename python/paddle/{v2 => }/fluid/tests/unittests/test_elementwise_mul_op.py (100%) rename python/paddle/{v2 => }/fluid/tests/unittests/test_elementwise_pow_op.py (100%) rename python/paddle/{v2 => }/fluid/tests/unittests/test_elementwise_sub_op.py (100%) rename python/paddle/{v2 => }/fluid/tests/unittests/test_exception.py (100%) rename python/paddle/{v2 => }/fluid/tests/unittests/test_executor_and_mul.py (100%) rename python/paddle/{v2 => }/fluid/tests/unittests/test_expand_op.py (100%) rename python/paddle/{v2 => }/fluid/tests/unittests/test_feed_fetch_method.py (100%) rename python/paddle/{v2 => }/fluid/tests/unittests/test_fetch_var.py (100%) rename python/paddle/{v2 => }/fluid/tests/unittests/test_fill_constant_batch_size_like_op.py (100%) rename python/paddle/{v2 => }/fluid/tests/unittests/test_fill_constant_op.py (100%) rename python/paddle/{v2 => }/fluid/tests/unittests/test_fill_op.py (100%) rename python/paddle/{v2 => }/fluid/tests/unittests/test_fill_zeros_like_op.py (100%) rename python/paddle/{v2 => }/fluid/tests/unittests/test_framework_debug_str.py (100%) rename python/paddle/{v2 => }/fluid/tests/unittests/test_ftrl_op.py (100%) rename python/paddle/{v2 => }/fluid/tests/unittests/test_gather_op.py (100%) rename python/paddle/{v2 => }/fluid/tests/unittests/test_gaussian_random_batch_size_like_op.py (100%) rename python/paddle/{v2 => }/fluid/tests/unittests/test_gaussian_random_op.py (100%) rename python/paddle/{v2 => }/fluid/tests/unittests/test_get_places_op.py (100%) rename python/paddle/{v2 => }/fluid/tests/unittests/test_gru_op.py (100%) rename python/paddle/{v2 => }/fluid/tests/unittests/test_gru_unit_op.py (100%) rename python/paddle/{v2 => }/fluid/tests/unittests/test_hinge_loss_op.py (100%) rename python/paddle/{v2 => }/fluid/tests/unittests/test_huber_loss_op.py (100%) rename python/paddle/{v2 => }/fluid/tests/unittests/test_im2sequence_op.py (100%) rename python/paddle/{v2 => }/fluid/tests/unittests/test_image_classification_layer.py (100%) rename python/paddle/{v2 => }/fluid/tests/unittests/test_infer_shape.py (100%) rename python/paddle/{v2 => }/fluid/tests/unittests/test_inference_model_io.py (100%) rename python/paddle/{v2 => }/fluid/tests/unittests/test_initializer.py (100%) rename python/paddle/{v2 => }/fluid/tests/unittests/test_iou_similarity_op.py (100%) rename python/paddle/{v2 => }/fluid/tests/unittests/test_is_empty_op.py (100%) rename python/paddle/{v2 => }/fluid/tests/unittests/test_l1_norm_op.py (100%) rename python/paddle/{v2 => }/fluid/tests/unittests/test_label_smooth_op.py (100%) rename python/paddle/{v2 => }/fluid/tests/unittests/test_layer_norm_op.py (100%) rename python/paddle/{v2 => }/fluid/tests/unittests/test_layers.py (100%) rename python/paddle/{v2 => }/fluid/tests/unittests/test_learning_rate_decay.py (100%) rename python/paddle/{v2 => }/fluid/tests/unittests/test_linear_chain_crf_op.py (100%) rename python/paddle/{v2 => }/fluid/tests/unittests/test_lod_array_length_op.py (100%) rename python/paddle/{v2 => }/fluid/tests/unittests/test_lod_rank_table.py (100%) rename python/paddle/{v2 => }/fluid/tests/unittests/test_lod_reset_op.py (100%) rename python/paddle/{v2 => }/fluid/tests/unittests/test_lod_tensor_array.py (100%) rename python/paddle/{v2 => }/fluid/tests/unittests/test_lod_tensor_array_ops.py (100%) rename python/paddle/{v2 => }/fluid/tests/unittests/test_log_loss_op.py (100%) rename python/paddle/{v2 => }/fluid/tests/unittests/test_logical_op.py (100%) rename python/paddle/{v2 => }/fluid/tests/unittests/test_lookup_table_op.py (100%) rename python/paddle/{v2 => }/fluid/tests/unittests/test_lrn_op.py (100%) rename python/paddle/{v2 => }/fluid/tests/unittests/test_lstm_op.py (100%) rename python/paddle/{v2 => }/fluid/tests/unittests/test_lstm_unit_op.py (100%) rename python/paddle/{v2 => }/fluid/tests/unittests/test_lstmp_op.py (100%) rename python/paddle/{v2 => }/fluid/tests/unittests/test_margin_rank_loss_op.py (100%) rename python/paddle/{v2 => }/fluid/tests/unittests/test_math_op_patch.py (100%) rename python/paddle/{v2 => }/fluid/tests/unittests/test_matmul_op.py (100%) rename python/paddle/{v2 => }/fluid/tests/unittests/test_maxout_op.py (100%) rename python/paddle/{v2 => }/fluid/tests/unittests/test_mean_op.py (100%) rename python/paddle/{v2 => }/fluid/tests/unittests/test_memory_optimization_transpiler.py (100%) rename python/paddle/{v2 => }/fluid/tests/unittests/test_mine_hard_examples_op.py (100%) rename python/paddle/{v2 => }/fluid/tests/unittests/test_minus_op.py (100%) rename python/paddle/{v2 => }/fluid/tests/unittests/test_modified_huber_loss_op.py (100%) rename python/paddle/{v2 => }/fluid/tests/unittests/test_momentum_op.py (100%) rename python/paddle/{v2 => }/fluid/tests/unittests/test_mul_op.py (100%) rename python/paddle/{v2 => }/fluid/tests/unittests/test_multiclass_nms_op.py (100%) rename python/paddle/{v2 => }/fluid/tests/unittests/test_multihead_attention.py (100%) rename python/paddle/{v2 => }/fluid/tests/unittests/test_multiplex_op.py (100%) rename python/paddle/{v2 => }/fluid/tests/unittests/test_nce.py (100%) rename python/paddle/{v2 => }/fluid/tests/unittests/test_net.py (100%) rename python/paddle/{v2 => }/fluid/tests/unittests/test_norm_op.py (100%) rename python/paddle/{v2 => }/fluid/tests/unittests/test_normalization_wrapper.py (100%) rename python/paddle/{v2 => }/fluid/tests/unittests/test_one_hot_op.py (100%) rename python/paddle/{v2 => }/fluid/tests/unittests/test_op_support_gpu.py (100%) rename python/paddle/{v2 => }/fluid/tests/unittests/test_operator.py (100%) rename python/paddle/{v2 => }/fluid/tests/unittests/test_operator_desc.py (100%) rename python/paddle/{v2 => }/fluid/tests/unittests/test_optimizer.py (100%) rename python/paddle/{v2 => }/fluid/tests/unittests/test_pad_op.py (100%) rename python/paddle/{v2 => }/fluid/tests/unittests/test_parallel_op.py (100%) rename python/paddle/{v2 => }/fluid/tests/unittests/test_parameter.py (100%) rename python/paddle/{v2 => }/fluid/tests/unittests/test_pool2d_op.py (100%) rename python/paddle/{v2 => }/fluid/tests/unittests/test_pool3d_op.py (100%) rename python/paddle/{v2 => }/fluid/tests/unittests/test_pool_max_op.py (100%) rename python/paddle/{v2 => }/fluid/tests/unittests/test_positive_negative_pair_op.py (100%) rename python/paddle/{v2 => }/fluid/tests/unittests/test_precision_recall_op.py (100%) rename python/paddle/{v2 => }/fluid/tests/unittests/test_prelu_op.py (100%) rename python/paddle/{v2 => }/fluid/tests/unittests/test_print_op.py (100%) rename python/paddle/{v2 => }/fluid/tests/unittests/test_prior_box_op.py (100%) rename python/paddle/{v2 => }/fluid/tests/unittests/test_profiler.py (100%) rename python/paddle/{v2 => }/fluid/tests/unittests/test_program.py (100%) rename python/paddle/{v2 => }/fluid/tests/unittests/test_protobuf.py (100%) rename python/paddle/{v2 => }/fluid/tests/unittests/test_protobuf_descs.py (100%) rename python/paddle/{v2 => }/fluid/tests/unittests/test_proximal_adagrad_op.py (100%) rename python/paddle/{v2 => }/fluid/tests/unittests/test_proximal_gd_op.py (100%) rename python/paddle/{v2 => }/fluid/tests/unittests/test_rank_loss_op.py (100%) rename python/paddle/{v2 => }/fluid/tests/unittests/test_recurrent_op.py (100%) rename python/paddle/{v2 => }/fluid/tests/unittests/test_recv_op.py (100%) rename python/paddle/{v2 => }/fluid/tests/unittests/test_reduce_op.py (100%) rename python/paddle/{v2 => }/fluid/tests/unittests/test_registry.py (100%) rename python/paddle/{v2 => }/fluid/tests/unittests/test_regularizer.py (100%) rename python/paddle/{v2 => }/fluid/tests/unittests/test_reorder_lod_tensor.py (100%) rename python/paddle/{v2 => }/fluid/tests/unittests/test_reshape_op.py (100%) rename python/paddle/{v2 => }/fluid/tests/unittests/test_rmsprop_op.py (100%) rename python/paddle/{v2 => }/fluid/tests/unittests/test_rnn_memory_helper_op.py (100%) rename python/paddle/{v2 => }/fluid/tests/unittests/test_roi_pool_op.py (100%) rename python/paddle/{v2 => }/fluid/tests/unittests/test_row_conv_op.py (100%) rename python/paddle/{v2 => }/fluid/tests/unittests/test_scale_op.py (100%) rename python/paddle/{v2 => }/fluid/tests/unittests/test_scatter_op.py (100%) rename python/paddle/{v2 => }/fluid/tests/unittests/test_scope.py (100%) rename python/paddle/{v2 => }/fluid/tests/unittests/test_selected_rows.py (100%) rename python/paddle/{v2 => }/fluid/tests/unittests/test_seq_concat_op.py (100%) rename python/paddle/{v2 => }/fluid/tests/unittests/test_seq_conv.py (100%) rename python/paddle/{v2 => }/fluid/tests/unittests/test_seq_pool.py (100%) rename python/paddle/{v2 => }/fluid/tests/unittests/test_sequence_erase_op.py (100%) rename python/paddle/{v2 => }/fluid/tests/unittests/test_sequence_expand.py (100%) rename python/paddle/{v2 => }/fluid/tests/unittests/test_sequence_reshape.py (100%) rename python/paddle/{v2 => }/fluid/tests/unittests/test_sequence_slice_op.py (100%) rename python/paddle/{v2 => }/fluid/tests/unittests/test_sequence_softmax_op.py (100%) rename python/paddle/{v2 => }/fluid/tests/unittests/test_sgd_op.py (100%) rename python/paddle/{v2 => }/fluid/tests/unittests/test_shrink_rnn_memory.py (100%) rename python/paddle/{v2 => }/fluid/tests/unittests/test_sigmoid_cross_entropy_with_logits_op.py (100%) rename python/paddle/{v2 => }/fluid/tests/unittests/test_sign_op.py (100%) rename python/paddle/{v2 => }/fluid/tests/unittests/test_smooth_l1_loss_op.py (100%) rename python/paddle/{v2 => }/fluid/tests/unittests/test_softmax_op.py (100%) rename python/paddle/{v2 => }/fluid/tests/unittests/test_softmax_with_cross_entropy_op.py (100%) rename python/paddle/{v2 => }/fluid/tests/unittests/test_split_and_merge_lod_tensor_op.py (100%) rename python/paddle/{v2 => }/fluid/tests/unittests/test_split_op.py (100%) rename python/paddle/{v2 => }/fluid/tests/unittests/test_split_selected_rows_op.py (100%) rename python/paddle/{v2 => }/fluid/tests/unittests/test_split_var.py (100%) rename python/paddle/{v2 => }/fluid/tests/unittests/test_spp_op.py (100%) rename python/paddle/{v2 => }/fluid/tests/unittests/test_squared_l2_distance_op.py (100%) rename python/paddle/{v2 => }/fluid/tests/unittests/test_squared_l2_norm_op.py (100%) rename python/paddle/{v2 => }/fluid/tests/unittests/test_sum_op.py (100%) rename python/paddle/{v2 => }/fluid/tests/unittests/test_switch.py (100%) rename python/paddle/{v2 => }/fluid/tests/unittests/test_target_assign_op.py (100%) rename python/paddle/{v2 => }/fluid/tests/unittests/test_tensor.py (100%) rename python/paddle/{v2 => }/fluid/tests/unittests/test_top_k_op.py (100%) rename python/paddle/{v2 => }/fluid/tests/unittests/test_transpose_op.py (100%) rename python/paddle/{v2 => }/fluid/tests/unittests/test_uniform_random_batch_size_like_op.py (100%) rename python/paddle/{v2 => }/fluid/tests/unittests/test_uniform_random_op.py (100%) rename python/paddle/{v2 => }/fluid/tests/unittests/test_unique_name.py (100%) rename python/paddle/{v2 => }/fluid/tests/unittests/test_unpool_op.py (100%) rename python/paddle/{v2 => }/fluid/tests/unittests/test_variable.py (100%) rename python/paddle/{v2 => }/fluid/tests/unittests/test_warpctc_op.py (100%) rename python/paddle/{v2 => }/fluid/tests/unittests/test_weight_normalization.py (100%) rename python/paddle/{v2 => }/fluid/tests/unittests/test_while_op.py (100%) rename python/paddle/{v2 => }/fluid/unique_name.py (100%) diff --git a/python/paddle/v2/fluid/.gitignore b/python/paddle/fluid/.gitignore similarity index 100% rename from python/paddle/v2/fluid/.gitignore rename to python/paddle/fluid/.gitignore diff --git a/python/paddle/v2/fluid/__init__.py b/python/paddle/fluid/__init__.py similarity index 100% rename from python/paddle/v2/fluid/__init__.py rename to python/paddle/fluid/__init__.py diff --git a/python/paddle/v2/fluid/backward.py b/python/paddle/fluid/backward.py similarity index 100% rename from python/paddle/v2/fluid/backward.py rename to python/paddle/fluid/backward.py diff --git a/python/paddle/v2/fluid/clip.py b/python/paddle/fluid/clip.py similarity index 100% rename from python/paddle/v2/fluid/clip.py rename to python/paddle/fluid/clip.py diff --git a/python/paddle/v2/fluid/concurrency.py b/python/paddle/fluid/concurrency.py similarity index 100% rename from python/paddle/v2/fluid/concurrency.py rename to python/paddle/fluid/concurrency.py diff --git a/python/paddle/v2/fluid/data_feeder.py b/python/paddle/fluid/data_feeder.py similarity index 100% rename from python/paddle/v2/fluid/data_feeder.py rename to python/paddle/fluid/data_feeder.py diff --git a/python/paddle/v2/fluid/debuger.py b/python/paddle/fluid/debuger.py similarity index 100% rename from python/paddle/v2/fluid/debuger.py rename to python/paddle/fluid/debuger.py diff --git a/python/paddle/v2/fluid/default_scope_funcs.py b/python/paddle/fluid/default_scope_funcs.py similarity index 100% rename from python/paddle/v2/fluid/default_scope_funcs.py rename to python/paddle/fluid/default_scope_funcs.py diff --git a/python/paddle/v2/fluid/distribute_transpiler.py b/python/paddle/fluid/distribute_transpiler.py similarity index 100% rename from python/paddle/v2/fluid/distribute_transpiler.py rename to python/paddle/fluid/distribute_transpiler.py diff --git a/python/paddle/v2/fluid/distribute_transpiler_simple.py b/python/paddle/fluid/distribute_transpiler_simple.py similarity index 100% rename from python/paddle/v2/fluid/distribute_transpiler_simple.py rename to python/paddle/fluid/distribute_transpiler_simple.py diff --git a/python/paddle/v2/fluid/distributed_spliter.py b/python/paddle/fluid/distributed_spliter.py similarity index 100% rename from python/paddle/v2/fluid/distributed_spliter.py rename to python/paddle/fluid/distributed_spliter.py diff --git a/python/paddle/v2/fluid/evaluator.py b/python/paddle/fluid/evaluator.py similarity index 100% rename from python/paddle/v2/fluid/evaluator.py rename to python/paddle/fluid/evaluator.py diff --git a/python/paddle/v2/fluid/executor.py b/python/paddle/fluid/executor.py similarity index 100% rename from python/paddle/v2/fluid/executor.py rename to python/paddle/fluid/executor.py diff --git a/python/paddle/v2/fluid/framework.py b/python/paddle/fluid/framework.py similarity index 100% rename from python/paddle/v2/fluid/framework.py rename to python/paddle/fluid/framework.py diff --git a/python/paddle/v2/fluid/graphviz.py b/python/paddle/fluid/graphviz.py similarity index 100% rename from python/paddle/v2/fluid/graphviz.py rename to python/paddle/fluid/graphviz.py diff --git a/python/paddle/v2/fluid/initializer.py b/python/paddle/fluid/initializer.py similarity index 100% rename from python/paddle/v2/fluid/initializer.py rename to python/paddle/fluid/initializer.py diff --git a/python/paddle/v2/fluid/io.py b/python/paddle/fluid/io.py similarity index 100% rename from python/paddle/v2/fluid/io.py rename to python/paddle/fluid/io.py diff --git a/python/paddle/v2/fluid/layer_helper.py b/python/paddle/fluid/layer_helper.py similarity index 100% rename from python/paddle/v2/fluid/layer_helper.py rename to python/paddle/fluid/layer_helper.py diff --git a/python/paddle/v2/fluid/layers/__init__.py b/python/paddle/fluid/layers/__init__.py similarity index 100% rename from python/paddle/v2/fluid/layers/__init__.py rename to python/paddle/fluid/layers/__init__.py diff --git a/python/paddle/v2/fluid/layers/control_flow.py b/python/paddle/fluid/layers/control_flow.py similarity index 100% rename from python/paddle/v2/fluid/layers/control_flow.py rename to python/paddle/fluid/layers/control_flow.py diff --git a/python/paddle/v2/fluid/layers/detection.py b/python/paddle/fluid/layers/detection.py similarity index 100% rename from python/paddle/v2/fluid/layers/detection.py rename to python/paddle/fluid/layers/detection.py diff --git a/python/paddle/v2/fluid/layers/device.py b/python/paddle/fluid/layers/device.py similarity index 100% rename from python/paddle/v2/fluid/layers/device.py rename to python/paddle/fluid/layers/device.py diff --git a/python/paddle/v2/fluid/layers/io.py b/python/paddle/fluid/layers/io.py similarity index 100% rename from python/paddle/v2/fluid/layers/io.py rename to python/paddle/fluid/layers/io.py diff --git a/python/paddle/v2/fluid/layers/layer_function_generator.py b/python/paddle/fluid/layers/layer_function_generator.py similarity index 100% rename from python/paddle/v2/fluid/layers/layer_function_generator.py rename to python/paddle/fluid/layers/layer_function_generator.py diff --git a/python/paddle/v2/fluid/layers/math_op_patch.py b/python/paddle/fluid/layers/math_op_patch.py similarity index 100% rename from python/paddle/v2/fluid/layers/math_op_patch.py rename to python/paddle/fluid/layers/math_op_patch.py diff --git a/python/paddle/v2/fluid/layers/nn.py b/python/paddle/fluid/layers/nn.py similarity index 100% rename from python/paddle/v2/fluid/layers/nn.py rename to python/paddle/fluid/layers/nn.py diff --git a/python/paddle/v2/fluid/layers/ops.py b/python/paddle/fluid/layers/ops.py similarity index 100% rename from python/paddle/v2/fluid/layers/ops.py rename to python/paddle/fluid/layers/ops.py diff --git a/python/paddle/v2/fluid/layers/tensor.py b/python/paddle/fluid/layers/tensor.py similarity index 100% rename from python/paddle/v2/fluid/layers/tensor.py rename to python/paddle/fluid/layers/tensor.py diff --git a/python/paddle/v2/fluid/learning_rate_decay.py b/python/paddle/fluid/learning_rate_decay.py similarity index 100% rename from python/paddle/v2/fluid/learning_rate_decay.py rename to python/paddle/fluid/learning_rate_decay.py diff --git a/python/paddle/v2/fluid/memory_optimization_transpiler.py b/python/paddle/fluid/memory_optimization_transpiler.py similarity index 100% rename from python/paddle/v2/fluid/memory_optimization_transpiler.py rename to python/paddle/fluid/memory_optimization_transpiler.py diff --git a/python/paddle/v2/fluid/net_drawer.py b/python/paddle/fluid/net_drawer.py similarity index 100% rename from python/paddle/v2/fluid/net_drawer.py rename to python/paddle/fluid/net_drawer.py diff --git a/python/paddle/v2/fluid/nets.py b/python/paddle/fluid/nets.py similarity index 100% rename from python/paddle/v2/fluid/nets.py rename to python/paddle/fluid/nets.py diff --git a/python/paddle/v2/fluid/op.py b/python/paddle/fluid/op.py similarity index 100% rename from python/paddle/v2/fluid/op.py rename to python/paddle/fluid/op.py diff --git a/python/paddle/v2/fluid/optimizer.py b/python/paddle/fluid/optimizer.py similarity index 100% rename from python/paddle/v2/fluid/optimizer.py rename to python/paddle/fluid/optimizer.py diff --git a/python/paddle/v2/fluid/param_attr.py b/python/paddle/fluid/param_attr.py similarity index 100% rename from python/paddle/v2/fluid/param_attr.py rename to python/paddle/fluid/param_attr.py diff --git a/python/paddle/v2/fluid/profiler.py b/python/paddle/fluid/profiler.py similarity index 100% rename from python/paddle/v2/fluid/profiler.py rename to python/paddle/fluid/profiler.py diff --git a/python/paddle/v2/fluid/regularizer.py b/python/paddle/fluid/regularizer.py similarity index 100% rename from python/paddle/v2/fluid/regularizer.py rename to python/paddle/fluid/regularizer.py diff --git a/python/paddle/v2/fluid/tests/.gitignore b/python/paddle/fluid/tests/.gitignore similarity index 100% rename from python/paddle/v2/fluid/tests/.gitignore rename to python/paddle/fluid/tests/.gitignore diff --git a/python/paddle/v2/fluid/tests/CMakeLists.txt b/python/paddle/fluid/tests/CMakeLists.txt similarity index 100% rename from python/paddle/v2/fluid/tests/CMakeLists.txt rename to python/paddle/fluid/tests/CMakeLists.txt diff --git a/python/paddle/v2/fluid/tests/__init__.py b/python/paddle/fluid/tests/__init__.py similarity index 100% rename from python/paddle/v2/fluid/tests/__init__.py rename to python/paddle/fluid/tests/__init__.py diff --git a/python/paddle/v2/fluid/tests/book/.gitignore b/python/paddle/fluid/tests/book/.gitignore similarity index 100% rename from python/paddle/v2/fluid/tests/book/.gitignore rename to python/paddle/fluid/tests/book/.gitignore diff --git a/python/paddle/v2/fluid/tests/book/CMakeLists.txt b/python/paddle/fluid/tests/book/CMakeLists.txt similarity index 100% rename from python/paddle/v2/fluid/tests/book/CMakeLists.txt rename to python/paddle/fluid/tests/book/CMakeLists.txt diff --git a/python/paddle/v2/fluid/tests/book/__init__.py b/python/paddle/fluid/tests/book/__init__.py similarity index 100% rename from python/paddle/v2/fluid/tests/book/__init__.py rename to python/paddle/fluid/tests/book/__init__.py diff --git a/python/paddle/v2/fluid/tests/book/notest_rnn_encoder_decoer.py b/python/paddle/fluid/tests/book/notest_rnn_encoder_decoer.py similarity index 100% rename from python/paddle/v2/fluid/tests/book/notest_rnn_encoder_decoer.py rename to python/paddle/fluid/tests/book/notest_rnn_encoder_decoer.py diff --git a/python/paddle/v2/fluid/tests/book/test_fit_a_line.py b/python/paddle/fluid/tests/book/test_fit_a_line.py similarity index 100% rename from python/paddle/v2/fluid/tests/book/test_fit_a_line.py rename to python/paddle/fluid/tests/book/test_fit_a_line.py diff --git a/python/paddle/v2/fluid/tests/book/test_image_classification.py b/python/paddle/fluid/tests/book/test_image_classification.py similarity index 100% rename from python/paddle/v2/fluid/tests/book/test_image_classification.py rename to python/paddle/fluid/tests/book/test_image_classification.py diff --git a/python/paddle/v2/fluid/tests/book/test_label_semantic_roles.py b/python/paddle/fluid/tests/book/test_label_semantic_roles.py similarity index 100% rename from python/paddle/v2/fluid/tests/book/test_label_semantic_roles.py rename to python/paddle/fluid/tests/book/test_label_semantic_roles.py diff --git a/python/paddle/v2/fluid/tests/book/test_machine_translation.py b/python/paddle/fluid/tests/book/test_machine_translation.py similarity index 100% rename from python/paddle/v2/fluid/tests/book/test_machine_translation.py rename to python/paddle/fluid/tests/book/test_machine_translation.py diff --git a/python/paddle/v2/fluid/tests/book/test_recognize_digits.py b/python/paddle/fluid/tests/book/test_recognize_digits.py similarity index 100% rename from python/paddle/v2/fluid/tests/book/test_recognize_digits.py rename to python/paddle/fluid/tests/book/test_recognize_digits.py diff --git a/python/paddle/v2/fluid/tests/book/test_recommender_system.py b/python/paddle/fluid/tests/book/test_recommender_system.py similarity index 100% rename from python/paddle/v2/fluid/tests/book/test_recommender_system.py rename to python/paddle/fluid/tests/book/test_recommender_system.py diff --git a/python/paddle/v2/fluid/tests/book/test_understand_sentiment.py b/python/paddle/fluid/tests/book/test_understand_sentiment.py similarity index 100% rename from python/paddle/v2/fluid/tests/book/test_understand_sentiment.py rename to python/paddle/fluid/tests/book/test_understand_sentiment.py diff --git a/python/paddle/v2/fluid/tests/book/test_word2vec.py b/python/paddle/fluid/tests/book/test_word2vec.py similarity index 100% rename from python/paddle/v2/fluid/tests/book/test_word2vec.py rename to python/paddle/fluid/tests/book/test_word2vec.py diff --git a/python/paddle/v2/fluid/tests/book_distribute/CMakeLists.txt b/python/paddle/fluid/tests/book_distribute/CMakeLists.txt similarity index 100% rename from python/paddle/v2/fluid/tests/book_distribute/CMakeLists.txt rename to python/paddle/fluid/tests/book_distribute/CMakeLists.txt diff --git a/python/paddle/v2/fluid/tests/book_distribute/notest_dist_fit_a_line.py b/python/paddle/fluid/tests/book_distribute/notest_dist_fit_a_line.py similarity index 100% rename from python/paddle/v2/fluid/tests/book_distribute/notest_dist_fit_a_line.py rename to python/paddle/fluid/tests/book_distribute/notest_dist_fit_a_line.py diff --git a/python/paddle/v2/fluid/tests/book_distribute/notest_dist_image_classification.py b/python/paddle/fluid/tests/book_distribute/notest_dist_image_classification.py similarity index 100% rename from python/paddle/v2/fluid/tests/book_distribute/notest_dist_image_classification.py rename to python/paddle/fluid/tests/book_distribute/notest_dist_image_classification.py diff --git a/python/paddle/v2/fluid/tests/book_distribute/notest_dist_label_semantic_roles.py b/python/paddle/fluid/tests/book_distribute/notest_dist_label_semantic_roles.py similarity index 100% rename from python/paddle/v2/fluid/tests/book_distribute/notest_dist_label_semantic_roles.py rename to python/paddle/fluid/tests/book_distribute/notest_dist_label_semantic_roles.py diff --git a/python/paddle/v2/fluid/tests/book_distribute/notest_dist_word2vec.py b/python/paddle/fluid/tests/book_distribute/notest_dist_word2vec.py similarity index 100% rename from python/paddle/v2/fluid/tests/book_distribute/notest_dist_word2vec.py rename to python/paddle/fluid/tests/book_distribute/notest_dist_word2vec.py diff --git a/python/paddle/v2/fluid/tests/book_distribute/notest_machine_translation.py b/python/paddle/fluid/tests/book_distribute/notest_machine_translation.py similarity index 100% rename from python/paddle/v2/fluid/tests/book_distribute/notest_machine_translation.py rename to python/paddle/fluid/tests/book_distribute/notest_machine_translation.py diff --git a/python/paddle/v2/fluid/tests/book_distribute/notest_recognize_digits_conv_dist.py b/python/paddle/fluid/tests/book_distribute/notest_recognize_digits_conv_dist.py similarity index 100% rename from python/paddle/v2/fluid/tests/book_distribute/notest_recognize_digits_conv_dist.py rename to python/paddle/fluid/tests/book_distribute/notest_recognize_digits_conv_dist.py diff --git a/python/paddle/v2/fluid/tests/book_distribute/notest_recognize_digits_mlp_dist.py b/python/paddle/fluid/tests/book_distribute/notest_recognize_digits_mlp_dist.py similarity index 100% rename from python/paddle/v2/fluid/tests/book_distribute/notest_recognize_digits_mlp_dist.py rename to python/paddle/fluid/tests/book_distribute/notest_recognize_digits_mlp_dist.py diff --git a/python/paddle/v2/fluid/tests/book_distribute/notest_recommender_system_dist.py b/python/paddle/fluid/tests/book_distribute/notest_recommender_system_dist.py similarity index 100% rename from python/paddle/v2/fluid/tests/book_distribute/notest_recommender_system_dist.py rename to python/paddle/fluid/tests/book_distribute/notest_recommender_system_dist.py diff --git a/python/paddle/v2/fluid/tests/book_distribute/notest_understand_sentiment_conv_dist.py b/python/paddle/fluid/tests/book_distribute/notest_understand_sentiment_conv_dist.py similarity index 100% rename from python/paddle/v2/fluid/tests/book_distribute/notest_understand_sentiment_conv_dist.py rename to python/paddle/fluid/tests/book_distribute/notest_understand_sentiment_conv_dist.py diff --git a/python/paddle/v2/fluid/tests/book_distribute/notest_understand_sentiment_dynamic_lstm.py b/python/paddle/fluid/tests/book_distribute/notest_understand_sentiment_dynamic_lstm.py similarity index 100% rename from python/paddle/v2/fluid/tests/book_distribute/notest_understand_sentiment_dynamic_lstm.py rename to python/paddle/fluid/tests/book_distribute/notest_understand_sentiment_dynamic_lstm.py diff --git a/python/paddle/v2/fluid/tests/book_memory_optimization/CMakeLists.txt b/python/paddle/fluid/tests/book_memory_optimization/CMakeLists.txt similarity index 100% rename from python/paddle/v2/fluid/tests/book_memory_optimization/CMakeLists.txt rename to python/paddle/fluid/tests/book_memory_optimization/CMakeLists.txt diff --git a/python/paddle/v2/fluid/tests/book_memory_optimization/test_memopt_fit_a_line.py b/python/paddle/fluid/tests/book_memory_optimization/test_memopt_fit_a_line.py similarity index 100% rename from python/paddle/v2/fluid/tests/book_memory_optimization/test_memopt_fit_a_line.py rename to python/paddle/fluid/tests/book_memory_optimization/test_memopt_fit_a_line.py diff --git a/python/paddle/v2/fluid/tests/book_memory_optimization/test_memopt_image_classification_train.py b/python/paddle/fluid/tests/book_memory_optimization/test_memopt_image_classification_train.py similarity index 100% rename from python/paddle/v2/fluid/tests/book_memory_optimization/test_memopt_image_classification_train.py rename to python/paddle/fluid/tests/book_memory_optimization/test_memopt_image_classification_train.py diff --git a/python/paddle/v2/fluid/tests/book_memory_optimization/test_memopt_machine_translation.py b/python/paddle/fluid/tests/book_memory_optimization/test_memopt_machine_translation.py similarity index 100% rename from python/paddle/v2/fluid/tests/book_memory_optimization/test_memopt_machine_translation.py rename to python/paddle/fluid/tests/book_memory_optimization/test_memopt_machine_translation.py diff --git a/python/paddle/v2/fluid/tests/demo/fc_gan.py b/python/paddle/fluid/tests/demo/fc_gan.py similarity index 100% rename from python/paddle/v2/fluid/tests/demo/fc_gan.py rename to python/paddle/fluid/tests/demo/fc_gan.py diff --git a/python/paddle/v2/fluid/tests/notest_concurrency.py b/python/paddle/fluid/tests/notest_concurrency.py similarity index 100% rename from python/paddle/v2/fluid/tests/notest_concurrency.py rename to python/paddle/fluid/tests/notest_concurrency.py diff --git a/python/paddle/v2/fluid/tests/notest_csp.py b/python/paddle/fluid/tests/notest_csp.py similarity index 100% rename from python/paddle/v2/fluid/tests/notest_csp.py rename to python/paddle/fluid/tests/notest_csp.py diff --git a/python/paddle/v2/fluid/tests/test_cpp_reader.py b/python/paddle/fluid/tests/test_cpp_reader.py similarity index 100% rename from python/paddle/v2/fluid/tests/test_cpp_reader.py rename to python/paddle/fluid/tests/test_cpp_reader.py diff --git a/python/paddle/v2/fluid/tests/test_data_feeder.py b/python/paddle/fluid/tests/test_data_feeder.py similarity index 100% rename from python/paddle/v2/fluid/tests/test_data_feeder.py rename to python/paddle/fluid/tests/test_data_feeder.py diff --git a/python/paddle/v2/fluid/tests/test_detection.py b/python/paddle/fluid/tests/test_detection.py similarity index 100% rename from python/paddle/v2/fluid/tests/test_detection.py rename to python/paddle/fluid/tests/test_detection.py diff --git a/python/paddle/v2/fluid/tests/test_error_clip.py b/python/paddle/fluid/tests/test_error_clip.py similarity index 100% rename from python/paddle/v2/fluid/tests/test_error_clip.py rename to python/paddle/fluid/tests/test_error_clip.py diff --git a/python/paddle/v2/fluid/tests/test_gradient_clip.py b/python/paddle/fluid/tests/test_gradient_clip.py similarity index 100% rename from python/paddle/v2/fluid/tests/test_gradient_clip.py rename to python/paddle/fluid/tests/test_gradient_clip.py diff --git a/python/paddle/v2/fluid/tests/test_mnist_if_else_op.py b/python/paddle/fluid/tests/test_mnist_if_else_op.py similarity index 100% rename from python/paddle/v2/fluid/tests/test_mnist_if_else_op.py rename to python/paddle/fluid/tests/test_mnist_if_else_op.py diff --git a/python/paddle/v2/fluid/tests/test_python_operator_overriding.py b/python/paddle/fluid/tests/test_python_operator_overriding.py similarity index 100% rename from python/paddle/v2/fluid/tests/test_python_operator_overriding.py rename to python/paddle/fluid/tests/test_python_operator_overriding.py diff --git a/python/paddle/v2/fluid/tests/unittests/CMakeLists.txt b/python/paddle/fluid/tests/unittests/CMakeLists.txt similarity index 100% rename from python/paddle/v2/fluid/tests/unittests/CMakeLists.txt rename to python/paddle/fluid/tests/unittests/CMakeLists.txt diff --git a/python/paddle/v2/fluid/tests/unittests/__init__.py b/python/paddle/fluid/tests/unittests/__init__.py similarity index 100% rename from python/paddle/v2/fluid/tests/unittests/__init__.py rename to python/paddle/fluid/tests/unittests/__init__.py diff --git a/python/paddle/v2/fluid/tests/unittests/decorators.py b/python/paddle/fluid/tests/unittests/decorators.py similarity index 100% rename from python/paddle/v2/fluid/tests/unittests/decorators.py rename to python/paddle/fluid/tests/unittests/decorators.py diff --git a/python/paddle/v2/fluid/tests/unittests/op_test.py b/python/paddle/fluid/tests/unittests/op_test.py similarity index 100% rename from python/paddle/v2/fluid/tests/unittests/op_test.py rename to python/paddle/fluid/tests/unittests/op_test.py diff --git a/python/paddle/v2/fluid/tests/unittests/test_accuracy_op.py b/python/paddle/fluid/tests/unittests/test_accuracy_op.py similarity index 100% rename from python/paddle/v2/fluid/tests/unittests/test_accuracy_op.py rename to python/paddle/fluid/tests/unittests/test_accuracy_op.py diff --git a/python/paddle/v2/fluid/tests/unittests/test_activation_op.py b/python/paddle/fluid/tests/unittests/test_activation_op.py similarity index 100% rename from python/paddle/v2/fluid/tests/unittests/test_activation_op.py rename to python/paddle/fluid/tests/unittests/test_activation_op.py diff --git a/python/paddle/v2/fluid/tests/unittests/test_adadelta_op.py b/python/paddle/fluid/tests/unittests/test_adadelta_op.py similarity index 100% rename from python/paddle/v2/fluid/tests/unittests/test_adadelta_op.py rename to python/paddle/fluid/tests/unittests/test_adadelta_op.py diff --git a/python/paddle/v2/fluid/tests/unittests/test_adagrad_op.py b/python/paddle/fluid/tests/unittests/test_adagrad_op.py similarity index 100% rename from python/paddle/v2/fluid/tests/unittests/test_adagrad_op.py rename to python/paddle/fluid/tests/unittests/test_adagrad_op.py diff --git a/python/paddle/v2/fluid/tests/unittests/test_adam_op.py b/python/paddle/fluid/tests/unittests/test_adam_op.py similarity index 100% rename from python/paddle/v2/fluid/tests/unittests/test_adam_op.py rename to python/paddle/fluid/tests/unittests/test_adam_op.py diff --git a/python/paddle/v2/fluid/tests/unittests/test_adamax_op.py b/python/paddle/fluid/tests/unittests/test_adamax_op.py similarity index 100% rename from python/paddle/v2/fluid/tests/unittests/test_adamax_op.py rename to python/paddle/fluid/tests/unittests/test_adamax_op.py diff --git a/python/paddle/v2/fluid/tests/unittests/test_array_read_write_op.py b/python/paddle/fluid/tests/unittests/test_array_read_write_op.py similarity index 100% rename from python/paddle/v2/fluid/tests/unittests/test_array_read_write_op.py rename to python/paddle/fluid/tests/unittests/test_array_read_write_op.py diff --git a/python/paddle/v2/fluid/tests/unittests/test_assign_op.py b/python/paddle/fluid/tests/unittests/test_assign_op.py similarity index 100% rename from python/paddle/v2/fluid/tests/unittests/test_assign_op.py rename to python/paddle/fluid/tests/unittests/test_assign_op.py diff --git a/python/paddle/v2/fluid/tests/unittests/test_assign_value_op.py b/python/paddle/fluid/tests/unittests/test_assign_value_op.py similarity index 100% rename from python/paddle/v2/fluid/tests/unittests/test_assign_value_op.py rename to python/paddle/fluid/tests/unittests/test_assign_value_op.py diff --git a/python/paddle/v2/fluid/tests/unittests/test_auc_op.py b/python/paddle/fluid/tests/unittests/test_auc_op.py similarity index 100% rename from python/paddle/v2/fluid/tests/unittests/test_auc_op.py rename to python/paddle/fluid/tests/unittests/test_auc_op.py diff --git a/python/paddle/v2/fluid/tests/unittests/test_batch_norm_op.py b/python/paddle/fluid/tests/unittests/test_batch_norm_op.py similarity index 100% rename from python/paddle/v2/fluid/tests/unittests/test_batch_norm_op.py rename to python/paddle/fluid/tests/unittests/test_batch_norm_op.py diff --git a/python/paddle/v2/fluid/tests/unittests/test_beam_search_decode_op.py b/python/paddle/fluid/tests/unittests/test_beam_search_decode_op.py similarity index 100% rename from python/paddle/v2/fluid/tests/unittests/test_beam_search_decode_op.py rename to python/paddle/fluid/tests/unittests/test_beam_search_decode_op.py diff --git a/python/paddle/v2/fluid/tests/unittests/test_beam_search_op.py b/python/paddle/fluid/tests/unittests/test_beam_search_op.py similarity index 100% rename from python/paddle/v2/fluid/tests/unittests/test_beam_search_op.py rename to python/paddle/fluid/tests/unittests/test_beam_search_op.py diff --git a/python/paddle/v2/fluid/tests/unittests/test_bilinear_tensor_product_op.py b/python/paddle/fluid/tests/unittests/test_bilinear_tensor_product_op.py similarity index 100% rename from python/paddle/v2/fluid/tests/unittests/test_bilinear_tensor_product_op.py rename to python/paddle/fluid/tests/unittests/test_bilinear_tensor_product_op.py diff --git a/python/paddle/v2/fluid/tests/unittests/test_bipartite_match_op.py b/python/paddle/fluid/tests/unittests/test_bipartite_match_op.py similarity index 100% rename from python/paddle/v2/fluid/tests/unittests/test_bipartite_match_op.py rename to python/paddle/fluid/tests/unittests/test_bipartite_match_op.py diff --git a/python/paddle/v2/fluid/tests/unittests/test_box_coder_op.py b/python/paddle/fluid/tests/unittests/test_box_coder_op.py similarity index 100% rename from python/paddle/v2/fluid/tests/unittests/test_box_coder_op.py rename to python/paddle/fluid/tests/unittests/test_box_coder_op.py diff --git a/python/paddle/v2/fluid/tests/unittests/test_calc_gradient.py b/python/paddle/fluid/tests/unittests/test_calc_gradient.py similarity index 100% rename from python/paddle/v2/fluid/tests/unittests/test_calc_gradient.py rename to python/paddle/fluid/tests/unittests/test_calc_gradient.py diff --git a/python/paddle/v2/fluid/tests/unittests/test_cast_op.py b/python/paddle/fluid/tests/unittests/test_cast_op.py similarity index 100% rename from python/paddle/v2/fluid/tests/unittests/test_cast_op.py rename to python/paddle/fluid/tests/unittests/test_cast_op.py diff --git a/python/paddle/v2/fluid/tests/unittests/test_chunk_eval_op.py b/python/paddle/fluid/tests/unittests/test_chunk_eval_op.py similarity index 100% rename from python/paddle/v2/fluid/tests/unittests/test_chunk_eval_op.py rename to python/paddle/fluid/tests/unittests/test_chunk_eval_op.py diff --git a/python/paddle/v2/fluid/tests/unittests/test_clip_by_norm_op.py b/python/paddle/fluid/tests/unittests/test_clip_by_norm_op.py similarity index 100% rename from python/paddle/v2/fluid/tests/unittests/test_clip_by_norm_op.py rename to python/paddle/fluid/tests/unittests/test_clip_by_norm_op.py diff --git a/python/paddle/v2/fluid/tests/unittests/test_clip_op.py b/python/paddle/fluid/tests/unittests/test_clip_op.py similarity index 100% rename from python/paddle/v2/fluid/tests/unittests/test_clip_op.py rename to python/paddle/fluid/tests/unittests/test_clip_op.py diff --git a/python/paddle/v2/fluid/tests/unittests/test_compare_op.py b/python/paddle/fluid/tests/unittests/test_compare_op.py similarity index 100% rename from python/paddle/v2/fluid/tests/unittests/test_compare_op.py rename to python/paddle/fluid/tests/unittests/test_compare_op.py diff --git a/python/paddle/v2/fluid/tests/unittests/test_concat_op.py b/python/paddle/fluid/tests/unittests/test_concat_op.py similarity index 100% rename from python/paddle/v2/fluid/tests/unittests/test_concat_op.py rename to python/paddle/fluid/tests/unittests/test_concat_op.py diff --git a/python/paddle/v2/fluid/tests/unittests/test_cond_op.py b/python/paddle/fluid/tests/unittests/test_cond_op.py similarity index 100% rename from python/paddle/v2/fluid/tests/unittests/test_cond_op.py rename to python/paddle/fluid/tests/unittests/test_cond_op.py diff --git a/python/paddle/v2/fluid/tests/unittests/test_conditional_block.py b/python/paddle/fluid/tests/unittests/test_conditional_block.py similarity index 100% rename from python/paddle/v2/fluid/tests/unittests/test_conditional_block.py rename to python/paddle/fluid/tests/unittests/test_conditional_block.py diff --git a/python/paddle/v2/fluid/tests/unittests/test_const_value.py b/python/paddle/fluid/tests/unittests/test_const_value.py similarity index 100% rename from python/paddle/v2/fluid/tests/unittests/test_const_value.py rename to python/paddle/fluid/tests/unittests/test_const_value.py diff --git a/python/paddle/v2/fluid/tests/unittests/test_conv2d_op.py b/python/paddle/fluid/tests/unittests/test_conv2d_op.py similarity index 100% rename from python/paddle/v2/fluid/tests/unittests/test_conv2d_op.py rename to python/paddle/fluid/tests/unittests/test_conv2d_op.py diff --git a/python/paddle/v2/fluid/tests/unittests/test_conv2d_transpose_op.py b/python/paddle/fluid/tests/unittests/test_conv2d_transpose_op.py similarity index 100% rename from python/paddle/v2/fluid/tests/unittests/test_conv2d_transpose_op.py rename to python/paddle/fluid/tests/unittests/test_conv2d_transpose_op.py diff --git a/python/paddle/v2/fluid/tests/unittests/test_conv3d_op.py b/python/paddle/fluid/tests/unittests/test_conv3d_op.py similarity index 100% rename from python/paddle/v2/fluid/tests/unittests/test_conv3d_op.py rename to python/paddle/fluid/tests/unittests/test_conv3d_op.py diff --git a/python/paddle/v2/fluid/tests/unittests/test_conv3d_transpose_op.py b/python/paddle/fluid/tests/unittests/test_conv3d_transpose_op.py similarity index 100% rename from python/paddle/v2/fluid/tests/unittests/test_conv3d_transpose_op.py rename to python/paddle/fluid/tests/unittests/test_conv3d_transpose_op.py diff --git a/python/paddle/v2/fluid/tests/unittests/test_conv_shift_op.py b/python/paddle/fluid/tests/unittests/test_conv_shift_op.py similarity index 100% rename from python/paddle/v2/fluid/tests/unittests/test_conv_shift_op.py rename to python/paddle/fluid/tests/unittests/test_conv_shift_op.py diff --git a/python/paddle/v2/fluid/tests/unittests/test_cos_sim_op.py b/python/paddle/fluid/tests/unittests/test_cos_sim_op.py similarity index 100% rename from python/paddle/v2/fluid/tests/unittests/test_cos_sim_op.py rename to python/paddle/fluid/tests/unittests/test_cos_sim_op.py diff --git a/python/paddle/v2/fluid/tests/unittests/test_create_op_doc_string.py b/python/paddle/fluid/tests/unittests/test_create_op_doc_string.py similarity index 100% rename from python/paddle/v2/fluid/tests/unittests/test_create_op_doc_string.py rename to python/paddle/fluid/tests/unittests/test_create_op_doc_string.py diff --git a/python/paddle/v2/fluid/tests/unittests/test_crf_decoding_op.py b/python/paddle/fluid/tests/unittests/test_crf_decoding_op.py similarity index 100% rename from python/paddle/v2/fluid/tests/unittests/test_crf_decoding_op.py rename to python/paddle/fluid/tests/unittests/test_crf_decoding_op.py diff --git a/python/paddle/v2/fluid/tests/unittests/test_crop_op.py b/python/paddle/fluid/tests/unittests/test_crop_op.py similarity index 100% rename from python/paddle/v2/fluid/tests/unittests/test_crop_op.py rename to python/paddle/fluid/tests/unittests/test_crop_op.py diff --git a/python/paddle/v2/fluid/tests/unittests/test_cross_entropy_op.py b/python/paddle/fluid/tests/unittests/test_cross_entropy_op.py similarity index 100% rename from python/paddle/v2/fluid/tests/unittests/test_cross_entropy_op.py rename to python/paddle/fluid/tests/unittests/test_cross_entropy_op.py diff --git a/python/paddle/v2/fluid/tests/unittests/test_ctc_align.py b/python/paddle/fluid/tests/unittests/test_ctc_align.py similarity index 100% rename from python/paddle/v2/fluid/tests/unittests/test_ctc_align.py rename to python/paddle/fluid/tests/unittests/test_ctc_align.py diff --git a/python/paddle/v2/fluid/tests/unittests/test_cumsum_op.py b/python/paddle/fluid/tests/unittests/test_cumsum_op.py similarity index 100% rename from python/paddle/v2/fluid/tests/unittests/test_cumsum_op.py rename to python/paddle/fluid/tests/unittests/test_cumsum_op.py diff --git a/python/paddle/v2/fluid/tests/unittests/test_decayed_adagrad_op.py b/python/paddle/fluid/tests/unittests/test_decayed_adagrad_op.py similarity index 100% rename from python/paddle/v2/fluid/tests/unittests/test_decayed_adagrad_op.py rename to python/paddle/fluid/tests/unittests/test_decayed_adagrad_op.py diff --git a/python/paddle/v2/fluid/tests/unittests/test_default_scope_funcs.py b/python/paddle/fluid/tests/unittests/test_default_scope_funcs.py similarity index 100% rename from python/paddle/v2/fluid/tests/unittests/test_default_scope_funcs.py rename to python/paddle/fluid/tests/unittests/test_default_scope_funcs.py diff --git a/python/paddle/v2/fluid/tests/unittests/test_detection_map_op.py b/python/paddle/fluid/tests/unittests/test_detection_map_op.py similarity index 100% rename from python/paddle/v2/fluid/tests/unittests/test_detection_map_op.py rename to python/paddle/fluid/tests/unittests/test_detection_map_op.py diff --git a/python/paddle/v2/fluid/tests/unittests/test_detection_output_op.py b/python/paddle/fluid/tests/unittests/test_detection_output_op.py similarity index 100% rename from python/paddle/v2/fluid/tests/unittests/test_detection_output_op.py rename to python/paddle/fluid/tests/unittests/test_detection_output_op.py diff --git a/python/paddle/v2/fluid/tests/unittests/test_dropout_op.py b/python/paddle/fluid/tests/unittests/test_dropout_op.py similarity index 100% rename from python/paddle/v2/fluid/tests/unittests/test_dropout_op.py rename to python/paddle/fluid/tests/unittests/test_dropout_op.py diff --git a/python/paddle/v2/fluid/tests/unittests/test_dyn_rnn.py b/python/paddle/fluid/tests/unittests/test_dyn_rnn.py similarity index 100% rename from python/paddle/v2/fluid/tests/unittests/test_dyn_rnn.py rename to python/paddle/fluid/tests/unittests/test_dyn_rnn.py diff --git a/python/paddle/v2/fluid/tests/unittests/test_dynrnn_gradient_check.py b/python/paddle/fluid/tests/unittests/test_dynrnn_gradient_check.py similarity index 100% rename from python/paddle/v2/fluid/tests/unittests/test_dynrnn_gradient_check.py rename to python/paddle/fluid/tests/unittests/test_dynrnn_gradient_check.py diff --git a/python/paddle/v2/fluid/tests/unittests/test_dynrnn_static_input.py b/python/paddle/fluid/tests/unittests/test_dynrnn_static_input.py similarity index 100% rename from python/paddle/v2/fluid/tests/unittests/test_dynrnn_static_input.py rename to python/paddle/fluid/tests/unittests/test_dynrnn_static_input.py diff --git a/python/paddle/v2/fluid/tests/unittests/test_edit_distance_op.py b/python/paddle/fluid/tests/unittests/test_edit_distance_op.py similarity index 100% rename from python/paddle/v2/fluid/tests/unittests/test_edit_distance_op.py rename to python/paddle/fluid/tests/unittests/test_edit_distance_op.py diff --git a/python/paddle/v2/fluid/tests/unittests/test_elementwise_add_op.py b/python/paddle/fluid/tests/unittests/test_elementwise_add_op.py similarity index 100% rename from python/paddle/v2/fluid/tests/unittests/test_elementwise_add_op.py rename to python/paddle/fluid/tests/unittests/test_elementwise_add_op.py diff --git a/python/paddle/v2/fluid/tests/unittests/test_elementwise_div_op.py b/python/paddle/fluid/tests/unittests/test_elementwise_div_op.py similarity index 100% rename from python/paddle/v2/fluid/tests/unittests/test_elementwise_div_op.py rename to python/paddle/fluid/tests/unittests/test_elementwise_div_op.py diff --git a/python/paddle/v2/fluid/tests/unittests/test_elementwise_max_op.py b/python/paddle/fluid/tests/unittests/test_elementwise_max_op.py similarity index 100% rename from python/paddle/v2/fluid/tests/unittests/test_elementwise_max_op.py rename to python/paddle/fluid/tests/unittests/test_elementwise_max_op.py diff --git a/python/paddle/v2/fluid/tests/unittests/test_elementwise_min_op.py b/python/paddle/fluid/tests/unittests/test_elementwise_min_op.py similarity index 100% rename from python/paddle/v2/fluid/tests/unittests/test_elementwise_min_op.py rename to python/paddle/fluid/tests/unittests/test_elementwise_min_op.py diff --git a/python/paddle/v2/fluid/tests/unittests/test_elementwise_mul_op.py b/python/paddle/fluid/tests/unittests/test_elementwise_mul_op.py similarity index 100% rename from python/paddle/v2/fluid/tests/unittests/test_elementwise_mul_op.py rename to python/paddle/fluid/tests/unittests/test_elementwise_mul_op.py diff --git a/python/paddle/v2/fluid/tests/unittests/test_elementwise_pow_op.py b/python/paddle/fluid/tests/unittests/test_elementwise_pow_op.py similarity index 100% rename from python/paddle/v2/fluid/tests/unittests/test_elementwise_pow_op.py rename to python/paddle/fluid/tests/unittests/test_elementwise_pow_op.py diff --git a/python/paddle/v2/fluid/tests/unittests/test_elementwise_sub_op.py b/python/paddle/fluid/tests/unittests/test_elementwise_sub_op.py similarity index 100% rename from python/paddle/v2/fluid/tests/unittests/test_elementwise_sub_op.py rename to python/paddle/fluid/tests/unittests/test_elementwise_sub_op.py diff --git a/python/paddle/v2/fluid/tests/unittests/test_exception.py b/python/paddle/fluid/tests/unittests/test_exception.py similarity index 100% rename from python/paddle/v2/fluid/tests/unittests/test_exception.py rename to python/paddle/fluid/tests/unittests/test_exception.py diff --git a/python/paddle/v2/fluid/tests/unittests/test_executor_and_mul.py b/python/paddle/fluid/tests/unittests/test_executor_and_mul.py similarity index 100% rename from python/paddle/v2/fluid/tests/unittests/test_executor_and_mul.py rename to python/paddle/fluid/tests/unittests/test_executor_and_mul.py diff --git a/python/paddle/v2/fluid/tests/unittests/test_expand_op.py b/python/paddle/fluid/tests/unittests/test_expand_op.py similarity index 100% rename from python/paddle/v2/fluid/tests/unittests/test_expand_op.py rename to python/paddle/fluid/tests/unittests/test_expand_op.py diff --git a/python/paddle/v2/fluid/tests/unittests/test_feed_fetch_method.py b/python/paddle/fluid/tests/unittests/test_feed_fetch_method.py similarity index 100% rename from python/paddle/v2/fluid/tests/unittests/test_feed_fetch_method.py rename to python/paddle/fluid/tests/unittests/test_feed_fetch_method.py diff --git a/python/paddle/v2/fluid/tests/unittests/test_fetch_var.py b/python/paddle/fluid/tests/unittests/test_fetch_var.py similarity index 100% rename from python/paddle/v2/fluid/tests/unittests/test_fetch_var.py rename to python/paddle/fluid/tests/unittests/test_fetch_var.py diff --git a/python/paddle/v2/fluid/tests/unittests/test_fill_constant_batch_size_like_op.py b/python/paddle/fluid/tests/unittests/test_fill_constant_batch_size_like_op.py similarity index 100% rename from python/paddle/v2/fluid/tests/unittests/test_fill_constant_batch_size_like_op.py rename to python/paddle/fluid/tests/unittests/test_fill_constant_batch_size_like_op.py diff --git a/python/paddle/v2/fluid/tests/unittests/test_fill_constant_op.py b/python/paddle/fluid/tests/unittests/test_fill_constant_op.py similarity index 100% rename from python/paddle/v2/fluid/tests/unittests/test_fill_constant_op.py rename to python/paddle/fluid/tests/unittests/test_fill_constant_op.py diff --git a/python/paddle/v2/fluid/tests/unittests/test_fill_op.py b/python/paddle/fluid/tests/unittests/test_fill_op.py similarity index 100% rename from python/paddle/v2/fluid/tests/unittests/test_fill_op.py rename to python/paddle/fluid/tests/unittests/test_fill_op.py diff --git a/python/paddle/v2/fluid/tests/unittests/test_fill_zeros_like_op.py b/python/paddle/fluid/tests/unittests/test_fill_zeros_like_op.py similarity index 100% rename from python/paddle/v2/fluid/tests/unittests/test_fill_zeros_like_op.py rename to python/paddle/fluid/tests/unittests/test_fill_zeros_like_op.py diff --git a/python/paddle/v2/fluid/tests/unittests/test_framework_debug_str.py b/python/paddle/fluid/tests/unittests/test_framework_debug_str.py similarity index 100% rename from python/paddle/v2/fluid/tests/unittests/test_framework_debug_str.py rename to python/paddle/fluid/tests/unittests/test_framework_debug_str.py diff --git a/python/paddle/v2/fluid/tests/unittests/test_ftrl_op.py b/python/paddle/fluid/tests/unittests/test_ftrl_op.py similarity index 100% rename from python/paddle/v2/fluid/tests/unittests/test_ftrl_op.py rename to python/paddle/fluid/tests/unittests/test_ftrl_op.py diff --git a/python/paddle/v2/fluid/tests/unittests/test_gather_op.py b/python/paddle/fluid/tests/unittests/test_gather_op.py similarity index 100% rename from python/paddle/v2/fluid/tests/unittests/test_gather_op.py rename to python/paddle/fluid/tests/unittests/test_gather_op.py diff --git a/python/paddle/v2/fluid/tests/unittests/test_gaussian_random_batch_size_like_op.py b/python/paddle/fluid/tests/unittests/test_gaussian_random_batch_size_like_op.py similarity index 100% rename from python/paddle/v2/fluid/tests/unittests/test_gaussian_random_batch_size_like_op.py rename to python/paddle/fluid/tests/unittests/test_gaussian_random_batch_size_like_op.py diff --git a/python/paddle/v2/fluid/tests/unittests/test_gaussian_random_op.py b/python/paddle/fluid/tests/unittests/test_gaussian_random_op.py similarity index 100% rename from python/paddle/v2/fluid/tests/unittests/test_gaussian_random_op.py rename to python/paddle/fluid/tests/unittests/test_gaussian_random_op.py diff --git a/python/paddle/v2/fluid/tests/unittests/test_get_places_op.py b/python/paddle/fluid/tests/unittests/test_get_places_op.py similarity index 100% rename from python/paddle/v2/fluid/tests/unittests/test_get_places_op.py rename to python/paddle/fluid/tests/unittests/test_get_places_op.py diff --git a/python/paddle/v2/fluid/tests/unittests/test_gru_op.py b/python/paddle/fluid/tests/unittests/test_gru_op.py similarity index 100% rename from python/paddle/v2/fluid/tests/unittests/test_gru_op.py rename to python/paddle/fluid/tests/unittests/test_gru_op.py diff --git a/python/paddle/v2/fluid/tests/unittests/test_gru_unit_op.py b/python/paddle/fluid/tests/unittests/test_gru_unit_op.py similarity index 100% rename from python/paddle/v2/fluid/tests/unittests/test_gru_unit_op.py rename to python/paddle/fluid/tests/unittests/test_gru_unit_op.py diff --git a/python/paddle/v2/fluid/tests/unittests/test_hinge_loss_op.py b/python/paddle/fluid/tests/unittests/test_hinge_loss_op.py similarity index 100% rename from python/paddle/v2/fluid/tests/unittests/test_hinge_loss_op.py rename to python/paddle/fluid/tests/unittests/test_hinge_loss_op.py diff --git a/python/paddle/v2/fluid/tests/unittests/test_huber_loss_op.py b/python/paddle/fluid/tests/unittests/test_huber_loss_op.py similarity index 100% rename from python/paddle/v2/fluid/tests/unittests/test_huber_loss_op.py rename to python/paddle/fluid/tests/unittests/test_huber_loss_op.py diff --git a/python/paddle/v2/fluid/tests/unittests/test_im2sequence_op.py b/python/paddle/fluid/tests/unittests/test_im2sequence_op.py similarity index 100% rename from python/paddle/v2/fluid/tests/unittests/test_im2sequence_op.py rename to python/paddle/fluid/tests/unittests/test_im2sequence_op.py diff --git a/python/paddle/v2/fluid/tests/unittests/test_image_classification_layer.py b/python/paddle/fluid/tests/unittests/test_image_classification_layer.py similarity index 100% rename from python/paddle/v2/fluid/tests/unittests/test_image_classification_layer.py rename to python/paddle/fluid/tests/unittests/test_image_classification_layer.py diff --git a/python/paddle/v2/fluid/tests/unittests/test_infer_shape.py b/python/paddle/fluid/tests/unittests/test_infer_shape.py similarity index 100% rename from python/paddle/v2/fluid/tests/unittests/test_infer_shape.py rename to python/paddle/fluid/tests/unittests/test_infer_shape.py diff --git a/python/paddle/v2/fluid/tests/unittests/test_inference_model_io.py b/python/paddle/fluid/tests/unittests/test_inference_model_io.py similarity index 100% rename from python/paddle/v2/fluid/tests/unittests/test_inference_model_io.py rename to python/paddle/fluid/tests/unittests/test_inference_model_io.py diff --git a/python/paddle/v2/fluid/tests/unittests/test_initializer.py b/python/paddle/fluid/tests/unittests/test_initializer.py similarity index 100% rename from python/paddle/v2/fluid/tests/unittests/test_initializer.py rename to python/paddle/fluid/tests/unittests/test_initializer.py diff --git a/python/paddle/v2/fluid/tests/unittests/test_iou_similarity_op.py b/python/paddle/fluid/tests/unittests/test_iou_similarity_op.py similarity index 100% rename from python/paddle/v2/fluid/tests/unittests/test_iou_similarity_op.py rename to python/paddle/fluid/tests/unittests/test_iou_similarity_op.py diff --git a/python/paddle/v2/fluid/tests/unittests/test_is_empty_op.py b/python/paddle/fluid/tests/unittests/test_is_empty_op.py similarity index 100% rename from python/paddle/v2/fluid/tests/unittests/test_is_empty_op.py rename to python/paddle/fluid/tests/unittests/test_is_empty_op.py diff --git a/python/paddle/v2/fluid/tests/unittests/test_l1_norm_op.py b/python/paddle/fluid/tests/unittests/test_l1_norm_op.py similarity index 100% rename from python/paddle/v2/fluid/tests/unittests/test_l1_norm_op.py rename to python/paddle/fluid/tests/unittests/test_l1_norm_op.py diff --git a/python/paddle/v2/fluid/tests/unittests/test_label_smooth_op.py b/python/paddle/fluid/tests/unittests/test_label_smooth_op.py similarity index 100% rename from python/paddle/v2/fluid/tests/unittests/test_label_smooth_op.py rename to python/paddle/fluid/tests/unittests/test_label_smooth_op.py diff --git a/python/paddle/v2/fluid/tests/unittests/test_layer_norm_op.py b/python/paddle/fluid/tests/unittests/test_layer_norm_op.py similarity index 100% rename from python/paddle/v2/fluid/tests/unittests/test_layer_norm_op.py rename to python/paddle/fluid/tests/unittests/test_layer_norm_op.py diff --git a/python/paddle/v2/fluid/tests/unittests/test_layers.py b/python/paddle/fluid/tests/unittests/test_layers.py similarity index 100% rename from python/paddle/v2/fluid/tests/unittests/test_layers.py rename to python/paddle/fluid/tests/unittests/test_layers.py diff --git a/python/paddle/v2/fluid/tests/unittests/test_learning_rate_decay.py b/python/paddle/fluid/tests/unittests/test_learning_rate_decay.py similarity index 100% rename from python/paddle/v2/fluid/tests/unittests/test_learning_rate_decay.py rename to python/paddle/fluid/tests/unittests/test_learning_rate_decay.py diff --git a/python/paddle/v2/fluid/tests/unittests/test_linear_chain_crf_op.py b/python/paddle/fluid/tests/unittests/test_linear_chain_crf_op.py similarity index 100% rename from python/paddle/v2/fluid/tests/unittests/test_linear_chain_crf_op.py rename to python/paddle/fluid/tests/unittests/test_linear_chain_crf_op.py diff --git a/python/paddle/v2/fluid/tests/unittests/test_lod_array_length_op.py b/python/paddle/fluid/tests/unittests/test_lod_array_length_op.py similarity index 100% rename from python/paddle/v2/fluid/tests/unittests/test_lod_array_length_op.py rename to python/paddle/fluid/tests/unittests/test_lod_array_length_op.py diff --git a/python/paddle/v2/fluid/tests/unittests/test_lod_rank_table.py b/python/paddle/fluid/tests/unittests/test_lod_rank_table.py similarity index 100% rename from python/paddle/v2/fluid/tests/unittests/test_lod_rank_table.py rename to python/paddle/fluid/tests/unittests/test_lod_rank_table.py diff --git a/python/paddle/v2/fluid/tests/unittests/test_lod_reset_op.py b/python/paddle/fluid/tests/unittests/test_lod_reset_op.py similarity index 100% rename from python/paddle/v2/fluid/tests/unittests/test_lod_reset_op.py rename to python/paddle/fluid/tests/unittests/test_lod_reset_op.py diff --git a/python/paddle/v2/fluid/tests/unittests/test_lod_tensor_array.py b/python/paddle/fluid/tests/unittests/test_lod_tensor_array.py similarity index 100% rename from python/paddle/v2/fluid/tests/unittests/test_lod_tensor_array.py rename to python/paddle/fluid/tests/unittests/test_lod_tensor_array.py diff --git a/python/paddle/v2/fluid/tests/unittests/test_lod_tensor_array_ops.py b/python/paddle/fluid/tests/unittests/test_lod_tensor_array_ops.py similarity index 100% rename from python/paddle/v2/fluid/tests/unittests/test_lod_tensor_array_ops.py rename to python/paddle/fluid/tests/unittests/test_lod_tensor_array_ops.py diff --git a/python/paddle/v2/fluid/tests/unittests/test_log_loss_op.py b/python/paddle/fluid/tests/unittests/test_log_loss_op.py similarity index 100% rename from python/paddle/v2/fluid/tests/unittests/test_log_loss_op.py rename to python/paddle/fluid/tests/unittests/test_log_loss_op.py diff --git a/python/paddle/v2/fluid/tests/unittests/test_logical_op.py b/python/paddle/fluid/tests/unittests/test_logical_op.py similarity index 100% rename from python/paddle/v2/fluid/tests/unittests/test_logical_op.py rename to python/paddle/fluid/tests/unittests/test_logical_op.py diff --git a/python/paddle/v2/fluid/tests/unittests/test_lookup_table_op.py b/python/paddle/fluid/tests/unittests/test_lookup_table_op.py similarity index 100% rename from python/paddle/v2/fluid/tests/unittests/test_lookup_table_op.py rename to python/paddle/fluid/tests/unittests/test_lookup_table_op.py diff --git a/python/paddle/v2/fluid/tests/unittests/test_lrn_op.py b/python/paddle/fluid/tests/unittests/test_lrn_op.py similarity index 100% rename from python/paddle/v2/fluid/tests/unittests/test_lrn_op.py rename to python/paddle/fluid/tests/unittests/test_lrn_op.py diff --git a/python/paddle/v2/fluid/tests/unittests/test_lstm_op.py b/python/paddle/fluid/tests/unittests/test_lstm_op.py similarity index 100% rename from python/paddle/v2/fluid/tests/unittests/test_lstm_op.py rename to python/paddle/fluid/tests/unittests/test_lstm_op.py diff --git a/python/paddle/v2/fluid/tests/unittests/test_lstm_unit_op.py b/python/paddle/fluid/tests/unittests/test_lstm_unit_op.py similarity index 100% rename from python/paddle/v2/fluid/tests/unittests/test_lstm_unit_op.py rename to python/paddle/fluid/tests/unittests/test_lstm_unit_op.py diff --git a/python/paddle/v2/fluid/tests/unittests/test_lstmp_op.py b/python/paddle/fluid/tests/unittests/test_lstmp_op.py similarity index 100% rename from python/paddle/v2/fluid/tests/unittests/test_lstmp_op.py rename to python/paddle/fluid/tests/unittests/test_lstmp_op.py diff --git a/python/paddle/v2/fluid/tests/unittests/test_margin_rank_loss_op.py b/python/paddle/fluid/tests/unittests/test_margin_rank_loss_op.py similarity index 100% rename from python/paddle/v2/fluid/tests/unittests/test_margin_rank_loss_op.py rename to python/paddle/fluid/tests/unittests/test_margin_rank_loss_op.py diff --git a/python/paddle/v2/fluid/tests/unittests/test_math_op_patch.py b/python/paddle/fluid/tests/unittests/test_math_op_patch.py similarity index 100% rename from python/paddle/v2/fluid/tests/unittests/test_math_op_patch.py rename to python/paddle/fluid/tests/unittests/test_math_op_patch.py diff --git a/python/paddle/v2/fluid/tests/unittests/test_matmul_op.py b/python/paddle/fluid/tests/unittests/test_matmul_op.py similarity index 100% rename from python/paddle/v2/fluid/tests/unittests/test_matmul_op.py rename to python/paddle/fluid/tests/unittests/test_matmul_op.py diff --git a/python/paddle/v2/fluid/tests/unittests/test_maxout_op.py b/python/paddle/fluid/tests/unittests/test_maxout_op.py similarity index 100% rename from python/paddle/v2/fluid/tests/unittests/test_maxout_op.py rename to python/paddle/fluid/tests/unittests/test_maxout_op.py diff --git a/python/paddle/v2/fluid/tests/unittests/test_mean_op.py b/python/paddle/fluid/tests/unittests/test_mean_op.py similarity index 100% rename from python/paddle/v2/fluid/tests/unittests/test_mean_op.py rename to python/paddle/fluid/tests/unittests/test_mean_op.py diff --git a/python/paddle/v2/fluid/tests/unittests/test_memory_optimization_transpiler.py b/python/paddle/fluid/tests/unittests/test_memory_optimization_transpiler.py similarity index 100% rename from python/paddle/v2/fluid/tests/unittests/test_memory_optimization_transpiler.py rename to python/paddle/fluid/tests/unittests/test_memory_optimization_transpiler.py diff --git a/python/paddle/v2/fluid/tests/unittests/test_mine_hard_examples_op.py b/python/paddle/fluid/tests/unittests/test_mine_hard_examples_op.py similarity index 100% rename from python/paddle/v2/fluid/tests/unittests/test_mine_hard_examples_op.py rename to python/paddle/fluid/tests/unittests/test_mine_hard_examples_op.py diff --git a/python/paddle/v2/fluid/tests/unittests/test_minus_op.py b/python/paddle/fluid/tests/unittests/test_minus_op.py similarity index 100% rename from python/paddle/v2/fluid/tests/unittests/test_minus_op.py rename to python/paddle/fluid/tests/unittests/test_minus_op.py diff --git a/python/paddle/v2/fluid/tests/unittests/test_modified_huber_loss_op.py b/python/paddle/fluid/tests/unittests/test_modified_huber_loss_op.py similarity index 100% rename from python/paddle/v2/fluid/tests/unittests/test_modified_huber_loss_op.py rename to python/paddle/fluid/tests/unittests/test_modified_huber_loss_op.py diff --git a/python/paddle/v2/fluid/tests/unittests/test_momentum_op.py b/python/paddle/fluid/tests/unittests/test_momentum_op.py similarity index 100% rename from python/paddle/v2/fluid/tests/unittests/test_momentum_op.py rename to python/paddle/fluid/tests/unittests/test_momentum_op.py diff --git a/python/paddle/v2/fluid/tests/unittests/test_mul_op.py b/python/paddle/fluid/tests/unittests/test_mul_op.py similarity index 100% rename from python/paddle/v2/fluid/tests/unittests/test_mul_op.py rename to python/paddle/fluid/tests/unittests/test_mul_op.py diff --git a/python/paddle/v2/fluid/tests/unittests/test_multiclass_nms_op.py b/python/paddle/fluid/tests/unittests/test_multiclass_nms_op.py similarity index 100% rename from python/paddle/v2/fluid/tests/unittests/test_multiclass_nms_op.py rename to python/paddle/fluid/tests/unittests/test_multiclass_nms_op.py diff --git a/python/paddle/v2/fluid/tests/unittests/test_multihead_attention.py b/python/paddle/fluid/tests/unittests/test_multihead_attention.py similarity index 100% rename from python/paddle/v2/fluid/tests/unittests/test_multihead_attention.py rename to python/paddle/fluid/tests/unittests/test_multihead_attention.py diff --git a/python/paddle/v2/fluid/tests/unittests/test_multiplex_op.py b/python/paddle/fluid/tests/unittests/test_multiplex_op.py similarity index 100% rename from python/paddle/v2/fluid/tests/unittests/test_multiplex_op.py rename to python/paddle/fluid/tests/unittests/test_multiplex_op.py diff --git a/python/paddle/v2/fluid/tests/unittests/test_nce.py b/python/paddle/fluid/tests/unittests/test_nce.py similarity index 100% rename from python/paddle/v2/fluid/tests/unittests/test_nce.py rename to python/paddle/fluid/tests/unittests/test_nce.py diff --git a/python/paddle/v2/fluid/tests/unittests/test_net.py b/python/paddle/fluid/tests/unittests/test_net.py similarity index 100% rename from python/paddle/v2/fluid/tests/unittests/test_net.py rename to python/paddle/fluid/tests/unittests/test_net.py diff --git a/python/paddle/v2/fluid/tests/unittests/test_norm_op.py b/python/paddle/fluid/tests/unittests/test_norm_op.py similarity index 100% rename from python/paddle/v2/fluid/tests/unittests/test_norm_op.py rename to python/paddle/fluid/tests/unittests/test_norm_op.py diff --git a/python/paddle/v2/fluid/tests/unittests/test_normalization_wrapper.py b/python/paddle/fluid/tests/unittests/test_normalization_wrapper.py similarity index 100% rename from python/paddle/v2/fluid/tests/unittests/test_normalization_wrapper.py rename to python/paddle/fluid/tests/unittests/test_normalization_wrapper.py diff --git a/python/paddle/v2/fluid/tests/unittests/test_one_hot_op.py b/python/paddle/fluid/tests/unittests/test_one_hot_op.py similarity index 100% rename from python/paddle/v2/fluid/tests/unittests/test_one_hot_op.py rename to python/paddle/fluid/tests/unittests/test_one_hot_op.py diff --git a/python/paddle/v2/fluid/tests/unittests/test_op_support_gpu.py b/python/paddle/fluid/tests/unittests/test_op_support_gpu.py similarity index 100% rename from python/paddle/v2/fluid/tests/unittests/test_op_support_gpu.py rename to python/paddle/fluid/tests/unittests/test_op_support_gpu.py diff --git a/python/paddle/v2/fluid/tests/unittests/test_operator.py b/python/paddle/fluid/tests/unittests/test_operator.py similarity index 100% rename from python/paddle/v2/fluid/tests/unittests/test_operator.py rename to python/paddle/fluid/tests/unittests/test_operator.py diff --git a/python/paddle/v2/fluid/tests/unittests/test_operator_desc.py b/python/paddle/fluid/tests/unittests/test_operator_desc.py similarity index 100% rename from python/paddle/v2/fluid/tests/unittests/test_operator_desc.py rename to python/paddle/fluid/tests/unittests/test_operator_desc.py diff --git a/python/paddle/v2/fluid/tests/unittests/test_optimizer.py b/python/paddle/fluid/tests/unittests/test_optimizer.py similarity index 100% rename from python/paddle/v2/fluid/tests/unittests/test_optimizer.py rename to python/paddle/fluid/tests/unittests/test_optimizer.py diff --git a/python/paddle/v2/fluid/tests/unittests/test_pad_op.py b/python/paddle/fluid/tests/unittests/test_pad_op.py similarity index 100% rename from python/paddle/v2/fluid/tests/unittests/test_pad_op.py rename to python/paddle/fluid/tests/unittests/test_pad_op.py diff --git a/python/paddle/v2/fluid/tests/unittests/test_parallel_op.py b/python/paddle/fluid/tests/unittests/test_parallel_op.py similarity index 100% rename from python/paddle/v2/fluid/tests/unittests/test_parallel_op.py rename to python/paddle/fluid/tests/unittests/test_parallel_op.py diff --git a/python/paddle/v2/fluid/tests/unittests/test_parameter.py b/python/paddle/fluid/tests/unittests/test_parameter.py similarity index 100% rename from python/paddle/v2/fluid/tests/unittests/test_parameter.py rename to python/paddle/fluid/tests/unittests/test_parameter.py diff --git a/python/paddle/v2/fluid/tests/unittests/test_pool2d_op.py b/python/paddle/fluid/tests/unittests/test_pool2d_op.py similarity index 100% rename from python/paddle/v2/fluid/tests/unittests/test_pool2d_op.py rename to python/paddle/fluid/tests/unittests/test_pool2d_op.py diff --git a/python/paddle/v2/fluid/tests/unittests/test_pool3d_op.py b/python/paddle/fluid/tests/unittests/test_pool3d_op.py similarity index 100% rename from python/paddle/v2/fluid/tests/unittests/test_pool3d_op.py rename to python/paddle/fluid/tests/unittests/test_pool3d_op.py diff --git a/python/paddle/v2/fluid/tests/unittests/test_pool_max_op.py b/python/paddle/fluid/tests/unittests/test_pool_max_op.py similarity index 100% rename from python/paddle/v2/fluid/tests/unittests/test_pool_max_op.py rename to python/paddle/fluid/tests/unittests/test_pool_max_op.py diff --git a/python/paddle/v2/fluid/tests/unittests/test_positive_negative_pair_op.py b/python/paddle/fluid/tests/unittests/test_positive_negative_pair_op.py similarity index 100% rename from python/paddle/v2/fluid/tests/unittests/test_positive_negative_pair_op.py rename to python/paddle/fluid/tests/unittests/test_positive_negative_pair_op.py diff --git a/python/paddle/v2/fluid/tests/unittests/test_precision_recall_op.py b/python/paddle/fluid/tests/unittests/test_precision_recall_op.py similarity index 100% rename from python/paddle/v2/fluid/tests/unittests/test_precision_recall_op.py rename to python/paddle/fluid/tests/unittests/test_precision_recall_op.py diff --git a/python/paddle/v2/fluid/tests/unittests/test_prelu_op.py b/python/paddle/fluid/tests/unittests/test_prelu_op.py similarity index 100% rename from python/paddle/v2/fluid/tests/unittests/test_prelu_op.py rename to python/paddle/fluid/tests/unittests/test_prelu_op.py diff --git a/python/paddle/v2/fluid/tests/unittests/test_print_op.py b/python/paddle/fluid/tests/unittests/test_print_op.py similarity index 100% rename from python/paddle/v2/fluid/tests/unittests/test_print_op.py rename to python/paddle/fluid/tests/unittests/test_print_op.py diff --git a/python/paddle/v2/fluid/tests/unittests/test_prior_box_op.py b/python/paddle/fluid/tests/unittests/test_prior_box_op.py similarity index 100% rename from python/paddle/v2/fluid/tests/unittests/test_prior_box_op.py rename to python/paddle/fluid/tests/unittests/test_prior_box_op.py diff --git a/python/paddle/v2/fluid/tests/unittests/test_profiler.py b/python/paddle/fluid/tests/unittests/test_profiler.py similarity index 100% rename from python/paddle/v2/fluid/tests/unittests/test_profiler.py rename to python/paddle/fluid/tests/unittests/test_profiler.py diff --git a/python/paddle/v2/fluid/tests/unittests/test_program.py b/python/paddle/fluid/tests/unittests/test_program.py similarity index 100% rename from python/paddle/v2/fluid/tests/unittests/test_program.py rename to python/paddle/fluid/tests/unittests/test_program.py diff --git a/python/paddle/v2/fluid/tests/unittests/test_protobuf.py b/python/paddle/fluid/tests/unittests/test_protobuf.py similarity index 100% rename from python/paddle/v2/fluid/tests/unittests/test_protobuf.py rename to python/paddle/fluid/tests/unittests/test_protobuf.py diff --git a/python/paddle/v2/fluid/tests/unittests/test_protobuf_descs.py b/python/paddle/fluid/tests/unittests/test_protobuf_descs.py similarity index 100% rename from python/paddle/v2/fluid/tests/unittests/test_protobuf_descs.py rename to python/paddle/fluid/tests/unittests/test_protobuf_descs.py diff --git a/python/paddle/v2/fluid/tests/unittests/test_proximal_adagrad_op.py b/python/paddle/fluid/tests/unittests/test_proximal_adagrad_op.py similarity index 100% rename from python/paddle/v2/fluid/tests/unittests/test_proximal_adagrad_op.py rename to python/paddle/fluid/tests/unittests/test_proximal_adagrad_op.py diff --git a/python/paddle/v2/fluid/tests/unittests/test_proximal_gd_op.py b/python/paddle/fluid/tests/unittests/test_proximal_gd_op.py similarity index 100% rename from python/paddle/v2/fluid/tests/unittests/test_proximal_gd_op.py rename to python/paddle/fluid/tests/unittests/test_proximal_gd_op.py diff --git a/python/paddle/v2/fluid/tests/unittests/test_rank_loss_op.py b/python/paddle/fluid/tests/unittests/test_rank_loss_op.py similarity index 100% rename from python/paddle/v2/fluid/tests/unittests/test_rank_loss_op.py rename to python/paddle/fluid/tests/unittests/test_rank_loss_op.py diff --git a/python/paddle/v2/fluid/tests/unittests/test_recurrent_op.py b/python/paddle/fluid/tests/unittests/test_recurrent_op.py similarity index 100% rename from python/paddle/v2/fluid/tests/unittests/test_recurrent_op.py rename to python/paddle/fluid/tests/unittests/test_recurrent_op.py diff --git a/python/paddle/v2/fluid/tests/unittests/test_recv_op.py b/python/paddle/fluid/tests/unittests/test_recv_op.py similarity index 100% rename from python/paddle/v2/fluid/tests/unittests/test_recv_op.py rename to python/paddle/fluid/tests/unittests/test_recv_op.py diff --git a/python/paddle/v2/fluid/tests/unittests/test_reduce_op.py b/python/paddle/fluid/tests/unittests/test_reduce_op.py similarity index 100% rename from python/paddle/v2/fluid/tests/unittests/test_reduce_op.py rename to python/paddle/fluid/tests/unittests/test_reduce_op.py diff --git a/python/paddle/v2/fluid/tests/unittests/test_registry.py b/python/paddle/fluid/tests/unittests/test_registry.py similarity index 100% rename from python/paddle/v2/fluid/tests/unittests/test_registry.py rename to python/paddle/fluid/tests/unittests/test_registry.py diff --git a/python/paddle/v2/fluid/tests/unittests/test_regularizer.py b/python/paddle/fluid/tests/unittests/test_regularizer.py similarity index 100% rename from python/paddle/v2/fluid/tests/unittests/test_regularizer.py rename to python/paddle/fluid/tests/unittests/test_regularizer.py diff --git a/python/paddle/v2/fluid/tests/unittests/test_reorder_lod_tensor.py b/python/paddle/fluid/tests/unittests/test_reorder_lod_tensor.py similarity index 100% rename from python/paddle/v2/fluid/tests/unittests/test_reorder_lod_tensor.py rename to python/paddle/fluid/tests/unittests/test_reorder_lod_tensor.py diff --git a/python/paddle/v2/fluid/tests/unittests/test_reshape_op.py b/python/paddle/fluid/tests/unittests/test_reshape_op.py similarity index 100% rename from python/paddle/v2/fluid/tests/unittests/test_reshape_op.py rename to python/paddle/fluid/tests/unittests/test_reshape_op.py diff --git a/python/paddle/v2/fluid/tests/unittests/test_rmsprop_op.py b/python/paddle/fluid/tests/unittests/test_rmsprop_op.py similarity index 100% rename from python/paddle/v2/fluid/tests/unittests/test_rmsprop_op.py rename to python/paddle/fluid/tests/unittests/test_rmsprop_op.py diff --git a/python/paddle/v2/fluid/tests/unittests/test_rnn_memory_helper_op.py b/python/paddle/fluid/tests/unittests/test_rnn_memory_helper_op.py similarity index 100% rename from python/paddle/v2/fluid/tests/unittests/test_rnn_memory_helper_op.py rename to python/paddle/fluid/tests/unittests/test_rnn_memory_helper_op.py diff --git a/python/paddle/v2/fluid/tests/unittests/test_roi_pool_op.py b/python/paddle/fluid/tests/unittests/test_roi_pool_op.py similarity index 100% rename from python/paddle/v2/fluid/tests/unittests/test_roi_pool_op.py rename to python/paddle/fluid/tests/unittests/test_roi_pool_op.py diff --git a/python/paddle/v2/fluid/tests/unittests/test_row_conv_op.py b/python/paddle/fluid/tests/unittests/test_row_conv_op.py similarity index 100% rename from python/paddle/v2/fluid/tests/unittests/test_row_conv_op.py rename to python/paddle/fluid/tests/unittests/test_row_conv_op.py diff --git a/python/paddle/v2/fluid/tests/unittests/test_scale_op.py b/python/paddle/fluid/tests/unittests/test_scale_op.py similarity index 100% rename from python/paddle/v2/fluid/tests/unittests/test_scale_op.py rename to python/paddle/fluid/tests/unittests/test_scale_op.py diff --git a/python/paddle/v2/fluid/tests/unittests/test_scatter_op.py b/python/paddle/fluid/tests/unittests/test_scatter_op.py similarity index 100% rename from python/paddle/v2/fluid/tests/unittests/test_scatter_op.py rename to python/paddle/fluid/tests/unittests/test_scatter_op.py diff --git a/python/paddle/v2/fluid/tests/unittests/test_scope.py b/python/paddle/fluid/tests/unittests/test_scope.py similarity index 100% rename from python/paddle/v2/fluid/tests/unittests/test_scope.py rename to python/paddle/fluid/tests/unittests/test_scope.py diff --git a/python/paddle/v2/fluid/tests/unittests/test_selected_rows.py b/python/paddle/fluid/tests/unittests/test_selected_rows.py similarity index 100% rename from python/paddle/v2/fluid/tests/unittests/test_selected_rows.py rename to python/paddle/fluid/tests/unittests/test_selected_rows.py diff --git a/python/paddle/v2/fluid/tests/unittests/test_seq_concat_op.py b/python/paddle/fluid/tests/unittests/test_seq_concat_op.py similarity index 100% rename from python/paddle/v2/fluid/tests/unittests/test_seq_concat_op.py rename to python/paddle/fluid/tests/unittests/test_seq_concat_op.py diff --git a/python/paddle/v2/fluid/tests/unittests/test_seq_conv.py b/python/paddle/fluid/tests/unittests/test_seq_conv.py similarity index 100% rename from python/paddle/v2/fluid/tests/unittests/test_seq_conv.py rename to python/paddle/fluid/tests/unittests/test_seq_conv.py diff --git a/python/paddle/v2/fluid/tests/unittests/test_seq_pool.py b/python/paddle/fluid/tests/unittests/test_seq_pool.py similarity index 100% rename from python/paddle/v2/fluid/tests/unittests/test_seq_pool.py rename to python/paddle/fluid/tests/unittests/test_seq_pool.py diff --git a/python/paddle/v2/fluid/tests/unittests/test_sequence_erase_op.py b/python/paddle/fluid/tests/unittests/test_sequence_erase_op.py similarity index 100% rename from python/paddle/v2/fluid/tests/unittests/test_sequence_erase_op.py rename to python/paddle/fluid/tests/unittests/test_sequence_erase_op.py diff --git a/python/paddle/v2/fluid/tests/unittests/test_sequence_expand.py b/python/paddle/fluid/tests/unittests/test_sequence_expand.py similarity index 100% rename from python/paddle/v2/fluid/tests/unittests/test_sequence_expand.py rename to python/paddle/fluid/tests/unittests/test_sequence_expand.py diff --git a/python/paddle/v2/fluid/tests/unittests/test_sequence_reshape.py b/python/paddle/fluid/tests/unittests/test_sequence_reshape.py similarity index 100% rename from python/paddle/v2/fluid/tests/unittests/test_sequence_reshape.py rename to python/paddle/fluid/tests/unittests/test_sequence_reshape.py diff --git a/python/paddle/v2/fluid/tests/unittests/test_sequence_slice_op.py b/python/paddle/fluid/tests/unittests/test_sequence_slice_op.py similarity index 100% rename from python/paddle/v2/fluid/tests/unittests/test_sequence_slice_op.py rename to python/paddle/fluid/tests/unittests/test_sequence_slice_op.py diff --git a/python/paddle/v2/fluid/tests/unittests/test_sequence_softmax_op.py b/python/paddle/fluid/tests/unittests/test_sequence_softmax_op.py similarity index 100% rename from python/paddle/v2/fluid/tests/unittests/test_sequence_softmax_op.py rename to python/paddle/fluid/tests/unittests/test_sequence_softmax_op.py diff --git a/python/paddle/v2/fluid/tests/unittests/test_sgd_op.py b/python/paddle/fluid/tests/unittests/test_sgd_op.py similarity index 100% rename from python/paddle/v2/fluid/tests/unittests/test_sgd_op.py rename to python/paddle/fluid/tests/unittests/test_sgd_op.py diff --git a/python/paddle/v2/fluid/tests/unittests/test_shrink_rnn_memory.py b/python/paddle/fluid/tests/unittests/test_shrink_rnn_memory.py similarity index 100% rename from python/paddle/v2/fluid/tests/unittests/test_shrink_rnn_memory.py rename to python/paddle/fluid/tests/unittests/test_shrink_rnn_memory.py diff --git a/python/paddle/v2/fluid/tests/unittests/test_sigmoid_cross_entropy_with_logits_op.py b/python/paddle/fluid/tests/unittests/test_sigmoid_cross_entropy_with_logits_op.py similarity index 100% rename from python/paddle/v2/fluid/tests/unittests/test_sigmoid_cross_entropy_with_logits_op.py rename to python/paddle/fluid/tests/unittests/test_sigmoid_cross_entropy_with_logits_op.py diff --git a/python/paddle/v2/fluid/tests/unittests/test_sign_op.py b/python/paddle/fluid/tests/unittests/test_sign_op.py similarity index 100% rename from python/paddle/v2/fluid/tests/unittests/test_sign_op.py rename to python/paddle/fluid/tests/unittests/test_sign_op.py diff --git a/python/paddle/v2/fluid/tests/unittests/test_smooth_l1_loss_op.py b/python/paddle/fluid/tests/unittests/test_smooth_l1_loss_op.py similarity index 100% rename from python/paddle/v2/fluid/tests/unittests/test_smooth_l1_loss_op.py rename to python/paddle/fluid/tests/unittests/test_smooth_l1_loss_op.py diff --git a/python/paddle/v2/fluid/tests/unittests/test_softmax_op.py b/python/paddle/fluid/tests/unittests/test_softmax_op.py similarity index 100% rename from python/paddle/v2/fluid/tests/unittests/test_softmax_op.py rename to python/paddle/fluid/tests/unittests/test_softmax_op.py diff --git a/python/paddle/v2/fluid/tests/unittests/test_softmax_with_cross_entropy_op.py b/python/paddle/fluid/tests/unittests/test_softmax_with_cross_entropy_op.py similarity index 100% rename from python/paddle/v2/fluid/tests/unittests/test_softmax_with_cross_entropy_op.py rename to python/paddle/fluid/tests/unittests/test_softmax_with_cross_entropy_op.py diff --git a/python/paddle/v2/fluid/tests/unittests/test_split_and_merge_lod_tensor_op.py b/python/paddle/fluid/tests/unittests/test_split_and_merge_lod_tensor_op.py similarity index 100% rename from python/paddle/v2/fluid/tests/unittests/test_split_and_merge_lod_tensor_op.py rename to python/paddle/fluid/tests/unittests/test_split_and_merge_lod_tensor_op.py diff --git a/python/paddle/v2/fluid/tests/unittests/test_split_op.py b/python/paddle/fluid/tests/unittests/test_split_op.py similarity index 100% rename from python/paddle/v2/fluid/tests/unittests/test_split_op.py rename to python/paddle/fluid/tests/unittests/test_split_op.py diff --git a/python/paddle/v2/fluid/tests/unittests/test_split_selected_rows_op.py b/python/paddle/fluid/tests/unittests/test_split_selected_rows_op.py similarity index 100% rename from python/paddle/v2/fluid/tests/unittests/test_split_selected_rows_op.py rename to python/paddle/fluid/tests/unittests/test_split_selected_rows_op.py diff --git a/python/paddle/v2/fluid/tests/unittests/test_split_var.py b/python/paddle/fluid/tests/unittests/test_split_var.py similarity index 100% rename from python/paddle/v2/fluid/tests/unittests/test_split_var.py rename to python/paddle/fluid/tests/unittests/test_split_var.py diff --git a/python/paddle/v2/fluid/tests/unittests/test_spp_op.py b/python/paddle/fluid/tests/unittests/test_spp_op.py similarity index 100% rename from python/paddle/v2/fluid/tests/unittests/test_spp_op.py rename to python/paddle/fluid/tests/unittests/test_spp_op.py diff --git a/python/paddle/v2/fluid/tests/unittests/test_squared_l2_distance_op.py b/python/paddle/fluid/tests/unittests/test_squared_l2_distance_op.py similarity index 100% rename from python/paddle/v2/fluid/tests/unittests/test_squared_l2_distance_op.py rename to python/paddle/fluid/tests/unittests/test_squared_l2_distance_op.py diff --git a/python/paddle/v2/fluid/tests/unittests/test_squared_l2_norm_op.py b/python/paddle/fluid/tests/unittests/test_squared_l2_norm_op.py similarity index 100% rename from python/paddle/v2/fluid/tests/unittests/test_squared_l2_norm_op.py rename to python/paddle/fluid/tests/unittests/test_squared_l2_norm_op.py diff --git a/python/paddle/v2/fluid/tests/unittests/test_sum_op.py b/python/paddle/fluid/tests/unittests/test_sum_op.py similarity index 100% rename from python/paddle/v2/fluid/tests/unittests/test_sum_op.py rename to python/paddle/fluid/tests/unittests/test_sum_op.py diff --git a/python/paddle/v2/fluid/tests/unittests/test_switch.py b/python/paddle/fluid/tests/unittests/test_switch.py similarity index 100% rename from python/paddle/v2/fluid/tests/unittests/test_switch.py rename to python/paddle/fluid/tests/unittests/test_switch.py diff --git a/python/paddle/v2/fluid/tests/unittests/test_target_assign_op.py b/python/paddle/fluid/tests/unittests/test_target_assign_op.py similarity index 100% rename from python/paddle/v2/fluid/tests/unittests/test_target_assign_op.py rename to python/paddle/fluid/tests/unittests/test_target_assign_op.py diff --git a/python/paddle/v2/fluid/tests/unittests/test_tensor.py b/python/paddle/fluid/tests/unittests/test_tensor.py similarity index 100% rename from python/paddle/v2/fluid/tests/unittests/test_tensor.py rename to python/paddle/fluid/tests/unittests/test_tensor.py diff --git a/python/paddle/v2/fluid/tests/unittests/test_top_k_op.py b/python/paddle/fluid/tests/unittests/test_top_k_op.py similarity index 100% rename from python/paddle/v2/fluid/tests/unittests/test_top_k_op.py rename to python/paddle/fluid/tests/unittests/test_top_k_op.py diff --git a/python/paddle/v2/fluid/tests/unittests/test_transpose_op.py b/python/paddle/fluid/tests/unittests/test_transpose_op.py similarity index 100% rename from python/paddle/v2/fluid/tests/unittests/test_transpose_op.py rename to python/paddle/fluid/tests/unittests/test_transpose_op.py diff --git a/python/paddle/v2/fluid/tests/unittests/test_uniform_random_batch_size_like_op.py b/python/paddle/fluid/tests/unittests/test_uniform_random_batch_size_like_op.py similarity index 100% rename from python/paddle/v2/fluid/tests/unittests/test_uniform_random_batch_size_like_op.py rename to python/paddle/fluid/tests/unittests/test_uniform_random_batch_size_like_op.py diff --git a/python/paddle/v2/fluid/tests/unittests/test_uniform_random_op.py b/python/paddle/fluid/tests/unittests/test_uniform_random_op.py similarity index 100% rename from python/paddle/v2/fluid/tests/unittests/test_uniform_random_op.py rename to python/paddle/fluid/tests/unittests/test_uniform_random_op.py diff --git a/python/paddle/v2/fluid/tests/unittests/test_unique_name.py b/python/paddle/fluid/tests/unittests/test_unique_name.py similarity index 100% rename from python/paddle/v2/fluid/tests/unittests/test_unique_name.py rename to python/paddle/fluid/tests/unittests/test_unique_name.py diff --git a/python/paddle/v2/fluid/tests/unittests/test_unpool_op.py b/python/paddle/fluid/tests/unittests/test_unpool_op.py similarity index 100% rename from python/paddle/v2/fluid/tests/unittests/test_unpool_op.py rename to python/paddle/fluid/tests/unittests/test_unpool_op.py diff --git a/python/paddle/v2/fluid/tests/unittests/test_variable.py b/python/paddle/fluid/tests/unittests/test_variable.py similarity index 100% rename from python/paddle/v2/fluid/tests/unittests/test_variable.py rename to python/paddle/fluid/tests/unittests/test_variable.py diff --git a/python/paddle/v2/fluid/tests/unittests/test_warpctc_op.py b/python/paddle/fluid/tests/unittests/test_warpctc_op.py similarity index 100% rename from python/paddle/v2/fluid/tests/unittests/test_warpctc_op.py rename to python/paddle/fluid/tests/unittests/test_warpctc_op.py diff --git a/python/paddle/v2/fluid/tests/unittests/test_weight_normalization.py b/python/paddle/fluid/tests/unittests/test_weight_normalization.py similarity index 100% rename from python/paddle/v2/fluid/tests/unittests/test_weight_normalization.py rename to python/paddle/fluid/tests/unittests/test_weight_normalization.py diff --git a/python/paddle/v2/fluid/tests/unittests/test_while_op.py b/python/paddle/fluid/tests/unittests/test_while_op.py similarity index 100% rename from python/paddle/v2/fluid/tests/unittests/test_while_op.py rename to python/paddle/fluid/tests/unittests/test_while_op.py diff --git a/python/paddle/v2/fluid/unique_name.py b/python/paddle/fluid/unique_name.py similarity index 100% rename from python/paddle/v2/fluid/unique_name.py rename to python/paddle/fluid/unique_name.py -- GitLab From 3b8bade61776d38686944ce9ebdf9b50e6bb9b9c Mon Sep 17 00:00:00 2001 From: qiaolongfei Date: Sat, 24 Feb 2018 17:27:33 +0800 Subject: [PATCH 110/122] init learning_rate_map when input learning rate is a Variable --- python/paddle/v2/fluid/optimizer.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/python/paddle/v2/fluid/optimizer.py b/python/paddle/v2/fluid/optimizer.py index 0b3e019d805..9309ec39169 100644 --- a/python/paddle/v2/fluid/optimizer.py +++ b/python/paddle/v2/fluid/optimizer.py @@ -45,6 +45,9 @@ class Optimizer(object): # each program should have a independent learning rate # program -> Variable(learning_rate) self._learning_rate_map = defaultdict(lambda: None) + if isinstance(self._learning_rate, framework.Variable): + self._learning_rate_map[framework.default_main_program( + )] = self._learning_rate # Dictionary of accumulators. Some optimizer subclasses need to # allocate and manage extra variables associated with the parameters # to train. These variables are called accumulators. -- GitLab From f7fa7c57c812b59ece75f5143e12298aa843ad93 Mon Sep 17 00:00:00 2001 From: Luo Tao Date: Sat, 24 Feb 2018 17:32:13 +0800 Subject: [PATCH 111/122] modify related build code after the move --- python/CMakeLists.txt | 12 +++++++----- python/setup.py.in | 12 ++++++------ 2 files changed, 13 insertions(+), 11 deletions(-) diff --git a/python/CMakeLists.txt b/python/CMakeLists.txt index 36919ab00bf..0d497dcfce9 100644 --- a/python/CMakeLists.txt +++ b/python/CMakeLists.txt @@ -3,12 +3,14 @@ file(GLOB TRAINER_PY_FILES . ./paddle/trainer/*.py) file(GLOB HELPERS_PY_FILES . ./paddle/trainer_config_helpers/*.py) file(GLOB UTILS_PY_FILES . ./paddle/utils/*.py) file(GLOB_RECURSE V2_PY_FILES ./paddle/v2/ *.py) +file(GLOB_RECURSE FLUID_PY_FILES ./paddle/fluid/ *.py) set(PY_FILES paddle/__init__.py ${TRAINER_PY_FILES} ${HELPERS_PY_FILES} ${UTILS_PY_FILES} - ${V2_PY_FILES}) + ${V2_PY_FILES} + ${FLUID_PY_FILES}) add_custom_target(copy_paddle_master) @@ -43,10 +45,10 @@ configure_file(${CMAKE_CURRENT_SOURCE_DIR}/setup.py.in ${CMAKE_CURRENT_BINARY_DIR}/setup.py) -add_custom_command(OUTPUT ${PADDLE_SOURCE_DIR}/python/paddle/v2/fluid/core.so - COMMAND cmake -E copy $ ${PADDLE_SOURCE_DIR}/python/paddle/v2/fluid/core.so +add_custom_command(OUTPUT ${PADDLE_SOURCE_DIR}/python/paddle/fluid/core.so + COMMAND cmake -E copy $ ${PADDLE_SOURCE_DIR}/python/paddle/fluid/core.so DEPENDS paddle_pybind) -add_custom_target(copy_paddle_pybind ALL DEPENDS ${PADDLE_SOURCE_DIR}/python/paddle/v2/fluid/core.so) +add_custom_target(copy_paddle_pybind ALL DEPENDS ${PADDLE_SOURCE_DIR}/python/paddle/fluid/core.so) add_custom_command(OUTPUT ${PADDLE_PYTHON_BUILD_DIR}/.timestamp @@ -72,7 +74,7 @@ if (WITH_TESTING) add_subdirectory(paddle/v2/tests) add_subdirectory(paddle/v2/reader/tests) add_subdirectory(paddle/v2/plot/tests) - add_subdirectory(paddle/v2/fluid/tests) + add_subdirectory(paddle/fluid/tests) endif() endif() install(DIRECTORY ${PADDLE_PYTHON_PACKAGE_DIR} diff --git a/python/setup.py.in b/python/setup.py.in index 5a0d9999543..6fff1bb09e4 100644 --- a/python/setup.py.in +++ b/python/setup.py.in @@ -71,9 +71,9 @@ packages=['paddle', 'paddle.v2.reader', 'paddle.v2.master', 'paddle.v2.plot', - 'paddle.v2.fluid', - 'paddle.v2.fluid.proto', - 'paddle.v2.fluid.layers', + 'paddle.fluid', + 'paddle.fluid.proto', + 'paddle.fluid.layers', 'py_paddle'] with open('@PADDLE_SOURCE_DIR@/python/requirements.txt') as f: @@ -102,14 +102,14 @@ setup(name='${PACKAGE_NAME}', ext_modules=[Extension('_foo', ['stub.cc'])], package_data={ 'paddle.v2.master': ['libpaddle_master.so'], - 'paddle.v2.fluid': ['core.so'], + 'paddle.fluid': ['core.so'], 'py_paddle':['*.py','_swig_paddle.so'] }, package_dir={ '': '${CMAKE_CURRENT_SOURCE_DIR}', - # The paddle.v2.fluid.proto will be generated while compiling. + # The paddle.fluid.proto will be generated while compiling. # So that package points to other directory. - 'paddle.v2.fluid.proto': '${PADDLE_BINARY_DIR}/paddle/fluid/framework', + 'paddle.fluid.proto': '${PADDLE_BINARY_DIR}/paddle/fluid/framework', 'py_paddle': '${PADDLE_SOURCE_DIR}/paddle/py_paddle' }, scripts=paddle_bins, -- GitLab From bde090a97564b9c61a6aaa38b72ccc4889d102d9 Mon Sep 17 00:00:00 2001 From: Luo Tao Date: Sat, 24 Feb 2018 18:00:01 +0800 Subject: [PATCH 112/122] replace paddle.v2.fluid by paddle.fluid in tests --- python/paddle/fluid/backward.py | 2 +- python/paddle/fluid/default_scope_funcs.py | 6 +++--- python/paddle/fluid/io.py | 4 ++-- python/paddle/fluid/layer_helper.py | 2 +- python/paddle/fluid/net_drawer.py | 4 ++-- python/paddle/fluid/op.py | 4 ++-- .../fluid/tests/book/notest_rnn_encoder_decoer.py | 10 +++++----- python/paddle/fluid/tests/book/test_fit_a_line.py | 2 +- .../fluid/tests/book/test_image_classification.py | 2 +- .../fluid/tests/book/test_label_semantic_roles.py | 4 ++-- .../fluid/tests/book/test_machine_translation.py | 8 ++++---- .../paddle/fluid/tests/book/test_recognize_digits.py | 2 +- .../fluid/tests/book/test_recommender_system.py | 12 ++++++------ .../fluid/tests/book/test_understand_sentiment.py | 2 +- python/paddle/fluid/tests/book/test_word2vec.py | 2 +- .../tests/book_distribute/notest_dist_fit_a_line.py | 2 +- .../notest_dist_image_classification.py | 2 +- .../notest_dist_label_semantic_roles.py | 2 +- .../tests/book_distribute/notest_dist_word2vec.py | 2 +- .../book_distribute/notest_machine_translation.py | 10 +++++----- .../notest_recognize_digits_conv_dist.py | 2 +- .../notest_recognize_digits_mlp_dist.py | 2 +- .../notest_recommender_system_dist.py | 10 +++++----- .../notest_understand_sentiment_conv_dist.py | 2 +- .../notest_understand_sentiment_dynamic_lstm.py | 2 +- .../test_memopt_fit_a_line.py | 2 +- .../test_memopt_image_classification_train.py | 2 +- .../test_memopt_machine_translation.py | 10 +++++----- python/paddle/fluid/tests/demo/fc_gan.py | 2 +- python/paddle/fluid/tests/notest_concurrency.py | 6 +++--- python/paddle/fluid/tests/notest_csp.py | 2 +- python/paddle/fluid/tests/test_cpp_reader.py | 2 +- python/paddle/fluid/tests/test_data_feeder.py | 2 +- python/paddle/fluid/tests/test_detection.py | 6 +++--- python/paddle/fluid/tests/test_error_clip.py | 2 +- python/paddle/fluid/tests/test_gradient_clip.py | 2 +- python/paddle/fluid/tests/test_mnist_if_else_op.py | 10 +++++----- .../fluid/tests/test_python_operator_overriding.py | 6 +++--- python/paddle/fluid/tests/unittests/decorators.py | 2 +- python/paddle/fluid/tests/unittests/op_test.py | 10 +++++----- .../paddle/fluid/tests/unittests/test_adagrad_op.py | 4 ++-- python/paddle/fluid/tests/unittests/test_adam_op.py | 4 ++-- .../tests/unittests/test_array_read_write_op.py | 10 +++++----- .../fluid/tests/unittests/test_assign_value_op.py | 6 +++--- .../fluid/tests/unittests/test_batch_norm_op.py | 6 +++--- .../tests/unittests/test_beam_search_decode_op.py | 4 ++-- .../fluid/tests/unittests/test_beam_search_op.py | 4 ++-- .../fluid/tests/unittests/test_calc_gradient.py | 10 +++++----- python/paddle/fluid/tests/unittests/test_cast_op.py | 2 +- python/paddle/fluid/tests/unittests/test_cond_op.py | 4 ++-- .../fluid/tests/unittests/test_conditional_block.py | 10 +++++----- .../paddle/fluid/tests/unittests/test_const_value.py | 2 +- .../paddle/fluid/tests/unittests/test_conv2d_op.py | 2 +- .../tests/unittests/test_conv2d_transpose_op.py | 2 +- .../paddle/fluid/tests/unittests/test_conv3d_op.py | 2 +- .../tests/unittests/test_conv3d_transpose_op.py | 2 +- .../tests/unittests/test_create_op_doc_string.py | 2 +- .../tests/unittests/test_default_scope_funcs.py | 2 +- python/paddle/fluid/tests/unittests/test_dyn_rnn.py | 2 +- .../tests/unittests/test_dynrnn_gradient_check.py | 2 +- .../tests/unittests/test_dynrnn_static_input.py | 10 +++++----- .../paddle/fluid/tests/unittests/test_exception.py | 2 +- .../fluid/tests/unittests/test_executor_and_mul.py | 6 +++--- .../fluid/tests/unittests/test_feed_fetch_method.py | 2 +- .../paddle/fluid/tests/unittests/test_fetch_var.py | 4 ++-- python/paddle/fluid/tests/unittests/test_fill_op.py | 2 +- .../tests/unittests/test_framework_debug_str.py | 2 +- .../fluid/tests/unittests/test_gaussian_random_op.py | 8 ++++---- .../fluid/tests/unittests/test_get_places_op.py | 2 +- .../unittests/test_image_classification_layer.py | 6 +++--- .../paddle/fluid/tests/unittests/test_infer_shape.py | 2 +- .../fluid/tests/unittests/test_inference_model_io.py | 12 ++++++------ .../paddle/fluid/tests/unittests/test_initializer.py | 4 ++-- .../paddle/fluid/tests/unittests/test_is_empty_op.py | 4 ++-- .../fluid/tests/unittests/test_layer_norm_op.py | 6 +++--- python/paddle/fluid/tests/unittests/test_layers.py | 8 ++++---- .../tests/unittests/test_learning_rate_decay.py | 8 ++++---- .../tests/unittests/test_lod_array_length_op.py | 6 +++--- .../fluid/tests/unittests/test_lod_rank_table.py | 6 +++--- .../fluid/tests/unittests/test_lod_tensor_array.py | 2 +- .../tests/unittests/test_lod_tensor_array_ops.py | 10 +++++----- .../fluid/tests/unittests/test_math_op_patch.py | 2 +- .../unittests/test_memory_optimization_transpiler.py | 8 ++++---- .../tests/unittests/test_multihead_attention.py | 4 ++-- python/paddle/fluid/tests/unittests/test_net.py | 4 ++-- .../tests/unittests/test_normalization_wrapper.py | 4 ++-- .../paddle/fluid/tests/unittests/test_one_hot_op.py | 8 ++++---- .../fluid/tests/unittests/test_op_support_gpu.py | 2 +- python/paddle/fluid/tests/unittests/test_operator.py | 4 ++-- .../fluid/tests/unittests/test_operator_desc.py | 4 ++-- .../paddle/fluid/tests/unittests/test_optimizer.py | 6 +++--- .../paddle/fluid/tests/unittests/test_parallel_op.py | 2 +- .../paddle/fluid/tests/unittests/test_parameter.py | 10 +++++----- .../paddle/fluid/tests/unittests/test_pool2d_op.py | 2 +- .../paddle/fluid/tests/unittests/test_pool3d_op.py | 2 +- python/paddle/fluid/tests/unittests/test_print_op.py | 12 ++++++------ python/paddle/fluid/tests/unittests/test_profiler.py | 8 ++++---- python/paddle/fluid/tests/unittests/test_program.py | 4 ++-- python/paddle/fluid/tests/unittests/test_protobuf.py | 2 +- .../fluid/tests/unittests/test_protobuf_descs.py | 2 +- .../fluid/tests/unittests/test_recurrent_op.py | 10 +++++----- python/paddle/fluid/tests/unittests/test_recv_op.py | 4 ++-- python/paddle/fluid/tests/unittests/test_registry.py | 2 +- .../paddle/fluid/tests/unittests/test_regularizer.py | 8 ++++---- .../fluid/tests/unittests/test_reorder_lod_tensor.py | 4 ++-- .../tests/unittests/test_rnn_memory_helper_op.py | 8 ++++---- python/paddle/fluid/tests/unittests/test_scope.py | 10 +++++----- .../fluid/tests/unittests/test_selected_rows.py | 2 +- python/paddle/fluid/tests/unittests/test_sgd_op.py | 4 ++-- .../fluid/tests/unittests/test_shrink_rnn_memory.py | 12 ++++++------ .../unittests/test_split_and_merge_lod_tensor_op.py | 10 +++++----- .../tests/unittests/test_split_selected_rows_op.py | 4 ++-- .../paddle/fluid/tests/unittests/test_split_var.py | 6 +++--- python/paddle/fluid/tests/unittests/test_switch.py | 10 +++++----- python/paddle/fluid/tests/unittests/test_tensor.py | 2 +- .../paddle/fluid/tests/unittests/test_unique_name.py | 2 +- python/paddle/fluid/tests/unittests/test_variable.py | 4 ++-- .../tests/unittests/test_weight_normalization.py | 8 ++++---- python/paddle/fluid/tests/unittests/test_while_op.py | 8 ++++---- 119 files changed, 285 insertions(+), 285 deletions(-) diff --git a/python/paddle/fluid/backward.py b/python/paddle/fluid/backward.py index 4da73bb9963..58fa7f1bebc 100644 --- a/python/paddle/fluid/backward.py +++ b/python/paddle/fluid/backward.py @@ -12,7 +12,7 @@ # See the License for the specific language governing permissions and # limitations under the License. -from paddle.v2.fluid import framework as framework +from paddle.fluid import framework as framework from . import core import collections import copy diff --git a/python/paddle/fluid/default_scope_funcs.py b/python/paddle/fluid/default_scope_funcs.py index eeb9fb20433..f8faf694252 100644 --- a/python/paddle/fluid/default_scope_funcs.py +++ b/python/paddle/fluid/default_scope_funcs.py @@ -26,7 +26,7 @@ A `scoped_function` will take a `function` as input. That function will be invoked in a new local scope. """ -import paddle.v2.fluid.core +import paddle.fluid.core import threading __tl_scope__ = threading.local() @@ -44,13 +44,13 @@ __all__ = [ def get_cur_scope(): """ Get current scope. - :rtype: paddle.v2.fluid.core.Scope + :rtype: paddle.fluid.core.Scope """ cur_scope_stack = getattr(__tl_scope__, 'cur_scope', None) if cur_scope_stack is None: __tl_scope__.cur_scope = list() if len(__tl_scope__.cur_scope) == 0: - __tl_scope__.cur_scope.append(paddle.v2.fluid.core.Scope()) + __tl_scope__.cur_scope.append(paddle.fluid.core.Scope()) return __tl_scope__.cur_scope[-1] diff --git a/python/paddle/fluid/io.py b/python/paddle/fluid/io.py index 8a8bd089b58..33f709ece48 100644 --- a/python/paddle/fluid/io.py +++ b/python/paddle/fluid/io.py @@ -14,8 +14,8 @@ import os -from paddle.v2.fluid.evaluator import Evaluator -from paddle.v2.fluid.framework import Program, Parameter, default_main_program, Variable +from paddle.fluid.evaluator import Evaluator +from paddle.fluid.framework import Program, Parameter, default_main_program, Variable from . import core __all__ = [ diff --git a/python/paddle/fluid/layer_helper.py b/python/paddle/fluid/layer_helper.py index dc4f992ddc3..6437dbb446e 100644 --- a/python/paddle/fluid/layer_helper.py +++ b/python/paddle/fluid/layer_helper.py @@ -17,7 +17,7 @@ import itertools from framework import Variable, Parameter, default_main_program, default_startup_program, dtype_is_floating import unique_name -from paddle.v2.fluid.initializer import Constant, Xavier +from paddle.fluid.initializer import Constant, Xavier from param_attr import ParamAttr, WeightNormParamAttr diff --git a/python/paddle/fluid/net_drawer.py b/python/paddle/fluid/net_drawer.py index 66793a57858..73946a0721d 100644 --- a/python/paddle/fluid/net_drawer.py +++ b/python/paddle/fluid/net_drawer.py @@ -17,8 +17,8 @@ import json import logging from collections import defaultdict -import paddle.v2.fluid.core as core -import paddle.v2.fluid.proto.framework_pb2 as framework_pb2 +import paddle.fluid.core as core +import paddle.fluid.proto.framework_pb2 as framework_pb2 logger = logging.getLogger(__name__) logger.setLevel(logging.INFO) diff --git a/python/paddle/fluid/op.py b/python/paddle/fluid/op.py index 6a413704583..0b76e94157e 100644 --- a/python/paddle/fluid/op.py +++ b/python/paddle/fluid/op.py @@ -12,8 +12,8 @@ # See the License for the specific language governing permissions and # limitations under the License. -import paddle.v2.fluid.core as core -import paddle.v2.fluid.proto.framework_pb2 as framework_pb2 +import paddle.fluid.core as core +import paddle.fluid.proto.framework_pb2 as framework_pb2 def get_all_op_protos(): diff --git a/python/paddle/fluid/tests/book/notest_rnn_encoder_decoer.py b/python/paddle/fluid/tests/book/notest_rnn_encoder_decoer.py index c7db70f1b18..adf38ea2899 100644 --- a/python/paddle/fluid/tests/book/notest_rnn_encoder_decoer.py +++ b/python/paddle/fluid/tests/book/notest_rnn_encoder_decoer.py @@ -14,15 +14,15 @@ import numpy as np import paddle.v2 as paddle -import paddle.v2.fluid as fluid -import paddle.v2.fluid.core as core -import paddle.v2.fluid.framework as framework -import paddle.v2.fluid.layers as layers +import paddle.fluid as fluid +import paddle.fluid.core as core +import paddle.fluid.framework as framework +import paddle.fluid.layers as layers import contextlib import math import sys import unittest -from paddle.v2.fluid.executor import Executor +from paddle.fluid.executor import Executor dict_size = 30000 source_dict_dim = target_dict_dim = dict_size diff --git a/python/paddle/fluid/tests/book/test_fit_a_line.py b/python/paddle/fluid/tests/book/test_fit_a_line.py index a66c2c3c2fc..0d6fb872d70 100644 --- a/python/paddle/fluid/tests/book/test_fit_a_line.py +++ b/python/paddle/fluid/tests/book/test_fit_a_line.py @@ -13,7 +13,7 @@ # limitations under the License. import paddle.v2 as paddle -import paddle.v2.fluid as fluid +import paddle.fluid as fluid import contextlib import numpy import unittest diff --git a/python/paddle/fluid/tests/book/test_image_classification.py b/python/paddle/fluid/tests/book/test_image_classification.py index 734ab3e4fba..2f6c7d1a70d 100644 --- a/python/paddle/fluid/tests/book/test_image_classification.py +++ b/python/paddle/fluid/tests/book/test_image_classification.py @@ -15,7 +15,7 @@ from __future__ import print_function import paddle.v2 as paddle -import paddle.v2.fluid as fluid +import paddle.fluid as fluid import contextlib import math import sys diff --git a/python/paddle/fluid/tests/book/test_label_semantic_roles.py b/python/paddle/fluid/tests/book/test_label_semantic_roles.py index b790246ec15..fcc9dbf8bbf 100644 --- a/python/paddle/fluid/tests/book/test_label_semantic_roles.py +++ b/python/paddle/fluid/tests/book/test_label_semantic_roles.py @@ -17,8 +17,8 @@ import math import numpy as np import paddle.v2 as paddle import paddle.v2.dataset.conll05 as conll05 -import paddle.v2.fluid as fluid -from paddle.v2.fluid.initializer import init_on_cpu +import paddle.fluid as fluid +from paddle.fluid.initializer import init_on_cpu import contextlib import time import unittest diff --git a/python/paddle/fluid/tests/book/test_machine_translation.py b/python/paddle/fluid/tests/book/test_machine_translation.py index d3405a9601d..287ef7a7524 100644 --- a/python/paddle/fluid/tests/book/test_machine_translation.py +++ b/python/paddle/fluid/tests/book/test_machine_translation.py @@ -15,10 +15,10 @@ import contextlib import numpy as np import paddle.v2 as paddle -import paddle.v2.fluid as fluid -import paddle.v2.fluid.framework as framework -import paddle.v2.fluid.layers as pd -from paddle.v2.fluid.executor import Executor +import paddle.fluid as fluid +import paddle.fluid.framework as framework +import paddle.fluid.layers as pd +from paddle.fluid.executor import Executor import unittest dict_size = 30000 diff --git a/python/paddle/fluid/tests/book/test_recognize_digits.py b/python/paddle/fluid/tests/book/test_recognize_digits.py index 2462d425e16..2a778b04538 100644 --- a/python/paddle/fluid/tests/book/test_recognize_digits.py +++ b/python/paddle/fluid/tests/book/test_recognize_digits.py @@ -13,7 +13,7 @@ # limitations under the License. from __future__ import print_function import argparse -import paddle.v2.fluid as fluid +import paddle.fluid as fluid import paddle.v2 as paddle import sys import numpy diff --git a/python/paddle/fluid/tests/book/test_recommender_system.py b/python/paddle/fluid/tests/book/test_recommender_system.py index 1a7d8d57ffa..81318823e5c 100644 --- a/python/paddle/fluid/tests/book/test_recommender_system.py +++ b/python/paddle/fluid/tests/book/test_recommender_system.py @@ -16,12 +16,12 @@ import math import sys import numpy as np import paddle.v2 as paddle -import paddle.v2.fluid as fluid -import paddle.v2.fluid.framework as framework -import paddle.v2.fluid.layers as layers -import paddle.v2.fluid.nets as nets -from paddle.v2.fluid.executor import Executor -from paddle.v2.fluid.optimizer import SGDOptimizer +import paddle.fluid as fluid +import paddle.fluid.framework as framework +import paddle.fluid.layers as layers +import paddle.fluid.nets as nets +from paddle.fluid.executor import Executor +from paddle.fluid.optimizer import SGDOptimizer IS_SPARSE = True USE_GPU = False diff --git a/python/paddle/fluid/tests/book/test_understand_sentiment.py b/python/paddle/fluid/tests/book/test_understand_sentiment.py index 61f46b51c44..8bb4bf92de9 100644 --- a/python/paddle/fluid/tests/book/test_understand_sentiment.py +++ b/python/paddle/fluid/tests/book/test_understand_sentiment.py @@ -14,7 +14,7 @@ from __future__ import print_function import unittest -import paddle.v2.fluid as fluid +import paddle.fluid as fluid import paddle.v2 as paddle import contextlib import math diff --git a/python/paddle/fluid/tests/book/test_word2vec.py b/python/paddle/fluid/tests/book/test_word2vec.py index 9bd8f90c5ee..965f1ff851a 100644 --- a/python/paddle/fluid/tests/book/test_word2vec.py +++ b/python/paddle/fluid/tests/book/test_word2vec.py @@ -12,7 +12,7 @@ # limitations under the License. import paddle.v2 as paddle -import paddle.v2.fluid as fluid +import paddle.fluid as fluid import unittest import os import numpy as np diff --git a/python/paddle/fluid/tests/book_distribute/notest_dist_fit_a_line.py b/python/paddle/fluid/tests/book_distribute/notest_dist_fit_a_line.py index c443c4e0b7d..b5fbffea368 100644 --- a/python/paddle/fluid/tests/book_distribute/notest_dist_fit_a_line.py +++ b/python/paddle/fluid/tests/book_distribute/notest_dist_fit_a_line.py @@ -14,7 +14,7 @@ import numpy as np import paddle.v2 as paddle -import paddle.v2.fluid as fluid +import paddle.fluid as fluid import os x = fluid.layers.data(name='x', shape=[13], dtype='float32') diff --git a/python/paddle/fluid/tests/book_distribute/notest_dist_image_classification.py b/python/paddle/fluid/tests/book_distribute/notest_dist_image_classification.py index 298ecfc386b..9f807df8829 100644 --- a/python/paddle/fluid/tests/book_distribute/notest_dist_image_classification.py +++ b/python/paddle/fluid/tests/book_distribute/notest_dist_image_classification.py @@ -15,7 +15,7 @@ from __future__ import print_function import paddle.v2 as paddle -import paddle.v2.fluid as fluid +import paddle.fluid as fluid import os import sys diff --git a/python/paddle/fluid/tests/book_distribute/notest_dist_label_semantic_roles.py b/python/paddle/fluid/tests/book_distribute/notest_dist_label_semantic_roles.py index 1210bf1d844..533cdb5a9ba 100644 --- a/python/paddle/fluid/tests/book_distribute/notest_dist_label_semantic_roles.py +++ b/python/paddle/fluid/tests/book_distribute/notest_dist_label_semantic_roles.py @@ -17,7 +17,7 @@ import math import numpy as np import paddle.v2 as paddle import paddle.v2.dataset.conll05 as conll05 -import paddle.v2.fluid as fluid +import paddle.fluid as fluid import time import os diff --git a/python/paddle/fluid/tests/book_distribute/notest_dist_word2vec.py b/python/paddle/fluid/tests/book_distribute/notest_dist_word2vec.py index 0d5ad988502..bee022bf4e2 100644 --- a/python/paddle/fluid/tests/book_distribute/notest_dist_word2vec.py +++ b/python/paddle/fluid/tests/book_distribute/notest_dist_word2vec.py @@ -15,7 +15,7 @@ from __future__ import print_function import numpy as np import paddle.v2 as paddle -import paddle.v2.fluid as fluid +import paddle.fluid as fluid import os PASS_NUM = 100 diff --git a/python/paddle/fluid/tests/book_distribute/notest_machine_translation.py b/python/paddle/fluid/tests/book_distribute/notest_machine_translation.py index 15d2d40979e..243d7f5073b 100644 --- a/python/paddle/fluid/tests/book_distribute/notest_machine_translation.py +++ b/python/paddle/fluid/tests/book_distribute/notest_machine_translation.py @@ -14,11 +14,11 @@ import numpy as np import paddle.v2 as paddle -import paddle.v2.fluid as fluid -import paddle.v2.fluid.core as core -import paddle.v2.fluid.framework as framework -import paddle.v2.fluid.layers as layers -from paddle.v2.fluid.executor import Executor +import paddle.fluid as fluid +import paddle.fluid.core as core +import paddle.fluid.framework as framework +import paddle.fluid.layers as layers +from paddle.fluid.executor import Executor import os dict_size = 30000 diff --git a/python/paddle/fluid/tests/book_distribute/notest_recognize_digits_conv_dist.py b/python/paddle/fluid/tests/book_distribute/notest_recognize_digits_conv_dist.py index 1c1fffc5892..223428f820c 100644 --- a/python/paddle/fluid/tests/book_distribute/notest_recognize_digits_conv_dist.py +++ b/python/paddle/fluid/tests/book_distribute/notest_recognize_digits_conv_dist.py @@ -15,7 +15,7 @@ from __future__ import print_function import numpy as np import paddle.v2 as paddle -import paddle.v2.fluid as fluid +import paddle.fluid as fluid import os images = fluid.layers.data(name='pixel', shape=[1, 28, 28], dtype='float32') diff --git a/python/paddle/fluid/tests/book_distribute/notest_recognize_digits_mlp_dist.py b/python/paddle/fluid/tests/book_distribute/notest_recognize_digits_mlp_dist.py index c442ada6e3c..9fb356e78d2 100644 --- a/python/paddle/fluid/tests/book_distribute/notest_recognize_digits_mlp_dist.py +++ b/python/paddle/fluid/tests/book_distribute/notest_recognize_digits_mlp_dist.py @@ -15,7 +15,7 @@ from __future__ import print_function import numpy as np import paddle.v2 as paddle -import paddle.v2.fluid as fluid +import paddle.fluid as fluid import os BATCH_SIZE = 128 diff --git a/python/paddle/fluid/tests/book_distribute/notest_recommender_system_dist.py b/python/paddle/fluid/tests/book_distribute/notest_recommender_system_dist.py index 363c7102c7f..ea05fbb457f 100644 --- a/python/paddle/fluid/tests/book_distribute/notest_recommender_system_dist.py +++ b/python/paddle/fluid/tests/book_distribute/notest_recommender_system_dist.py @@ -15,11 +15,11 @@ import numpy as np import os import paddle.v2 as paddle -import paddle.v2.fluid as fluid -import paddle.v2.fluid.core as core -import paddle.v2.fluid.layers as layers -import paddle.v2.fluid.nets as nets -from paddle.v2.fluid.optimizer import SGDOptimizer +import paddle.fluid as fluid +import paddle.fluid.core as core +import paddle.fluid.layers as layers +import paddle.fluid.nets as nets +from paddle.fluid.optimizer import SGDOptimizer IS_SPARSE = True BATCH_SIZE = 256 diff --git a/python/paddle/fluid/tests/book_distribute/notest_understand_sentiment_conv_dist.py b/python/paddle/fluid/tests/book_distribute/notest_understand_sentiment_conv_dist.py index c5c0856c31a..3b057c5d962 100644 --- a/python/paddle/fluid/tests/book_distribute/notest_understand_sentiment_conv_dist.py +++ b/python/paddle/fluid/tests/book_distribute/notest_understand_sentiment_conv_dist.py @@ -16,7 +16,7 @@ from __future__ import print_function import os import numpy as np import paddle.v2 as paddle -import paddle.v2.fluid as fluid +import paddle.fluid as fluid def convolution_net(data, label, input_dim, class_dim=2, emb_dim=32, diff --git a/python/paddle/fluid/tests/book_distribute/notest_understand_sentiment_dynamic_lstm.py b/python/paddle/fluid/tests/book_distribute/notest_understand_sentiment_dynamic_lstm.py index 99e2c2bbac6..b6c85ebb406 100644 --- a/python/paddle/fluid/tests/book_distribute/notest_understand_sentiment_dynamic_lstm.py +++ b/python/paddle/fluid/tests/book_distribute/notest_understand_sentiment_dynamic_lstm.py @@ -15,7 +15,7 @@ import numpy as np import os import paddle.v2 as paddle -import paddle.v2.fluid as fluid +import paddle.fluid as fluid def stacked_lstm_net(data, diff --git a/python/paddle/fluid/tests/book_memory_optimization/test_memopt_fit_a_line.py b/python/paddle/fluid/tests/book_memory_optimization/test_memopt_fit_a_line.py index 944f8af0861..11250db9cbb 100644 --- a/python/paddle/fluid/tests/book_memory_optimization/test_memopt_fit_a_line.py +++ b/python/paddle/fluid/tests/book_memory_optimization/test_memopt_fit_a_line.py @@ -14,7 +14,7 @@ import numpy as np import paddle.v2 as paddle -import paddle.v2.fluid as fluid +import paddle.fluid as fluid import math import sys diff --git a/python/paddle/fluid/tests/book_memory_optimization/test_memopt_image_classification_train.py b/python/paddle/fluid/tests/book_memory_optimization/test_memopt_image_classification_train.py index a556904107c..64f55e08531 100644 --- a/python/paddle/fluid/tests/book_memory_optimization/test_memopt_image_classification_train.py +++ b/python/paddle/fluid/tests/book_memory_optimization/test_memopt_image_classification_train.py @@ -17,7 +17,7 @@ from __future__ import print_function import sys import paddle.v2 as paddle -import paddle.v2.fluid as fluid +import paddle.fluid as fluid import math import sys diff --git a/python/paddle/fluid/tests/book_memory_optimization/test_memopt_machine_translation.py b/python/paddle/fluid/tests/book_memory_optimization/test_memopt_machine_translation.py index 4c1eae861bb..c439401ea92 100644 --- a/python/paddle/fluid/tests/book_memory_optimization/test_memopt_machine_translation.py +++ b/python/paddle/fluid/tests/book_memory_optimization/test_memopt_machine_translation.py @@ -14,11 +14,11 @@ import numpy as np import paddle.v2 as paddle -import paddle.v2.fluid as fluid -import paddle.v2.fluid.core as core -import paddle.v2.fluid.framework as framework -import paddle.v2.fluid.layers as layers -from paddle.v2.fluid.executor import Executor +import paddle.fluid as fluid +import paddle.fluid.core as core +import paddle.fluid.framework as framework +import paddle.fluid.layers as layers +from paddle.fluid.executor import Executor import math import sys diff --git a/python/paddle/fluid/tests/demo/fc_gan.py b/python/paddle/fluid/tests/demo/fc_gan.py index 67921db04ab..fd9d80fa944 100644 --- a/python/paddle/fluid/tests/demo/fc_gan.py +++ b/python/paddle/fluid/tests/demo/fc_gan.py @@ -20,7 +20,7 @@ import matplotlib import numpy import paddle.v2 as paddle -import paddle.v2.fluid as fluid +import paddle.fluid as fluid matplotlib.use('Agg') import matplotlib.pyplot as plt diff --git a/python/paddle/fluid/tests/notest_concurrency.py b/python/paddle/fluid/tests/notest_concurrency.py index 9d87ed9c073..602d5f31eb3 100644 --- a/python/paddle/fluid/tests/notest_concurrency.py +++ b/python/paddle/fluid/tests/notest_concurrency.py @@ -13,9 +13,9 @@ # limitations under the License. import unittest -import paddle.v2.fluid as fluid -import paddle.v2.fluid.core as core -from paddle.v2.fluid.executor import Executor +import paddle.fluid as fluid +import paddle.fluid.core as core +from paddle.fluid.executor import Executor class TestRoutineOp(unittest.TestCase): diff --git a/python/paddle/fluid/tests/notest_csp.py b/python/paddle/fluid/tests/notest_csp.py index 7fe234a20b5..f4be833deeb 100644 --- a/python/paddle/fluid/tests/notest_csp.py +++ b/python/paddle/fluid/tests/notest_csp.py @@ -13,7 +13,7 @@ # limitations under the License. import unittest -import paddle.v2.fluid as fluid +import paddle.fluid as fluid class TestCSPFramework(unittest.TestCase): diff --git a/python/paddle/fluid/tests/test_cpp_reader.py b/python/paddle/fluid/tests/test_cpp_reader.py index 6d2312dbcb5..b6559205781 100644 --- a/python/paddle/fluid/tests/test_cpp_reader.py +++ b/python/paddle/fluid/tests/test_cpp_reader.py @@ -13,7 +13,7 @@ # limitations under the License. import paddle.v2 as paddle -import paddle.v2.fluid as fluid +import paddle.fluid as fluid import numpy as np prog = fluid.framework.Program() diff --git a/python/paddle/fluid/tests/test_data_feeder.py b/python/paddle/fluid/tests/test_data_feeder.py index 3154293ee63..861dd3174a2 100644 --- a/python/paddle/fluid/tests/test_data_feeder.py +++ b/python/paddle/fluid/tests/test_data_feeder.py @@ -12,7 +12,7 @@ # See the License for the specific language governing permissions and # limitations under the License. -import paddle.v2.fluid as fluid +import paddle.fluid as fluid def test_converter(): diff --git a/python/paddle/fluid/tests/test_detection.py b/python/paddle/fluid/tests/test_detection.py index 908f4e82a62..1dc6d107d21 100644 --- a/python/paddle/fluid/tests/test_detection.py +++ b/python/paddle/fluid/tests/test_detection.py @@ -13,9 +13,9 @@ # limitations under the License. from __future__ import print_function -import paddle.v2.fluid as fluid -import paddle.v2.fluid.layers as layers -from paddle.v2.fluid.framework import Program, program_guard +import paddle.fluid as fluid +import paddle.fluid.layers as layers +from paddle.fluid.framework import Program, program_guard import unittest diff --git a/python/paddle/fluid/tests/test_error_clip.py b/python/paddle/fluid/tests/test_error_clip.py index d577d0014dc..f4c0dfa7a7f 100644 --- a/python/paddle/fluid/tests/test_error_clip.py +++ b/python/paddle/fluid/tests/test_error_clip.py @@ -15,7 +15,7 @@ from __future__ import print_function import numpy as np import paddle.v2 as paddle -import paddle.v2.fluid as fluid +import paddle.fluid as fluid BATCH_SIZE = 128 CLIP_MAX = 2e-6 diff --git a/python/paddle/fluid/tests/test_gradient_clip.py b/python/paddle/fluid/tests/test_gradient_clip.py index 792262df84f..ca0b129008b 100644 --- a/python/paddle/fluid/tests/test_gradient_clip.py +++ b/python/paddle/fluid/tests/test_gradient_clip.py @@ -14,7 +14,7 @@ import numpy as np import paddle.v2 as paddle -import paddle.v2.fluid as fluid +import paddle.fluid as fluid BATCH_SIZE = 128 CLIP = 1 diff --git a/python/paddle/fluid/tests/test_mnist_if_else_op.py b/python/paddle/fluid/tests/test_mnist_if_else_op.py index 75a651cf271..0b557942b08 100644 --- a/python/paddle/fluid/tests/test_mnist_if_else_op.py +++ b/python/paddle/fluid/tests/test_mnist_if_else_op.py @@ -12,11 +12,11 @@ # See the License for the specific language governing permissions and # limitations under the License. -import paddle.v2.fluid.layers as layers -from paddle.v2.fluid.framework import Program, program_guard, default_main_program, default_startup_program -from paddle.v2.fluid.executor import Executor -from paddle.v2.fluid.optimizer import MomentumOptimizer -import paddle.v2.fluid.core as core +import paddle.fluid.layers as layers +from paddle.fluid.framework import Program, program_guard, default_main_program, default_startup_program +from paddle.fluid.executor import Executor +from paddle.fluid.optimizer import MomentumOptimizer +import paddle.fluid.core as core import paddle.v2 as paddle import unittest import numpy as np diff --git a/python/paddle/fluid/tests/test_python_operator_overriding.py b/python/paddle/fluid/tests/test_python_operator_overriding.py index e5198ec17d0..b5ac97eac55 100644 --- a/python/paddle/fluid/tests/test_python_operator_overriding.py +++ b/python/paddle/fluid/tests/test_python_operator_overriding.py @@ -16,9 +16,9 @@ import unittest import numpy as np -import paddle.v2.fluid.layers as layers -import paddle.v2.fluid.framework as framework -import paddle.v2.fluid as fluid +import paddle.fluid.layers as layers +import paddle.fluid.framework as framework +import paddle.fluid as fluid class TestPythonOperatorOverride(unittest.TestCase): diff --git a/python/paddle/fluid/tests/unittests/decorators.py b/python/paddle/fluid/tests/unittests/decorators.py index 7081e4b9345..d1165e2a919 100644 --- a/python/paddle/fluid/tests/unittests/decorators.py +++ b/python/paddle/fluid/tests/unittests/decorators.py @@ -12,7 +12,7 @@ # See the License for the specific language governing permissions and # limitations under the License. -import paddle.v2.fluid as fluid +import paddle.fluid as fluid __all__ = ['many_times', 'prog_scope'] diff --git a/python/paddle/fluid/tests/unittests/op_test.py b/python/paddle/fluid/tests/unittests/op_test.py index d8867550cae..f7e02595ec3 100644 --- a/python/paddle/fluid/tests/unittests/op_test.py +++ b/python/paddle/fluid/tests/unittests/op_test.py @@ -16,12 +16,12 @@ import unittest import numpy as np import random import itertools -import paddle.v2.fluid.core as core +import paddle.fluid.core as core import collections -from paddle.v2.fluid.backward import append_backward -from paddle.v2.fluid.op import Operator -from paddle.v2.fluid.executor import Executor -from paddle.v2.fluid.framework import Program, OpProtoHolder +from paddle.fluid.backward import append_backward +from paddle.fluid.op import Operator +from paddle.fluid.executor import Executor +from paddle.fluid.framework import Program, OpProtoHolder def randomize_probability(batch_size, class_num, dtype='float32'): diff --git a/python/paddle/fluid/tests/unittests/test_adagrad_op.py b/python/paddle/fluid/tests/unittests/test_adagrad_op.py index 320f43023c0..2f0ea79f4d6 100644 --- a/python/paddle/fluid/tests/unittests/test_adagrad_op.py +++ b/python/paddle/fluid/tests/unittests/test_adagrad_op.py @@ -14,8 +14,8 @@ import unittest import numpy as np -import paddle.v2.fluid.core as core -from paddle.v2.fluid.op import Operator +import paddle.fluid.core as core +from paddle.fluid.op import Operator from op_test import OpTest import math diff --git a/python/paddle/fluid/tests/unittests/test_adam_op.py b/python/paddle/fluid/tests/unittests/test_adam_op.py index d6c5a16ff2b..3c65f3d44ad 100644 --- a/python/paddle/fluid/tests/unittests/test_adam_op.py +++ b/python/paddle/fluid/tests/unittests/test_adam_op.py @@ -15,8 +15,8 @@ import unittest import numpy as np from op_test import OpTest -from paddle.v2.fluid import core -from paddle.v2.fluid.op import Operator +from paddle.fluid import core +from paddle.fluid.op import Operator class TestAdamOp1(OpTest): diff --git a/python/paddle/fluid/tests/unittests/test_array_read_write_op.py b/python/paddle/fluid/tests/unittests/test_array_read_write_op.py index 8917b9b906d..380a8549b3a 100644 --- a/python/paddle/fluid/tests/unittests/test_array_read_write_op.py +++ b/python/paddle/fluid/tests/unittests/test_array_read_write_op.py @@ -13,11 +13,11 @@ # limitations under the License. import unittest -import paddle.v2.fluid.core as core -import paddle.v2.fluid.layers as layers -from paddle.v2.fluid.executor import Executor -from paddle.v2.fluid.backward import append_backward -from paddle.v2.fluid.framework import default_main_program +import paddle.fluid.core as core +import paddle.fluid.layers as layers +from paddle.fluid.executor import Executor +from paddle.fluid.backward import append_backward +from paddle.fluid.framework import default_main_program import numpy diff --git a/python/paddle/fluid/tests/unittests/test_assign_value_op.py b/python/paddle/fluid/tests/unittests/test_assign_value_op.py index 99d7e958c32..02f2e6eddc8 100644 --- a/python/paddle/fluid/tests/unittests/test_assign_value_op.py +++ b/python/paddle/fluid/tests/unittests/test_assign_value_op.py @@ -12,12 +12,12 @@ # See the License for the specific language governing permissions and # limitations under the License. -import paddle.v2.fluid as fluid -import paddle.v2.fluid.layers as layers +import paddle.fluid as fluid +import paddle.fluid.layers as layers import op_test import numpy import unittest -import paddle.v2.fluid.framework as framework +import paddle.fluid.framework as framework class TestAssignValueOp(op_test.OpTest): diff --git a/python/paddle/fluid/tests/unittests/test_batch_norm_op.py b/python/paddle/fluid/tests/unittests/test_batch_norm_op.py index b7c0cb521a3..80e6fa6df3c 100644 --- a/python/paddle/fluid/tests/unittests/test_batch_norm_op.py +++ b/python/paddle/fluid/tests/unittests/test_batch_norm_op.py @@ -15,9 +15,9 @@ import unittest import numpy as np from op_test import OpTest -import paddle.v2.fluid.core as core -from paddle.v2.fluid.op import Operator -from paddle.v2.fluid.framework import grad_var_name +import paddle.fluid.core as core +from paddle.fluid.op import Operator +from paddle.fluid.framework import grad_var_name def get_backward_op(scope, op, no_grad_set): diff --git a/python/paddle/fluid/tests/unittests/test_beam_search_decode_op.py b/python/paddle/fluid/tests/unittests/test_beam_search_decode_op.py index 91f8f7b18bb..4ee00605e22 100644 --- a/python/paddle/fluid/tests/unittests/test_beam_search_decode_op.py +++ b/python/paddle/fluid/tests/unittests/test_beam_search_decode_op.py @@ -15,8 +15,8 @@ import unittest import numpy as np -import paddle.v2.fluid.core as core -from paddle.v2.fluid.op import Operator +import paddle.fluid.core as core +from paddle.fluid.op import Operator class TestBeamSearchDecodeOp(unittest.TestCase): diff --git a/python/paddle/fluid/tests/unittests/test_beam_search_op.py b/python/paddle/fluid/tests/unittests/test_beam_search_op.py index 1596bb3970c..bc708f3aff5 100644 --- a/python/paddle/fluid/tests/unittests/test_beam_search_op.py +++ b/python/paddle/fluid/tests/unittests/test_beam_search_op.py @@ -13,8 +13,8 @@ # limitations under the License. import logging -from paddle.v2.fluid.op import Operator, DynamicRecurrentOp -import paddle.v2.fluid.core as core +from paddle.fluid.op import Operator, DynamicRecurrentOp +import paddle.fluid.core as core import unittest import numpy as np diff --git a/python/paddle/fluid/tests/unittests/test_calc_gradient.py b/python/paddle/fluid/tests/unittests/test_calc_gradient.py index 1b38dcf343a..15731fefc82 100644 --- a/python/paddle/fluid/tests/unittests/test_calc_gradient.py +++ b/python/paddle/fluid/tests/unittests/test_calc_gradient.py @@ -14,11 +14,11 @@ import unittest -import paddle.v2.fluid as fluid -import paddle.v2.fluid.layers as layers -import paddle.v2.fluid.framework as framework -import paddle.v2.fluid.optimizer as optimizer -from paddle.v2.fluid.backward import calc_gradient +import paddle.fluid as fluid +import paddle.fluid.layers as layers +import paddle.fluid.framework as framework +import paddle.fluid.optimizer as optimizer +from paddle.fluid.backward import calc_gradient class TestCalcGradient(unittest.TestCase): diff --git a/python/paddle/fluid/tests/unittests/test_cast_op.py b/python/paddle/fluid/tests/unittests/test_cast_op.py index 3d05a319cd4..8fb8d038283 100644 --- a/python/paddle/fluid/tests/unittests/test_cast_op.py +++ b/python/paddle/fluid/tests/unittests/test_cast_op.py @@ -15,7 +15,7 @@ import op_test import unittest import numpy as np -import paddle.v2.fluid.core as core +import paddle.fluid.core as core class TestCastOp(op_test.OpTest): diff --git a/python/paddle/fluid/tests/unittests/test_cond_op.py b/python/paddle/fluid/tests/unittests/test_cond_op.py index 4a1e806c4be..66fbae961a2 100644 --- a/python/paddle/fluid/tests/unittests/test_cond_op.py +++ b/python/paddle/fluid/tests/unittests/test_cond_op.py @@ -13,10 +13,10 @@ # limitations under the License. import logging -import paddle.v2.fluid.core as core +import paddle.fluid.core as core import unittest import numpy as np -from paddle.v2.fluid.op import Operator, CondOp +from paddle.fluid.op import Operator, CondOp class PySimpleCond(object): diff --git a/python/paddle/fluid/tests/unittests/test_conditional_block.py b/python/paddle/fluid/tests/unittests/test_conditional_block.py index 58ac2672036..fad97a28164 100644 --- a/python/paddle/fluid/tests/unittests/test_conditional_block.py +++ b/python/paddle/fluid/tests/unittests/test_conditional_block.py @@ -13,11 +13,11 @@ # limitations under the License. import unittest -import paddle.v2.fluid.layers as layers -import paddle.v2.fluid.core as core -from paddle.v2.fluid.framework import default_startup_program, default_main_program -from paddle.v2.fluid.executor import Executor -from paddle.v2.fluid.backward import append_backward +import paddle.fluid.layers as layers +import paddle.fluid.core as core +from paddle.fluid.framework import default_startup_program, default_main_program +from paddle.fluid.executor import Executor +from paddle.fluid.backward import append_backward import numpy diff --git a/python/paddle/fluid/tests/unittests/test_const_value.py b/python/paddle/fluid/tests/unittests/test_const_value.py index 06c1c21fbcb..d1075d514e9 100644 --- a/python/paddle/fluid/tests/unittests/test_const_value.py +++ b/python/paddle/fluid/tests/unittests/test_const_value.py @@ -13,7 +13,7 @@ # limitations under the License. import unittest -import paddle.v2.fluid.framework as framework +import paddle.fluid.framework as framework class ConditionalBlock(unittest.TestCase): diff --git a/python/paddle/fluid/tests/unittests/test_conv2d_op.py b/python/paddle/fluid/tests/unittests/test_conv2d_op.py index ad242692ec6..1fada38a035 100644 --- a/python/paddle/fluid/tests/unittests/test_conv2d_op.py +++ b/python/paddle/fluid/tests/unittests/test_conv2d_op.py @@ -15,7 +15,7 @@ import unittest import numpy as np -import paddle.v2.fluid.core as core +import paddle.fluid.core as core from op_test import OpTest diff --git a/python/paddle/fluid/tests/unittests/test_conv2d_transpose_op.py b/python/paddle/fluid/tests/unittests/test_conv2d_transpose_op.py index c9e74f58605..9831b7eb126 100644 --- a/python/paddle/fluid/tests/unittests/test_conv2d_transpose_op.py +++ b/python/paddle/fluid/tests/unittests/test_conv2d_transpose_op.py @@ -15,7 +15,7 @@ import unittest import numpy as np -import paddle.v2.fluid.core as core +import paddle.fluid.core as core from op_test import OpTest diff --git a/python/paddle/fluid/tests/unittests/test_conv3d_op.py b/python/paddle/fluid/tests/unittests/test_conv3d_op.py index 0f7e383d1aa..4d3df5e33c4 100644 --- a/python/paddle/fluid/tests/unittests/test_conv3d_op.py +++ b/python/paddle/fluid/tests/unittests/test_conv3d_op.py @@ -15,7 +15,7 @@ import unittest import numpy as np -import paddle.v2.fluid.core as core +import paddle.fluid.core as core from op_test import OpTest diff --git a/python/paddle/fluid/tests/unittests/test_conv3d_transpose_op.py b/python/paddle/fluid/tests/unittests/test_conv3d_transpose_op.py index a70f23d4ad4..a79bfa13d6c 100644 --- a/python/paddle/fluid/tests/unittests/test_conv3d_transpose_op.py +++ b/python/paddle/fluid/tests/unittests/test_conv3d_transpose_op.py @@ -15,7 +15,7 @@ import unittest import numpy as np -import paddle.v2.fluid.core as core +import paddle.fluid.core as core from op_test import OpTest diff --git a/python/paddle/fluid/tests/unittests/test_create_op_doc_string.py b/python/paddle/fluid/tests/unittests/test_create_op_doc_string.py index 4eadbd18ac4..5e6f9a20a93 100644 --- a/python/paddle/fluid/tests/unittests/test_create_op_doc_string.py +++ b/python/paddle/fluid/tests/unittests/test_create_op_doc_string.py @@ -13,7 +13,7 @@ # limitations under the License. import unittest -import paddle.v2.fluid.layers as layers +import paddle.fluid.layers as layers class TestDocString(unittest.TestCase): diff --git a/python/paddle/fluid/tests/unittests/test_default_scope_funcs.py b/python/paddle/fluid/tests/unittests/test_default_scope_funcs.py index d7ca5960709..a3bf7b544b9 100644 --- a/python/paddle/fluid/tests/unittests/test_default_scope_funcs.py +++ b/python/paddle/fluid/tests/unittests/test_default_scope_funcs.py @@ -12,7 +12,7 @@ # See the License for the specific language governing permissions and # limitations under the License. -from paddle.v2.fluid.default_scope_funcs import * +from paddle.fluid.default_scope_funcs import * import unittest diff --git a/python/paddle/fluid/tests/unittests/test_dyn_rnn.py b/python/paddle/fluid/tests/unittests/test_dyn_rnn.py index 1571572fc6b..0a3812a68d6 100644 --- a/python/paddle/fluid/tests/unittests/test_dyn_rnn.py +++ b/python/paddle/fluid/tests/unittests/test_dyn_rnn.py @@ -12,7 +12,7 @@ # See the License for the specific language governing permissions and # limitations under the License. -import paddle.v2.fluid as fluid +import paddle.fluid as fluid import paddle.v2 as paddle import unittest import numpy diff --git a/python/paddle/fluid/tests/unittests/test_dynrnn_gradient_check.py b/python/paddle/fluid/tests/unittests/test_dynrnn_gradient_check.py index 8b01ec730aa..f3dcbe3386a 100644 --- a/python/paddle/fluid/tests/unittests/test_dynrnn_gradient_check.py +++ b/python/paddle/fluid/tests/unittests/test_dynrnn_gradient_check.py @@ -15,7 +15,7 @@ import numpy import random import collections -import paddle.v2.fluid as fluid +import paddle.fluid as fluid import unittest from decorators import * diff --git a/python/paddle/fluid/tests/unittests/test_dynrnn_static_input.py b/python/paddle/fluid/tests/unittests/test_dynrnn_static_input.py index d2f05dcd14e..c28177a1ae5 100644 --- a/python/paddle/fluid/tests/unittests/test_dynrnn_static_input.py +++ b/python/paddle/fluid/tests/unittests/test_dynrnn_static_input.py @@ -14,11 +14,11 @@ import unittest import paddle.v2 as paddle -import paddle.v2.fluid.core as core -import paddle.v2.fluid as fluid -from paddle.v2.fluid.backward import append_backward -import paddle.v2.fluid.framework as framework -from paddle.v2.fluid.framework import Program, switch_main_program +import paddle.fluid.core as core +import paddle.fluid as fluid +from paddle.fluid.backward import append_backward +import paddle.fluid.framework as framework +from paddle.fluid.framework import Program, switch_main_program import bisect import numpy as np diff --git a/python/paddle/fluid/tests/unittests/test_exception.py b/python/paddle/fluid/tests/unittests/test_exception.py index 066b0b7409f..bb7c0f88f60 100644 --- a/python/paddle/fluid/tests/unittests/test_exception.py +++ b/python/paddle/fluid/tests/unittests/test_exception.py @@ -12,7 +12,7 @@ # See the License for the specific language governing permissions and # limitations under the License. -import paddle.v2.fluid.core as core +import paddle.fluid.core as core import unittest diff --git a/python/paddle/fluid/tests/unittests/test_executor_and_mul.py b/python/paddle/fluid/tests/unittests/test_executor_and_mul.py index c043c07b3a3..4958bef3ef4 100644 --- a/python/paddle/fluid/tests/unittests/test_executor_and_mul.py +++ b/python/paddle/fluid/tests/unittests/test_executor_and_mul.py @@ -15,10 +15,10 @@ import unittest import numpy -import paddle.v2.fluid.core as core +import paddle.fluid.core as core -from paddle.v2.fluid.executor import Executor -from paddle.v2.fluid.layers import mul, data +from paddle.fluid.executor import Executor +from paddle.fluid.layers import mul, data class TestExecutor(unittest.TestCase): diff --git a/python/paddle/fluid/tests/unittests/test_feed_fetch_method.py b/python/paddle/fluid/tests/unittests/test_feed_fetch_method.py index f24e5e27f37..9d724a6479f 100644 --- a/python/paddle/fluid/tests/unittests/test_feed_fetch_method.py +++ b/python/paddle/fluid/tests/unittests/test_feed_fetch_method.py @@ -12,7 +12,7 @@ # See the License for the specific language governing permissions and # limitations under the License. -import paddle.v2.fluid.core as core +import paddle.fluid.core as core import unittest import numpy as np diff --git a/python/paddle/fluid/tests/unittests/test_fetch_var.py b/python/paddle/fluid/tests/unittests/test_fetch_var.py index ed75a350b0b..46c3bbb6712 100644 --- a/python/paddle/fluid/tests/unittests/test_fetch_var.py +++ b/python/paddle/fluid/tests/unittests/test_fetch_var.py @@ -12,8 +12,8 @@ # See the License for the specific language governing permissions and # limitations under the License. -import paddle.v2.fluid as fluid -import paddle.v2.fluid.layers as layers +import paddle.fluid as fluid +import paddle.fluid.layers as layers import op_test import numpy import unittest diff --git a/python/paddle/fluid/tests/unittests/test_fill_op.py b/python/paddle/fluid/tests/unittests/test_fill_op.py index c2e3cfe6f3c..762d29199e2 100644 --- a/python/paddle/fluid/tests/unittests/test_fill_op.py +++ b/python/paddle/fluid/tests/unittests/test_fill_op.py @@ -15,7 +15,7 @@ import unittest import numpy as np from op_test import OpTest -import paddle.v2.fluid.core as core +import paddle.fluid.core as core class TestFillOp(OpTest): diff --git a/python/paddle/fluid/tests/unittests/test_framework_debug_str.py b/python/paddle/fluid/tests/unittests/test_framework_debug_str.py index 88995c24dfc..c906c74afe6 100644 --- a/python/paddle/fluid/tests/unittests/test_framework_debug_str.py +++ b/python/paddle/fluid/tests/unittests/test_framework_debug_str.py @@ -13,7 +13,7 @@ # limitations under the License. import unittest -from paddle.v2.fluid.framework import Program +from paddle.fluid.framework import Program class TestDebugStringFramework(unittest.TestCase): diff --git a/python/paddle/fluid/tests/unittests/test_gaussian_random_op.py b/python/paddle/fluid/tests/unittests/test_gaussian_random_op.py index 3c0ee64098a..272caceaf38 100644 --- a/python/paddle/fluid/tests/unittests/test_gaussian_random_op.py +++ b/python/paddle/fluid/tests/unittests/test_gaussian_random_op.py @@ -15,10 +15,10 @@ import unittest import numpy -import paddle.v2.fluid as fluid -import paddle.v2.fluid.core as core -from paddle.v2.fluid.op import Operator -from paddle.v2.fluid.executor import Executor +import paddle.fluid as fluid +import paddle.fluid.core as core +from paddle.fluid.op import Operator +from paddle.fluid.executor import Executor class TestGaussianRandomOp(unittest.TestCase): diff --git a/python/paddle/fluid/tests/unittests/test_get_places_op.py b/python/paddle/fluid/tests/unittests/test_get_places_op.py index 265433e606f..6dab1e22f0c 100644 --- a/python/paddle/fluid/tests/unittests/test_get_places_op.py +++ b/python/paddle/fluid/tests/unittests/test_get_places_op.py @@ -12,7 +12,7 @@ # See the License for the specific language governing permissions and # limitations under the License. -import paddle.v2.fluid as fluid +import paddle.fluid as fluid import decorators import unittest diff --git a/python/paddle/fluid/tests/unittests/test_image_classification_layer.py b/python/paddle/fluid/tests/unittests/test_image_classification_layer.py index 8af8f646a71..6ecfa9ea213 100644 --- a/python/paddle/fluid/tests/unittests/test_image_classification_layer.py +++ b/python/paddle/fluid/tests/unittests/test_image_classification_layer.py @@ -14,9 +14,9 @@ import unittest -import paddle.v2.fluid as fluid -import paddle.v2.fluid.nets as nets -from paddle.v2.fluid.framework import Program +import paddle.fluid as fluid +import paddle.fluid.nets as nets +from paddle.fluid.framework import Program def conv_block(input, num_filter, groups, dropouts): diff --git a/python/paddle/fluid/tests/unittests/test_infer_shape.py b/python/paddle/fluid/tests/unittests/test_infer_shape.py index 17957b9e049..699a2d42467 100644 --- a/python/paddle/fluid/tests/unittests/test_infer_shape.py +++ b/python/paddle/fluid/tests/unittests/test_infer_shape.py @@ -14,7 +14,7 @@ import unittest -import paddle.v2.fluid.core as core +import paddle.fluid.core as core class TestInferShape(unittest.TestCase): diff --git a/python/paddle/fluid/tests/unittests/test_inference_model_io.py b/python/paddle/fluid/tests/unittests/test_inference_model_io.py index e381312ccc7..238ca7188b8 100644 --- a/python/paddle/fluid/tests/unittests/test_inference_model_io.py +++ b/python/paddle/fluid/tests/unittests/test_inference_model_io.py @@ -15,13 +15,13 @@ import unittest import numpy as np -import paddle.v2.fluid.core as core +import paddle.fluid.core as core -import paddle.v2.fluid.executor as executor -import paddle.v2.fluid.layers as layers -import paddle.v2.fluid.optimizer as optimizer -from paddle.v2.fluid.framework import Program, program_guard -from paddle.v2.fluid.io import save_inference_model, load_inference_model +import paddle.fluid.executor as executor +import paddle.fluid.layers as layers +import paddle.fluid.optimizer as optimizer +from paddle.fluid.framework import Program, program_guard +from paddle.fluid.io import save_inference_model, load_inference_model class TestBook(unittest.TestCase): diff --git a/python/paddle/fluid/tests/unittests/test_initializer.py b/python/paddle/fluid/tests/unittests/test_initializer.py index 6d4eb62916b..587e2025e10 100644 --- a/python/paddle/fluid/tests/unittests/test_initializer.py +++ b/python/paddle/fluid/tests/unittests/test_initializer.py @@ -15,8 +15,8 @@ import numpy as np import unittest -import paddle.v2.fluid.framework as framework -import paddle.v2.fluid.initializer as initializer +import paddle.fluid.framework as framework +import paddle.fluid.initializer as initializer DELTA = 0.00001 diff --git a/python/paddle/fluid/tests/unittests/test_is_empty_op.py b/python/paddle/fluid/tests/unittests/test_is_empty_op.py index 799da9dc151..4d11cf226be 100644 --- a/python/paddle/fluid/tests/unittests/test_is_empty_op.py +++ b/python/paddle/fluid/tests/unittests/test_is_empty_op.py @@ -14,8 +14,8 @@ import unittest import numpy as np -from paddle.v2.fluid.op import Operator -import paddle.v2.fluid.core as core +from paddle.fluid.op import Operator +import paddle.fluid.core as core def create_tensor(scope, name, np_data): diff --git a/python/paddle/fluid/tests/unittests/test_layer_norm_op.py b/python/paddle/fluid/tests/unittests/test_layer_norm_op.py index a1206b3b858..8c67e45b7fc 100644 --- a/python/paddle/fluid/tests/unittests/test_layer_norm_op.py +++ b/python/paddle/fluid/tests/unittests/test_layer_norm_op.py @@ -16,9 +16,9 @@ import numpy as np from operator import mul from op_test import OpTest -import paddle.v2.fluid.core as core -from paddle.v2.fluid.op import Operator -from paddle.v2.fluid.framework import grad_var_name +import paddle.fluid.core as core +from paddle.fluid.op import Operator +from paddle.fluid.framework import grad_var_name np.random.random(123) diff --git a/python/paddle/fluid/tests/unittests/test_layers.py b/python/paddle/fluid/tests/unittests/test_layers.py index e757598bbac..bb673d3b541 100644 --- a/python/paddle/fluid/tests/unittests/test_layers.py +++ b/python/paddle/fluid/tests/unittests/test_layers.py @@ -15,10 +15,10 @@ from __future__ import print_function import unittest -import paddle.v2.fluid.layers as layers -import paddle.v2.fluid.nets as nets -from paddle.v2.fluid.framework import Program, program_guard, default_main_program -from paddle.v2.fluid.param_attr import ParamAttr +import paddle.fluid.layers as layers +import paddle.fluid.nets as nets +from paddle.fluid.framework import Program, program_guard, default_main_program +from paddle.fluid.param_attr import ParamAttr import decorators diff --git a/python/paddle/fluid/tests/unittests/test_learning_rate_decay.py b/python/paddle/fluid/tests/unittests/test_learning_rate_decay.py index 1d6bab3d6c4..595b0516892 100644 --- a/python/paddle/fluid/tests/unittests/test_learning_rate_decay.py +++ b/python/paddle/fluid/tests/unittests/test_learning_rate_decay.py @@ -17,10 +17,10 @@ import unittest import math import copy -import paddle.v2.fluid.framework as framework -import paddle.v2.fluid as fluid -import paddle.v2.fluid.layers as layers -import paddle.v2.fluid.learning_rate_decay as lr_decay +import paddle.fluid.framework as framework +import paddle.fluid as fluid +import paddle.fluid.layers as layers +import paddle.fluid.learning_rate_decay as lr_decay def exponential_decay(learning_rate, diff --git a/python/paddle/fluid/tests/unittests/test_lod_array_length_op.py b/python/paddle/fluid/tests/unittests/test_lod_array_length_op.py index 643ee906d6f..d8b4e406625 100644 --- a/python/paddle/fluid/tests/unittests/test_lod_array_length_op.py +++ b/python/paddle/fluid/tests/unittests/test_lod_array_length_op.py @@ -13,9 +13,9 @@ # limitations under the License. import unittest -import paddle.v2.fluid.layers as layers -from paddle.v2.fluid.executor import Executor -import paddle.v2.fluid.core as core +import paddle.fluid.layers as layers +from paddle.fluid.executor import Executor +import paddle.fluid.core as core import numpy diff --git a/python/paddle/fluid/tests/unittests/test_lod_rank_table.py b/python/paddle/fluid/tests/unittests/test_lod_rank_table.py index 70b8d69585c..093eecb8370 100644 --- a/python/paddle/fluid/tests/unittests/test_lod_rank_table.py +++ b/python/paddle/fluid/tests/unittests/test_lod_rank_table.py @@ -12,9 +12,9 @@ # See the License for the specific language governing permissions and # limitations under the License. -from paddle.v2.fluid.layers import lod_rank_table, data -from paddle.v2.fluid.executor import Executor -import paddle.v2.fluid.core as core +from paddle.fluid.layers import lod_rank_table, data +from paddle.fluid.executor import Executor +import paddle.fluid.core as core import numpy import unittest diff --git a/python/paddle/fluid/tests/unittests/test_lod_tensor_array.py b/python/paddle/fluid/tests/unittests/test_lod_tensor_array.py index 0e90e255381..63b17a5ccd6 100644 --- a/python/paddle/fluid/tests/unittests/test_lod_tensor_array.py +++ b/python/paddle/fluid/tests/unittests/test_lod_tensor_array.py @@ -13,7 +13,7 @@ # limitations under the License. import unittest -import paddle.v2.fluid.core as core +import paddle.fluid.core as core import numpy diff --git a/python/paddle/fluid/tests/unittests/test_lod_tensor_array_ops.py b/python/paddle/fluid/tests/unittests/test_lod_tensor_array_ops.py index ebc0a2f7146..de1a3d101d8 100644 --- a/python/paddle/fluid/tests/unittests/test_lod_tensor_array_ops.py +++ b/python/paddle/fluid/tests/unittests/test_lod_tensor_array_ops.py @@ -13,12 +13,12 @@ # limitations under the License. import unittest -import paddle.v2.fluid.core as core +import paddle.fluid.core as core import numpy -import paddle.v2.fluid.layers as layers -from paddle.v2.fluid.framework import Program, program_guard -from paddle.v2.fluid.executor import Executor -from paddle.v2.fluid.backward import append_backward +import paddle.fluid.layers as layers +from paddle.fluid.framework import Program, program_guard +from paddle.fluid.executor import Executor +from paddle.fluid.backward import append_backward class TestCPULoDTensorArrayOps(unittest.TestCase): diff --git a/python/paddle/fluid/tests/unittests/test_math_op_patch.py b/python/paddle/fluid/tests/unittests/test_math_op_patch.py index cae5188fe88..6864d271e79 100644 --- a/python/paddle/fluid/tests/unittests/test_math_op_patch.py +++ b/python/paddle/fluid/tests/unittests/test_math_op_patch.py @@ -14,7 +14,7 @@ import unittest import decorators -import paddle.v2.fluid as fluid +import paddle.fluid as fluid import numpy diff --git a/python/paddle/fluid/tests/unittests/test_memory_optimization_transpiler.py b/python/paddle/fluid/tests/unittests/test_memory_optimization_transpiler.py index a276db581e2..e57804d0df8 100644 --- a/python/paddle/fluid/tests/unittests/test_memory_optimization_transpiler.py +++ b/python/paddle/fluid/tests/unittests/test_memory_optimization_transpiler.py @@ -15,10 +15,10 @@ from __future__ import print_function import unittest -import paddle.v2.fluid.layers as layers -import paddle.v2.fluid.optimizer as optimizer -from paddle.v2.fluid.framework import Program, program_guard -from paddle.v2.fluid.memory_optimization_transpiler import memory_optimize +import paddle.fluid.layers as layers +import paddle.fluid.optimizer as optimizer +from paddle.fluid.framework import Program, program_guard +from paddle.fluid.memory_optimization_transpiler import memory_optimize class TestControlFlowGraph(unittest.TestCase): diff --git a/python/paddle/fluid/tests/unittests/test_multihead_attention.py b/python/paddle/fluid/tests/unittests/test_multihead_attention.py index 6eeeefe021c..80c3c67967e 100644 --- a/python/paddle/fluid/tests/unittests/test_multihead_attention.py +++ b/python/paddle/fluid/tests/unittests/test_multihead_attention.py @@ -13,8 +13,8 @@ # limitations under the License. import unittest -import paddle.v2.fluid as fluid -import paddle.v2.fluid.core as core +import paddle.fluid as fluid +import paddle.fluid.core as core import numpy as np diff --git a/python/paddle/fluid/tests/unittests/test_net.py b/python/paddle/fluid/tests/unittests/test_net.py index 796a8391179..ae1699d647d 100644 --- a/python/paddle/fluid/tests/unittests/test_net.py +++ b/python/paddle/fluid/tests/unittests/test_net.py @@ -12,8 +12,8 @@ # See the License for the specific language governing permissions and # limitations under the License. -import paddle.v2.fluid.core as core -from paddle.v2.fluid.op import Operator +import paddle.fluid.core as core +from paddle.fluid.op import Operator import unittest diff --git a/python/paddle/fluid/tests/unittests/test_normalization_wrapper.py b/python/paddle/fluid/tests/unittests/test_normalization_wrapper.py index 094d8071e27..ef34893943d 100644 --- a/python/paddle/fluid/tests/unittests/test_normalization_wrapper.py +++ b/python/paddle/fluid/tests/unittests/test_normalization_wrapper.py @@ -13,8 +13,8 @@ # limitations under the License. import unittest -import paddle.v2.fluid as fluid -import paddle.v2.fluid.core as core +import paddle.fluid as fluid +import paddle.fluid.core as core import numpy as np diff --git a/python/paddle/fluid/tests/unittests/test_one_hot_op.py b/python/paddle/fluid/tests/unittests/test_one_hot_op.py index b7db30104a8..cd78cce8729 100644 --- a/python/paddle/fluid/tests/unittests/test_one_hot_op.py +++ b/python/paddle/fluid/tests/unittests/test_one_hot_op.py @@ -16,10 +16,10 @@ import unittest import numpy as np import math from op_test import OpTest -import paddle.v2.fluid as fluid -import paddle.v2.fluid.core as core -import paddle.v2.fluid.framework as framework -from paddle.v2.fluid.framework import Program, program_guard +import paddle.fluid as fluid +import paddle.fluid.core as core +import paddle.fluid.framework as framework +from paddle.fluid.framework import Program, program_guard class TestOneHotOp(OpTest): diff --git a/python/paddle/fluid/tests/unittests/test_op_support_gpu.py b/python/paddle/fluid/tests/unittests/test_op_support_gpu.py index f8ac55590c7..5fafb8280e1 100644 --- a/python/paddle/fluid/tests/unittests/test_op_support_gpu.py +++ b/python/paddle/fluid/tests/unittests/test_op_support_gpu.py @@ -13,7 +13,7 @@ # limitations under the License. import unittest -import paddle.v2.fluid.core as core +import paddle.fluid.core as core class TestOpSupportGPU(unittest.TestCase): diff --git a/python/paddle/fluid/tests/unittests/test_operator.py b/python/paddle/fluid/tests/unittests/test_operator.py index 1f5de93387d..5e418fe6ac2 100644 --- a/python/paddle/fluid/tests/unittests/test_operator.py +++ b/python/paddle/fluid/tests/unittests/test_operator.py @@ -14,8 +14,8 @@ import unittest -import paddle.v2.fluid.op as op -import paddle.v2.fluid.proto.framework_pb2 as framework_pb2 +import paddle.fluid.op as op +import paddle.fluid.proto.framework_pb2 as framework_pb2 class TestGetAllProtos(unittest.TestCase): diff --git a/python/paddle/fluid/tests/unittests/test_operator_desc.py b/python/paddle/fluid/tests/unittests/test_operator_desc.py index c64c08ff7f3..649fabe4a0c 100644 --- a/python/paddle/fluid/tests/unittests/test_operator_desc.py +++ b/python/paddle/fluid/tests/unittests/test_operator_desc.py @@ -14,9 +14,9 @@ import unittest -import paddle.v2.fluid.core as core +import paddle.fluid.core as core -from paddle.v2.fluid.framework import Program, default_startup_program +from paddle.fluid.framework import Program, default_startup_program main_program = default_startup_program() diff --git a/python/paddle/fluid/tests/unittests/test_optimizer.py b/python/paddle/fluid/tests/unittests/test_optimizer.py index 875e9e7c762..6ee7fc819a5 100644 --- a/python/paddle/fluid/tests/unittests/test_optimizer.py +++ b/python/paddle/fluid/tests/unittests/test_optimizer.py @@ -14,9 +14,9 @@ import unittest -import paddle.v2.fluid.framework as framework -import paddle.v2.fluid.optimizer as optimizer -from paddle.v2.fluid.backward import append_backward +import paddle.fluid.framework as framework +import paddle.fluid.optimizer as optimizer +from paddle.fluid.backward import append_backward class TestOptimizer(unittest.TestCase): diff --git a/python/paddle/fluid/tests/unittests/test_parallel_op.py b/python/paddle/fluid/tests/unittests/test_parallel_op.py index d65752608b2..edaae977dfb 100644 --- a/python/paddle/fluid/tests/unittests/test_parallel_op.py +++ b/python/paddle/fluid/tests/unittests/test_parallel_op.py @@ -14,7 +14,7 @@ import unittest -import paddle.v2.fluid as fluid +import paddle.fluid as fluid import numpy diff --git a/python/paddle/fluid/tests/unittests/test_parameter.py b/python/paddle/fluid/tests/unittests/test_parameter.py index 88356a7ea14..e09865074e8 100644 --- a/python/paddle/fluid/tests/unittests/test_parameter.py +++ b/python/paddle/fluid/tests/unittests/test_parameter.py @@ -13,11 +13,11 @@ # limitations under the License. import unittest -from paddle.v2.fluid.framework import default_main_program -import paddle.v2.fluid.core as core -from paddle.v2.fluid.executor import Executor -import paddle.v2.fluid.io as io -from paddle.v2.fluid.initializer import ConstantInitializer +from paddle.fluid.framework import default_main_program +import paddle.fluid.core as core +from paddle.fluid.executor import Executor +import paddle.fluid.io as io +from paddle.fluid.initializer import ConstantInitializer import numpy as np main_program = default_main_program() diff --git a/python/paddle/fluid/tests/unittests/test_pool2d_op.py b/python/paddle/fluid/tests/unittests/test_pool2d_op.py index 77961bc99f0..12899ecca36 100644 --- a/python/paddle/fluid/tests/unittests/test_pool2d_op.py +++ b/python/paddle/fluid/tests/unittests/test_pool2d_op.py @@ -15,7 +15,7 @@ import unittest import numpy as np -import paddle.v2.fluid.core as core +import paddle.fluid.core as core from op_test import OpTest diff --git a/python/paddle/fluid/tests/unittests/test_pool3d_op.py b/python/paddle/fluid/tests/unittests/test_pool3d_op.py index a6afdaedc51..321b5f39fff 100644 --- a/python/paddle/fluid/tests/unittests/test_pool3d_op.py +++ b/python/paddle/fluid/tests/unittests/test_pool3d_op.py @@ -15,7 +15,7 @@ import unittest import numpy as np -import paddle.v2.fluid.core as core +import paddle.fluid.core as core from op_test import OpTest diff --git a/python/paddle/fluid/tests/unittests/test_print_op.py b/python/paddle/fluid/tests/unittests/test_print_op.py index 1e49ce994b7..5c08bf4fc3f 100644 --- a/python/paddle/fluid/tests/unittests/test_print_op.py +++ b/python/paddle/fluid/tests/unittests/test_print_op.py @@ -13,12 +13,12 @@ # limitations under the License. import unittest -import paddle.v2.fluid.core as core -from paddle.v2.fluid.executor import Executor -import paddle.v2.fluid.layers as layers -from paddle.v2.fluid.backward import append_backward -from paddle.v2.fluid.framework import switch_main_program -from paddle.v2.fluid.framework import Program +import paddle.fluid.core as core +from paddle.fluid.executor import Executor +import paddle.fluid.layers as layers +from paddle.fluid.backward import append_backward +from paddle.fluid.framework import switch_main_program +from paddle.fluid.framework import Program import numpy as np diff --git a/python/paddle/fluid/tests/unittests/test_profiler.py b/python/paddle/fluid/tests/unittests/test_profiler.py index 62bfb2b8e24..09f23894c4c 100644 --- a/python/paddle/fluid/tests/unittests/test_profiler.py +++ b/python/paddle/fluid/tests/unittests/test_profiler.py @@ -15,10 +15,10 @@ import unittest import os import numpy as np -import paddle.v2.fluid as fluid -import paddle.v2.fluid.profiler as profiler -import paddle.v2.fluid.layers as layers -import paddle.v2.fluid.core as core +import paddle.fluid as fluid +import paddle.fluid.profiler as profiler +import paddle.fluid.layers as layers +import paddle.fluid.core as core class TestProfiler(unittest.TestCase): diff --git a/python/paddle/fluid/tests/unittests/test_program.py b/python/paddle/fluid/tests/unittests/test_program.py index 266e189e501..87a2195f0d5 100644 --- a/python/paddle/fluid/tests/unittests/test_program.py +++ b/python/paddle/fluid/tests/unittests/test_program.py @@ -15,8 +15,8 @@ from __future__ import print_function import unittest -from paddle.v2.fluid.framework import Program, default_main_program, program_guard, grad_var_name -import paddle.v2.fluid.layers as layers +from paddle.fluid.framework import Program, default_main_program, program_guard, grad_var_name +import paddle.fluid.layers as layers main_program = default_main_program() diff --git a/python/paddle/fluid/tests/unittests/test_protobuf.py b/python/paddle/fluid/tests/unittests/test_protobuf.py index 90de56514da..c3f1fa80185 100644 --- a/python/paddle/fluid/tests/unittests/test_protobuf.py +++ b/python/paddle/fluid/tests/unittests/test_protobuf.py @@ -12,7 +12,7 @@ # See the License for the specific language governing permissions and # limitations under the License. -import paddle.v2.fluid.proto.framework_pb2 as framework_pb2 +import paddle.fluid.proto.framework_pb2 as framework_pb2 import unittest diff --git a/python/paddle/fluid/tests/unittests/test_protobuf_descs.py b/python/paddle/fluid/tests/unittests/test_protobuf_descs.py index c3bef958748..309ea2b9b7e 100644 --- a/python/paddle/fluid/tests/unittests/test_protobuf_descs.py +++ b/python/paddle/fluid/tests/unittests/test_protobuf_descs.py @@ -13,7 +13,7 @@ # limitations under the License. import unittest -import paddle.v2.fluid.core as core +import paddle.fluid.core as core class TestOpDesc(unittest.TestCase): diff --git a/python/paddle/fluid/tests/unittests/test_recurrent_op.py b/python/paddle/fluid/tests/unittests/test_recurrent_op.py index 177d8fc65f4..d2d13386ac1 100644 --- a/python/paddle/fluid/tests/unittests/test_recurrent_op.py +++ b/python/paddle/fluid/tests/unittests/test_recurrent_op.py @@ -14,12 +14,12 @@ import unittest -import paddle.v2.fluid.layers as layers -from paddle.v2.fluid.framework import Program, grad_var_name -from paddle.v2.fluid.executor import Executor -from paddle.v2.fluid.backward import append_backward +import paddle.fluid.layers as layers +from paddle.fluid.framework import Program, grad_var_name +from paddle.fluid.executor import Executor +from paddle.fluid.backward import append_backward import numpy as np -import paddle.v2.fluid.core as core +import paddle.fluid.core as core class PyRNNBase(object): diff --git a/python/paddle/fluid/tests/unittests/test_recv_op.py b/python/paddle/fluid/tests/unittests/test_recv_op.py index 7a0802afc54..985d892c568 100644 --- a/python/paddle/fluid/tests/unittests/test_recv_op.py +++ b/python/paddle/fluid/tests/unittests/test_recv_op.py @@ -14,8 +14,8 @@ import unittest -import paddle.v2.fluid as fluid -import paddle.v2.fluid.layers as layers +import paddle.fluid as fluid +import paddle.fluid.layers as layers import numpy from multiprocessing import Process import os, sys diff --git a/python/paddle/fluid/tests/unittests/test_registry.py b/python/paddle/fluid/tests/unittests/test_registry.py index 82527a6ec7c..d04192cb3a3 100644 --- a/python/paddle/fluid/tests/unittests/test_registry.py +++ b/python/paddle/fluid/tests/unittests/test_registry.py @@ -13,7 +13,7 @@ # limitations under the License. import unittest -import paddle.v2.fluid as fluid +import paddle.fluid as fluid import numpy as np import decorators diff --git a/python/paddle/fluid/tests/unittests/test_regularizer.py b/python/paddle/fluid/tests/unittests/test_regularizer.py index 8fc4db1c5a8..9b1c4ceada5 100644 --- a/python/paddle/fluid/tests/unittests/test_regularizer.py +++ b/python/paddle/fluid/tests/unittests/test_regularizer.py @@ -14,10 +14,10 @@ import unittest -import paddle.v2.fluid.framework as framework -import paddle.v2.fluid.optimizer as optimizer -import paddle.v2.fluid.regularizer as regularizer -from paddle.v2.fluid.backward import append_backward +import paddle.fluid.framework as framework +import paddle.fluid.optimizer as optimizer +import paddle.fluid.regularizer as regularizer +from paddle.fluid.backward import append_backward class TestL2DecayRegularizer(unittest.TestCase): diff --git a/python/paddle/fluid/tests/unittests/test_reorder_lod_tensor.py b/python/paddle/fluid/tests/unittests/test_reorder_lod_tensor.py index d4e17d1b1e5..76d0d2f2fe8 100644 --- a/python/paddle/fluid/tests/unittests/test_reorder_lod_tensor.py +++ b/python/paddle/fluid/tests/unittests/test_reorder_lod_tensor.py @@ -13,8 +13,8 @@ # limitations under the License. import unittest -import paddle.v2.fluid as fluid -import paddle.v2.fluid.core as core +import paddle.fluid as fluid +import paddle.fluid.core as core import numpy diff --git a/python/paddle/fluid/tests/unittests/test_rnn_memory_helper_op.py b/python/paddle/fluid/tests/unittests/test_rnn_memory_helper_op.py index 773bd17456a..178606f0596 100644 --- a/python/paddle/fluid/tests/unittests/test_rnn_memory_helper_op.py +++ b/python/paddle/fluid/tests/unittests/test_rnn_memory_helper_op.py @@ -14,11 +14,11 @@ import unittest -from paddle.v2.fluid.framework import Program -from paddle.v2.fluid.executor import Executor -from paddle.v2.fluid.backward import append_backward +from paddle.fluid.framework import Program +from paddle.fluid.executor import Executor +from paddle.fluid.backward import append_backward import numpy as np -import paddle.v2.fluid.core as core +import paddle.fluid.core as core class RNNMemoryHelperOpTest(unittest.TestCase): diff --git a/python/paddle/fluid/tests/unittests/test_scope.py b/python/paddle/fluid/tests/unittests/test_scope.py index 2a2efbf0982..d249a989a94 100644 --- a/python/paddle/fluid/tests/unittests/test_scope.py +++ b/python/paddle/fluid/tests/unittests/test_scope.py @@ -12,25 +12,25 @@ # See the License for the specific language governing permissions and # limitations under the License. -import paddle.v2.fluid.core +import paddle.fluid.core import unittest class TestScope(unittest.TestCase): def test_create_destroy(self): - paddle_c = paddle.v2.fluid.core + paddle_c = paddle.fluid.core scope = paddle_c.Scope() self.assertIsNotNone(scope) scope_with_parent = scope.new_scope() self.assertIsNotNone(scope_with_parent) def test_none_variable(self): - paddle_c = paddle.v2.fluid.core + paddle_c = paddle.fluid.core scope = paddle_c.Scope() self.assertIsNone(scope.find_var("test")) def test_create_var_get_var(self): - paddle_c = paddle.v2.fluid.core + paddle_c = paddle.fluid.core scope = paddle_c.Scope() var_a = scope.var("var_a") self.assertIsNotNone(var_a) @@ -39,7 +39,7 @@ class TestScope(unittest.TestCase): self.assertIsNotNone(scope2.find_var('var_a')) def test_var_get_int(self): - paddle_c = paddle.v2.fluid.core + paddle_c = paddle.fluid.core scope = paddle_c.Scope() var = scope.var("test_int") var.set_int(10) diff --git a/python/paddle/fluid/tests/unittests/test_selected_rows.py b/python/paddle/fluid/tests/unittests/test_selected_rows.py index 50c8bb4bca2..3d7b86787fb 100644 --- a/python/paddle/fluid/tests/unittests/test_selected_rows.py +++ b/python/paddle/fluid/tests/unittests/test_selected_rows.py @@ -12,7 +12,7 @@ # See the License for the specific language governing permissions and # limitations under the License. -import paddle.v2.fluid.core as core +import paddle.fluid.core as core import unittest import numpy as np diff --git a/python/paddle/fluid/tests/unittests/test_sgd_op.py b/python/paddle/fluid/tests/unittests/test_sgd_op.py index e5379b961f4..c498b23db12 100644 --- a/python/paddle/fluid/tests/unittests/test_sgd_op.py +++ b/python/paddle/fluid/tests/unittests/test_sgd_op.py @@ -14,8 +14,8 @@ import unittest import numpy as np -import paddle.v2.fluid.core as core -from paddle.v2.fluid.op import Operator +import paddle.fluid.core as core +from paddle.fluid.op import Operator from op_test import OpTest diff --git a/python/paddle/fluid/tests/unittests/test_shrink_rnn_memory.py b/python/paddle/fluid/tests/unittests/test_shrink_rnn_memory.py index 48874ba8a5b..ba34e6a486e 100644 --- a/python/paddle/fluid/tests/unittests/test_shrink_rnn_memory.py +++ b/python/paddle/fluid/tests/unittests/test_shrink_rnn_memory.py @@ -13,12 +13,12 @@ # limitations under the License. import unittest -import paddle.v2.fluid.core as core -from paddle.v2.fluid.executor import Executor -import paddle.v2.fluid.layers as layers -from paddle.v2.fluid.backward import append_backward -from paddle.v2.fluid.framework import default_main_program, switch_main_program -from paddle.v2.fluid.framework import Program +import paddle.fluid.core as core +from paddle.fluid.executor import Executor +import paddle.fluid.layers as layers +from paddle.fluid.backward import append_backward +from paddle.fluid.framework import default_main_program, switch_main_program +from paddle.fluid.framework import Program import numpy as np diff --git a/python/paddle/fluid/tests/unittests/test_split_and_merge_lod_tensor_op.py b/python/paddle/fluid/tests/unittests/test_split_and_merge_lod_tensor_op.py index 48e6756a868..0b04ff302dc 100644 --- a/python/paddle/fluid/tests/unittests/test_split_and_merge_lod_tensor_op.py +++ b/python/paddle/fluid/tests/unittests/test_split_and_merge_lod_tensor_op.py @@ -13,12 +13,12 @@ # limitations under the License. import unittest -import paddle.v2.fluid.core as core +import paddle.fluid.core as core import numpy as np -import paddle.v2.fluid.layers as layers -from paddle.v2.fluid.framework import Program, program_guard -from paddle.v2.fluid.executor import Executor -from paddle.v2.fluid.backward import append_backward +import paddle.fluid.layers as layers +from paddle.fluid.framework import Program, program_guard +from paddle.fluid.executor import Executor +from paddle.fluid.backward import append_backward class TestCPULoDTensorArrayOps(unittest.TestCase): diff --git a/python/paddle/fluid/tests/unittests/test_split_selected_rows_op.py b/python/paddle/fluid/tests/unittests/test_split_selected_rows_op.py index 2aaa05dcacf..286d305a777 100644 --- a/python/paddle/fluid/tests/unittests/test_split_selected_rows_op.py +++ b/python/paddle/fluid/tests/unittests/test_split_selected_rows_op.py @@ -13,9 +13,9 @@ # limitations under the License. import unittest -import paddle.v2.fluid.core as core +import paddle.fluid.core as core import numpy as np -from paddle.v2.fluid.op import Operator +from paddle.fluid.op import Operator class TestSpliteSelectedRows(unittest.TestCase): diff --git a/python/paddle/fluid/tests/unittests/test_split_var.py b/python/paddle/fluid/tests/unittests/test_split_var.py index d7160b78b95..104ceb4fe7b 100644 --- a/python/paddle/fluid/tests/unittests/test_split_var.py +++ b/python/paddle/fluid/tests/unittests/test_split_var.py @@ -14,9 +14,9 @@ import math import unittest -from paddle.v2.fluid.distribute_transpiler import split_dense_variable -import paddle.v2.fluid as fluid -import paddle.v2.fluid.core as core +from paddle.fluid.distribute_transpiler import split_dense_variable +import paddle.fluid as fluid +import paddle.fluid.core as core import random diff --git a/python/paddle/fluid/tests/unittests/test_switch.py b/python/paddle/fluid/tests/unittests/test_switch.py index 11296bc04ea..528c5cce4bc 100644 --- a/python/paddle/fluid/tests/unittests/test_switch.py +++ b/python/paddle/fluid/tests/unittests/test_switch.py @@ -14,11 +14,11 @@ import unittest -import paddle.v2.fluid.core as core -import paddle.v2.fluid.layers as layers -import paddle.v2.fluid.framework as framework -from paddle.v2.fluid.executor import Executor -from paddle.v2.fluid.framework import default_startup_program +import paddle.fluid.core as core +import paddle.fluid.layers as layers +import paddle.fluid.framework as framework +from paddle.fluid.executor import Executor +from paddle.fluid.framework import default_startup_program class TestSwitch(unittest.TestCase): diff --git a/python/paddle/fluid/tests/unittests/test_tensor.py b/python/paddle/fluid/tests/unittests/test_tensor.py index 8fe234a90f2..a369783245a 100644 --- a/python/paddle/fluid/tests/unittests/test_tensor.py +++ b/python/paddle/fluid/tests/unittests/test_tensor.py @@ -12,7 +12,7 @@ # See the License for the specific language governing permissions and # limitations under the License. -import paddle.v2.fluid.core as core +import paddle.fluid.core as core import unittest import numpy diff --git a/python/paddle/fluid/tests/unittests/test_unique_name.py b/python/paddle/fluid/tests/unittests/test_unique_name.py index e28810c96b8..49ef335618c 100644 --- a/python/paddle/fluid/tests/unittests/test_unique_name.py +++ b/python/paddle/fluid/tests/unittests/test_unique_name.py @@ -13,7 +13,7 @@ # limitations under the License. import unittest -import paddle.v2.fluid as fluid +import paddle.fluid as fluid class TestUniqueName(unittest.TestCase): diff --git a/python/paddle/fluid/tests/unittests/test_variable.py b/python/paddle/fluid/tests/unittests/test_variable.py index 4ae3909d274..49784e21c46 100644 --- a/python/paddle/fluid/tests/unittests/test_variable.py +++ b/python/paddle/fluid/tests/unittests/test_variable.py @@ -13,8 +13,8 @@ # limitations under the License. import unittest -from paddle.v2.fluid.framework import default_main_program, Program, convert_np_dtype_to_dtype_ -import paddle.v2.fluid.core as core +from paddle.fluid.framework import default_main_program, Program, convert_np_dtype_to_dtype_ +import paddle.fluid.core as core import numpy as np diff --git a/python/paddle/fluid/tests/unittests/test_weight_normalization.py b/python/paddle/fluid/tests/unittests/test_weight_normalization.py index c2b81dddb00..2adf917bc5d 100644 --- a/python/paddle/fluid/tests/unittests/test_weight_normalization.py +++ b/python/paddle/fluid/tests/unittests/test_weight_normalization.py @@ -15,10 +15,10 @@ import unittest import numpy import collections -import paddle.v2.fluid as fluid -import paddle.v2.fluid.core as core -from paddle.v2.fluid.initializer import ConstantInitializer -from paddle.v2.fluid.param_attr import WeightNormParamAttr +import paddle.fluid as fluid +import paddle.fluid.core as core +from paddle.fluid.initializer import ConstantInitializer +from paddle.fluid.param_attr import WeightNormParamAttr class TestWeightNormalization(unittest.TestCase): diff --git a/python/paddle/fluid/tests/unittests/test_while_op.py b/python/paddle/fluid/tests/unittests/test_while_op.py index 3fa1d5e0edd..5afeb5ae898 100644 --- a/python/paddle/fluid/tests/unittests/test_while_op.py +++ b/python/paddle/fluid/tests/unittests/test_while_op.py @@ -13,10 +13,10 @@ # limitations under the License. import unittest -import paddle.v2.fluid.layers as layers -from paddle.v2.fluid.executor import Executor -import paddle.v2.fluid.core as core -from paddle.v2.fluid.backward import append_backward +import paddle.fluid.layers as layers +from paddle.fluid.executor import Executor +import paddle.fluid.core as core +from paddle.fluid.backward import append_backward import numpy -- GitLab From fa32516281eb4e31379ae8a149e6b9d7eaa75654 Mon Sep 17 00:00:00 2001 From: superjom Date: Sat, 24 Feb 2018 18:26:02 +0800 Subject: [PATCH 113/122] boot --- doc/api/overview.rst | 15 ++++++++++++--- 1 file changed, 12 insertions(+), 3 deletions(-) diff --git a/doc/api/overview.rst b/doc/api/overview.rst index 953d2db2b30..5b7da7a477b 100644 --- a/doc/api/overview.rst +++ b/doc/api/overview.rst @@ -1,4 +1,13 @@ -API Overview -============ +# V2 API Overview -TBD +The PaddlePaddle V2 API is designed to provide a modern user interface for PaddlePaddle V1(the original layer-based platform of PaddlePaddle), it proposes some high-level concepts such as [Layers](http://www.paddlepaddle.org/docs/develop/api/en/v2/config/layer.html),[Optimizer](http://www.paddlepaddle.org/docs/develop/api/en/v2/config/optimizer.html),[Evaluator](http://www.paddlepaddle.org/docs/develop/api/en/v2/config/evaluators.html) and [Data Reader](http://www.paddlepaddle.org/docs/develop/api/en/v2/data/data_reader.html) to make the model configuration more familiar to users. + +A model is composed of the computation described by a group of `Layers`, with `Evaluator` to define the error, `Optimizer` to update the parameters and `Data Reader` to feed in the data. + +We also provide the [interface for Training and Inference](http://www.paddlepaddle.org/docs/develop/api/en/v2/run_logic.html) to help control the training and inference phrase, it has several easy to use methods + +- `paddle.train` +- `paddle.test` +- `paddle.infer` + +to better expose the internal running details, different [Events](http://www.paddlepaddle.org/docs/develop/api/en/v2/run_logic.html#event) are available to users by writing some callbacks. -- GitLab From ef5d3d4bf132fb34015588a59f7c60a7ac2ce70a Mon Sep 17 00:00:00 2001 From: Luo Tao Date: Sat, 24 Feb 2018 18:11:30 +0800 Subject: [PATCH 114/122] move Fluid API doc out of V2 API doc --- doc/api/v2/fluid/data_feeder.rst | 2 +- doc/api/v2/fluid/evaluator.rst | 4 +- doc/api/v2/fluid/executor.rst | 8 +- doc/api/v2/fluid/gen_doc.py | 6 +- doc/api/v2/fluid/initializer.rst | 8 +- doc/api/v2/fluid/io.rst | 18 +-- doc/api/v2/fluid/layers.rst | 256 +++++++++++++++---------------- doc/api/v2/fluid/nets.rst | 8 +- doc/api/v2/fluid/optimizer.rst | 12 +- doc/api/v2/fluid/param_attr.rst | 4 +- doc/api/v2/fluid/profiler.rst | 6 +- doc/api/v2/fluid/regularizer.rst | 6 +- doc/templates/conf.py.cn.in | 1 + doc/templates/conf.py.en.in | 1 + 14 files changed, 171 insertions(+), 169 deletions(-) diff --git a/doc/api/v2/fluid/data_feeder.rst b/doc/api/v2/fluid/data_feeder.rst index a591c7334fd..3df5c0307ff 100644 --- a/doc/api/v2/fluid/data_feeder.rst +++ b/doc/api/v2/fluid/data_feeder.rst @@ -8,7 +8,7 @@ data_feeder DataFeeder ---------- -.. autoclass:: paddle.v2.fluid.data_feeder.DataFeeder +.. autoclass:: paddle.fluid.data_feeder.DataFeeder :members: :noindex: diff --git a/doc/api/v2/fluid/evaluator.rst b/doc/api/v2/fluid/evaluator.rst index 00dcecfd628..ae9daeb7918 100644 --- a/doc/api/v2/fluid/evaluator.rst +++ b/doc/api/v2/fluid/evaluator.rst @@ -8,14 +8,14 @@ evaluator Accuracy -------- -.. autoclass:: paddle.v2.fluid.evaluator.Accuracy +.. autoclass:: paddle.fluid.evaluator.Accuracy :members: :noindex: ChunkEvaluator -------------- -.. autoclass:: paddle.v2.fluid.evaluator.ChunkEvaluator +.. autoclass:: paddle.fluid.evaluator.ChunkEvaluator :members: :noindex: diff --git a/doc/api/v2/fluid/executor.rst b/doc/api/v2/fluid/executor.rst index a028f6283f2..a9cdf264e49 100644 --- a/doc/api/v2/fluid/executor.rst +++ b/doc/api/v2/fluid/executor.rst @@ -8,25 +8,25 @@ executor Executor -------- -.. autoclass:: paddle.v2.fluid.executor.Executor +.. autoclass:: paddle.fluid.executor.Executor :members: :noindex: global_scope ------------ -.. autofunction:: paddle.v2.fluid.executor.global_scope +.. autofunction:: paddle.fluid.executor.global_scope :noindex: scope_guard ----------- -.. autofunction:: paddle.v2.fluid.executor.scope_guard +.. autofunction:: paddle.fluid.executor.scope_guard :noindex: switch_scope ------------ -.. autofunction:: paddle.v2.fluid.executor.switch_scope +.. autofunction:: paddle.fluid.executor.switch_scope :noindex: diff --git a/doc/api/v2/fluid/gen_doc.py b/doc/api/v2/fluid/gen_doc.py index a2147fd3f7e..89ab880301b 100644 --- a/doc/api/v2/fluid/gen_doc.py +++ b/doc/api/v2/fluid/gen_doc.py @@ -17,7 +17,7 @@ import argparse import sys import types -import paddle.v2.fluid as fluid +import paddle.fluid as fluid def parse_arg(): @@ -70,7 +70,7 @@ class DocGenerator(object): def print_class(self, name): self._print_header_(name, dot='-', is_title=False) - self.stream.write('''.. autoclass:: paddle.v2.fluid.{0}.{1} + self.stream.write('''.. autoclass:: paddle.fluid.{0}.{1} :members: :noindex: @@ -78,7 +78,7 @@ class DocGenerator(object): def print_method(self, name): self._print_header_(name, dot='-', is_title=False) - self.stream.write('''.. autofunction:: paddle.v2.fluid.{0}.{1} + self.stream.write('''.. autofunction:: paddle.fluid.{0}.{1} :noindex: '''.format(self.module_name, name)) diff --git a/doc/api/v2/fluid/initializer.rst b/doc/api/v2/fluid/initializer.rst index c38be033fff..ee69925fda6 100644 --- a/doc/api/v2/fluid/initializer.rst +++ b/doc/api/v2/fluid/initializer.rst @@ -8,28 +8,28 @@ initializer Constant -------- -.. autoclass:: paddle.v2.fluid.initializer.Constant +.. autoclass:: paddle.fluid.initializer.Constant :members: :noindex: Uniform ------- -.. autoclass:: paddle.v2.fluid.initializer.Uniform +.. autoclass:: paddle.fluid.initializer.Uniform :members: :noindex: Normal ------ -.. autoclass:: paddle.v2.fluid.initializer.Normal +.. autoclass:: paddle.fluid.initializer.Normal :members: :noindex: Xavier ------ -.. autoclass:: paddle.v2.fluid.initializer.Xavier +.. autoclass:: paddle.fluid.initializer.Xavier :members: :noindex: diff --git a/doc/api/v2/fluid/io.rst b/doc/api/v2/fluid/io.rst index 37c9c273e36..dd9d88b6699 100644 --- a/doc/api/v2/fluid/io.rst +++ b/doc/api/v2/fluid/io.rst @@ -8,54 +8,54 @@ io save_vars --------- -.. autofunction:: paddle.v2.fluid.io.save_vars +.. autofunction:: paddle.fluid.io.save_vars :noindex: save_params ----------- -.. autofunction:: paddle.v2.fluid.io.save_params +.. autofunction:: paddle.fluid.io.save_params :noindex: save_persistables ----------------- -.. autofunction:: paddle.v2.fluid.io.save_persistables +.. autofunction:: paddle.fluid.io.save_persistables :noindex: load_vars --------- -.. autofunction:: paddle.v2.fluid.io.load_vars +.. autofunction:: paddle.fluid.io.load_vars :noindex: load_params ----------- -.. autofunction:: paddle.v2.fluid.io.load_params +.. autofunction:: paddle.fluid.io.load_params :noindex: load_persistables ----------------- -.. autofunction:: paddle.v2.fluid.io.load_persistables +.. autofunction:: paddle.fluid.io.load_persistables :noindex: save_inference_model -------------------- -.. autofunction:: paddle.v2.fluid.io.save_inference_model +.. autofunction:: paddle.fluid.io.save_inference_model :noindex: load_inference_model -------------------- -.. autofunction:: paddle.v2.fluid.io.load_inference_model +.. autofunction:: paddle.fluid.io.load_inference_model :noindex: get_inference_program --------------------- -.. autofunction:: paddle.v2.fluid.io.get_inference_program +.. autofunction:: paddle.fluid.io.get_inference_program :noindex: diff --git a/doc/api/v2/fluid/layers.rst b/doc/api/v2/fluid/layers.rst index 58c493fd741..ae35d8c5347 100644 --- a/doc/api/v2/fluid/layers.rst +++ b/doc/api/v2/fluid/layers.rst @@ -11,167 +11,167 @@ control_flow split_lod_tensor ---------------- -.. autofunction:: paddle.v2.fluid.layers.split_lod_tensor +.. autofunction:: paddle.fluid.layers.split_lod_tensor :noindex: merge_lod_tensor ---------------- -.. autofunction:: paddle.v2.fluid.layers.merge_lod_tensor +.. autofunction:: paddle.fluid.layers.merge_lod_tensor :noindex: BlockGuard ---------- -.. autoclass:: paddle.v2.fluid.layers.BlockGuard +.. autoclass:: paddle.fluid.layers.BlockGuard :members: :noindex: BlockGuardWithCompletion ------------------------ -.. autoclass:: paddle.v2.fluid.layers.BlockGuardWithCompletion +.. autoclass:: paddle.fluid.layers.BlockGuardWithCompletion :members: :noindex: StaticRNNMemoryLink ------------------- -.. autoclass:: paddle.v2.fluid.layers.StaticRNNMemoryLink +.. autoclass:: paddle.fluid.layers.StaticRNNMemoryLink :members: :noindex: WhileGuard ---------- -.. autoclass:: paddle.v2.fluid.layers.WhileGuard +.. autoclass:: paddle.fluid.layers.WhileGuard :members: :noindex: While ----- -.. autoclass:: paddle.v2.fluid.layers.While +.. autoclass:: paddle.fluid.layers.While :members: :noindex: lod_rank_table -------------- -.. autofunction:: paddle.v2.fluid.layers.lod_rank_table +.. autofunction:: paddle.fluid.layers.lod_rank_table :noindex: max_sequence_len ---------------- -.. autofunction:: paddle.v2.fluid.layers.max_sequence_len +.. autofunction:: paddle.fluid.layers.max_sequence_len :noindex: topk ---- -.. autofunction:: paddle.v2.fluid.layers.topk +.. autofunction:: paddle.fluid.layers.topk :noindex: lod_tensor_to_array ------------------- -.. autofunction:: paddle.v2.fluid.layers.lod_tensor_to_array +.. autofunction:: paddle.fluid.layers.lod_tensor_to_array :noindex: array_to_lod_tensor ------------------- -.. autofunction:: paddle.v2.fluid.layers.array_to_lod_tensor +.. autofunction:: paddle.fluid.layers.array_to_lod_tensor :noindex: increment --------- -.. autofunction:: paddle.v2.fluid.layers.increment +.. autofunction:: paddle.fluid.layers.increment :noindex: array_write ----------- -.. autofunction:: paddle.v2.fluid.layers.array_write +.. autofunction:: paddle.fluid.layers.array_write :noindex: create_array ------------ -.. autofunction:: paddle.v2.fluid.layers.create_array +.. autofunction:: paddle.fluid.layers.create_array :noindex: less_than --------- -.. autofunction:: paddle.v2.fluid.layers.less_than +.. autofunction:: paddle.fluid.layers.less_than :noindex: array_read ---------- -.. autofunction:: paddle.v2.fluid.layers.array_read +.. autofunction:: paddle.fluid.layers.array_read :noindex: shrink_memory ------------- -.. autofunction:: paddle.v2.fluid.layers.shrink_memory +.. autofunction:: paddle.fluid.layers.shrink_memory :noindex: array_length ------------ -.. autofunction:: paddle.v2.fluid.layers.array_length +.. autofunction:: paddle.fluid.layers.array_length :noindex: IfElse ------ -.. autoclass:: paddle.v2.fluid.layers.IfElse +.. autoclass:: paddle.fluid.layers.IfElse :members: :noindex: DynamicRNN ---------- -.. autoclass:: paddle.v2.fluid.layers.DynamicRNN +.. autoclass:: paddle.fluid.layers.DynamicRNN :members: :noindex: ConditionalBlock ---------------- -.. autoclass:: paddle.v2.fluid.layers.ConditionalBlock +.. autoclass:: paddle.fluid.layers.ConditionalBlock :members: :noindex: StaticRNN --------- -.. autoclass:: paddle.v2.fluid.layers.StaticRNN +.. autoclass:: paddle.fluid.layers.StaticRNN :members: :noindex: reorder_lod_tensor_by_rank -------------------------- -.. autofunction:: paddle.v2.fluid.layers.reorder_lod_tensor_by_rank +.. autofunction:: paddle.fluid.layers.reorder_lod_tensor_by_rank :noindex: ParallelDo ---------- -.. autoclass:: paddle.v2.fluid.layers.ParallelDo +.. autoclass:: paddle.fluid.layers.ParallelDo :members: :noindex: Print ----- -.. autofunction:: paddle.v2.fluid.layers.Print +.. autofunction:: paddle.fluid.layers.Print :noindex: device @@ -180,7 +180,7 @@ device get_places ---------- -.. autofunction:: paddle.v2.fluid.layers.get_places +.. autofunction:: paddle.fluid.layers.get_places :noindex: io @@ -189,27 +189,27 @@ io data ---- -.. autofunction:: paddle.v2.fluid.layers.data +.. autofunction:: paddle.fluid.layers.data :noindex: BlockGuardServ -------------- -.. autoclass:: paddle.v2.fluid.layers.BlockGuardServ +.. autoclass:: paddle.fluid.layers.BlockGuardServ :members: :noindex: ListenAndServ ------------- -.. autoclass:: paddle.v2.fluid.layers.ListenAndServ +.. autoclass:: paddle.fluid.layers.ListenAndServ :members: :noindex: Send ---- -.. autofunction:: paddle.v2.fluid.layers.Send +.. autofunction:: paddle.fluid.layers.Send :noindex: nn @@ -218,259 +218,259 @@ nn fc -- -.. autofunction:: paddle.v2.fluid.layers.fc +.. autofunction:: paddle.fluid.layers.fc :noindex: embedding --------- -.. autofunction:: paddle.v2.fluid.layers.embedding +.. autofunction:: paddle.fluid.layers.embedding :noindex: dynamic_lstm ------------ -.. autofunction:: paddle.v2.fluid.layers.dynamic_lstm +.. autofunction:: paddle.fluid.layers.dynamic_lstm :noindex: dynamic_lstmp ------------- -.. autofunction:: paddle.v2.fluid.layers.dynamic_lstmp +.. autofunction:: paddle.fluid.layers.dynamic_lstmp :noindex: dynamic_gru ----------- -.. autofunction:: paddle.v2.fluid.layers.dynamic_gru +.. autofunction:: paddle.fluid.layers.dynamic_gru :noindex: gru_unit -------- -.. autofunction:: paddle.v2.fluid.layers.gru_unit +.. autofunction:: paddle.fluid.layers.gru_unit :noindex: linear_chain_crf ---------------- -.. autofunction:: paddle.v2.fluid.layers.linear_chain_crf +.. autofunction:: paddle.fluid.layers.linear_chain_crf :noindex: crf_decoding ------------ -.. autofunction:: paddle.v2.fluid.layers.crf_decoding +.. autofunction:: paddle.fluid.layers.crf_decoding :noindex: cos_sim ------- -.. autofunction:: paddle.v2.fluid.layers.cos_sim +.. autofunction:: paddle.fluid.layers.cos_sim :noindex: cross_entropy ------------- -.. autofunction:: paddle.v2.fluid.layers.cross_entropy +.. autofunction:: paddle.fluid.layers.cross_entropy :noindex: square_error_cost ----------------- -.. autofunction:: paddle.v2.fluid.layers.square_error_cost +.. autofunction:: paddle.fluid.layers.square_error_cost :noindex: accuracy -------- -.. autofunction:: paddle.v2.fluid.layers.accuracy +.. autofunction:: paddle.fluid.layers.accuracy :noindex: chunk_eval ---------- -.. autofunction:: paddle.v2.fluid.layers.chunk_eval +.. autofunction:: paddle.fluid.layers.chunk_eval :noindex: sequence_conv ------------- -.. autofunction:: paddle.v2.fluid.layers.sequence_conv +.. autofunction:: paddle.fluid.layers.sequence_conv :noindex: conv2d ------ -.. autofunction:: paddle.v2.fluid.layers.conv2d +.. autofunction:: paddle.fluid.layers.conv2d :noindex: sequence_pool ------------- -.. autofunction:: paddle.v2.fluid.layers.sequence_pool +.. autofunction:: paddle.fluid.layers.sequence_pool :noindex: pool2d ------ -.. autofunction:: paddle.v2.fluid.layers.pool2d +.. autofunction:: paddle.fluid.layers.pool2d :noindex: batch_norm ---------- -.. autofunction:: paddle.v2.fluid.layers.batch_norm +.. autofunction:: paddle.fluid.layers.batch_norm :noindex: layer_norm ---------- -.. autofunction:: paddle.v2.fluid.layers.layer_norm +.. autofunction:: paddle.fluid.layers.layer_norm :noindex: beam_search_decode ------------------ -.. autofunction:: paddle.v2.fluid.layers.beam_search_decode +.. autofunction:: paddle.fluid.layers.beam_search_decode :noindex: conv2d_transpose ---------------- -.. autofunction:: paddle.v2.fluid.layers.conv2d_transpose +.. autofunction:: paddle.fluid.layers.conv2d_transpose :noindex: sequence_expand --------------- -.. autofunction:: paddle.v2.fluid.layers.sequence_expand +.. autofunction:: paddle.fluid.layers.sequence_expand :noindex: lstm_unit --------- -.. autofunction:: paddle.v2.fluid.layers.lstm_unit +.. autofunction:: paddle.fluid.layers.lstm_unit :noindex: reduce_sum ---------- -.. autofunction:: paddle.v2.fluid.layers.reduce_sum +.. autofunction:: paddle.fluid.layers.reduce_sum :noindex: reduce_mean ----------- -.. autofunction:: paddle.v2.fluid.layers.reduce_mean +.. autofunction:: paddle.fluid.layers.reduce_mean :noindex: reduce_max ---------- -.. autofunction:: paddle.v2.fluid.layers.reduce_max +.. autofunction:: paddle.fluid.layers.reduce_max :noindex: reduce_min ---------- -.. autofunction:: paddle.v2.fluid.layers.reduce_min +.. autofunction:: paddle.fluid.layers.reduce_min :noindex: sequence_first_step ------------------- -.. autofunction:: paddle.v2.fluid.layers.sequence_first_step +.. autofunction:: paddle.fluid.layers.sequence_first_step :noindex: sequence_last_step ------------------ -.. autofunction:: paddle.v2.fluid.layers.sequence_last_step +.. autofunction:: paddle.fluid.layers.sequence_last_step :noindex: dropout ------- -.. autofunction:: paddle.v2.fluid.layers.dropout +.. autofunction:: paddle.fluid.layers.dropout :noindex: split ----- -.. autofunction:: paddle.v2.fluid.layers.split +.. autofunction:: paddle.fluid.layers.split :noindex: ctc_greedy_decoder ------------------ -.. autofunction:: paddle.v2.fluid.layers.ctc_greedy_decoder +.. autofunction:: paddle.fluid.layers.ctc_greedy_decoder :noindex: edit_distance ------------- -.. autofunction:: paddle.v2.fluid.layers.edit_distance +.. autofunction:: paddle.fluid.layers.edit_distance :noindex: l2_normalize ------------ -.. autofunction:: paddle.v2.fluid.layers.l2_normalize +.. autofunction:: paddle.fluid.layers.l2_normalize :noindex: matmul ------ -.. autofunction:: paddle.v2.fluid.layers.matmul +.. autofunction:: paddle.fluid.layers.matmul :noindex: warpctc ------- -.. autofunction:: paddle.v2.fluid.layers.warpctc +.. autofunction:: paddle.fluid.layers.warpctc :noindex: sequence_reshape ---------------- -.. autofunction:: paddle.v2.fluid.layers.sequence_reshape +.. autofunction:: paddle.fluid.layers.sequence_reshape :noindex: transpose --------- -.. autofunction:: paddle.v2.fluid.layers.transpose +.. autofunction:: paddle.fluid.layers.transpose :noindex: im2sequence ----------- -.. autofunction:: paddle.v2.fluid.layers.im2sequence +.. autofunction:: paddle.fluid.layers.im2sequence :noindex: nce --- -.. autofunction:: paddle.v2.fluid.layers.nce +.. autofunction:: paddle.fluid.layers.nce :noindex: beam_search ----------- -.. autofunction:: paddle.v2.fluid.layers.beam_search +.. autofunction:: paddle.fluid.layers.beam_search :noindex: row_conv -------- -.. autofunction:: paddle.v2.fluid.layers.row_conv +.. autofunction:: paddle.fluid.layers.row_conv :noindex: multiplex --------- -.. autofunction:: paddle.v2.fluid.layers.multiplex +.. autofunction:: paddle.fluid.layers.multiplex :noindex: ops @@ -479,259 +479,259 @@ ops mean ---- -.. autofunction:: paddle.v2.fluid.layers.mean +.. autofunction:: paddle.fluid.layers.mean :noindex: mul --- -.. autofunction:: paddle.v2.fluid.layers.mul +.. autofunction:: paddle.fluid.layers.mul :noindex: reshape ------- -.. autofunction:: paddle.v2.fluid.layers.reshape +.. autofunction:: paddle.fluid.layers.reshape :noindex: scale ----- -.. autofunction:: paddle.v2.fluid.layers.scale +.. autofunction:: paddle.fluid.layers.scale :noindex: sigmoid_cross_entropy_with_logits --------------------------------- -.. autofunction:: paddle.v2.fluid.layers.sigmoid_cross_entropy_with_logits +.. autofunction:: paddle.fluid.layers.sigmoid_cross_entropy_with_logits :noindex: elementwise_add --------------- -.. autofunction:: paddle.v2.fluid.layers.elementwise_add +.. autofunction:: paddle.fluid.layers.elementwise_add :noindex: elementwise_div --------------- -.. autofunction:: paddle.v2.fluid.layers.elementwise_div +.. autofunction:: paddle.fluid.layers.elementwise_div :noindex: elementwise_sub --------------- -.. autofunction:: paddle.v2.fluid.layers.elementwise_sub +.. autofunction:: paddle.fluid.layers.elementwise_sub :noindex: elementwise_mul --------------- -.. autofunction:: paddle.v2.fluid.layers.elementwise_mul +.. autofunction:: paddle.fluid.layers.elementwise_mul :noindex: elementwise_max --------------- -.. autofunction:: paddle.v2.fluid.layers.elementwise_max +.. autofunction:: paddle.fluid.layers.elementwise_max :noindex: elementwise_min --------------- -.. autofunction:: paddle.v2.fluid.layers.elementwise_min +.. autofunction:: paddle.fluid.layers.elementwise_min :noindex: elementwise_pow --------------- -.. autofunction:: paddle.v2.fluid.layers.elementwise_pow +.. autofunction:: paddle.fluid.layers.elementwise_pow :noindex: clip ---- -.. autofunction:: paddle.v2.fluid.layers.clip +.. autofunction:: paddle.fluid.layers.clip :noindex: clip_by_norm ------------ -.. autofunction:: paddle.v2.fluid.layers.clip_by_norm +.. autofunction:: paddle.fluid.layers.clip_by_norm :noindex: sequence_softmax ---------------- -.. autofunction:: paddle.v2.fluid.layers.sequence_softmax +.. autofunction:: paddle.fluid.layers.sequence_softmax :noindex: sigmoid ------- -.. autofunction:: paddle.v2.fluid.layers.sigmoid +.. autofunction:: paddle.fluid.layers.sigmoid :noindex: logsigmoid ---------- -.. autofunction:: paddle.v2.fluid.layers.logsigmoid +.. autofunction:: paddle.fluid.layers.logsigmoid :noindex: exp --- -.. autofunction:: paddle.v2.fluid.layers.exp +.. autofunction:: paddle.fluid.layers.exp :noindex: relu ---- -.. autofunction:: paddle.v2.fluid.layers.relu +.. autofunction:: paddle.fluid.layers.relu :noindex: tanh ---- -.. autofunction:: paddle.v2.fluid.layers.tanh +.. autofunction:: paddle.fluid.layers.tanh :noindex: tanh_shrink ----------- -.. autofunction:: paddle.v2.fluid.layers.tanh_shrink +.. autofunction:: paddle.fluid.layers.tanh_shrink :noindex: softshrink ---------- -.. autofunction:: paddle.v2.fluid.layers.softshrink +.. autofunction:: paddle.fluid.layers.softshrink :noindex: sqrt ---- -.. autofunction:: paddle.v2.fluid.layers.sqrt +.. autofunction:: paddle.fluid.layers.sqrt :noindex: abs --- -.. autofunction:: paddle.v2.fluid.layers.abs +.. autofunction:: paddle.fluid.layers.abs :noindex: ceil ---- -.. autofunction:: paddle.v2.fluid.layers.ceil +.. autofunction:: paddle.fluid.layers.ceil :noindex: floor ----- -.. autofunction:: paddle.v2.fluid.layers.floor +.. autofunction:: paddle.fluid.layers.floor :noindex: round ----- -.. autofunction:: paddle.v2.fluid.layers.round +.. autofunction:: paddle.fluid.layers.round :noindex: reciprocal ---------- -.. autofunction:: paddle.v2.fluid.layers.reciprocal +.. autofunction:: paddle.fluid.layers.reciprocal :noindex: log --- -.. autofunction:: paddle.v2.fluid.layers.log +.. autofunction:: paddle.fluid.layers.log :noindex: square ------ -.. autofunction:: paddle.v2.fluid.layers.square +.. autofunction:: paddle.fluid.layers.square :noindex: softplus -------- -.. autofunction:: paddle.v2.fluid.layers.softplus +.. autofunction:: paddle.fluid.layers.softplus :noindex: softsign -------- -.. autofunction:: paddle.v2.fluid.layers.softsign +.. autofunction:: paddle.fluid.layers.softsign :noindex: brelu ----- -.. autofunction:: paddle.v2.fluid.layers.brelu +.. autofunction:: paddle.fluid.layers.brelu :noindex: leaky_relu ---------- -.. autofunction:: paddle.v2.fluid.layers.leaky_relu +.. autofunction:: paddle.fluid.layers.leaky_relu :noindex: soft_relu --------- -.. autofunction:: paddle.v2.fluid.layers.soft_relu +.. autofunction:: paddle.fluid.layers.soft_relu :noindex: elu --- -.. autofunction:: paddle.v2.fluid.layers.elu +.. autofunction:: paddle.fluid.layers.elu :noindex: relu6 ----- -.. autofunction:: paddle.v2.fluid.layers.relu6 +.. autofunction:: paddle.fluid.layers.relu6 :noindex: pow --- -.. autofunction:: paddle.v2.fluid.layers.pow +.. autofunction:: paddle.fluid.layers.pow :noindex: stanh ----- -.. autofunction:: paddle.v2.fluid.layers.stanh +.. autofunction:: paddle.fluid.layers.stanh :noindex: hard_shrink ----------- -.. autofunction:: paddle.v2.fluid.layers.hard_shrink +.. autofunction:: paddle.fluid.layers.hard_shrink :noindex: thresholded_relu ---------------- -.. autofunction:: paddle.v2.fluid.layers.thresholded_relu +.. autofunction:: paddle.fluid.layers.thresholded_relu :noindex: hard_sigmoid ------------ -.. autofunction:: paddle.v2.fluid.layers.hard_sigmoid +.. autofunction:: paddle.fluid.layers.hard_sigmoid :noindex: swish ----- -.. autofunction:: paddle.v2.fluid.layers.swish +.. autofunction:: paddle.fluid.layers.swish :noindex: tensor @@ -740,66 +740,66 @@ tensor create_tensor ------------- -.. autofunction:: paddle.v2.fluid.layers.create_tensor +.. autofunction:: paddle.fluid.layers.create_tensor :noindex: create_parameter ---------------- -.. autofunction:: paddle.v2.fluid.layers.create_parameter +.. autofunction:: paddle.fluid.layers.create_parameter :noindex: create_global_var ----------------- -.. autofunction:: paddle.v2.fluid.layers.create_global_var +.. autofunction:: paddle.fluid.layers.create_global_var :noindex: cast ---- -.. autofunction:: paddle.v2.fluid.layers.cast +.. autofunction:: paddle.fluid.layers.cast :noindex: concat ------ -.. autofunction:: paddle.v2.fluid.layers.concat +.. autofunction:: paddle.fluid.layers.concat :noindex: sums ---- -.. autofunction:: paddle.v2.fluid.layers.sums +.. autofunction:: paddle.fluid.layers.sums :noindex: assign ------ -.. autofunction:: paddle.v2.fluid.layers.assign +.. autofunction:: paddle.fluid.layers.assign :noindex: fill_constant_batch_size_like ----------------------------- -.. autofunction:: paddle.v2.fluid.layers.fill_constant_batch_size_like +.. autofunction:: paddle.fluid.layers.fill_constant_batch_size_like :noindex: fill_constant ------------- -.. autofunction:: paddle.v2.fluid.layers.fill_constant +.. autofunction:: paddle.fluid.layers.fill_constant :noindex: ones ---- -.. autofunction:: paddle.v2.fluid.layers.ones +.. autofunction:: paddle.fluid.layers.ones :noindex: zeros ----- -.. autofunction:: paddle.v2.fluid.layers.zeros +.. autofunction:: paddle.fluid.layers.zeros :noindex: diff --git a/doc/api/v2/fluid/nets.rst b/doc/api/v2/fluid/nets.rst index 015581b7660..7ae3187304f 100644 --- a/doc/api/v2/fluid/nets.rst +++ b/doc/api/v2/fluid/nets.rst @@ -8,24 +8,24 @@ nets simple_img_conv_pool -------------------- -.. autofunction:: paddle.v2.fluid.nets.simple_img_conv_pool +.. autofunction:: paddle.fluid.nets.simple_img_conv_pool :noindex: sequence_conv_pool ------------------ -.. autofunction:: paddle.v2.fluid.nets.sequence_conv_pool +.. autofunction:: paddle.fluid.nets.sequence_conv_pool :noindex: glu --- -.. autofunction:: paddle.v2.fluid.nets.glu +.. autofunction:: paddle.fluid.nets.glu :noindex: scaled_dot_product_attention ---------------------------- -.. autofunction:: paddle.v2.fluid.nets.scaled_dot_product_attention +.. autofunction:: paddle.fluid.nets.scaled_dot_product_attention :noindex: diff --git a/doc/api/v2/fluid/optimizer.rst b/doc/api/v2/fluid/optimizer.rst index 1691ebb9a7c..9b165f87045 100644 --- a/doc/api/v2/fluid/optimizer.rst +++ b/doc/api/v2/fluid/optimizer.rst @@ -8,42 +8,42 @@ optimizer SGD --- -.. autoclass:: paddle.v2.fluid.optimizer.SGD +.. autoclass:: paddle.fluid.optimizer.SGD :members: :noindex: Momentum -------- -.. autoclass:: paddle.v2.fluid.optimizer.Momentum +.. autoclass:: paddle.fluid.optimizer.Momentum :members: :noindex: Adagrad ------- -.. autoclass:: paddle.v2.fluid.optimizer.Adagrad +.. autoclass:: paddle.fluid.optimizer.Adagrad :members: :noindex: Adam ---- -.. autoclass:: paddle.v2.fluid.optimizer.Adam +.. autoclass:: paddle.fluid.optimizer.Adam :members: :noindex: Adamax ------ -.. autoclass:: paddle.v2.fluid.optimizer.Adamax +.. autoclass:: paddle.fluid.optimizer.Adamax :members: :noindex: DecayedAdagrad -------------- -.. autoclass:: paddle.v2.fluid.optimizer.DecayedAdagrad +.. autoclass:: paddle.fluid.optimizer.DecayedAdagrad :members: :noindex: diff --git a/doc/api/v2/fluid/param_attr.rst b/doc/api/v2/fluid/param_attr.rst index 8083d0d858d..8e4ddb2b049 100644 --- a/doc/api/v2/fluid/param_attr.rst +++ b/doc/api/v2/fluid/param_attr.rst @@ -8,14 +8,14 @@ param_attr ParamAttr --------- -.. autoclass:: paddle.v2.fluid.param_attr.ParamAttr +.. autoclass:: paddle.fluid.param_attr.ParamAttr :members: :noindex: WeightNormParamAttr ------------------- -.. autoclass:: paddle.v2.fluid.param_attr.WeightNormParamAttr +.. autoclass:: paddle.fluid.param_attr.WeightNormParamAttr :members: :noindex: diff --git a/doc/api/v2/fluid/profiler.rst b/doc/api/v2/fluid/profiler.rst index 4a1ff7cb697..74d102dcb0d 100644 --- a/doc/api/v2/fluid/profiler.rst +++ b/doc/api/v2/fluid/profiler.rst @@ -8,18 +8,18 @@ profiler cuda_profiler ------------- -.. autofunction:: paddle.v2.fluid.profiler.cuda_profiler +.. autofunction:: paddle.fluid.profiler.cuda_profiler :noindex: reset_profiler -------------- -.. autofunction:: paddle.v2.fluid.profiler.reset_profiler +.. autofunction:: paddle.fluid.profiler.reset_profiler :noindex: profiler -------- -.. autofunction:: paddle.v2.fluid.profiler.profiler +.. autofunction:: paddle.fluid.profiler.profiler :noindex: diff --git a/doc/api/v2/fluid/regularizer.rst b/doc/api/v2/fluid/regularizer.rst index 2c17d15599b..dc9740c4639 100644 --- a/doc/api/v2/fluid/regularizer.rst +++ b/doc/api/v2/fluid/regularizer.rst @@ -8,20 +8,20 @@ regularizer append_regularization_ops ------------------------- -.. autofunction:: paddle.v2.fluid.regularizer.append_regularization_ops +.. autofunction:: paddle.fluid.regularizer.append_regularization_ops :noindex: L1Decay ------- -.. autoclass:: paddle.v2.fluid.regularizer.L1Decay +.. autoclass:: paddle.fluid.regularizer.L1Decay :members: :noindex: L2Decay ------- -.. autoclass:: paddle.v2.fluid.regularizer.L2Decay +.. autoclass:: paddle.fluid.regularizer.L2Decay :members: :noindex: diff --git a/doc/templates/conf.py.cn.in b/doc/templates/conf.py.cn.in index d134aad794b..c8da4a790be 100644 --- a/doc/templates/conf.py.cn.in +++ b/doc/templates/conf.py.cn.in @@ -18,6 +18,7 @@ import shlex from recommonmark import parser, transform import paddle import paddle.v2 +import paddle.fluid MarkdownParser = parser.CommonMarkParser AutoStructify = transform.AutoStructify diff --git a/doc/templates/conf.py.en.in b/doc/templates/conf.py.en.in index 1f057d2e839..a4cb2b7170f 100644 --- a/doc/templates/conf.py.en.in +++ b/doc/templates/conf.py.en.in @@ -18,6 +18,7 @@ import shlex from recommonmark import parser, transform import paddle import paddle.v2 +import paddle.fluid MarkdownParser = parser.CommonMarkParser -- GitLab From f2694124291190da55e84f99dafd6ac0d8f067c2 Mon Sep 17 00:00:00 2001 From: superjom Date: Sat, 24 Feb 2018 18:46:18 +0800 Subject: [PATCH 115/122] update format for sphinx --- doc/api/overview.rst | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/doc/api/overview.rst b/doc/api/overview.rst index 5b7da7a477b..c1a4582b5f4 100644 --- a/doc/api/overview.rst +++ b/doc/api/overview.rst @@ -1,13 +1,16 @@ -# V2 API Overview +V2 API Overview +================ -The PaddlePaddle V2 API is designed to provide a modern user interface for PaddlePaddle V1(the original layer-based platform of PaddlePaddle), it proposes some high-level concepts such as [Layers](http://www.paddlepaddle.org/docs/develop/api/en/v2/config/layer.html),[Optimizer](http://www.paddlepaddle.org/docs/develop/api/en/v2/config/optimizer.html),[Evaluator](http://www.paddlepaddle.org/docs/develop/api/en/v2/config/evaluators.html) and [Data Reader](http://www.paddlepaddle.org/docs/develop/api/en/v2/data/data_reader.html) to make the model configuration more familiar to users. +The PaddlePaddle V2 API is designed to provide a modern user interface for PaddlePaddle V1(the original layer-based platform of PaddlePaddle), +it proposes some high-level concepts such as `Layers`_ ,`Optimizer`_ ,`Evaluator``_ and `Data Reader`_ to make the model configuration more familiar to users. A model is composed of the computation described by a group of `Layers`, with `Evaluator` to define the error, `Optimizer` to update the parameters and `Data Reader` to feed in the data. -We also provide the [interface for Training and Inference](http://www.paddlepaddle.org/docs/develop/api/en/v2/run_logic.html) to help control the training and inference phrase, it has several easy to use methods +We also provide the `interface for Training and Inference``_ are available to users by writing some callbacks. -- GitLab From 2b9de0af5880e4e77120ebeef4e97d516d13b13d Mon Sep 17 00:00:00 2001 From: superjom Date: Sat, 24 Feb 2018 18:58:36 +0800 Subject: [PATCH 116/122] format --- doc/api/overview.rst | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/doc/api/overview.rst b/doc/api/overview.rst index c1a4582b5f4..5213585f54c 100644 --- a/doc/api/overview.rst +++ b/doc/api/overview.rst @@ -2,15 +2,15 @@ V2 API Overview ================ The PaddlePaddle V2 API is designed to provide a modern user interface for PaddlePaddle V1(the original layer-based platform of PaddlePaddle), -it proposes some high-level concepts such as `Layers`_ ,`Optimizer`_ ,`Evaluator``_ and `Data Reader`_ to make the model configuration more familiar to users. +it proposes some high-level concepts such as `Layers `_ , `Optimizer `_ , `Evaluator `_ and `Data Reader `_ to make the model configuration more familiar to users. A model is composed of the computation described by a group of `Layers`, with `Evaluator` to define the error, `Optimizer` to update the parameters and `Data Reader` to feed in the data. -We also provide the `interface for Training and Inference``_ to help control the training and inference phrase, it has several easy to use methods - `paddle.train` - `paddle.test` - `paddle.infer` -to better expose the internal running details, different `Events`_ are available to users by writing some callbacks. +to better expose the internal running details, different `Events `_ are available to users by writing some callbacks. -- GitLab From 6989d081996fd2d7d85b3d4addbd60048c5f36ec Mon Sep 17 00:00:00 2001 From: superjom Date: Sat, 24 Feb 2018 18:59:23 +0800 Subject: [PATCH 117/122] lowercase Events --- doc/api/overview.rst | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/doc/api/overview.rst b/doc/api/overview.rst index 5213585f54c..16b6cf42660 100644 --- a/doc/api/overview.rst +++ b/doc/api/overview.rst @@ -13,4 +13,4 @@ it has several easy to use methods - `paddle.test` - `paddle.infer` -to better expose the internal running details, different `Events `_ are available to users by writing some callbacks. +to better expose the internal running details, different `events `_ are available to users by writing some callbacks. -- GitLab From bb3608494913d43c68d890bce5bbc913dd25571a Mon Sep 17 00:00:00 2001 From: Luo Tao Date: Sat, 24 Feb 2018 20:54:02 +0800 Subject: [PATCH 118/122] fix error directory of fluid inference unitest --- paddle/fluid/inference/tests/book/CMakeLists.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/paddle/fluid/inference/tests/book/CMakeLists.txt b/paddle/fluid/inference/tests/book/CMakeLists.txt index c0aba39b977..4ead540e5dd 100644 --- a/paddle/fluid/inference/tests/book/CMakeLists.txt +++ b/paddle/fluid/inference/tests/book/CMakeLists.txt @@ -4,7 +4,7 @@ function(inference_test TARGET_NAME) set(multiValueArgs ARGS) cmake_parse_arguments(inference_test "${options}" "${oneValueArgs}" "${multiValueArgs}" ${ARGN}) - set(PYTHON_TESTS_DIR ${PADDLE_SOURCE_DIR}/python/paddle/v2/fluid/tests) + set(PYTHON_TESTS_DIR ${PADDLE_SOURCE_DIR}/python/paddle/fluid/tests) set(arg_list "") if(inference_test_ARGS) foreach(arg ${inference_test_ARGS}) -- GitLab From 7453312dee86984f548a4ddebae62179c7c77139 Mon Sep 17 00:00:00 2001 From: Luo Tao Date: Sat, 24 Feb 2018 21:22:53 +0800 Subject: [PATCH 119/122] fix error python path when building framework_py_proto --- paddle/fluid/framework/CMakeLists.txt | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/paddle/fluid/framework/CMakeLists.txt b/paddle/fluid/framework/CMakeLists.txt index ef1bc07c2db..0b8cfab573f 100644 --- a/paddle/fluid/framework/CMakeLists.txt +++ b/paddle/fluid/framework/CMakeLists.txt @@ -68,9 +68,9 @@ py_proto_compile(framework_py_proto SRCS framework.proto) add_custom_target(framework_py_proto_init ALL COMMAND ${CMAKE_COMMAND} -E touch __init__.py) add_dependencies(framework_py_proto framework_py_proto_init) add_custom_command(TARGET framework_py_proto POST_BUILD - COMMAND ${CMAKE_COMMAND} -E make_directory ${PADDLE_SOURCE_DIR}/python/paddle/v2/fluid/proto - COMMAND cp *.py ${PADDLE_SOURCE_DIR}/python/paddle/v2/fluid/proto/ - COMMENT "Copy generated python proto into directory paddle/v2/fluid/proto." + COMMAND ${CMAKE_COMMAND} -E make_directory ${PADDLE_SOURCE_DIR}/python/paddle/fluid/proto + COMMAND cp *.py ${PADDLE_SOURCE_DIR}/python/paddle/fluid/proto/ + COMMENT "Copy generated python proto into directory paddle/fluid/proto." WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}) cc_library(backward SRCS backward.cc DEPS net_op) -- GitLab From 71f84c907693ab5469b7eb2252deebd4e18f1d0d Mon Sep 17 00:00:00 2001 From: Luo Tao Date: Mon, 26 Feb 2018 10:17:26 +0800 Subject: [PATCH 120/122] move paddle/v2/fluid to paddle/fluid in documentation --- doc/design/concurrent_programming.md | 2 +- doc/design/fluid.md | 2 +- doc/design/memory_optimization.md | 2 +- doc/howto/cluster/fluid_cluster_train_en.md | 6 +++--- doc/howto/optimization/cpu_profiling_cn.md | 14 +++++++------- doc/howto/optimization/cpu_profiling_en.md | 14 +++++++------- doc/howto/read_source.md | 12 ++++++------ 7 files changed, 26 insertions(+), 26 deletions(-) diff --git a/doc/design/concurrent_programming.md b/doc/design/concurrent_programming.md index afc65e831d5..f022e67fd3a 100644 --- a/doc/design/concurrent_programming.md +++ b/doc/design/concurrent_programming.md @@ -12,7 +12,7 @@ The following table compares concepts in Fluid and Go | Go | Fluid | |----|-------| -|user-defined functions | [layers](https://github.com/PaddlePaddle/Paddle/tree/develop/python/paddle/v2/fluid) | +|user-defined functions | [layers](https://github.com/PaddlePaddle/Paddle/tree/develop/python/paddle/fluid) | | control-flow and built-in functions | [intrinsics/operators](https://github.com/PaddlePaddle/Paddle/tree/develop/paddle/operators) | | goroutines, channels | [class ThreadPool](https://github.com/PaddlePaddle/Paddle/tree/develop/paddle/framework/thread_pool.h) | | runtime | [class Executor](https://github.com/PaddlePaddle/Paddle/blob/develop/paddle/framework/executor.h) | diff --git a/doc/design/fluid.md b/doc/design/fluid.md index 2acc168007d..f78fa8c1914 100644 --- a/doc/design/fluid.md +++ b/doc/design/fluid.md @@ -89,7 +89,7 @@ with train_loop.block(): h[t] = the_step(input[t]) ``` -An actual Fluid example is described [here](https://github.com/PaddlePaddle/Paddle/blob/a91efdde6910ce92a78e3aa7157412c4c88d9ee8/python/paddle/v2/fluid/tests/test_while_op.py#L36-L44). +An actual Fluid example is described [here](https://github.com/PaddlePaddle/Paddle/blob/bde090a97564b9c61a6aaa38b72ccc4889d102d9/python/paddle/fluid/tests/unittests/test_while_op.py#L50-L58). From the example, the Fluid programs look very similar to their PyTorch equivalent programs, except that Fluid's loop structure, wrapped with Python's `with` statement, could run much faster than just a Python loop. diff --git a/doc/design/memory_optimization.md b/doc/design/memory_optimization.md index 1f68cef4cc2..285464ada72 100644 --- a/doc/design/memory_optimization.md +++ b/doc/design/memory_optimization.md @@ -101,7 +101,7 @@ In-place is a built-in attribute of an operator. Since we treat in-place and oth #### contruct control flow graph -Following is the ProgramDesc protobuf of [machine translation](https://github.com/PaddlePaddle/Paddle/blob/develop/python/paddle/v2/fluid/tests/book/test_machine_translation.py) example. +Following is the ProgramDesc protobuf of [machine translation](https://github.com/PaddlePaddle/Paddle/blob/develop/python/paddle/fluid/tests/book/test_machine_translation.py) example. - Block0: diff --git a/doc/howto/cluster/fluid_cluster_train_en.md b/doc/howto/cluster/fluid_cluster_train_en.md index ae825d9a517..b4465e8269c 100644 --- a/doc/howto/cluster/fluid_cluster_train_en.md +++ b/doc/howto/cluster/fluid_cluster_train_en.md @@ -32,7 +32,7 @@ The non-cluster version of this demo with fluid API is as follows: ``` python import paddle.v2 as paddle -import paddle.v2.fluid as fluid +import paddle.fluid as fluid x = fluid.layers.data(name='x', shape=[13], dtype='float32') y_predict = fluid.layers.fc(input=x, size=1, act=None) @@ -125,11 +125,11 @@ for pass_id in range(100): ### E2E demo -Please find the complete demo from [here](https://github.com/PaddlePaddle/Paddle/blob/develop/python/paddle/v2/fluid/tests/book_distribute/notest_dist_fit_a_line.py). +Please find the complete demo from [here](https://github.com/PaddlePaddle/Paddle/blob/develop/python/paddle/fluid/tests/book_distribute/notest_dist_fit_a_line.py). First `cd` into the folder that contains the `python` files. In this case: ```bash -cd /paddle/python/paddle/v2/fluid/tests/book_distribute +cd /paddle/python/paddle/fluid/tests/book_distribute ``` In parameter server node run the following in the command line: diff --git a/doc/howto/optimization/cpu_profiling_cn.md b/doc/howto/optimization/cpu_profiling_cn.md index 14eba0e2f34..d59be670c2b 100644 --- a/doc/howto/optimization/cpu_profiling_cn.md +++ b/doc/howto/optimization/cpu_profiling_cn.md @@ -35,7 +35,7 @@ cprofilev -a 0.0.0.0 -p 3214 -f profile.out main.py ``` ncalls tottime percall cumtime percall filename:lineno(function) 1 0.284 0.284 29.514 29.514 main.py:1() - 4696 0.128 0.000 15.748 0.003 /home/yuyang/perf_test/.env/lib/python2.7/site-packages/paddle/v2/fluid/executor.py:20(run) + 4696 0.128 0.000 15.748 0.003 /home/yuyang/perf_test/.env/lib/python2.7/site-packages/paddle/fluid/executor.py:20(run) 4696 12.040 0.003 12.040 0.003 {built-in method run} 1 0.144 0.144 6.534 6.534 /home/yuyang/perf_test/.env/lib/python2.7/site-packages/paddle/v2/__init__.py:14() ``` @@ -61,9 +61,9 @@ cprofilev -a 0.0.0.0 -p 3214 -f profile.out main.py ```text 4696 12.040 0.003 12.040 0.003 {built-in method run} 300005 0.874 0.000 1.681 0.000 /home/yuyang/perf_test/.env/lib/python2.7/site-packages/paddle/v2/dataset/mnist.py:38(reader) - 107991 0.676 0.000 1.519 0.000 /home/yuyang/perf_test/.env/lib/python2.7/site-packages/paddle/v2/fluid/framework.py:219(__init__) - 4697 0.626 0.000 2.291 0.000 /home/yuyang/perf_test/.env/lib/python2.7/site-packages/paddle/v2/fluid/framework.py:428(sync_with_cpp) - 1 0.618 0.618 0.618 0.618 /home/yuyang/perf_test/.env/lib/python2.7/site-packages/paddle/v2/fluid/__init__.py:1() + 107991 0.676 0.000 1.519 0.000 /home/yuyang/perf_test/.env/lib/python2.7/site-packages/paddle/fluid/framework.py:219(__init__) + 4697 0.626 0.000 2.291 0.000 /home/yuyang/perf_test/.env/lib/python2.7/site-packages/paddle/fluid/framework.py:428(sync_with_cpp) + 1 0.618 0.618 0.618 0.618 /home/yuyang/perf_test/.env/lib/python2.7/site-packages/paddle/fluid/__init__.py:1() ``` 可以看到最耗时的函数是C++端的`run`函数。这需要联合我们第二节`Python`与`C++`混合代码的性能分析来进行调优。而`sync_with_cpp`函数的总共耗时很长,每次调用的耗时也很长。于是我们可以点击`sync_with_cpp`的详细信息,了解其调用关系。 @@ -76,9 +76,9 @@ Called By: Function was called by... ncalls tottime cumtime -/home/yuyang/perf_test/.env/lib/python2.7/site-packages/paddle/v2/fluid/framework.py:428(sync_with_cpp) <- 4697 0.626 2.291 /home/yuyang/perf_test/.env/lib/python2.7/site-packages/paddle/v2/fluid/framework.py:562(sync_with_cpp) -/home/yuyang/perf_test/.env/lib/python2.7/site-packages/paddle/v2/fluid/framework.py:562(sync_with_cpp) <- 4696 0.019 2.316 /home/yuyang/perf_test/.env/lib/python2.7/site-packages/paddle/v2/fluid/framework.py:487(clone) - 1 0.000 0.001 /home/yuyang/perf_test/.env/lib/python2.7/site-packages/paddle/v2/fluid/framework.py:534(append_backward) +/home/yuyang/perf_test/.env/lib/python2.7/site-packages/paddle/fluid/framework.py:428(sync_with_cpp) <- 4697 0.626 2.291 /home/yuyang/perf_test/.env/lib/python2.7/site-packages/paddle/fluid/framework.py:562(sync_with_cpp) +/home/yuyang/perf_test/.env/lib/python2.7/site-packages/paddle/fluid/framework.py:562(sync_with_cpp) <- 4696 0.019 2.316 /home/yuyang/perf_test/.env/lib/python2.7/site-packages/paddle/fluid/framework.py:487(clone) + 1 0.000 0.001 /home/yuyang/perf_test/.env/lib/python2.7/site-packages/paddle/fluid/framework.py:534(append_backward) Called: diff --git a/doc/howto/optimization/cpu_profiling_en.md b/doc/howto/optimization/cpu_profiling_en.md index 368af40cc73..01e5fddf615 100644 --- a/doc/howto/optimization/cpu_profiling_en.md +++ b/doc/howto/optimization/cpu_profiling_en.md @@ -49,7 +49,7 @@ port, we will see the output like the following: ``` ncalls tottime percall cumtime percall filename:lineno(function) 1 0.284 0.284 29.514 29.514 main.py:1() - 4696 0.128 0.000 15.748 0.003 /home/yuyang/perf_test/.env/lib/python2.7/site-packages/paddle/v2/fluid/executor.py:20(run) + 4696 0.128 0.000 15.748 0.003 /home/yuyang/perf_test/.env/lib/python2.7/site-packages/paddle/fluid/executor.py:20(run) 4696 12.040 0.003 12.040 0.003 {built-in method run} 1 0.144 0.144 6.534 6.534 /home/yuyang/perf_test/.env/lib/python2.7/site-packages/paddle/v2/__init__.py:14() ``` @@ -74,9 +74,9 @@ focus on. We can sort above profiling file by tottime: ```text 4696 12.040 0.003 12.040 0.003 {built-in method run} 300005 0.874 0.000 1.681 0.000 /home/yuyang/perf_test/.env/lib/python2.7/site-packages/paddle/v2/dataset/mnist.py:38(reader) - 107991 0.676 0.000 1.519 0.000 /home/yuyang/perf_test/.env/lib/python2.7/site-packages/paddle/v2/fluid/framework.py:219(__init__) - 4697 0.626 0.000 2.291 0.000 /home/yuyang/perf_test/.env/lib/python2.7/site-packages/paddle/v2/fluid/framework.py:428(sync_with_cpp) - 1 0.618 0.618 0.618 0.618 /home/yuyang/perf_test/.env/lib/python2.7/site-packages/paddle/v2/fluid/__init__.py:1() + 107991 0.676 0.000 1.519 0.000 /home/yuyang/perf_test/.env/lib/python2.7/site-packages/paddle/fluid/framework.py:219(__init__) + 4697 0.626 0.000 2.291 0.000 /home/yuyang/perf_test/.env/lib/python2.7/site-packages/paddle/fluid/framework.py:428(sync_with_cpp) + 1 0.618 0.618 0.618 0.618 /home/yuyang/perf_test/.env/lib/python2.7/site-packages/paddle/fluid/__init__.py:1() ``` We can see that the most time-consuming function is the `built-in @@ -93,9 +93,9 @@ Called By: Function was called by... ncalls tottime cumtime -/home/yuyang/perf_test/.env/lib/python2.7/site-packages/paddle/v2/fluid/framework.py:428(sync_with_cpp) <- 4697 0.626 2.291 /home/yuyang/perf_test/.env/lib/python2.7/site-packages/paddle/v2/fluid/framework.py:562(sync_with_cpp) -/home/yuyang/perf_test/.env/lib/python2.7/site-packages/paddle/v2/fluid/framework.py:562(sync_with_cpp) <- 4696 0.019 2.316 /home/yuyang/perf_test/.env/lib/python2.7/site-packages/paddle/v2/fluid/framework.py:487(clone) - 1 0.000 0.001 /home/yuyang/perf_test/.env/lib/python2.7/site-packages/paddle/v2/fluid/framework.py:534(append_backward) +/home/yuyang/perf_test/.env/lib/python2.7/site-packages/paddle/fluid/framework.py:428(sync_with_cpp) <- 4697 0.626 2.291 /home/yuyang/perf_test/.env/lib/python2.7/site-packages/paddle/fluid/framework.py:562(sync_with_cpp) +/home/yuyang/perf_test/.env/lib/python2.7/site-packages/paddle/fluid/framework.py:562(sync_with_cpp) <- 4696 0.019 2.316 /home/yuyang/perf_test/.env/lib/python2.7/site-packages/paddle/fluid/framework.py:487(clone) + 1 0.000 0.001 /home/yuyang/perf_test/.env/lib/python2.7/site-packages/paddle/fluid/framework.py:534(append_backward) Called: diff --git a/doc/howto/read_source.md b/doc/howto/read_source.md index 31987920f32..edf46aff8c6 100644 --- a/doc/howto/read_source.md +++ b/doc/howto/read_source.md @@ -1,6 +1,6 @@ # PaddlePaddle Fluid Source Code Overview -Examples: https://github.com/PaddlePaddle/Paddle/tree/develop/python/paddle/v2/fluid/tests/book +Examples: https://github.com/PaddlePaddle/Paddle/tree/develop/python/paddle/fluid/tests/book Core: https://github.com/PaddlePaddle/Paddle/tree/develop/paddle/framework @@ -26,16 +26,16 @@ sgd_optimizer = fluid.optimizer.SGD(learning_rate=0.001) sgd_optimizer.minimize(avg_cost) ``` -- Variables: `x`, `y`, `y_predict`, `cost` and `avg_cost`. [Python](https://github.com/PaddlePaddle/Paddle/blob/develop/python/paddle/v2/fluid/framework.py#) -- Layers: `fluid.layers.data`, `fluid.layers.fc` and `fluid.layers.mean` are layers. [Python](https://github.com/PaddlePaddle/Paddle/tree/develop/python/paddle/v2/fluid/layers) +- Variables: `x`, `y`, `y_predict`, `cost` and `avg_cost`. [Python](https://github.com/PaddlePaddle/Paddle/blob/develop/python/paddle/fluid/framework.py#) +- Layers: `fluid.layers.data`, `fluid.layers.fc` and `fluid.layers.mean` are layers. [Python](https://github.com/PaddlePaddle/Paddle/tree/develop/python/paddle/fluid/layers) - Every Layer has one or more operators and variables/parameters - All the operators are defined at [`paddle/operators/`](https://github.com/PaddlePaddle/Paddle/tree/develop/paddle/operators). Other worth-looking files: - Base class: [`paddle/framework/operator.h`](https://github.com/PaddlePaddle/Paddle/blob/develop/paddle/framework/operator.h) - Operator Registration: [`paddle/framework/op_registry.h`](https://github.com/PaddlePaddle/Paddle/blob/develop/paddle/framework/op_registry.h) - Operator Lookup: [`paddle/framework/op_info.h`](https://github.com/PaddlePaddle/Paddle/blob/develop/paddle/framework/op_info.h) - Optimizer: `fluid.optimizer.SGD`. It does the following - - Add backward operators. [[Python](https://github.com/PaddlePaddle/Paddle/blob/develop/python/paddle/v2/fluid/backward.py)] - - Add optimizer operators. [[Python](https://github.com/PaddlePaddle/Paddle/blob/develop/python/paddle/v2/fluid/optimizer.py)] + - Add backward operators. [[Python](https://github.com/PaddlePaddle/Paddle/blob/develop/python/paddle/fluid/backward.py)] + - Add optimizer operators. [[Python](https://github.com/PaddlePaddle/Paddle/blob/develop/python/paddle/fluid/optimizer.py)] # Run Time @@ -57,7 +57,7 @@ exe.run(fluid.default_main_program(), - Place: `place`. one of CPU, GPU or FPGA. [C++](https://github.com/PaddlePaddle/Paddle/blob/develop/paddle/platform/place.h) - The device handle are at [paddle/platform/device_context.h](https://github.com/PaddlePaddle/Paddle/blob/develop/paddle/platform/device_context.h) -- Executor: `fluid.Executor(place)`. [[Python](https://github.com/PaddlePaddle/Paddle/blob/develop/python/paddle/v2/fluid/executor.py), [C++](https://github.com/PaddlePaddle/Paddle/blob/develop/paddle/framework/executor.cc)] +- Executor: `fluid.Executor(place)`. [[Python](https://github.com/PaddlePaddle/Paddle/blob/develop/python/paddle/fluid/executor.py), [C++](https://github.com/PaddlePaddle/Paddle/blob/develop/paddle/framework/executor.cc)] - Feeds the data: `feed=feeder.feed(data)` - Evaluates all the operators - Fetches the result: `fetch_list=[avg_cost]` -- GitLab From 962326b06e9cc12ae9dc3b1ef353202be14f2a35 Mon Sep 17 00:00:00 2001 From: Luo Tao Date: Mon, 26 Feb 2018 10:39:53 +0800 Subject: [PATCH 121/122] move doc/api/v2/fluid to doc/api/fluid --- doc/api/{v2 => }/fluid/data_feeder.rst | 0 doc/api/{v2 => }/fluid/evaluator.rst | 0 doc/api/{v2 => }/fluid/executor.rst | 0 doc/api/{v2 => }/fluid/gen_doc.py | 0 doc/api/{v2 => }/fluid/gen_doc.sh | 0 doc/api/fluid/index.rst | 18 ++++++++++++++++++ doc/api/{v2 => }/fluid/initializer.rst | 0 doc/api/{v2 => }/fluid/io.rst | 0 doc/api/{v2 => }/fluid/layers.rst | 0 doc/api/{v2 => }/fluid/nets.rst | 0 doc/api/{v2 => }/fluid/optimizer.rst | 0 doc/api/{v2 => }/fluid/param_attr.rst | 0 doc/api/{v2 => }/fluid/profiler.rst | 0 doc/api/{v2 => }/fluid/regularizer.rst | 0 doc/api/index_en.rst | 2 +- doc/api/v2/fluid.rst | 18 ------------------ 16 files changed, 19 insertions(+), 19 deletions(-) rename doc/api/{v2 => }/fluid/data_feeder.rst (100%) rename doc/api/{v2 => }/fluid/evaluator.rst (100%) rename doc/api/{v2 => }/fluid/executor.rst (100%) rename doc/api/{v2 => }/fluid/gen_doc.py (100%) rename doc/api/{v2 => }/fluid/gen_doc.sh (100%) create mode 100644 doc/api/fluid/index.rst rename doc/api/{v2 => }/fluid/initializer.rst (100%) rename doc/api/{v2 => }/fluid/io.rst (100%) rename doc/api/{v2 => }/fluid/layers.rst (100%) rename doc/api/{v2 => }/fluid/nets.rst (100%) rename doc/api/{v2 => }/fluid/optimizer.rst (100%) rename doc/api/{v2 => }/fluid/param_attr.rst (100%) rename doc/api/{v2 => }/fluid/profiler.rst (100%) rename doc/api/{v2 => }/fluid/regularizer.rst (100%) delete mode 100644 doc/api/v2/fluid.rst diff --git a/doc/api/v2/fluid/data_feeder.rst b/doc/api/fluid/data_feeder.rst similarity index 100% rename from doc/api/v2/fluid/data_feeder.rst rename to doc/api/fluid/data_feeder.rst diff --git a/doc/api/v2/fluid/evaluator.rst b/doc/api/fluid/evaluator.rst similarity index 100% rename from doc/api/v2/fluid/evaluator.rst rename to doc/api/fluid/evaluator.rst diff --git a/doc/api/v2/fluid/executor.rst b/doc/api/fluid/executor.rst similarity index 100% rename from doc/api/v2/fluid/executor.rst rename to doc/api/fluid/executor.rst diff --git a/doc/api/v2/fluid/gen_doc.py b/doc/api/fluid/gen_doc.py similarity index 100% rename from doc/api/v2/fluid/gen_doc.py rename to doc/api/fluid/gen_doc.py diff --git a/doc/api/v2/fluid/gen_doc.sh b/doc/api/fluid/gen_doc.sh similarity index 100% rename from doc/api/v2/fluid/gen_doc.sh rename to doc/api/fluid/gen_doc.sh diff --git a/doc/api/fluid/index.rst b/doc/api/fluid/index.rst new file mode 100644 index 00000000000..b0710d8b199 --- /dev/null +++ b/doc/api/fluid/index.rst @@ -0,0 +1,18 @@ +====================== +Fluid +====================== + +.. toctree:: + :maxdepth: 1 + + layers.rst + data_feeder.rst + executor.rst + initializer.rst + evaluator.rst + nets.rst + optimizer.rst + param_attr.rst + profiler.rst + regularizer.rst + io.rst diff --git a/doc/api/v2/fluid/initializer.rst b/doc/api/fluid/initializer.rst similarity index 100% rename from doc/api/v2/fluid/initializer.rst rename to doc/api/fluid/initializer.rst diff --git a/doc/api/v2/fluid/io.rst b/doc/api/fluid/io.rst similarity index 100% rename from doc/api/v2/fluid/io.rst rename to doc/api/fluid/io.rst diff --git a/doc/api/v2/fluid/layers.rst b/doc/api/fluid/layers.rst similarity index 100% rename from doc/api/v2/fluid/layers.rst rename to doc/api/fluid/layers.rst diff --git a/doc/api/v2/fluid/nets.rst b/doc/api/fluid/nets.rst similarity index 100% rename from doc/api/v2/fluid/nets.rst rename to doc/api/fluid/nets.rst diff --git a/doc/api/v2/fluid/optimizer.rst b/doc/api/fluid/optimizer.rst similarity index 100% rename from doc/api/v2/fluid/optimizer.rst rename to doc/api/fluid/optimizer.rst diff --git a/doc/api/v2/fluid/param_attr.rst b/doc/api/fluid/param_attr.rst similarity index 100% rename from doc/api/v2/fluid/param_attr.rst rename to doc/api/fluid/param_attr.rst diff --git a/doc/api/v2/fluid/profiler.rst b/doc/api/fluid/profiler.rst similarity index 100% rename from doc/api/v2/fluid/profiler.rst rename to doc/api/fluid/profiler.rst diff --git a/doc/api/v2/fluid/regularizer.rst b/doc/api/fluid/regularizer.rst similarity index 100% rename from doc/api/v2/fluid/regularizer.rst rename to doc/api/fluid/regularizer.rst diff --git a/doc/api/index_en.rst b/doc/api/index_en.rst index 77337982be1..fc8dbd07eba 100644 --- a/doc/api/index_en.rst +++ b/doc/api/index_en.rst @@ -8,4 +8,4 @@ API v2/model_configs.rst v2/data.rst v2/run_logic.rst - v2/fluid.rst + fluid/index.rst diff --git a/doc/api/v2/fluid.rst b/doc/api/v2/fluid.rst deleted file mode 100644 index 5f15cad2b53..00000000000 --- a/doc/api/v2/fluid.rst +++ /dev/null @@ -1,18 +0,0 @@ -====================== -Fluid -====================== - -.. toctree:: - :maxdepth: 1 - - fluid/layers.rst - fluid/data_feeder.rst - fluid/executor.rst - fluid/initializer.rst - fluid/evaluator.rst - fluid/nets.rst - fluid/optimizer.rst - fluid/param_attr.rst - fluid/profiler.rst - fluid/regularizer.rst - fluid/io.rst -- GitLab From ea9e62b8fcf7326a17a8cd72f1f9171807f92d8a Mon Sep 17 00:00:00 2001 From: qiaolongfei Date: Mon, 26 Feb 2018 10:45:03 +0800 Subject: [PATCH 122/122] optimize code --- python/paddle/fluid/optimizer.py | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/python/paddle/fluid/optimizer.py b/python/paddle/fluid/optimizer.py index 9309ec39169..93a19de92e1 100644 --- a/python/paddle/fluid/optimizer.py +++ b/python/paddle/fluid/optimizer.py @@ -38,13 +38,13 @@ class Optimizer(object): def __init__(self, learning_rate, global_step=None, regularization=None): if not isinstance(learning_rate, float) and \ not isinstance(learning_rate, framework.Variable): - raise ValueError("learning rate should be float or Variable") + raise TypeError("learning rate should be float or Variable") self._global_step = global_step self.regularization = regularization self._learning_rate = learning_rate # each program should have a independent learning rate # program -> Variable(learning_rate) - self._learning_rate_map = defaultdict(lambda: None) + self._learning_rate_map = dict() if isinstance(self._learning_rate, framework.Variable): self._learning_rate_map[framework.default_main_program( )] = self._learning_rate @@ -62,7 +62,7 @@ class Optimizer(object): return else: if not isinstance(self._learning_rate, float): - raise ValueError( + raise TypeError( "learning rate variable is create outside optimizer," "can not create new learning rate variable for new program") @@ -82,7 +82,7 @@ class Optimizer(object): """ if program is None: program = framework.default_main_program() - return self._learning_rate_map[program] + return self._learning_rate_map.get(program, None) def _append_optimize_op(self, block, param_and_grad): """ append optimize operator to block and return all the added optimize_op -- GitLab