Skip to content

Instantly share code, notes, and snippets.

@ailzhang
Last active December 13, 2018 17:01
Show Gist options
  • Save ailzhang/1dd6de3f788b2077e071ecbb1d6a49cb to your computer and use it in GitHub Desktop.
Save ailzhang/1dd6de3f788b2077e071ecbb1d6a49cb to your computer and use it in GitHub Desktop.
Pytorch API categorization

Torch level 1: Uncategorized

function Symbolic_implemented
pin_memory
size
stride
to
storage_offset
set_
is_contiguous
is_set_to
is_tensor
is_storage

Torch level 1: linear algebra

function Symbolic_implemented
addbmm
addmv
addr
baddbmm
bmm
dot
matmul
mm yes
mv
addmm yes

Torch level 1: comparison

function Symbolic_implemented
min
max
all
any
allclose
is_floating_point
is_complex
is_same_size
ne yes
eq yes
ge yes
le yes
gt yes
lt yes
isfinite
isinf
isnan

Torch level 1: constructor

function Symbolic_implemented
multinomial
normal
tensor
arange
bernoulli
empty
empty_like
empty_strided
fill_
full
full_like
ones
ones_like
rand
rand_like
randint
randint_like
randn
randn_like
randperm
range
detach
view_as
zeros
zeros_like
clone
zero_
masked_fill_
masked_scatter_
view
random_
uniform_
as_tensor

Torch level 1: conv

function Symbolic_implemented
convolution
conv1d
conv2d
conv3d
conv_transpose1d
conv_transpose2d
conv_transpose3d

Torch level 1: indexing

function Symbolic_implemented
gather
as_strided
broadcast_tensors
cat
chunk
contiguous
resize_
expand
expand_as
index
index_copy_
index_put
narrow_copy
narrow
repeat
reshape
reshape_as
select
slice
split
squeeze
stack
t yes
transpose
unsqueeze yes
resize_as_
unbind
put_
index_add_
index_fill_
scatter_
scatter_add_
take
index_select
masked_select
nonzero

Torch level 1: math_other

function Symbolic_implemented
flatten
tensordot

Torch level 1: pointwise

function Symbolic_implemented
equal
and
iand
or
ior
xor
ixor
lshift
ilshift
rshift
irshift
frac yes
reciprocal yes
neg yes
atan2
pow
lerp
sign
fmod yes
remainder yes
addcmul
addcdiv
_cast_byte
_cast_char
_cast_double
_cast_float
_cast_int
_cast_long
_cast_short
_cast_half
abs yes
acos yes
add yes
asin yes
atan yes
ceil yes
clamp yes
cos yes
cosh yes
div yes
erf
erfc
exp yes
expm1 yes
floor yes
is_nonzero
is_signed
log yes
log10 yes
log1p yes
log2 yes
mul yes
round yes
rsqrt yes
sin yes
sinh yes
sqrt
tan yes
tanh yes
trunc yes
type_as yes
sub yes

Torch level 1: reduction

function Symbolic_implemented
dist
argmax
argmin
logsumexp
mean
sum
std
prod
var
norm
numel
unique

Torch level 2: linear algebra

function Symbolic_implemented
gels
trtrs
symeig
eig
svd
potrf
potrs
potri
pstrf
qr
geqrf
orgqr
ormqr
btrifact
btrifact_with_info
btrisolve

Torch level 2: comparison

function Symbolic_implemented
sort
topk

Torch level 2: constructor

function Symbolic_implemented
linspace
logspace

Torch level 2: reduction

function Symbolic_implemented
median
cumsum

Torch level 3: Uncategorized

function Symbolic_implemented
to_dense
sparse_dim
dense_dim
coalesce
is_coalesced
indices
values
hspmm
copy_sparse_to_sparse_
to_sparse

Torch level 3: linear algebra

function Symbolic_implemented
chain_matmul
det
ger
gesv
inverse
logdet
matrix_rank
matrix_power
pinverse
slogdet
smm
sspaddmm
btriunpack

Torch level 3: comparison

function Symbolic_implemented
kthvalue
argsort

Torch level 3: constructor

function Symbolic_implemented
eye
poisson
sparse_coo_tensor
cauchy_
log_normal_
exponential_
geometric_

Torch level 3: indexing

function Symbolic_implemented
permute
rot90
where
sparse_resize_
sparse_resize_and_clear_
sparse_mask

Torch level 3: loss

function Symbolic_implemented
hinge_embedding_loss

Torch level 3: math_other

function Symbolic_implemented
renorm
histc
bincount
diagflat
diagonal
einsum
flip
meshgrid
diag
cross
triu
tril
trace

Torch level 3: pointwise

function Symbolic_implemented
lgamma
digamma
polygamma
erfinv
mvlgamma

Torch level 3: reduction

function Symbolic_implemented
cumprod
mode

Torch level 3: spectral

function Symbolic_implemented
bartlett_window
blackman_window
hann_window
hamming_window
fft
ifft
rfft
irfft
stft

Torch level 3: vision

function Symbolic_implemented
pixel_shuffle

NN level 1: dropout

function Symbolic_implemented
dropout
feature_dropout
dropout2d
dropout3d

NN level 1: embedding

function Symbolic_implemented
embedding

NN level 1: loss

function Symbolic_implemented
binary_cross_entropy
mse_loss
nll_loss
nll_loss2d
smooth_l1_loss
cross_entropy

NN level 1: nonlinear

function Symbolic_implemented
elu
glu
hardtanh
leaky_relu
log_sigmoid
softplus
softshrink
threshold
log_softmax
relu yes
prelu
softmax
relu6
logsigmoid
tanhshrink
softsign
softmin

NN level 1: normalization

function Symbolic_implemented
batch_norm
group_norm
instance_norm

NN level 1: pointwise

function Symbolic_implemented
sigmoid yes

NN level 1: pooling

function Symbolic_implemented
avg_pool2d
avg_pool3d
max_pool2d_with_indices
max_pool3d_with_indices
max_unpool2d
max_unpool3d
avg_pool1d
max_pool1d_with_indices
max_pool1d
max_pool2d
max_pool3d
max_unpool1d

NN level 1: vision

function Symbolic_implemented
upsample_linear1d
upsample_bilinear2d
upsample_trilinear3d
upsample_nearest1d
upsample_nearest2d
upsample_nearest3d
bilinear
binary_cross_entropy_with_logits
linear
interpolate
upsample
upsample_nearest
upsample_bilinear

NN level 2: Uncategorized

function Symbolic_implemented
_pack_padded_sequence
_pad_packed_sequence

NN level 2: loss

function Symbolic_implemented
l1_loss
multi_margin_loss
multilabel_margin_loss
soft_margin_loss
ctc_loss

NN level 2: normalization

function Symbolic_implemented
layer_norm

NN level 2: recurrent

function Symbolic_implemented
lstm
gru
rnn_tanh
rnn_relu
lstm_cell
gru_cell
rnn_tanh_cell
rnn_relu_cell
torch.nn.utils.rnn.packedsequence
torch.nn.utils.rnn.pack_padded_sequence
torch.nn.utils.rnn.pad_packed_sequence
torch.nn.utils.rnn.pad_sequence
torch.nn.utils.rnn.pack_sequence

NN level 2: vision

function Symbolic_implemented
grid_sampler
grid_sampler_2d
grid_sampler_3d

NN level 3: Uncategorized

function Symbolic_implemented
torch.nn.utils.clip_grad_norm_
torch.nn.utils.clip_grad_value_
torch.nn.utils.parameters_to_vector
torch.nn.utils.vector_to_parameters
torch.nn.utils.weight_norm
torch.nn.utils.remove_weight_norm
torch.nn.utils.spectral_norm
torch.nn.utils.remove_spectral_norm
torch.nn.parallel.data_parallel

NN level 3: conv

function Symbolic_implemented
unfold
fold

NN level 3: distance

function Symbolic_implemented
pairwise_distance
pdist
cosine_similarity

NN level 3: dropout

function Symbolic_implemented
alpha_dropout
feature_alpha_dropout

NN level 3: embedding

function Symbolic_implemented
embedding_bag

NN level 3: init

function Symbolic_implemented
calculate_gain
constant_
dirac_
xavier_uniform_
xavier_normal_
kaiming_uniform_
kaiming_normal_
orthogonal_
sparse_

NN level 3: loss

function Symbolic_implemented
cosine_embedding_loss
kl_div
margin_ranking_loss
triplet_margin_loss
poisson_nll_loss
multilabel_soft_margin_loss

NN level 3: nonlinear

function Symbolic_implemented
rrelu
hardshrink
selu
celu
gumbel_softmax

NN level 3: normalization

function Symbolic_implemented
local_response_norm
normalize

NN level 3: padding

function Symbolic_implemented
pad

NN level 3: pooling

function Symbolic_implemented
adaptive_avg_pool2d
adaptive_avg_pool3d
adaptive_max_pool2d
adaptive_max_pool3d
fractional_max_pool2d
adaptive_avg_pool1d
adaptive_max_pool1d
lp_pool1d
lp_pool2d

NN level 3: vision

function Symbolic_implemented
grid_sample
affine_grid
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment