未验证 提交 217ca776 编写于 作者: X XiaoguangHu 提交者: GitHub

[for 2.0-alpha] add alias in paddle.nn and paddle.tensor test=develop (#24561)

* add alias in paddle.nn and paddle.tensor test=develop

* add alias in paddle.nn and paddle.tensor dir test=develop

* fix same conflict manually test=develop

* update fc and dygraph alias test=develop

* fix initalizer.py typo test=develop
上级 2b6d0049
...@@ -43,10 +43,12 @@ import paddle.metric ...@@ -43,10 +43,12 @@ import paddle.metric
import paddle.incubate.complex as complex import paddle.incubate.complex as complex
# TODO: define alias in tensor and framework directory # TODO: define alias in tensor and framework directory
from .tensor.random import randperm from .tensor.random import randperm
from .tensor.attribute import rank #DEFINE_ALIAS from .tensor.attribute import rank #DEFINE_ALIAS
from .tensor.attribute import shape #DEFINE_ALIAS from .tensor.attribute import shape #DEFINE_ALIAS
# from .tensor.creation import create_tensor #DEFINE_ALIAS from .tensor.creation import create_tensor #DEFINE_ALIAS
# from .tensor.creation import create_lod_tensor #DEFINE_ALIAS # from .tensor.creation import create_lod_tensor #DEFINE_ALIAS
# from .tensor.creation import create_random_int_lodtensor #DEFINE_ALIAS # from .tensor.creation import create_random_int_lodtensor #DEFINE_ALIAS
from .tensor.creation import crop_tensor #DEFINE_ALIAS from .tensor.creation import crop_tensor #DEFINE_ALIAS
...@@ -102,13 +104,13 @@ from .tensor.manipulation import expand #DEFINE_ALIAS ...@@ -102,13 +104,13 @@ from .tensor.manipulation import expand #DEFINE_ALIAS
from .tensor.manipulation import expand_as #DEFINE_ALIAS from .tensor.manipulation import expand_as #DEFINE_ALIAS
from .tensor.manipulation import flatten #DEFINE_ALIAS from .tensor.manipulation import flatten #DEFINE_ALIAS
from .tensor.manipulation import gather #DEFINE_ALIAS from .tensor.manipulation import gather #DEFINE_ALIAS
# from .tensor.manipulation import gather_nd #DEFINE_ALIAS from .tensor.manipulation import gather_nd #DEFINE_ALIAS
from .tensor.manipulation import reshape #DEFINE_ALIAS from .tensor.manipulation import reshape #DEFINE_ALIAS
from .tensor.manipulation import reverse #DEFINE_ALIAS from .tensor.manipulation import reverse #DEFINE_ALIAS
from .tensor.manipulation import scatter #DEFINE_ALIAS from .tensor.manipulation import scatter #DEFINE_ALIAS
# from .tensor.manipulation import scatter_nd_add #DEFINE_ALIAS from .tensor.manipulation import scatter_nd_add #DEFINE_ALIAS
# from .tensor.manipulation import scatter_nd #DEFINE_ALIAS from .tensor.manipulation import scatter_nd #DEFINE_ALIAS
# from .tensor.manipulation import shard_index #DEFINE_ALIAS from .tensor.manipulation import shard_index #DEFINE_ALIAS
from .tensor.manipulation import slice #DEFINE_ALIAS from .tensor.manipulation import slice #DEFINE_ALIAS
from .tensor.manipulation import split #DEFINE_ALIAS from .tensor.manipulation import split #DEFINE_ALIAS
from .tensor.manipulation import squeeze #DEFINE_ALIAS from .tensor.manipulation import squeeze #DEFINE_ALIAS
...@@ -116,11 +118,11 @@ from .tensor.manipulation import stack #DEFINE_ALIAS ...@@ -116,11 +118,11 @@ from .tensor.manipulation import stack #DEFINE_ALIAS
from .tensor.manipulation import strided_slice #DEFINE_ALIAS from .tensor.manipulation import strided_slice #DEFINE_ALIAS
from .tensor.manipulation import transpose #DEFINE_ALIAS from .tensor.manipulation import transpose #DEFINE_ALIAS
from .tensor.manipulation import unique #DEFINE_ALIAS from .tensor.manipulation import unique #DEFINE_ALIAS
# from .tensor.manipulation import unique_with_counts #DEFINE_ALIAS from .tensor.manipulation import unique_with_counts #DEFINE_ALIAS
from .tensor.manipulation import unsqueeze #DEFINE_ALIAS from .tensor.manipulation import unsqueeze #DEFINE_ALIAS
from .tensor.manipulation import unstack #DEFINE_ALIAS from .tensor.manipulation import unstack #DEFINE_ALIAS
from .tensor.manipulation import flip #DEFINE_ALIAS from .tensor.manipulation import flip #DEFINE_ALIAS
# from .tensor.manipulation import unbind #DEFINE_ALIAS from .tensor.manipulation import unbind #DEFINE_ALIAS
from .tensor.manipulation import roll #DEFINE_ALIAS from .tensor.manipulation import roll #DEFINE_ALIAS
from .tensor.math import abs #DEFINE_ALIAS from .tensor.math import abs #DEFINE_ALIAS
from .tensor.math import acos #DEFINE_ALIAS from .tensor.math import acos #DEFINE_ALIAS
...@@ -140,10 +142,10 @@ from .tensor.math import elementwise_pow #DEFINE_ALIAS ...@@ -140,10 +142,10 @@ from .tensor.math import elementwise_pow #DEFINE_ALIAS
from .tensor.math import elementwise_sub #DEFINE_ALIAS from .tensor.math import elementwise_sub #DEFINE_ALIAS
from .tensor.math import exp #DEFINE_ALIAS from .tensor.math import exp #DEFINE_ALIAS
from .tensor.math import floor #DEFINE_ALIAS from .tensor.math import floor #DEFINE_ALIAS
# from .tensor.math import increment #DEFINE_ALIAS from .tensor.math import increment #DEFINE_ALIAS
from .tensor.math import log #DEFINE_ALIAS from .tensor.math import log #DEFINE_ALIAS
from .tensor.math import mul #DEFINE_ALIAS from .tensor.math import mul #DEFINE_ALIAS
# from .tensor.math import multiplex #DEFINE_ALIAS from .tensor.math import multiplex #DEFINE_ALIAS
from .tensor.math import pow #DEFINE_ALIAS from .tensor.math import pow #DEFINE_ALIAS
from .tensor.math import reciprocal #DEFINE_ALIAS from .tensor.math import reciprocal #DEFINE_ALIAS
from .tensor.math import reduce_max #DEFINE_ALIAS from .tensor.math import reduce_max #DEFINE_ALIAS
...@@ -159,7 +161,7 @@ from .tensor.math import sqrt #DEFINE_ALIAS ...@@ -159,7 +161,7 @@ from .tensor.math import sqrt #DEFINE_ALIAS
from .tensor.math import square #DEFINE_ALIAS from .tensor.math import square #DEFINE_ALIAS
from .tensor.math import stanh #DEFINE_ALIAS from .tensor.math import stanh #DEFINE_ALIAS
from .tensor.math import sum #DEFINE_ALIAS from .tensor.math import sum #DEFINE_ALIAS
# from .tensor.math import sums #DEFINE_ALIAS from .tensor.math import sums #DEFINE_ALIAS
from .tensor.math import tanh #DEFINE_ALIAS from .tensor.math import tanh #DEFINE_ALIAS
from .tensor.math import elementwise_sum #DEFINE_ALIAS from .tensor.math import elementwise_sum #DEFINE_ALIAS
from .tensor.math import max #DEFINE_ALIAS from .tensor.math import max #DEFINE_ALIAS
......
...@@ -33,12 +33,12 @@ from .clip import GradientClipByNorm #DEFINE_ALIAS ...@@ -33,12 +33,12 @@ from .clip import GradientClipByNorm #DEFINE_ALIAS
from .clip import GradientClipByValue #DEFINE_ALIAS from .clip import GradientClipByValue #DEFINE_ALIAS
# from .clip import set_gradient_clip #DEFINE_ALIAS # from .clip import set_gradient_clip #DEFINE_ALIAS
from .clip import clip #DEFINE_ALIAS from .clip import clip #DEFINE_ALIAS
# from .clip import clip_by_norm #DEFINE_ALIAS from .clip import clip_by_norm #DEFINE_ALIAS
from .control_flow import case #DEFINE_ALIAS from .control_flow import case #DEFINE_ALIAS
from .control_flow import cond #DEFINE_ALIAS from .control_flow import cond #DEFINE_ALIAS
# from .control_flow import DynamicRNN #DEFINE_ALIAS # from .control_flow import DynamicRNN #DEFINE_ALIAS
# from .control_flow import StaticRNN #DEFINE_ALIAS # from .control_flow import StaticRNN #DEFINE_ALIAS
# from .control_flow import switch_case #DEFINE_ALIAS from .control_flow import switch_case #DEFINE_ALIAS
from .control_flow import while_loop #DEFINE_ALIAS from .control_flow import while_loop #DEFINE_ALIAS
# from .control_flow import rnn #DEFINE_ALIAS # from .control_flow import rnn #DEFINE_ALIAS
# from .decode import BeamSearchDecoder #DEFINE_ALIAS # from .decode import BeamSearchDecoder #DEFINE_ALIAS
...@@ -48,7 +48,7 @@ from .decode import beam_search_decode #DEFINE_ALIAS ...@@ -48,7 +48,7 @@ from .decode import beam_search_decode #DEFINE_ALIAS
# from .decode import crf_decoding #DEFINE_ALIAS # from .decode import crf_decoding #DEFINE_ALIAS
# from .decode import ctc_greedy_decoder #DEFINE_ALIAS # from .decode import ctc_greedy_decoder #DEFINE_ALIAS
# from .decode import dynamic_decode #DEFINE_ALIAS # from .decode import dynamic_decode #DEFINE_ALIAS
# from .decode import gather_tree #DEFINE_ALIAS from .decode import gather_tree #DEFINE_ALIAS
from .input import data #DEFINE_ALIAS from .input import data #DEFINE_ALIAS
# from .input import Input #DEFINE_ALIAS # from .input import Input #DEFINE_ALIAS
# from .layer.activation import PReLU #DEFINE_ALIAS # from .layer.activation import PReLU #DEFINE_ALIAS
...@@ -90,6 +90,7 @@ from .layer.norm import InstanceNorm #DEFINE_ALIAS ...@@ -90,6 +90,7 @@ from .layer.norm import InstanceNorm #DEFINE_ALIAS
# from .layer.rnn import RNNCell #DEFINE_ALIAS # from .layer.rnn import RNNCell #DEFINE_ALIAS
# from .layer.rnn import GRUCell #DEFINE_ALIAS # from .layer.rnn import GRUCell #DEFINE_ALIAS
# from .layer.rnn import LSTMCell #DEFINE_ALIAS # from .layer.rnn import LSTMCell #DEFINE_ALIAS
from .layer import loss #DEFINE_ALIAS from .layer import loss #DEFINE_ALIAS
from .layer import conv #DEFINE_ALIAS from .layer import conv #DEFINE_ALIAS
from ..fluid.dygraph.layers import Layer #DEFINE_ALIAS from ..fluid.dygraph.layers import Layer #DEFINE_ALIAS
......
...@@ -18,6 +18,8 @@ from ..fluid.clip import GradientClipByNorm #DEFINE_ALIAS ...@@ -18,6 +18,8 @@ from ..fluid.clip import GradientClipByNorm #DEFINE_ALIAS
from ..fluid.clip import GradientClipByValue #DEFINE_ALIAS from ..fluid.clip import GradientClipByValue #DEFINE_ALIAS
from ..fluid.layers import clip #DEFINE_ALIAS from ..fluid.layers import clip #DEFINE_ALIAS
from ..fluid.layers import clip_by_norm #DEFINE_ALIAS
__all__ = [ __all__ = [
# 'ErrorClipByValue', # 'ErrorClipByValue',
'GradientClipByGlobalNorm', 'GradientClipByGlobalNorm',
...@@ -25,5 +27,5 @@ __all__ = [ ...@@ -25,5 +27,5 @@ __all__ = [
'GradientClipByValue', 'GradientClipByValue',
# 'set_gradient_clip', # 'set_gradient_clip',
'clip', 'clip',
# 'clip_by_norm' 'clip_by_norm'
] ]
...@@ -17,12 +17,14 @@ from ..fluid.layers import case #DEFINE_ALIAS ...@@ -17,12 +17,14 @@ from ..fluid.layers import case #DEFINE_ALIAS
from ..fluid.layers import cond #DEFINE_ALIAS from ..fluid.layers import cond #DEFINE_ALIAS
from ..fluid.layers import while_loop #DEFINE_ALIAS from ..fluid.layers import while_loop #DEFINE_ALIAS
from ..fluid.layers import switch_case #DEFINE_ALIAS
__all__ = [ __all__ = [
'case', 'case',
'cond', 'cond',
# 'DynamicRNN', # 'DynamicRNN',
# 'StaticRNN', # 'StaticRNN',
# 'switch_case', 'switch_case',
'while_loop', 'while_loop',
# 'rnn' # 'rnn'
] ]
...@@ -16,6 +16,8 @@ ...@@ -16,6 +16,8 @@
from ..fluid.layers import beam_search #DEFINE_ALIAS from ..fluid.layers import beam_search #DEFINE_ALIAS
from ..fluid.layers import beam_search_decode #DEFINE_ALIAS from ..fluid.layers import beam_search_decode #DEFINE_ALIAS
from ..fluid.layers import gather_tree #DEFINE_ALIAS
__all__ = [ __all__ = [
# 'BeamSearchDecoder', # 'BeamSearchDecoder',
# 'Decoder', # 'Decoder',
...@@ -24,5 +26,5 @@ __all__ = [ ...@@ -24,5 +26,5 @@ __all__ = [
# 'crf_decoding', # 'crf_decoding',
# 'ctc_greedy_decoder', # 'ctc_greedy_decoder',
# 'dynamic_decode', # 'dynamic_decode',
# 'gather_tree' 'gather_tree'
] ]
...@@ -56,7 +56,7 @@ from .common import dropout #DEFINE_ALIAS ...@@ -56,7 +56,7 @@ from .common import dropout #DEFINE_ALIAS
from .common import label_smooth #DEFINE_ALIAS from .common import label_smooth #DEFINE_ALIAS
from .common import one_hot #DEFINE_ALIAS from .common import one_hot #DEFINE_ALIAS
from .common import pad #DEFINE_ALIAS from .common import pad #DEFINE_ALIAS
# from .common import pad_constant_like #DEFINE_ALIAS from .common import pad_constant_like #DEFINE_ALIAS
from .common import pad2d #DEFINE_ALIAS from .common import pad2d #DEFINE_ALIAS
from .common import unfold #DEFINE_ALIAS from .common import unfold #DEFINE_ALIAS
# from .common import bilinear_tensor_product #DEFINE_ALIAS # from .common import bilinear_tensor_product #DEFINE_ALIAS
...@@ -68,19 +68,19 @@ from .conv import conv3d #DEFINE_ALIAS ...@@ -68,19 +68,19 @@ from .conv import conv3d #DEFINE_ALIAS
from .conv import conv3d_transpose #DEFINE_ALIAS from .conv import conv3d_transpose #DEFINE_ALIAS
from .extension import add_position_encoding #DEFINE_ALIAS from .extension import add_position_encoding #DEFINE_ALIAS
# from .extension import autoincreased_step_counter #DEFINE_ALIAS # from .extension import autoincreased_step_counter #DEFINE_ALIAS
# from .extension import continuous_value_model #DEFINE_ALIAS from .extension import continuous_value_model #DEFINE_ALIAS
# from .extension import filter_by_instag #DEFINE_ALIAS from .extension import filter_by_instag #DEFINE_ALIAS
# from .extension import linear_chain_crf #DEFINE_ALIAS # from .extension import linear_chain_crf #DEFINE_ALIAS
# from .extension import merge_selected_rows #DEFINE_ALIAS # from .extension import merge_selected_rows #DEFINE_ALIAS
from .extension import multiclass_nms #DEFINE_ALIAS from .extension import multiclass_nms #DEFINE_ALIAS
# from .extension import polygon_box_transform #DEFINE_ALIAS from .extension import polygon_box_transform #DEFINE_ALIAS
# from .extension import random_crop #DEFINE_ALIAS from .extension import random_crop #DEFINE_ALIAS
from .extension import row_conv #DEFINE_ALIAS from .extension import row_conv #DEFINE_ALIAS
# from .extension import rpn_target_assign #DEFINE_ALIAS from .extension import rpn_target_assign #DEFINE_ALIAS
# from .extension import similarity_focus #DEFINE_ALIAS from .extension import similarity_focus #DEFINE_ALIAS
from .extension import target_assign #DEFINE_ALIAS from .extension import target_assign #DEFINE_ALIAS
from .extension import temporal_shift #DEFINE_ALIAS from .extension import temporal_shift #DEFINE_ALIAS
# from .extension import warpctc #DEFINE_ALIAS from .extension import warpctc #DEFINE_ALIAS
from .extension import diag_embed #DEFINE_ALIAS from .extension import diag_embed #DEFINE_ALIAS
from .learning_rate import cosine_decay #DEFINE_ALIAS from .learning_rate import cosine_decay #DEFINE_ALIAS
from .learning_rate import exponential_decay #DEFINE_ALIAS from .learning_rate import exponential_decay #DEFINE_ALIAS
...@@ -123,17 +123,17 @@ from .loss import bpr_loss #DEFINE_ALIAS ...@@ -123,17 +123,17 @@ from .loss import bpr_loss #DEFINE_ALIAS
from .loss import center_loss #DEFINE_ALIAS from .loss import center_loss #DEFINE_ALIAS
from .loss import cross_entropy #DEFINE_ALIAS from .loss import cross_entropy #DEFINE_ALIAS
from .loss import dice_loss #DEFINE_ALIAS from .loss import dice_loss #DEFINE_ALIAS
# from .loss import edit_distance #DEFINE_ALIAS from .loss import edit_distance #DEFINE_ALIAS
# from .loss import huber_loss #DEFINE_ALIAS from .loss import huber_loss #DEFINE_ALIAS
from .loss import iou_similarity #DEFINE_ALIAS from .loss import iou_similarity #DEFINE_ALIAS
from .loss import kldiv_loss #DEFINE_ALIAS from .loss import kldiv_loss #DEFINE_ALIAS
from .loss import log_loss #DEFINE_ALIAS from .loss import log_loss #DEFINE_ALIAS
# from .loss import margin_rank_loss #DEFINE_ALIAS from .loss import margin_rank_loss #DEFINE_ALIAS
from .loss import mse_loss #DEFINE_ALIAS from .loss import mse_loss #DEFINE_ALIAS
# from .loss import nce #DEFINE_ALIAS # from .loss import nce #DEFINE_ALIAS
from .loss import npair_loss #DEFINE_ALIAS from .loss import npair_loss #DEFINE_ALIAS
from .loss import rank_loss #DEFINE_ALIAS from .loss import rank_loss #DEFINE_ALIAS
# from .loss import sampled_softmax_with_cross_entropy #DEFINE_ALIAS from .loss import sampled_softmax_with_cross_entropy #DEFINE_ALIAS
from .loss import sigmoid_cross_entropy_with_logits #DEFINE_ALIAS from .loss import sigmoid_cross_entropy_with_logits #DEFINE_ALIAS
from .loss import sigmoid_focal_loss #DEFINE_ALIAS from .loss import sigmoid_focal_loss #DEFINE_ALIAS
from .loss import smooth_l1 #DEFINE_ALIAS from .loss import smooth_l1 #DEFINE_ALIAS
...@@ -169,27 +169,27 @@ from .vision import deformable_roi_pooling #DEFINE_ALIAS ...@@ -169,27 +169,27 @@ from .vision import deformable_roi_pooling #DEFINE_ALIAS
from .vision import density_prior_box #DEFINE_ALIAS from .vision import density_prior_box #DEFINE_ALIAS
from .vision import detection_output #DEFINE_ALIAS from .vision import detection_output #DEFINE_ALIAS
from .vision import distribute_fpn_proposals #DEFINE_ALIAS from .vision import distribute_fpn_proposals #DEFINE_ALIAS
# from .vision import fsp_matrix #DEFINE_ALIAS from .vision import fsp_matrix #DEFINE_ALIAS
from .vision import generate_mask_labels #DEFINE_ALIAS from .vision import generate_mask_labels #DEFINE_ALIAS
from .vision import generate_proposal_labels #DEFINE_ALIAS from .vision import generate_proposal_labels #DEFINE_ALIAS
from .vision import generate_proposals #DEFINE_ALIAS from .vision import generate_proposals #DEFINE_ALIAS
from .vision import grid_sampler #DEFINE_ALIAS from .vision import grid_sampler #DEFINE_ALIAS
from .vision import image_resize #DEFINE_ALIAS from .vision import image_resize #DEFINE_ALIAS
# from .vision import image_resize_short #DEFINE_ALIAS from .vision import image_resize_short #DEFINE_ALIAS
# from .vision import multi_box_head #DEFINE_ALIAS # from .vision import multi_box_head #DEFINE_ALIAS
# from .vision import pixel_shuffle #DEFINE_ALIAS from .vision import pixel_shuffle #DEFINE_ALIAS
from .vision import prior_box #DEFINE_ALIAS from .vision import prior_box #DEFINE_ALIAS
from .vision import prroi_pool #DEFINE_ALIAS from .vision import prroi_pool #DEFINE_ALIAS
from .vision import psroi_pool #DEFINE_ALIAS from .vision import psroi_pool #DEFINE_ALIAS
from .vision import resize_bilinear #DEFINE_ALIAS from .vision import resize_bilinear #DEFINE_ALIAS
from .vision import resize_nearest #DEFINE_ALIAS from .vision import resize_nearest #DEFINE_ALIAS
from .vision import resize_trilinear #DEFINE_ALIAS from .vision import resize_trilinear #DEFINE_ALIAS
# from .vision import retinanet_detection_output #DEFINE_ALIAS from .vision import retinanet_detection_output #DEFINE_ALIAS
# from .vision import retinanet_target_assign #DEFINE_ALIAS from .vision import retinanet_target_assign #DEFINE_ALIAS
from .vision import roi_align #DEFINE_ALIAS from .vision import roi_align #DEFINE_ALIAS
# from .vision import roi_perspective_transform #DEFINE_ALIAS from .vision import roi_perspective_transform #DEFINE_ALIAS
from .vision import roi_pool #DEFINE_ALIAS from .vision import roi_pool #DEFINE_ALIAS
# from .vision import shuffle_channel #DEFINE_ALIAS from .vision import shuffle_channel #DEFINE_ALIAS
from .vision import space_to_depth #DEFINE_ALIAS from .vision import space_to_depth #DEFINE_ALIAS
from .vision import yolo_box #DEFINE_ALIAS from .vision import yolo_box #DEFINE_ALIAS
from .vision import yolov3_loss #DEFINE_ALIAS from .vision import yolov3_loss #DEFINE_ALIAS
...@@ -25,6 +25,9 @@ from ...fluid.layers import pad2d #DEFINE_ALIAS ...@@ -25,6 +25,9 @@ from ...fluid.layers import pad2d #DEFINE_ALIAS
from ...fluid.layers import unfold #DEFINE_ALIAS from ...fluid.layers import unfold #DEFINE_ALIAS
from ...fluid.layers import assign #DEFINE_ALIAS from ...fluid.layers import assign #DEFINE_ALIAS
#from ...fluid.layers import fc #DEFINE_ALIAS
from ...fluid.layers import pad_constant_like #DEFINE_ALIAS
__all__ = [ __all__ = [
'dropout', 'dropout',
# 'embedding', # 'embedding',
...@@ -32,7 +35,7 @@ __all__ = [ ...@@ -32,7 +35,7 @@ __all__ = [
'label_smooth', 'label_smooth',
'one_hot', 'one_hot',
'pad', 'pad',
# 'pad_constant_like', 'pad_constant_like',
'pad2d', 'pad2d',
'unfold', 'unfold',
# 'bilinear_tensor_product', # 'bilinear_tensor_product',
......
...@@ -18,22 +18,30 @@ from ...fluid.layers import multiclass_nms #DEFINE_ALIAS ...@@ -18,22 +18,30 @@ from ...fluid.layers import multiclass_nms #DEFINE_ALIAS
from ...fluid.layers import target_assign #DEFINE_ALIAS from ...fluid.layers import target_assign #DEFINE_ALIAS
from ...fluid.layers import temporal_shift #DEFINE_ALIAS from ...fluid.layers import temporal_shift #DEFINE_ALIAS
from ...fluid.layers import continuous_value_model #DEFINE_ALIAS
from ...fluid.layers import filter_by_instag #DEFINE_ALIAS
from ...fluid.layers import polygon_box_transform #DEFINE_ALIAS
from ...fluid.layers import random_crop #DEFINE_ALIAS
from ...fluid.layers import rpn_target_assign #DEFINE_ALIAS
from ...fluid.layers import similarity_focus #DEFINE_ALIAS
from ...fluid.layers import warpctc #DEFINE_ALIAS
__all__ = [ __all__ = [
'add_position_encoding', 'add_position_encoding',
# 'autoincreased_step_counter', # 'autoincreased_step_counter',
# 'continuous_value_model', 'continuous_value_model',
# 'filter_by_instag', 'filter_by_instag',
# 'linear_chain_crf', # 'linear_chain_crf',
# 'merge_selected_rows', # 'merge_selected_rows',
'multiclass_nms', 'multiclass_nms',
# 'polygon_box_transform', 'polygon_box_transform',
# 'random_crop', 'random_crop',
'row_conv', 'row_conv',
# 'rpn_target_assign', 'rpn_target_assign',
# 'similarity_focus', 'similarity_focus',
'target_assign', 'target_assign',
'temporal_shift', 'temporal_shift',
# 'warpctc', 'warpctc',
'diag_embed' 'diag_embed'
] ]
......
...@@ -31,22 +31,27 @@ from ...fluid.layers import square_error_cost #DEFINE_ALIAS ...@@ -31,22 +31,27 @@ from ...fluid.layers import square_error_cost #DEFINE_ALIAS
from ...fluid.layers import ssd_loss #DEFINE_ALIAS from ...fluid.layers import ssd_loss #DEFINE_ALIAS
from ...fluid.layers import teacher_student_sigmoid_loss #DEFINE_ALIAS from ...fluid.layers import teacher_student_sigmoid_loss #DEFINE_ALIAS
from ...fluid.layers import edit_distance #DEFINE_ALIAS
from ...fluid.layers import huber_loss #DEFINE_ALIAS
from ...fluid.layers import margin_rank_loss #DEFINE_ALIAS
from ...fluid.layers import sampled_softmax_with_cross_entropy #DEFINE_ALIAS
__all__ = [ __all__ = [
'bpr_loss', 'bpr_loss',
'center_loss', 'center_loss',
'cross_entropy', 'cross_entropy',
'dice_loss', 'dice_loss',
# 'edit_distance', 'edit_distance',
# 'huber_loss', 'huber_loss',
'iou_similarity', 'iou_similarity',
'kldiv_loss', 'kldiv_loss',
'log_loss', 'log_loss',
# 'margin_rank_loss', 'margin_rank_loss',
'mse_loss', 'mse_loss',
# 'nce', # 'nce',
'npair_loss', 'npair_loss',
'rank_loss', 'rank_loss',
# 'sampled_softmax_with_cross_entropy', 'sampled_softmax_with_cross_entropy',
'sigmoid_cross_entropy_with_logits', 'sigmoid_cross_entropy_with_logits',
'sigmoid_focal_loss', 'sigmoid_focal_loss',
'smooth_l1', 'smooth_l1',
......
...@@ -42,6 +42,14 @@ from ...fluid.layers import space_to_depth #DEFINE_ALIAS ...@@ -42,6 +42,14 @@ from ...fluid.layers import space_to_depth #DEFINE_ALIAS
from ...fluid.layers import yolo_box #DEFINE_ALIAS from ...fluid.layers import yolo_box #DEFINE_ALIAS
from ...fluid.layers import yolov3_loss #DEFINE_ALIAS from ...fluid.layers import yolov3_loss #DEFINE_ALIAS
from ...fluid.layers import fsp_matrix #DEFINE_ALIAS
from ...fluid.layers import image_resize_short #DEFINE_ALIAS
from ...fluid.layers import pixel_shuffle #DEFINE_ALIAS
from ...fluid.layers import retinanet_detection_output #DEFINE_ALIAS
from ...fluid.layers import retinanet_target_assign #DEFINE_ALIAS
from ...fluid.layers import roi_perspective_transform #DEFINE_ALIAS
from ...fluid.layers import shuffle_channel #DEFINE_ALIAS
__all__ = [ __all__ = [
'affine_channel', 'affine_channel',
'affine_grid', 'affine_grid',
...@@ -56,27 +64,27 @@ __all__ = [ ...@@ -56,27 +64,27 @@ __all__ = [
'density_prior_box', 'density_prior_box',
'detection_output', 'detection_output',
'distribute_fpn_proposals', 'distribute_fpn_proposals',
# 'fsp_matrix', 'fsp_matrix',
'generate_mask_labels', 'generate_mask_labels',
'generate_proposal_labels', 'generate_proposal_labels',
'generate_proposals', 'generate_proposals',
'grid_sampler', 'grid_sampler',
'image_resize', 'image_resize',
# 'image_resize_short', 'image_resize_short',
# 'multi_box_head', # 'multi_box_head',
# 'pixel_shuffle', 'pixel_shuffle',
'prior_box', 'prior_box',
'prroi_pool', 'prroi_pool',
'psroi_pool', 'psroi_pool',
'resize_bilinear', 'resize_bilinear',
'resize_nearest', 'resize_nearest',
'resize_trilinear', 'resize_trilinear',
# 'retinanet_detection_output', 'retinanet_detection_output',
# 'retinanet_target_assign', 'retinanet_target_assign',
'roi_align', 'roi_align',
# 'roi_perspective_transform', 'roi_perspective_transform',
'roi_pool', 'roi_pool',
# 'shuffle_channel', 'shuffle_channel',
'space_to_depth', 'space_to_depth',
'yolo_box', 'yolo_box',
'yolov3_loss' 'yolov3_loss'
......
...@@ -22,7 +22,7 @@ from __future__ import print_function ...@@ -22,7 +22,7 @@ from __future__ import print_function
from .random import randperm from .random import randperm
from .attribute import rank #DEFINE_ALIAS from .attribute import rank #DEFINE_ALIAS
from .attribute import shape #DEFINE_ALIAS from .attribute import shape #DEFINE_ALIAS
# from .creation import create_tensor #DEFINE_ALIAS from .creation import create_tensor #DEFINE_ALIAS
# from .creation import create_lod_tensor #DEFINE_ALIAS # from .creation import create_lod_tensor #DEFINE_ALIAS
# from .creation import create_random_int_lodtensor #DEFINE_ALIAS # from .creation import create_random_int_lodtensor #DEFINE_ALIAS
from .creation import crop_tensor #DEFINE_ALIAS from .creation import crop_tensor #DEFINE_ALIAS
...@@ -78,13 +78,13 @@ from .manipulation import expand #DEFINE_ALIAS ...@@ -78,13 +78,13 @@ from .manipulation import expand #DEFINE_ALIAS
from .manipulation import expand_as #DEFINE_ALIAS from .manipulation import expand_as #DEFINE_ALIAS
from .manipulation import flatten #DEFINE_ALIAS from .manipulation import flatten #DEFINE_ALIAS
from .manipulation import gather #DEFINE_ALIAS from .manipulation import gather #DEFINE_ALIAS
# from .manipulation import gather_nd #DEFINE_ALIAS from .manipulation import gather_nd #DEFINE_ALIAS
from .manipulation import reshape #DEFINE_ALIAS from .manipulation import reshape #DEFINE_ALIAS
from .manipulation import reverse #DEFINE_ALIAS from .manipulation import reverse #DEFINE_ALIAS
from .manipulation import scatter #DEFINE_ALIAS from .manipulation import scatter #DEFINE_ALIAS
# from .manipulation import scatter_nd_add #DEFINE_ALIAS from .manipulation import scatter_nd_add #DEFINE_ALIAS
# from .manipulation import scatter_nd #DEFINE_ALIAS from .manipulation import scatter_nd #DEFINE_ALIAS
# from .manipulation import shard_index #DEFINE_ALIAS from .manipulation import shard_index #DEFINE_ALIAS
from .manipulation import slice #DEFINE_ALIAS from .manipulation import slice #DEFINE_ALIAS
from .manipulation import split #DEFINE_ALIAS from .manipulation import split #DEFINE_ALIAS
from .manipulation import squeeze #DEFINE_ALIAS from .manipulation import squeeze #DEFINE_ALIAS
...@@ -92,11 +92,11 @@ from .manipulation import stack #DEFINE_ALIAS ...@@ -92,11 +92,11 @@ from .manipulation import stack #DEFINE_ALIAS
from .manipulation import strided_slice #DEFINE_ALIAS from .manipulation import strided_slice #DEFINE_ALIAS
from .manipulation import transpose #DEFINE_ALIAS from .manipulation import transpose #DEFINE_ALIAS
from .manipulation import unique #DEFINE_ALIAS from .manipulation import unique #DEFINE_ALIAS
# from .manipulation import unique_with_counts #DEFINE_ALIAS from .manipulation import unique_with_counts #DEFINE_ALIAS
from .manipulation import unsqueeze #DEFINE_ALIAS from .manipulation import unsqueeze #DEFINE_ALIAS
from .manipulation import unstack #DEFINE_ALIAS from .manipulation import unstack #DEFINE_ALIAS
from .manipulation import flip #DEFINE_ALIAS from .manipulation import flip #DEFINE_ALIAS
# from .manipulation import unbind #DEFINE_ALIAS from .manipulation import unbind #DEFINE_ALIAS
from .manipulation import roll #DEFINE_ALIAS from .manipulation import roll #DEFINE_ALIAS
from .math import abs #DEFINE_ALIAS from .math import abs #DEFINE_ALIAS
from .math import acos #DEFINE_ALIAS from .math import acos #DEFINE_ALIAS
...@@ -116,10 +116,10 @@ from .math import elementwise_pow #DEFINE_ALIAS ...@@ -116,10 +116,10 @@ from .math import elementwise_pow #DEFINE_ALIAS
from .math import elementwise_sub #DEFINE_ALIAS from .math import elementwise_sub #DEFINE_ALIAS
from .math import exp #DEFINE_ALIAS from .math import exp #DEFINE_ALIAS
from .math import floor #DEFINE_ALIAS from .math import floor #DEFINE_ALIAS
# from .math import increment #DEFINE_ALIAS from .math import increment #DEFINE_ALIAS
from .math import log #DEFINE_ALIAS from .math import log #DEFINE_ALIAS
from .math import mul #DEFINE_ALIAS from .math import mul #DEFINE_ALIAS
# from .math import multiplex #DEFINE_ALIAS from .math import multiplex #DEFINE_ALIAS
from .math import pow #DEFINE_ALIAS from .math import pow #DEFINE_ALIAS
from .math import reciprocal #DEFINE_ALIAS from .math import reciprocal #DEFINE_ALIAS
from .math import reduce_max #DEFINE_ALIAS from .math import reduce_max #DEFINE_ALIAS
...@@ -135,7 +135,7 @@ from .math import sqrt #DEFINE_ALIAS ...@@ -135,7 +135,7 @@ from .math import sqrt #DEFINE_ALIAS
from .math import square #DEFINE_ALIAS from .math import square #DEFINE_ALIAS
from .math import stanh #DEFINE_ALIAS from .math import stanh #DEFINE_ALIAS
from .math import sum #DEFINE_ALIAS from .math import sum #DEFINE_ALIAS
# from .math import sums #DEFINE_ALIAS from .math import sums #DEFINE_ALIAS
from .math import tanh #DEFINE_ALIAS from .math import tanh #DEFINE_ALIAS
from .math import elementwise_sum #DEFINE_ALIAS from .math import elementwise_sum #DEFINE_ALIAS
from .math import max #DEFINE_ALIAS from .math import max #DEFINE_ALIAS
...@@ -151,7 +151,6 @@ from .math import erf #DEFINE_ALIAS ...@@ -151,7 +151,6 @@ from .math import erf #DEFINE_ALIAS
from .math import addcmul #DEFINE_ALIAS from .math import addcmul #DEFINE_ALIAS
from .math import addmm #DEFINE_ALIAS from .math import addmm #DEFINE_ALIAS
from .math import clamp #DEFINE_ALIAS from .math import clamp #DEFINE_ALIAS
from .manipulation import unbind #DEFINE_ALIAS
from .math import trace #DEFINE_ALIAS from .math import trace #DEFINE_ALIAS
from .math import kron #DEFINE_ALIAS from .math import kron #DEFINE_ALIAS
# from .random import gaussin #DEFINE_ALIAS # from .random import gaussin #DEFINE_ALIAS
......
...@@ -28,8 +28,10 @@ from ..fluid.layers import diag #DEFINE_ALIAS ...@@ -28,8 +28,10 @@ from ..fluid.layers import diag #DEFINE_ALIAS
from ..fluid.layers import eye #DEFINE_ALIAS from ..fluid.layers import eye #DEFINE_ALIAS
from ..fluid.layers import fill_constant #DEFINE_ALIAS from ..fluid.layers import fill_constant #DEFINE_ALIAS
from ..fluid.layers import create_tensor #DEFINE_ALIAS
__all__ = [ __all__ = [
# 'create_tensor', 'create_tensor',
# 'create_lod_tensor', # 'create_lod_tensor',
# 'create_random_int_lodtensor', # 'create_random_int_lodtensor',
'crop_tensor', 'crop_tensor',
......
...@@ -36,33 +36,18 @@ from ..fluid.layers import transpose #DEFINE_ALIAS ...@@ -36,33 +36,18 @@ from ..fluid.layers import transpose #DEFINE_ALIAS
from ..fluid.layers import unique #DEFINE_ALIAS from ..fluid.layers import unique #DEFINE_ALIAS
from ..fluid.layers import unstack #DEFINE_ALIAS from ..fluid.layers import unstack #DEFINE_ALIAS
from ..fluid.layers import gather_nd #DEFINE_ALIAS
from ..fluid.layers import scatter_nd_add #DEFINE_ALIAS
from ..fluid.layers import scatter_nd #DEFINE_ALIAS
from ..fluid.layers import shard_index #DEFINE_ALIAS
from ..fluid.layers import unique_with_counts #DEFINE_ALIAS
__all__ = [ __all__ = [
'cast', 'cast', 'concat', 'expand', 'expand_as', 'flatten', 'gather', 'gather_nd',
'concat', 'reshape', 'reverse', 'scatter', 'scatter_nd_add', 'scatter_nd',
'expand', 'shard_index', 'slice', 'split', 'squeeze', 'stack', 'strided_slice',
'expand_as', 'transpose', 'unique', 'unique_with_counts', 'unsqueeze', 'unstack', 'flip',
'flatten', 'unbind', 'roll'
'gather',
# 'gather_nd',
'reshape',
'reverse',
'scatter',
# 'scatter_nd_add',
# 'scatter_nd',
# 'shard_index',
'slice',
'split',
'squeeze',
'stack',
'strided_slice',
'transpose',
'unique',
# 'unique_with_counts',
'unsqueeze',
'unstack',
'flip',
'unbind',
'roll'
] ]
......
...@@ -58,6 +58,10 @@ from ..fluid.layers import stanh #DEFINE_ALIAS ...@@ -58,6 +58,10 @@ from ..fluid.layers import stanh #DEFINE_ALIAS
from ..fluid.layers import atan #DEFINE_ALIAS from ..fluid.layers import atan #DEFINE_ALIAS
from ..fluid.layers import erf #DEFINE_ALIAS from ..fluid.layers import erf #DEFINE_ALIAS
from ..fluid.layers import increment #DEFINE_ALIAS
from ..fluid.layers import multiplex #DEFINE_ALIAS
from ..fluid.layers import sums #DEFINE_ALIAS
__all__ = [ __all__ = [
'abs', 'abs',
'acos', 'acos',
...@@ -77,10 +81,10 @@ __all__ = [ ...@@ -77,10 +81,10 @@ __all__ = [
'elementwise_sub', 'elementwise_sub',
'exp', 'exp',
'floor', 'floor',
# 'increment', 'increment',
'log', 'log',
'mul', 'mul',
# 'multiplex', 'multiplex',
'pow', 'pow',
'reciprocal', 'reciprocal',
'reduce_max', 'reduce_max',
...@@ -96,7 +100,7 @@ __all__ = [ ...@@ -96,7 +100,7 @@ __all__ = [
'square', 'square',
'stanh', 'stanh',
'sum', 'sum',
# 'sums', 'sums',
'tanh', 'tanh',
'elementwise_sum', 'elementwise_sum',
'max', 'max',
...@@ -116,6 +120,7 @@ __all__ = [ ...@@ -116,6 +120,7 @@ __all__ = [
'kron' 'kron'
] ]
# yapf: enable. # yapf: enable.
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册