__init__.py 8.3 KB
Newer Older
1
# Copyright (c) 2016 PaddlePaddle Authors. All Rights Reserved
2 3 4 5 6 7 8 9 10 11 12 13
#
# 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.
14 15 16 17 18
from __future__ import print_function

#from .math import *
#from .creation import *
#from .linalg import *
19

C
Chengmo 已提交
20
# TODO: define alias in tensor and framework directory
21

22 23 24
from .random import randperm
from .attribute import rank  #DEFINE_ALIAS
from .attribute import shape  #DEFINE_ALIAS
25
from .creation import to_tensor  #DEFINE_ALIAS
26
from .creation import diag  #DEFINE_ALIAS
27
from .creation import eye  #DEFINE_ALIAS
28
# from .creation import fill_constant  #DEFINE_ALIAS
29
# from .creation import get_tensor_from_selected_rows        #DEFINE_ALIAS
30
from .creation import linspace  #DEFINE_ALIAS
31 32 33 34
from .creation import ones  #DEFINE_ALIAS
from .creation import ones_like  #DEFINE_ALIAS
from .creation import zeros  #DEFINE_ALIAS
from .creation import zeros_like  #DEFINE_ALIAS
35
from .creation import arange  #DEFINE_ALIAS
36 37
from .creation import eye  #DEFINE_ALIAS
from .creation import full  #DEFINE_ALIAS
P
Pei Yang 已提交
38
from .creation import full_like  #DEFINE_ALIAS
W
WuHaobo 已提交
39 40
from .creation import triu  #DEFINE_ALIAS
from .creation import tril  #DEFINE_ALIAS
S
suytingwan 已提交
41
from .creation import meshgrid  #DEFINE_ALIAS
42
from .creation import empty  #DEFINE_ALIAS
43
from .creation import empty_like  #DEFINE_ALIAS
44 45 46 47 48 49 50 51 52 53 54
from .linalg import matmul  #DEFINE_ALIAS
from .linalg import dot  #DEFINE_ALIAS
# from .linalg import einsum        #DEFINE_ALIAS
from .linalg import norm  #DEFINE_ALIAS
from .linalg import transpose  #DEFINE_ALIAS
from .linalg import dist  #DEFINE_ALIAS
from .linalg import t  #DEFINE_ALIAS
from .linalg import cross  #DEFINE_ALIAS
from .linalg import cholesky  #DEFINE_ALIAS
# from .linalg import tensordot        #DEFINE_ALIAS
from .linalg import bmm  #DEFINE_ALIAS
Q
Qi Li 已提交
55
from .linalg import histogram  #DEFINE_ALIAS
56
from .linalg import mv  #DEFINE_ALIAS
57
from .logic import equal  #DEFINE_ALIAS
58 59 60
from .logic import greater_equal  #DEFINE_ALIAS
from .logic import greater_than  #DEFINE_ALIAS
from .logic import is_empty  #DEFINE_ALIAS
J
Jack Zhou 已提交
61
#from .logic import isfinite  #DEFINE_ALIAS
62 63 64 65 66 67 68
from .logic import less_equal  #DEFINE_ALIAS
from .logic import less_than  #DEFINE_ALIAS
from .logic import logical_and  #DEFINE_ALIAS
from .logic import logical_not  #DEFINE_ALIAS
from .logic import logical_or  #DEFINE_ALIAS
from .logic import logical_xor  #DEFINE_ALIAS
from .logic import not_equal  #DEFINE_ALIAS
Z
Zhen Wang 已提交
69
from .logic import allclose  #DEFINE_ALIAS
W
wawltor 已提交
70
from .logic import equal_all  #DEFINE_ALIAS
71
# from .logic import isnan        #DEFINE_ALIAS
Z
zhulei 已提交
72
from .logic import is_tensor  #DEFINE_ALIAS
73 74 75
from .manipulation import cast  #DEFINE_ALIAS
from .manipulation import concat  #DEFINE_ALIAS
from .manipulation import expand  #DEFINE_ALIAS
L
lilong12 已提交
76
from .manipulation import broadcast_to  #DEFINE_ALIAS
77
from .manipulation import expand_as  #DEFINE_ALIAS
L
lilong12 已提交
78
from .manipulation import tile  #DEFINE_ALIAS
79 80
from .manipulation import flatten  #DEFINE_ALIAS
from .manipulation import gather  #DEFINE_ALIAS
81
from .manipulation import gather_nd  #DEFINE_ALIAS
82
from .manipulation import reshape  #DEFINE_ALIAS
Y
yaoxuefeng 已提交
83
from .manipulation import flip as reverse  #DEFINE_ALIAS
84
from .manipulation import scatter  #DEFINE_ALIAS
85 86 87
from .manipulation import scatter_nd_add  #DEFINE_ALIAS
from .manipulation import scatter_nd  #DEFINE_ALIAS
from .manipulation import shard_index  #DEFINE_ALIAS
88 89 90 91 92 93 94 95 96 97
from .manipulation import slice  #DEFINE_ALIAS
from .manipulation import split  #DEFINE_ALIAS
from .manipulation import squeeze  #DEFINE_ALIAS
from .manipulation import stack  #DEFINE_ALIAS
from .manipulation import strided_slice  #DEFINE_ALIAS
from .manipulation import transpose  #DEFINE_ALIAS
from .manipulation import unique  #DEFINE_ALIAS
from .manipulation import unsqueeze  #DEFINE_ALIAS
from .manipulation import unstack  #DEFINE_ALIAS
from .manipulation import flip  #DEFINE_ALIAS
98
from .manipulation import unbind  #DEFINE_ALIAS
99
from .manipulation import roll  #DEFINE_ALIAS
100
from .manipulation import chunk  #DEFINE_ALIAS
101 102 103
from .math import abs  #DEFINE_ALIAS
from .math import acos  #DEFINE_ALIAS
from .math import asin  #DEFINE_ALIAS
104
from .math import atan  #DEFINE_ALIAS
105 106
from .math import ceil  #DEFINE_ALIAS
from .math import cos  #DEFINE_ALIAS
107
from .math import cosh  #DEFINE_ALIAS
108
from .math import cumsum  #DEFINE_ALIAS
109 110 111 112 113 114 115
# from .math import elementwise_add  #DEFINE_ALIAS
# from .math import elementwise_div  #DEFINE_ALIAS
# from .math import elementwise_floordiv  #DEFINE_ALIAS
# from .math import elementwise_mul  #DEFINE_ALIAS
# from .math import elementwise_mod  #DEFINE_ALIAS
# from .math import elementwise_pow  #DEFINE_ALIAS
# from .math import elementwise_sub  #DEFINE_ALIAS
116 117
from .math import exp  #DEFINE_ALIAS
from .math import floor  #DEFINE_ALIAS
118
from .math import increment  #DEFINE_ALIAS
119
from .math import log  #DEFINE_ALIAS
120
from .math import multiplex  #DEFINE_ALIAS
121
from .math import pow  #DEFINE_ALIAS
122
from .math import reciprocal  #DEFINE_ALIAS
123 124 125 126
# from .math import reduce_max  #DEFINE_ALIAS
# from .math import reduce_min  #DEFINE_ALIAS
# from .math import reduce_prod  #DEFINE_ALIAS
# from .math import reduce_sum  #DEFINE_ALIAS
127 128 129 130
from .math import round  #DEFINE_ALIAS
from .math import rsqrt  #DEFINE_ALIAS
from .math import scale  #DEFINE_ALIAS
from .math import sign  #DEFINE_ALIAS
131
from .math import sin  #DEFINE_ALIAS
132
from .math import sinh  #DEFINE_ALIAS
133
from .math import sqrt  #DEFINE_ALIAS
134 135
from .math import square  #DEFINE_ALIAS
from .math import stanh  #DEFINE_ALIAS
136
from .math import sum  #DEFINE_ALIAS
137
from .math import tanh  #DEFINE_ALIAS
S
Steffy-zxf 已提交
138
from .math import add_n  #DEFINE_ALIAS
139
from .math import max  #DEFINE_ALIAS
140
from .math import maximum  #DEFINE_ALIAS
141
from .math import min  #DEFINE_ALIAS
142
from .math import minimum  #DEFINE_ALIAS
143
from .math import mm  #DEFINE_ALIAS
144 145 146 147 148
from .math import divide  #DEFINE_ALIAS
from .math import floor_divide  #DEFINE_ALIAS
from .math import remainder  #DEFINE_ALIAS
from .math import mod  #DEFINE_ALIAS
from .math import floor_mod  #DEFINE_ALIAS
149
from .math import multiply  #DEFINE_ALIAS
150
from .math import add  #DEFINE_ALIAS
151
from .math import atan  #DEFINE_ALIAS
152
from .math import logsumexp  #DEFINE_ALIAS
153
from .math import inverse  #DEFINE_ALIAS
154
from .math import log1p  #DEFINE_ALIAS
155
from .math import erf  #DEFINE_ALIAS
156
# from .math import addcmul  #DEFINE_ALIAS
157
from .math import addmm  #DEFINE_ALIAS
Y
Yang Zhang 已提交
158
from .math import clip  #DEFINE_ALIAS
L
Li Fuchen 已提交
159
from .math import trace  #DEFINE_ALIAS
160
from .math import kron  #DEFINE_ALIAS
J
Jack Zhou 已提交
161 162 163
from .math import isfinite  #DEFINE_ALIAS
from .math import isinf  #DEFINE_ALIAS
from .math import isnan  #DEFINE_ALIAS
G
guofei 已提交
164
from .math import prod  #DEFINE_ALIAS
165 166
from .math import all  #DEFINE_ALIAS
from .math import any  #DEFINE_ALIAS
P
pangyoki 已提交
167
from .random import multinomial  #DEFINE_ALIAS
168 169
from .random import standard_normal
from .random import normal
P
pangyoki 已提交
170
from .random import uniform  #DEFINE_ALIAS
171 172 173 174
from .random import randn  #DEFINE_ALIAS
from .random import rand  #DEFINE_ALIAS
from .random import randint  #DEFINE_ALIAS
from .random import randperm  #DEFINE_ALIAS
175
from .search import argmax  #DEFINE_ALIAS
176 177
from .search import argmin  #DEFINE_ALIAS
from .search import argsort  #DEFINE_ALIAS
178 179
# from .search import has_inf  #DEFINE_ALIAS
# from .search import has_nan  #DEFINE_ALIAS
180 181
# from .search import masked_select        #DEFINE_ALIAS
from .search import topk  #DEFINE_ALIAS
182
from .search import where  #DEFINE_ALIAS
183 184
from .search import index_select  #DEFINE_ALIAS
from .search import nonzero  #DEFINE_ALIAS
185
from .search import sort  #DEFINE_ALIAS
186
from .search import index_sample  #DEFINE_ALIAS
187
from .search import masked_select  #DEFINE_ALIAS
188
from .stat import mean  #DEFINE_ALIAS
189
# from .stat import reduce_mean  #DEFINE_ALIAS
190 191
from .stat import std  #DEFINE_ALIAS
from .stat import var  #DEFINE_ALIAS
192
from .stat import numel  #DEFINE_ALIAS
Z
zhulei 已提交
193
from .stat import median  #DEFINE_ALIAS
194
# from .tensor import Tensor        #DEFINE_ALIAS
195 196
# from .tensor import LoDTensor        #DEFINE_ALIAS
# from .tensor import LoDTensorArray        #DEFINE_ALIAS
197
from .to_string import set_printoptions