diff --git a/Dockerfile b/Dockerfile index 6ac9901ac6cea12e97047efdfb6272c957f166ae..60e76c7f2ede6beaca11659020d5991a75d5b741 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/doc/api/overview.rst b/doc/api/overview.rst index 953d2db2b30c14c92c2d6d762294c3aebc6eda29..16b6cf42660c51feee09c689c671d5ef06663efb 100644 --- a/doc/api/overview.rst +++ b/doc/api/overview.rst @@ -1,4 +1,16 @@ -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 `_ , `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. diff --git a/doc/api/v2/fluid/data_feeder.rst b/doc/api/v2/fluid/data_feeder.rst index a591c7334fd31c98a94b50a4344f251560a0f2f9..3df5c0307ffed9d101da58b385840b115920e906 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 00dcecfd628a35d83d1c596bf0aea819a1705862..ae9daeb7918d773d7330f419de96c6972a836710 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 a028f6283f2ca333bdf6c9857a98661c0222b41e..a9cdf264e49691afc4b9425b7bfe54f8157ae6c2 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 a2147fd3f7ea635d8f14210fbcd1a568ee2230ee..89ab880301b6ac687fd61f556f87f03792c37da3 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 c38be033fff2997930525f51c93995db09daa2b6..ee69925fda6b3fc850cfb632e8edd359e7fcff9c 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 37c9c273e369532e8ff596e9649cb695a98a2505..dd9d88b669957c22cd0a07fa4b7e219e2d6e5d61 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 58c493fd7412cf9dbe507c9622d67dae33a5fb25..ae35d8c53476b34cb18331364267dd7c8b94dd64 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 015581b7660848bdb0845fafe2d3fc05405e6ae6..7ae3187304f386a08c5cb8a4ba093423a58a7f36 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 1691ebb9a7cb16da96e04147d0adea322374f529..9b165f870459b4f9ef2efe24f5604a3fcb96f7f3 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 8083d0d858dafcd275eaddb9b475875ee42ef724..8e4ddb2b0492d0fcfcade199fdd6dfe43faa7075 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 4a1ff7cb6976e0054f77428b699ea679aa91394f..74d102dcb0db35766c34e3d14939a8aa5861686b 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 2c17d15599baa1d02eb87c7b6c40034769ebb3a4..dc9740c46392567d314121ac401540b0e7382703 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 d134aad794b0a630dfc8395c484d111bc5462d9b..c8da4a790be041d673a749cf200dadb839fb3a62 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 1f057d2e839896722fedba6634607bcdf2fd893a..a4cb2b7170fc8cdfb05e97738f7b6feb8165fce0 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 diff --git a/paddle/fluid/framework/CMakeLists.txt b/paddle/fluid/framework/CMakeLists.txt index ef1bc07c2dbe71268c706a119056d3a9fcfc7f8c..0b8cfab573f2771d6845df2d2768c8f6e6634043 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) diff --git a/paddle/fluid/inference/tests/book/CMakeLists.txt b/paddle/fluid/inference/tests/book/CMakeLists.txt index c0aba39b97770886cf95456e9876d3cc7ff92266..4ead540e5dd87ccf66168ab29c9d4aeaf6921269 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}) diff --git a/paddle/fluid/platform/nccl_test.cu b/paddle/fluid/platform/nccl_test.cu index 212ea8517e897f86a3c19bb5d996c567854811a6..32a293796c09e5254c5eb48d11fa74617b3465ac 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 56fa138786104df3b67cd5248d1625509cc913d1..8ec3d0c657400165c2225238f21facfb6c84df7c 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 diff --git a/python/CMakeLists.txt b/python/CMakeLists.txt index 36919ab00bf6fc1f9aee350074e5532bfdc7d45e..0d497dcfce909d969081ac49dd760e70f025f73d 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/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 99% rename from python/paddle/v2/fluid/backward.py rename to python/paddle/fluid/backward.py index 4da73bb9963cd7870e8496686c9618b4da1728e8..58fa7f1bebc082df11e07f5f97927b417af3e4e8 100644 --- a/python/paddle/v2/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/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 94% rename from python/paddle/v2/fluid/default_scope_funcs.py rename to python/paddle/fluid/default_scope_funcs.py index eeb9fb204337b775e95a8e1a5628c86275a6e5c9..f8faf6942524612ccc63713240bb289eeeaf75eb 100644 --- a/python/paddle/v2/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/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 99% rename from python/paddle/v2/fluid/io.py rename to python/paddle/fluid/io.py index 8a8bd089b5890f99c5f8f8961a0c2974208ca3e0..33f709ece48c450fbf893855edd59cd687cb0d9d 100644 --- a/python/paddle/v2/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/v2/fluid/layer_helper.py b/python/paddle/fluid/layer_helper.py similarity index 99% rename from python/paddle/v2/fluid/layer_helper.py rename to python/paddle/fluid/layer_helper.py index dc4f992ddc3c349a74d62003befbac923a747c07..6437dbb446e13d9ba24098dd936bfba395c6a566 100644 --- a/python/paddle/v2/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/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 97% rename from python/paddle/v2/fluid/net_drawer.py rename to python/paddle/fluid/net_drawer.py index 66793a57858cc6f8c6e18ebe51e7403ddd56f242..73946a0721dc4a6d03074a4708cf574951412e66 100644 --- a/python/paddle/v2/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/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 99% rename from python/paddle/v2/fluid/op.py rename to python/paddle/fluid/op.py index 6a413704583a0d830ab385c0f8571893edfc9288..0b76e94157e378b40baff641c466968e239d8a83 100644 --- a/python/paddle/v2/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/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 98% 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 index c7db70f1b18e958d2c3d22aff1c48a4556a26fc9..adf38ea28995be137efe853d0842142cbeb282e7 100644 --- a/python/paddle/v2/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/v2/fluid/tests/book/test_fit_a_line.py b/python/paddle/fluid/tests/book/test_fit_a_line.py similarity index 99% 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 index a66c2c3c2fc24048eb794a1a36e2b2fc8ff0da27..0d6fb872d70e339dbd0d86aa3406740ca5e4ef2c 100644 --- a/python/paddle/v2/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/v2/fluid/tests/book/test_image_classification.py b/python/paddle/fluid/tests/book/test_image_classification.py similarity index 99% rename from python/paddle/v2/fluid/tests/book/test_image_classification.py rename to python/paddle/fluid/tests/book/test_image_classification.py index 734ab3e4fbabc9360f7f11013143625932585c48..2f6c7d1a70d2c9550f3af1babb7fe9ac744fb679 100644 --- a/python/paddle/v2/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/v2/fluid/tests/book/test_label_semantic_roles.py b/python/paddle/fluid/tests/book/test_label_semantic_roles.py similarity index 99% 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 index b790246ec15777d254a0aaee90393e19f72c2ea1..fcc9dbf8bbf15cc8756127046ebe56ab9246e7bc 100644 --- a/python/paddle/v2/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/v2/fluid/tests/book/test_machine_translation.py b/python/paddle/fluid/tests/book/test_machine_translation.py similarity index 98% rename from python/paddle/v2/fluid/tests/book/test_machine_translation.py rename to python/paddle/fluid/tests/book/test_machine_translation.py index d3405a9601d5c12b05e257ab2e28176fa1d743f4..287ef7a752474e2a865b71c140d5f66977c9aa82 100644 --- a/python/paddle/v2/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/v2/fluid/tests/book/test_recognize_digits.py b/python/paddle/fluid/tests/book/test_recognize_digits.py similarity index 99% rename from python/paddle/v2/fluid/tests/book/test_recognize_digits.py rename to python/paddle/fluid/tests/book/test_recognize_digits.py index 2462d425e16c40f2fa3b0944311aea4f44de3ac4..2a778b04538582d4bff20a97221bc2daa81452f8 100644 --- a/python/paddle/v2/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/v2/fluid/tests/book/test_recommender_system.py b/python/paddle/fluid/tests/book/test_recommender_system.py similarity index 97% rename from python/paddle/v2/fluid/tests/book/test_recommender_system.py rename to python/paddle/fluid/tests/book/test_recommender_system.py index 1a7d8d57ffa7f459bac4b55882dd5f9b0ed8beda..81318823e5c329faa140dbaa8d5b23eb6dc0f7ca 100644 --- a/python/paddle/v2/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/v2/fluid/tests/book/test_understand_sentiment.py b/python/paddle/fluid/tests/book/test_understand_sentiment.py similarity index 99% rename from python/paddle/v2/fluid/tests/book/test_understand_sentiment.py rename to python/paddle/fluid/tests/book/test_understand_sentiment.py index 61f46b51c4457a7e7d3364d38f874e998318afef..8bb4bf92de9a6e6e6160c5eca675bc154d254d51 100644 --- a/python/paddle/v2/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/v2/fluid/tests/book/test_word2vec.py b/python/paddle/fluid/tests/book/test_word2vec.py similarity index 99% rename from python/paddle/v2/fluid/tests/book/test_word2vec.py rename to python/paddle/fluid/tests/book/test_word2vec.py index 9bd8f90c5ee3ccbb6642dc09a8177be914856975..965f1ff851abbf1dbbda4de1831f9208a8dd0d3c 100644 --- a/python/paddle/v2/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/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 98% 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 index c443c4e0b7d68bdff4a767372d0b9c96f34eba5e..b5fbffea368aa78f33bd1d1f85de7c2e830f2d44 100644 --- 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 @@ -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/v2/fluid/tests/book_distribute/notest_dist_image_classification.py b/python/paddle/fluid/tests/book_distribute/notest_dist_image_classification.py similarity index 99% 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 index 298ecfc386b3ae093cf714a41f5072759cb2cf2e..9f807df8829db59833cafb9723371abc240da62d 100644 --- 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 @@ -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/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 99% 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 index 1210bf1d8441356e41e18266e8e087ba0d7b032c..533cdb5a9ba1546ba8d922b7651cd09d0c1a363c 100644 --- 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 @@ -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/v2/fluid/tests/book_distribute/notest_dist_word2vec.py b/python/paddle/fluid/tests/book_distribute/notest_dist_word2vec.py similarity index 99% 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 index 0d5ad9885028b8b53d0ed4017cefc3eae04dc691..bee022bf4e262f027871849a4e47cc04e91b8025 100644 --- a/python/paddle/v2/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/v2/fluid/tests/book_distribute/notest_machine_translation.py b/python/paddle/fluid/tests/book_distribute/notest_machine_translation.py similarity index 96% 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 index 15d2d40979edc7ceb2cdafcb21b10e21c4ae7392..243d7f5073b5e21f6203907626e382d3daca0949 100644 --- a/python/paddle/v2/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/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 99% 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 index 1c1fffc5892aa6ade05a341efb7043cea538b03f..223428f820c278d6b76f1339bd83c6e55e112ed9 100644 --- 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 @@ -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/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 99% 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 index c442ada6e3c03426f084da379207bc48817072ed..9fb356e78d24931b2b9aef7a72bef4b4982eba94 100644 --- 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 @@ -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/v2/fluid/tests/book_distribute/notest_recommender_system_dist.py b/python/paddle/fluid/tests/book_distribute/notest_recommender_system_dist.py similarity index 97% 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 index 363c7102c7fa431bfb5457003a28bee6fce3a77b..ea05fbb457fa4250590778988d05c5ee7b0124be 100644 --- 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 @@ -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/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 99% 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 index c5c0856c31a43d04fa8983b612e99487cb41d615..3b057c5d96204989055003e1520b7f35ce8d89c7 100644 --- 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 @@ -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/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 99% 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 index 99e2c2bbac6d12912de0a718ff6e4151a28e12eb..b6c85ebb40628ee2bb6d2ecbda8966045597092f 100644 --- 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 @@ -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/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 98% 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 index 944f8af0861f6c44f30c3c03c8ee27c406910c9b..11250db9cbb77ca7747799470942ce5aa6f64034 100644 --- 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 @@ -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/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 99% 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 index a556904107c25121a1c70ad82b113d582c41a010..64f55e08531dd47631fbd946de25436805ac9fdd 100644 --- 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 @@ -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/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 96% 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 index 4c1eae861bbe5662f58d41c08035e6d701ac8672..c439401ea92defd3fe2fc5ff44f7e2c8d7a2ae74 100644 --- 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 @@ -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/v2/fluid/tests/demo/fc_gan.py b/python/paddle/fluid/tests/demo/fc_gan.py similarity index 99% rename from python/paddle/v2/fluid/tests/demo/fc_gan.py rename to python/paddle/fluid/tests/demo/fc_gan.py index 67921db04ab3809c7f50f1f9615c10bb5dc79d07..fd9d80fa94467c70d28e4c71f34ebf0f964e5145 100644 --- a/python/paddle/v2/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/v2/fluid/tests/notest_concurrency.py b/python/paddle/fluid/tests/notest_concurrency.py similarity index 90% rename from python/paddle/v2/fluid/tests/notest_concurrency.py rename to python/paddle/fluid/tests/notest_concurrency.py index 9d87ed9c0736413ac4f740dbc83a1ed4ad8fd444..602d5f31eb311e8f87d3f5eae78cd41d64f61141 100644 --- a/python/paddle/v2/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/v2/fluid/tests/notest_csp.py b/python/paddle/fluid/tests/notest_csp.py similarity index 97% rename from python/paddle/v2/fluid/tests/notest_csp.py rename to python/paddle/fluid/tests/notest_csp.py index 7fe234a20b5222eb85e6bcea2fcb05c53ddd57e9..f4be833deebd2c82e060e66a8bcf590020625cf8 100644 --- a/python/paddle/v2/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/v2/fluid/tests/test_cpp_reader.py b/python/paddle/fluid/tests/test_cpp_reader.py similarity index 98% rename from python/paddle/v2/fluid/tests/test_cpp_reader.py rename to python/paddle/fluid/tests/test_cpp_reader.py index 6d2312dbcb5ff1c9486a807dec7466da8f7317e4..b65592057817cef83bf2157c55bacea5bbe34ea1 100644 --- a/python/paddle/v2/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/v2/fluid/tests/test_data_feeder.py b/python/paddle/fluid/tests/test_data_feeder.py similarity index 96% rename from python/paddle/v2/fluid/tests/test_data_feeder.py rename to python/paddle/fluid/tests/test_data_feeder.py index 3154293ee6344b17ecdd628d334cf2e598078ebb..861dd3174a21d59fe12e0b794ecb2a934946ac71 100644 --- a/python/paddle/v2/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/v2/fluid/tests/test_detection.py b/python/paddle/fluid/tests/test_detection.py similarity index 97% rename from python/paddle/v2/fluid/tests/test_detection.py rename to python/paddle/fluid/tests/test_detection.py index 908f4e82a62eec49ca0e88d678bb1e3003024d8e..1dc6d107d214165dd42cb728a56a55baf9b157fb 100644 --- a/python/paddle/v2/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/v2/fluid/tests/test_error_clip.py b/python/paddle/fluid/tests/test_error_clip.py similarity index 98% rename from python/paddle/v2/fluid/tests/test_error_clip.py rename to python/paddle/fluid/tests/test_error_clip.py index d577d0014dc136ee5ef92155e37009df60d9bf62..f4c0dfa7a7f2417c3e2406f29653100d907c8606 100644 --- a/python/paddle/v2/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/v2/fluid/tests/test_gradient_clip.py b/python/paddle/fluid/tests/test_gradient_clip.py similarity index 98% rename from python/paddle/v2/fluid/tests/test_gradient_clip.py rename to python/paddle/fluid/tests/test_gradient_clip.py index 792262df84f5b6233548d56d7bf721b564520ba3..ca0b129008b29a208567f5a862b12f307b3eae43 100644 --- a/python/paddle/v2/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/v2/fluid/tests/test_mnist_if_else_op.py b/python/paddle/fluid/tests/test_mnist_if_else_op.py similarity index 95% 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 index 75a651cf2719028fb54dc806952512c80ad3d9c4..0b557942b0893e5af203d869ed8d235bbb85fba8 100644 --- a/python/paddle/v2/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/v2/fluid/tests/test_python_operator_overriding.py b/python/paddle/fluid/tests/test_python_operator_overriding.py similarity index 95% rename from python/paddle/v2/fluid/tests/test_python_operator_overriding.py rename to python/paddle/fluid/tests/test_python_operator_overriding.py index e5198ec17d027f007b4a831ef2e427481f8ff8c4..b5ac97eac559e8c52a8949cfd63fc8671ba52514 100644 --- a/python/paddle/v2/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/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 97% rename from python/paddle/v2/fluid/tests/unittests/decorators.py rename to python/paddle/fluid/tests/unittests/decorators.py index 7081e4b9345b836dd1db918480f2ac86fa94c6c1..d1165e2a9199454dbcc1fda411afad20449bcc92 100644 --- a/python/paddle/v2/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/v2/fluid/tests/unittests/op_test.py b/python/paddle/fluid/tests/unittests/op_test.py similarity index 98% rename from python/paddle/v2/fluid/tests/unittests/op_test.py rename to python/paddle/fluid/tests/unittests/op_test.py index d8867550cae8882c2d71a641ef7e5424537e0500..f7e02595ec3b41ae7bb32353c258736968ca78d4 100644 --- a/python/paddle/v2/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/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 98% rename from python/paddle/v2/fluid/tests/unittests/test_adagrad_op.py rename to python/paddle/fluid/tests/unittests/test_adagrad_op.py index 320f43023c055c0fd96d34a88997d04702265afe..2f0ea79f4d6afe91ee7e0d747f3d8f4884d8f9ee 100644 --- a/python/paddle/v2/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/v2/fluid/tests/unittests/test_adam_op.py b/python/paddle/fluid/tests/unittests/test_adam_op.py similarity index 99% rename from python/paddle/v2/fluid/tests/unittests/test_adam_op.py rename to python/paddle/fluid/tests/unittests/test_adam_op.py index d6c5a16ff2b5dad1d1b06be687bde1224fa99691..3c65f3d44adcebdca92f78f7834d4878a9fa3dfe 100644 --- a/python/paddle/v2/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/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 93% 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 index 8917b9b906da6af568c28a29335c40c9737b842c..380a8549b3ac3e34d3d2a41c829e6dca529fcbdf 100644 --- 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 @@ -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/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 93% 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 index 99d7e958c32678f357e2dfb94de59469261c5307..02f2e6eddc80fcce4ca5a444cff82db355c085ca 100644 --- a/python/paddle/v2/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/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 99% 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 index b7c0cb521a3b25881ccba199ac55ab8f712b1894..80e6fa6df3c21aa19feb571916f11c41ccd6bb10 100644 --- a/python/paddle/v2/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/v2/fluid/tests/unittests/test_beam_search_decode_op.py b/python/paddle/fluid/tests/unittests/test_beam_search_decode_op.py similarity index 97% 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 index 91f8f7b18bbbba120add77476d4203b61f9f57f6..4ee00605e22ba45d9e46a8bba27712c3fd97872a 100644 --- 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 @@ -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/v2/fluid/tests/unittests/test_beam_search_op.py b/python/paddle/fluid/tests/unittests/test_beam_search_op.py similarity index 96% 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 index 1596bb3970c870b51e69226678c9199844083613..bc708f3aff54f54d290684d68afa503a50a32dac 100644 --- a/python/paddle/v2/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/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 85% rename from python/paddle/v2/fluid/tests/unittests/test_calc_gradient.py rename to python/paddle/fluid/tests/unittests/test_calc_gradient.py index 1b38dcf343a450f3a10725def9d18366c87e72c6..15731fefc824b7e71a83d7527d022bdb92e8ed9b 100644 --- a/python/paddle/v2/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/v2/fluid/tests/unittests/test_cast_op.py b/python/paddle/fluid/tests/unittests/test_cast_op.py similarity index 97% rename from python/paddle/v2/fluid/tests/unittests/test_cast_op.py rename to python/paddle/fluid/tests/unittests/test_cast_op.py index 3d05a319cd4d0ab1a2237ee34a30dfa58827ff0c..8fb8d03828393ccfe57c0848d79b960c641ad39a 100644 --- a/python/paddle/v2/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/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 97% rename from python/paddle/v2/fluid/tests/unittests/test_cond_op.py rename to python/paddle/fluid/tests/unittests/test_cond_op.py index 4a1e806c4be9011dd2f4ebad1ff2abf8a4e83de3..66fbae961a2701e79da5222ae2689108335c4065 100644 --- a/python/paddle/v2/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/v2/fluid/tests/unittests/test_conditional_block.py b/python/paddle/fluid/tests/unittests/test_conditional_block.py similarity index 85% rename from python/paddle/v2/fluid/tests/unittests/test_conditional_block.py rename to python/paddle/fluid/tests/unittests/test_conditional_block.py index 58ac26720365f5c6e6e3acb29dd9907325e76fe9..fad97a28164bbb9c7e6a94040c644ba8fc790c0f 100644 --- a/python/paddle/v2/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/v2/fluid/tests/unittests/test_const_value.py b/python/paddle/fluid/tests/unittests/test_const_value.py similarity index 95% rename from python/paddle/v2/fluid/tests/unittests/test_const_value.py rename to python/paddle/fluid/tests/unittests/test_const_value.py index 06c1c21fbcb7e1c1ee266a7c7fdd031229838da2..d1075d514e9b2b692f271f10a005815a66b421fb 100644 --- a/python/paddle/v2/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/v2/fluid/tests/unittests/test_conv2d_op.py b/python/paddle/fluid/tests/unittests/test_conv2d_op.py similarity index 99% rename from python/paddle/v2/fluid/tests/unittests/test_conv2d_op.py rename to python/paddle/fluid/tests/unittests/test_conv2d_op.py index ad242692ec6752d64030603acbf928cc50054222..1fada38a0359d4a0130d58ae2f8442fbfce21e2e 100644 --- a/python/paddle/v2/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/v2/fluid/tests/unittests/test_conv2d_transpose_op.py b/python/paddle/fluid/tests/unittests/test_conv2d_transpose_op.py similarity index 99% 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 index c9e74f58605270bb4d20f2fbdf3ed63d22fba023..9831b7eb1269938cfcb1d6a3a2940836ee19ed56 100644 --- a/python/paddle/v2/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/v2/fluid/tests/unittests/test_conv3d_op.py b/python/paddle/fluid/tests/unittests/test_conv3d_op.py similarity index 99% rename from python/paddle/v2/fluid/tests/unittests/test_conv3d_op.py rename to python/paddle/fluid/tests/unittests/test_conv3d_op.py index 0f7e383d1aa86b54d8b82b57f44c70162bfd40b4..4d3df5e33c426c92213a199b4841f649446c6e28 100644 --- a/python/paddle/v2/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/v2/fluid/tests/unittests/test_conv3d_transpose_op.py b/python/paddle/fluid/tests/unittests/test_conv3d_transpose_op.py similarity index 99% 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 index a70f23d4ad4ab02fe068625fcbe11948adf148f5..a79bfa13d6ca21cac6640deb5a21ef457af984df 100644 --- a/python/paddle/v2/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/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 95% 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 index 4eadbd18ac428cd8d98d63fc886d16b20c90963b..5e6f9a20a93e467980f5a4f23fbcb6118317fe44 100644 --- 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 @@ -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/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 96% 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 index d7ca59607098b3cf9865867f32d3af7804a9d7a2..a3bf7b544b91c70ffe3894219c118ec9887aba81 100644 --- a/python/paddle/v2/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/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 99% rename from python/paddle/v2/fluid/tests/unittests/test_dyn_rnn.py rename to python/paddle/fluid/tests/unittests/test_dyn_rnn.py index 1571572fc6b54917ddfa6a92456180700b5024cc..0a3812a68d60c6bc44b1c275526dc0ac5c9e3b1c 100644 --- a/python/paddle/v2/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/v2/fluid/tests/unittests/test_dynrnn_gradient_check.py b/python/paddle/fluid/tests/unittests/test_dynrnn_gradient_check.py similarity index 99% 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 index 8b01ec730aafdd864db86e2c58d68001d0f0ebfb..f3dcbe3386a7241449ef7d7aa7982557ddb47823 100644 --- a/python/paddle/v2/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/v2/fluid/tests/unittests/test_dynrnn_static_input.py b/python/paddle/fluid/tests/unittests/test_dynrnn_static_input.py similarity index 97% 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 index d2f05dcd14e5df4b796291339b3e0044f500f56a..c28177a1ae513bb84a220a7b945cbf619c2d8e83 100644 --- a/python/paddle/v2/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/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 96% rename from python/paddle/v2/fluid/tests/unittests/test_exception.py rename to python/paddle/fluid/tests/unittests/test_exception.py index 066b0b7409fe4a97afdbd590641269d97adf4a54..bb7c0f88f6027807394e15aa6803da2ddc22f4e2 100644 --- a/python/paddle/v2/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/v2/fluid/tests/unittests/test_executor_and_mul.py b/python/paddle/fluid/tests/unittests/test_executor_and_mul.py similarity index 91% 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 index c043c07b3a31b2675e9a76e54da216aaa26e0f48..4958bef3ef4d101f934a2776efc21efdd24a9a4d 100644 --- a/python/paddle/v2/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/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 97% 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 index f24e5e27f372219673bc7a5aa75bbc880620887e..9d724a6479f061996359b1efcc5f61f0564331c7 100644 --- a/python/paddle/v2/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/v2/fluid/tests/unittests/test_fetch_var.py b/python/paddle/fluid/tests/unittests/test_fetch_var.py similarity index 94% rename from python/paddle/v2/fluid/tests/unittests/test_fetch_var.py rename to python/paddle/fluid/tests/unittests/test_fetch_var.py index ed75a350b0bcb220c8435d60e1978c27da84a24c..46c3bbb6712c6276e48dd9328d7741a447f28b91 100644 --- a/python/paddle/v2/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/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 96% rename from python/paddle/v2/fluid/tests/unittests/test_fill_op.py rename to python/paddle/fluid/tests/unittests/test_fill_op.py index c2e3cfe6f3c0af80bbdaa88a5a5d88531d81f752..762d29199e2127415ed7daabca63edcdbae3344f 100644 --- a/python/paddle/v2/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/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 95% 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 index 88995c24dfcefc01c85915b5ad969700799d9c04..c906c74afe66b05e2ca0e1122677e2dc738351b8 100644 --- a/python/paddle/v2/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/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 92% 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 index 3c0ee64098a5a1ca7c86c0cea45995d6673c5482..272caceaf38699438ccae41691bf26b2eb4d2a22 100644 --- a/python/paddle/v2/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/v2/fluid/tests/unittests/test_get_places_op.py b/python/paddle/fluid/tests/unittests/test_get_places_op.py similarity index 96% 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 index 265433e606fec3bf7a5a164e2546943382f0259b..6dab1e22f0c50ab011d6b8e8944097600cf3fecc 100644 --- a/python/paddle/v2/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/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 96% 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 index 8af8f646a71af1c91178d7bc3a1e0b3cdec7f0bb..6ecfa9ea213fe0cf57e18fa83bbb85c223727d71 100644 --- a/python/paddle/v2/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/v2/fluid/tests/unittests/test_infer_shape.py b/python/paddle/fluid/tests/unittests/test_infer_shape.py similarity index 98% rename from python/paddle/v2/fluid/tests/unittests/test_infer_shape.py rename to python/paddle/fluid/tests/unittests/test_infer_shape.py index 17957b9e049183bd01089c44e5afde1bc7b7c5e3..699a2d42467b7ac0dcf1939bde744ad2fcb29c97 100644 --- a/python/paddle/v2/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/v2/fluid/tests/unittests/test_inference_model_io.py b/python/paddle/fluid/tests/unittests/test_inference_model_io.py similarity index 90% 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 index e381312ccc7ce529a2568ecda3182f8d619e6d0d..238ca7188b80f53fd3f84801e4fe6ac6ad4d0f97 100644 --- a/python/paddle/v2/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/v2/fluid/tests/unittests/test_initializer.py b/python/paddle/fluid/tests/unittests/test_initializer.py similarity index 99% rename from python/paddle/v2/fluid/tests/unittests/test_initializer.py rename to python/paddle/fluid/tests/unittests/test_initializer.py index 6d4eb62916b64ee89430c01f0caf39e1a30c5ceb..587e2025e1045f63a5825f884d4dcad8b4685e62 100644 --- a/python/paddle/v2/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/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 95% 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 index 799da9dc151f507a71b4026f78760f5a5fbb450f..4d11cf226be2ba4ffbe015198fed3191f1e02f72 100644 --- a/python/paddle/v2/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/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 98% 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 index a1206b3b858a1b03e7189bb9adbbcb3b2628f29f..8c67e45b7fc997012af5f678f21271ad8b220edc 100644 --- a/python/paddle/v2/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/v2/fluid/tests/unittests/test_layers.py b/python/paddle/fluid/tests/unittests/test_layers.py similarity index 98% rename from python/paddle/v2/fluid/tests/unittests/test_layers.py rename to python/paddle/fluid/tests/unittests/test_layers.py index e757598bbacf39463c3fc0e66ecd462c2668c589..bb673d3b541e6589e8979ced0b4aa25075b22a17 100644 --- a/python/paddle/v2/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/v2/fluid/tests/unittests/test_learning_rate_decay.py b/python/paddle/fluid/tests/unittests/test_learning_rate_decay.py similarity index 96% 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 index 1d6bab3d6c44b2b3403778d5db086e405bb30dee..595b05168920f3b9497172e502591cef82903cdc 100644 --- a/python/paddle/v2/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/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 90% 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 index 643ee906d6f280903b0a8416b54c39e7678f2da2..d8b4e40662568f580ccff0257512cb8809488f17 100644 --- 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 @@ -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/v2/fluid/tests/unittests/test_lod_rank_table.py b/python/paddle/fluid/tests/unittests/test_lod_rank_table.py similarity index 90% 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 index 70b8d69585c4fe743f5a88efffa1de04c9a2829d..093eecb8370b8ae7e4c43ce7ca6f50f5d302bd60 100644 --- a/python/paddle/v2/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/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 97% 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 index 0e90e25538118dbf031891061bc4dbf63a2252b3..63b17a5ccd62ed79b3d611e039c2b2705a133272 100644 --- a/python/paddle/v2/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/v2/fluid/tests/unittests/test_lod_tensor_array_ops.py b/python/paddle/fluid/tests/unittests/test_lod_tensor_array_ops.py similarity index 96% 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 index ebc0a2f71465c0b3d10b205d3bdedfac87c500ec..de1a3d101d8343bf25be5fd6e8b7791d06b4ab02 100644 --- 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 @@ -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/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 99% 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 index cae5188fe88d9f8ab80e100d101b7b52e6b8b254..6864d271e795026d59525e9f1e4d86e32df980bf 100644 --- a/python/paddle/v2/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/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 87% 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 index a276db581e240547a392aac9f2e68cc2ed848e01..e57804d0df840331c9f53e4ff1a03f062c3fe93e 100644 --- a/python/paddle/v2/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/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 97% rename from python/paddle/v2/fluid/tests/unittests/test_multihead_attention.py rename to python/paddle/fluid/tests/unittests/test_multihead_attention.py index 6eeeefe021cad0447400c3930056fea3beb5142c..80c3c67967e970a7182c008b6cfd138aff044167 100644 --- a/python/paddle/v2/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/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 95% rename from python/paddle/v2/fluid/tests/unittests/test_net.py rename to python/paddle/fluid/tests/unittests/test_net.py index 796a83911793ba27357f4b827960a58279c06f7f..ae1699d647d7c0adab36200fb07bde12085053c1 100644 --- a/python/paddle/v2/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/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 97% rename from python/paddle/v2/fluid/tests/unittests/test_normalization_wrapper.py rename to python/paddle/fluid/tests/unittests/test_normalization_wrapper.py index 094d8071e27e478ea50f0db13701f5aeb0d1f9e8..ef34893943d8f6bf91b1eb14378e463c178de84d 100644 --- a/python/paddle/v2/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/v2/fluid/tests/unittests/test_one_hot_op.py b/python/paddle/fluid/tests/unittests/test_one_hot_op.py similarity index 95% 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 index b7db30104a894097feb75da3a79355df93d0fa65..cd78cce8729ab2b5a0bb4817cf3022e53932283a 100644 --- a/python/paddle/v2/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/v2/fluid/tests/unittests/test_op_support_gpu.py b/python/paddle/fluid/tests/unittests/test_op_support_gpu.py similarity index 95% 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 index f8ac55590c72a4503c53268809ef413ddd4d400f..5fafb8280e19cca46e5bf687494c07200ca53153 100644 --- a/python/paddle/v2/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/v2/fluid/tests/unittests/test_operator.py b/python/paddle/fluid/tests/unittests/test_operator.py similarity index 98% rename from python/paddle/v2/fluid/tests/unittests/test_operator.py rename to python/paddle/fluid/tests/unittests/test_operator.py index 1f5de93387d4108ef499f08f9517a80f90a1f0c2..5e418fe6ac2d62948762290a65686207d017275c 100644 --- a/python/paddle/v2/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/v2/fluid/tests/unittests/test_operator_desc.py b/python/paddle/fluid/tests/unittests/test_operator_desc.py similarity index 97% rename from python/paddle/v2/fluid/tests/unittests/test_operator_desc.py rename to python/paddle/fluid/tests/unittests/test_operator_desc.py index c64c08ff7f3f3f8e673b106f6b955c6109058d93..649fabe4a0cdef4c665f8a6d3ebee1bb8232185f 100644 --- a/python/paddle/v2/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/v2/fluid/tests/unittests/test_optimizer.py b/python/paddle/fluid/tests/unittests/test_optimizer.py similarity index 99% rename from python/paddle/v2/fluid/tests/unittests/test_optimizer.py rename to python/paddle/fluid/tests/unittests/test_optimizer.py index 875e9e7c762819ea0605ac840453ef65cd87cec7..6ee7fc819a501eb7bf452b5d470a2e0df1b44600 100644 --- a/python/paddle/v2/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/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 99% rename from python/paddle/v2/fluid/tests/unittests/test_parallel_op.py rename to python/paddle/fluid/tests/unittests/test_parallel_op.py index d65752608b204454d9d3e529dad366084f9b2c0e..edaae977dfbe9a98ed7c78f8cf990082a043a8a9 100644 --- a/python/paddle/v2/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/v2/fluid/tests/unittests/test_parameter.py b/python/paddle/fluid/tests/unittests/test_parameter.py similarity index 87% rename from python/paddle/v2/fluid/tests/unittests/test_parameter.py rename to python/paddle/fluid/tests/unittests/test_parameter.py index 88356a7ea14bdf4ef8cd7cb4a1a401d66556cc7e..e09865074e8aa9345fd9cc84e1f19eaf0436142f 100644 --- a/python/paddle/v2/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/v2/fluid/tests/unittests/test_pool2d_op.py b/python/paddle/fluid/tests/unittests/test_pool2d_op.py similarity index 99% rename from python/paddle/v2/fluid/tests/unittests/test_pool2d_op.py rename to python/paddle/fluid/tests/unittests/test_pool2d_op.py index 77961bc99f0e477ec7e38943afc59c89ffd0bfa8..12899ecca36dd1a49f536e657c1840803c3405e2 100644 --- a/python/paddle/v2/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/v2/fluid/tests/unittests/test_pool3d_op.py b/python/paddle/fluid/tests/unittests/test_pool3d_op.py similarity index 99% rename from python/paddle/v2/fluid/tests/unittests/test_pool3d_op.py rename to python/paddle/fluid/tests/unittests/test_pool3d_op.py index a6afdaedc516e295ed08420d72b4873f1c4b8ee5..321b5f39ffff129384c2a809ba8f7d154dcf5036 100644 --- a/python/paddle/v2/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/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 88% rename from python/paddle/v2/fluid/tests/unittests/test_print_op.py rename to python/paddle/fluid/tests/unittests/test_print_op.py index 1e49ce994b788d5f0f46d8427282410b2a2d2db2..5c08bf4fc3f14599d71bd31767a34c0b5b7621f2 100644 --- a/python/paddle/v2/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/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 95% rename from python/paddle/v2/fluid/tests/unittests/test_profiler.py rename to python/paddle/fluid/tests/unittests/test_profiler.py index 62bfb2b8e24d0bf1554d19ea46f9ae7de5665937..09f23894c4c928cb3e07f1c0a42a8917091950b6 100644 --- a/python/paddle/v2/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/v2/fluid/tests/unittests/test_program.py b/python/paddle/fluid/tests/unittests/test_program.py similarity index 97% rename from python/paddle/v2/fluid/tests/unittests/test_program.py rename to python/paddle/fluid/tests/unittests/test_program.py index 266e189e501fb925451a0b5bfade2dc24e3dc640..87a2195f0d5c7fd355ea01a3c8f60908b33d4b9d 100644 --- a/python/paddle/v2/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/v2/fluid/tests/unittests/test_protobuf.py b/python/paddle/fluid/tests/unittests/test_protobuf.py similarity index 95% rename from python/paddle/v2/fluid/tests/unittests/test_protobuf.py rename to python/paddle/fluid/tests/unittests/test_protobuf.py index 90de56514da27ea8f5fe303cb9505917c4ae6485..c3f1fa80185bfc4afc3ed715d736bcba092629d8 100644 --- a/python/paddle/v2/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/v2/fluid/tests/unittests/test_protobuf_descs.py b/python/paddle/fluid/tests/unittests/test_protobuf_descs.py similarity index 99% rename from python/paddle/v2/fluid/tests/unittests/test_protobuf_descs.py rename to python/paddle/fluid/tests/unittests/test_protobuf_descs.py index c3bef9587485445504bdd04247766afe8996d7da..309ea2b9b7ede442da3ac897ce8d1a4b9aa68233 100644 --- a/python/paddle/v2/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/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 98% rename from python/paddle/v2/fluid/tests/unittests/test_recurrent_op.py rename to python/paddle/fluid/tests/unittests/test_recurrent_op.py index 177d8fc65f415fff542829152e0d3768c03c18fb..d2d13386ac1545605b807486d14c0925d890df5e 100644 --- a/python/paddle/v2/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/v2/fluid/tests/unittests/test_recv_op.py b/python/paddle/fluid/tests/unittests/test_recv_op.py similarity index 96% rename from python/paddle/v2/fluid/tests/unittests/test_recv_op.py rename to python/paddle/fluid/tests/unittests/test_recv_op.py index 7a0802afc546279cd5c164809f3eb44c5265b620..985d892c568472614c5f3e6691f54807ddccc4bd 100644 --- a/python/paddle/v2/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/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 97% rename from python/paddle/v2/fluid/tests/unittests/test_registry.py rename to python/paddle/fluid/tests/unittests/test_registry.py index 82527a6ec7ca59ca0a9e10d416e1c98d9c84da09..d04192cb3a380b2f71b8a920479545167251387f 100644 --- a/python/paddle/v2/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/v2/fluid/tests/unittests/test_regularizer.py b/python/paddle/fluid/tests/unittests/test_regularizer.py similarity index 95% rename from python/paddle/v2/fluid/tests/unittests/test_regularizer.py rename to python/paddle/fluid/tests/unittests/test_regularizer.py index 8fc4db1c5a8d2dff91b7990d4bd5978aa64efe04..9b1c4ceada52322b3f1fdc4ab2e90a2c089ee67e 100644 --- a/python/paddle/v2/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/v2/fluid/tests/unittests/test_reorder_lod_tensor.py b/python/paddle/fluid/tests/unittests/test_reorder_lod_tensor.py similarity index 99% 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 index d4e17d1b1e5a9ced0ca463101b2d41791d53e337..76d0d2f2fe80e409dc1b7fa858d43fbc6ad960ef 100644 --- a/python/paddle/v2/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/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 96% 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 index 773bd17456a2375e577adcd20addda9b117cae1c..178606f05961263df5ef0398064a1fd135fbe784 100644 --- 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 @@ -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/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 89% rename from python/paddle/v2/fluid/tests/unittests/test_scope.py rename to python/paddle/fluid/tests/unittests/test_scope.py index 2a2efbf098268ee8df959e8b58eefaa6728820f9..d249a989a9499d01f6ed10d6cdbc6c456a7262c5 100644 --- a/python/paddle/v2/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/v2/fluid/tests/unittests/test_selected_rows.py b/python/paddle/fluid/tests/unittests/test_selected_rows.py similarity index 98% rename from python/paddle/v2/fluid/tests/unittests/test_selected_rows.py rename to python/paddle/fluid/tests/unittests/test_selected_rows.py index 50c8bb4bca2edfa362e55e404a764485fba675ad..3d7b86787fbf0a855bcd86b8a873c9134cb1d5cc 100644 --- a/python/paddle/v2/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/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 97% rename from python/paddle/v2/fluid/tests/unittests/test_sgd_op.py rename to python/paddle/fluid/tests/unittests/test_sgd_op.py index e5379b961f40d00c9c8f6522addac3a4768ad763..c498b23db12cd83304f4c3a3d1f15bd68ad4f0b6 100644 --- a/python/paddle/v2/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/v2/fluid/tests/unittests/test_shrink_rnn_memory.py b/python/paddle/fluid/tests/unittests/test_shrink_rnn_memory.py similarity index 92% 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 index 48874ba8a5ba827a5ef36bff5adcd4a696f8cbc3..ba34e6a486e780a703b32b66c3b2caf7676cd27e 100644 --- a/python/paddle/v2/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/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 96% 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 index 48e6756a8682a4cb4a151769bf8e9db22be80cf5..0b04ff302dc82a150a223b2f6632d77f95c61dc7 100644 --- 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 @@ -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/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 98% 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 index 2aaa05dcacf09fb2b9119b90598373bf3f874b71..286d305a777a4683d42a4d3d2d5d5f0c5b6ac12a 100644 --- 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 @@ -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/v2/fluid/tests/unittests/test_split_var.py b/python/paddle/fluid/tests/unittests/test_split_var.py similarity index 92% rename from python/paddle/v2/fluid/tests/unittests/test_split_var.py rename to python/paddle/fluid/tests/unittests/test_split_var.py index d7160b78b95c862a41a4a07a770ccb35c97845ca..104ceb4fe7beb70b9016f57cef0ef895a3eb8ba6 100644 --- a/python/paddle/v2/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/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 90% rename from python/paddle/v2/fluid/tests/unittests/test_switch.py rename to python/paddle/fluid/tests/unittests/test_switch.py index 11296bc04ea29366dfa7b047154063333cbe998b..528c5cce4bc7262ade196f6a81a57a57089117ec 100644 --- a/python/paddle/v2/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/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 99% rename from python/paddle/v2/fluid/tests/unittests/test_tensor.py rename to python/paddle/fluid/tests/unittests/test_tensor.py index 8fe234a90f27f1bd72302ebad9d5959c917924af..a369783245ae2e35a9743ef1f4321ac919e58283 100644 --- a/python/paddle/v2/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/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 97% rename from python/paddle/v2/fluid/tests/unittests/test_unique_name.py rename to python/paddle/fluid/tests/unittests/test_unique_name.py index e28810c96b8bc829b7034914b429ce21a59260bb..49ef335618ca7ca1e8249a61a97ca552dabdb9e8 100644 --- a/python/paddle/v2/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/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 94% rename from python/paddle/v2/fluid/tests/unittests/test_variable.py rename to python/paddle/fluid/tests/unittests/test_variable.py index 4ae3909d2743874fb7cd4b739c3fe5db02fa02b3..49784e21c461bacadd404bf4a8640ebc4dcb26ca 100644 --- a/python/paddle/v2/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/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 95% rename from python/paddle/v2/fluid/tests/unittests/test_weight_normalization.py rename to python/paddle/fluid/tests/unittests/test_weight_normalization.py index c2b81dddb0039aba7b39518b43d29a2b466b85e3..2adf917bc5d3bb35842a817c57a983627b759f22 100644 --- a/python/paddle/v2/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/v2/fluid/tests/unittests/test_while_op.py b/python/paddle/fluid/tests/unittests/test_while_op.py similarity index 93% rename from python/paddle/v2/fluid/tests/unittests/test_while_op.py rename to python/paddle/fluid/tests/unittests/test_while_op.py index 3fa1d5e0edd4ac8b62c1e45089a9384952f0822a..5afeb5ae8983df5c2c426db79a007173e8e470e8 100644 --- a/python/paddle/v2/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 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 diff --git a/python/setup.py.in b/python/setup.py.in index 5a0d99995439135ce814e58fcfbcdc337965b164..6fff1bb09e4923650356a50afba0e105b3d8c0c2 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,