reorganize the paddle api test=develop (#23151)

revert-23830-2.0-beta
XiaoguangHu 5 years ago committed by GitHub
parent 46b8d282dc
commit 194a22c5a8
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

@ -0,0 +1,22 @@
# Copyright (c) 2020 PaddlePaddle Authors. All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
# TODO: define the functions to manipulate devices
# __all__ = ['cpu_places',
# 'CPUPlace',
# 'cuda_pinned_places',
# 'cuda_places',
# 'CUDAPinnedPlace',
# 'CUDAPlace',
# 'is_compiled_with_cuda']

@ -0,0 +1,20 @@
# Copyright (c) 2020 PaddlePaddle Authors. All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
# TODO: define the distribution functions
# __all__ = ['Categorical',
# 'MultivariateNormalDiag',
# 'Normal',
# 'sampling_id',
# 'Uniform']

@ -0,0 +1,28 @@
# Copyright (c) 2020 PaddlePaddle Authors. All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
# TODO: define distributed api under this directory,
# __all__ = ['metric',
# 'optimizer',
# 'RoleMaker',
# 'dataset',
# ' DatasetFactory',
# ' InMemoryDataset',
# ' QueueDataset',
# 'transpiler',
# ' DistributeTranspiler',
# ' DistributeTranspilerConfig',
# ' HashName',
# ' RoundRobin',
# 'collective']

@ -0,0 +1,40 @@
# Copyright (c) 2020 PaddlePaddle Authors. All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
# TODO: import framework api under this directory
# __all__ = ['append_backward',
# 'gradients',
# 'Executor',
# 'global_scope',
# 'scope_guard',
# 'BuildStrategy',
# 'CompiledProgram',
# 'default_main_program',
# 'default_startup_program',
# 'create_global_var',
# 'create_parameter',
# 'create_py_reader_by_data',
# 'Print',
# 'py_func',
# 'ExecutionStrategy',
# 'in_dygraph_mode',
# 'name_scope',
# 'ParallelExecutor',
# 'ParamAttr',
# 'Program',
# 'program_guard',
# 'Variable',
# 'WeightNormParamAttr',
# 'Model',
# 'Sequential']

@ -0,0 +1,17 @@
# Copyright (c) 2020 PaddlePaddle Authors. All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
# TODO: define framework api
# __all__ = ['set_default_dtype',
# 'get_default_dtype']

@ -0,0 +1,16 @@
# Copyright (c) 2020 PaddlePaddle Authors. All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
# TODO: define random api
# __all__ = ['manual_seed']

@ -0,0 +1,26 @@
# Copyright (c) 2020 PaddlePaddle Authors. All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
# TODO: define api used to run in imperative mode
# __all__ = ['BackwardStrategy',
# 'guard',
# 'Layer',
# 'LayerList',
# 'load_dygraph',
# 'save_dygraph',
# 'prepare_context',
# 'to_variable',
# 'TracedLayer',
# 'no_grad',
# 'ParameterList']

@ -0,0 +1,34 @@
# Copyright (c) 2020 PaddlePaddle Authors. All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
# TODO: define all functions about input & output in this directory
# __all__ = ['Dataset',
# 'Sampler',
# 'Transform',
# 'DataLoader',
# 'load',
# 'save',
# 'load_program_state',
# 'set_program_state',
# 'load_inference_model',
# 'save_inference_model',
# 'batch',
# 'shuffle',
# 'buffered',
# 'cache',
# 'chain',
# 'firstn',
# 'compose',
# 'map_readers',
# 'xmap_readers']

@ -0,0 +1,28 @@
# Copyright (c) 2020 PaddlePaddle Authors. All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
# TODO: define the functions to calculate metric in this directory
# __all__ = ['Accuracy',
# 'Auc',
# 'ChunkEvaluator',
# 'CompositeMetric',
# 'DetectionMAP',
# 'EditDistance',
# 'Precesion',
# 'Recall',
# 'accuracy',
# 'auc',
# 'chunk_eval',
# 'cos_sim',
# 'mean_iou']

@ -0,0 +1,17 @@
# Copyright (c) 2020 PaddlePaddle Authors. All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
# TODO: import all neural network related api under this directory,
# including layers, linear, conv, rnn etc.
# __all__ = [ ]

@ -0,0 +1,22 @@
# Copyright (c) 2020 PaddlePaddle Authors. All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
# TODO: define the functions to clip gradient of parameter
# __all__ = ['ErrorClipByValue',
# 'GradientClipByGlobalNorm',
# 'GradientClipByNorm',
# 'GradientClipByValue',
# 'set_gradient_clip',
# 'clip',
# 'clip_by_norm']

@ -0,0 +1,22 @@
# Copyright (c) 2020 PaddlePaddle Authors. All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
# TODO: define the control flow api
# __all__ = ['case',
# 'cond',
# 'DynamicRNN',
# 'StaticRNN',
# 'switch_case',
# 'while_loop',
# 'rnn']

@ -0,0 +1,23 @@
# Copyright (c) 2020 PaddlePaddle Authors. All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
# TODO: define api to implement decoding algorithm
# __all__ = ['BeamSearchDecoder',
# 'Decoder',
# 'beam_search',
# 'beam_search_decode',
# 'crf_decoding',
# 'ctc_greedy_decoder',
# 'dynamic_decode',
# 'gather_tree']

@ -0,0 +1,40 @@
# Copyright (c) 2020 PaddlePaddle Authors. All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
# TODO: define activation functions of neural network
# __all__ = ['brelu',
# 'elu',
# 'erf',
# 'gelu',
# 'hard_shrink',
# 'hard_sigmoid',
# 'hard_swish',
# 'hsigmoid',
# 'leaky_relu',
# 'logsigmoid',
# 'maxout',
# 'prelu',
# 'relu',
# 'relu6',
# 'selu',
# 'sigmoid',
# 'soft_relu',
# 'softmax',
# 'softplus',
# 'softshrink',
# 'softsign',
# 'swish',
# 'tanh_shrink',
# 'thresholded_relu',
# 'log_softmax']

@ -0,0 +1,27 @@
# Copyright (c) 2020 PaddlePaddle Authors. All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
# TODO: define the common functions to build a neural network
# __all__ = ['dropout',
# 'embedding',
# 'fc',
# 'label_smooth',
# 'one_hot',
# 'pad',
# 'pad_constant_like',
# 'pad2d',
# 'unfold',
# 'bilinear_tensor_product',
# 'assign',
# 'interpolate']

@ -0,0 +1,19 @@
# Copyright (c) 2020 PaddlePaddle Authors. All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
# TODO: define functions of convolutional neural network
# __all__ = ['conv2d',
# 'conv2d_transpose',
# 'conv3d',
# 'conv3d_transpose']

@ -0,0 +1,31 @@
# Copyright (c) 2020 PaddlePaddle Authors. All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
# TODO: define the extention functions
# __all__ = ['add_position_encoding',
# 'autoincreased_step_counter',
# 'continuous_value_model',
# 'filter_by_instag',
# 'linear_chain_crf',
# 'merge_selected_rows',
# 'multiclass_nms',
# 'polygon_box_transform',
# 'random_crop',
# 'row_conv',
# 'rpn_target_assign',
# 'similarity_focus',
# 'target_assign',
# 'temporal_shift',
# 'warpctc',
# 'diag_embed']

@ -0,0 +1,23 @@
# Copyright (c) 2020 PaddlePaddle Authors. All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
# TODO: define learning rate decay
# __all__ = ['cosine_decay',
# 'exponential_decay',
# 'inverse_time_decay',
# 'natural_exp_decay',
# 'noam_decay',
# 'piecewise_decay',
# 'polynomial_decay',
# 'linear_lr_warmup']

@ -0,0 +1,44 @@
# Copyright (c) 2020 PaddlePaddle Authors. All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
# TODO: define functions which accept only LoDTensor as input
# __all__ = ['sequence_concat',
# 'sequence_conv',
# 'sequence_enumerate',
# 'sequence_expand_as',
# 'sequence_expand',
# 'sequence_first_step',
# 'sequence_last_step',
# 'sequence_mask',
# 'sequence_pad',
# 'sequence_pool',
# 'sequence_reshape',
# 'sequence_reverse',
# 'sequence_scatter',
# 'sequence_slice',
# 'sequence_softmax',
# 'sequence_unpad',
# 'array_length',
# 'array_read',
# 'array_write',
# 'create_array',
# 'hash',
# 'im2sequence',
# 'lod_append',
# 'lod_reset',
# 'reorder_lod_tensor_by_rank',
# 'tensor_array_to_tensor',
# 'dynamic_gru',
# 'dynamic_lstm',
# 'dynamic_lstmp']

@ -0,0 +1,37 @@
# Copyright (c) 2020 PaddlePaddle Authors. All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
# TODO: define loss functions of neural network
# __all__ = ['bpr_loss',
# 'center_loss',
# 'cross_entropy',
# 'dice_loss',
# 'edit_distance',
# 'huber_loss',
# 'iou_similarity',
# 'kldiv_loss',
# 'log_loss',
# 'margin_rank_loss',
# 'mse_loss',
# 'nce',
# 'npair_loss',
# 'rank_loss',
# 'sampled_softmax_with_cross_entropy',
# 'sigmoid_cross_entropy_with_logits',
# 'sigmoid_focal_loss',
# 'smooth_l1',
# 'softmax_with_cross_entropy',
# 'square_error_cost',
# 'ssd_loss',
# 'teacher_student_sigmoid_loss']

@ -0,0 +1,23 @@
# Copyright (c) 2020 PaddlePaddle Authors. All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
# TODO: define normalization api
# __all__ = ['batch_norm',
# 'data_norm',
# 'group_norm',
# 'instance_norm',
# 'l2_normalize',
# 'layer_norm',
# 'lrn',
# 'spectral_norm']

@ -0,0 +1,19 @@
# Copyright (c) 2020 PaddlePaddle Authors. All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
# TODO: define pooling functions
# __all__ = ['pool2d',
# 'pool3d',
# 'adaptive_pool2d',
# 'adaptive_pool3d']

@ -0,0 +1,18 @@
# Copyright (c) 2020 PaddlePaddle Authors. All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
# TODO: define function of recurrent neural network
# __all__ = ['gru_unit',
# 'lstm',
# 'lstm_unit']

@ -0,0 +1,16 @@
# Copyright (c) 2020 PaddlePaddle Authors. All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
# TODO: define the classes of Transformer neural network
# __all__ = [ ]

@ -0,0 +1,52 @@
# Copyright (c) 2020 PaddlePaddle Authors. All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
# TODO: define specitial functions used in computer vision task
# __all__ = ['affine_channel',
# 'affine_grid',
# 'anchor_generator',
# 'bipartite_match',
# 'box_clip',
# 'box_coder',
# 'box_decoder_and_assign',
# 'collect_fpn_proposals',
# 'deformable_conv',
# 'deformable_roi_pooling',
# 'density_prior_box',
# 'detection_output',
# 'distribute_fpn_proposals',
# 'fsp_matrix',
# 'generate_mask_labels',
# 'generate_proposal_labels',
# 'generate_proposals',
# 'grid_sampler',
# 'image_resize',
# 'image_resize_short',
# 'multi_box_head',
# 'pixel_shuffle',
# 'prior_box',
# 'prroi_pool',
# 'psroi_pool',
# 'resize_bilinear',
# 'resize_nearest',
# 'resize_trilinear',
# 'retinanet_detection_output',
# 'retinanet_target_assign',
# 'roi_align',
# 'roi_perspective_transform',
# 'roi_pool',
# 'shuffle_channel',
# 'space_to_depth',
# 'yolo_box',
# 'yolov3_loss']

Some files were not shown because too many files have changed in this diff Show More

Loading…
Cancel
Save