Open dfalbel opened 5 years ago
Code I wrote to keep track of new/deprecated methods.
library(httr)
library(xml2)
library(magrittr)
# methods listed in docs today
docs_new <- httr::GET("https://pytorch.org/docs/stable/tensors.html") %>%
content() %>%
xml2::xml_find_all("//code[@class='descname']") %>%
xml2::xml_text() %>%
unique() %>%
sort() %>%
stringr::str_replace("\\$", "")
# methods listed in this issue (#25)
docs_old <- httr::GET("https://github.com/dfalbel/torch/issues/25") %>%
content() %>%
xml2::xml_find_all("//li[@class='task-list-item']/code") %>%
xml2::xml_text() %>%
stringr::str_replace("\\$", "")
setdiff(docs_new, docs_old)
setdiff(docs_old, docs_new)
Here's a complete list of tensor method we need to implement:
$abs
$abs_
$acos
$acos_
$add
$add_
$addbmm
$addbmm_
$addcdiv
$addcdiv_
$addcmul
$addcmul_
$addmm
$addmm_
$addmv
$addmv_
$addr
$addr_
$all
$allclose
$any
$apply_
$argmax
$argmin
$asin
$asin_
$atan
$atan_
$atan2
$atan2_
$baddbmm
$baddbmm_
$bernoulli
$bernoulli_
$bmm
$btrifact
$btrifact_with_info
$btrisolve
$byte
$ByteTensor
$cauchy_
$ceil
$ceil_
$char
$cholesky
$chunk
$clamp
$clamp_
$clone
$contiguous
$copy_
$cos
$cos_
$cosh
$cosh_
$cpu
$cross
$cuda
$cumprod
$cumsum
$data_ptr
$det
$device
$diag
$diag_embed
$dim
$dist
$div
$div_
$dot
$double
$eig
$element_size
$eq
$eq_
(waiting because there's a bug on pytorch )$equal
$erf
$erf_
$erfc
$erfc_
$erfinv
$erfinv_
$exp
$exp_
$expand
$expand_as
$expm1
$expm1_
$exponential_
- need to think about generators.$fill_
$flatten
$flip
$float
$floor
$floor_
$fmod
$fmod_
$frac
$frac_
$gather
$ge
$ge_
$gels
$geometric_
$geqrf
$ger
$gesv
$get_device
$gt
$gt_
$half
$histc
$index_add_
$index_copy_
$index_fill_
$index_put_
$index_select
$int
$inverse
$is_contiguous
$is_cuda
$is_pinned
$is_set_to
$is_signed
$item
$kthvalue
$le
$le_
$lerp
$lerp_
$log
$log_
$log_normal_
$log10
$log10_
$log1p
$log1p_
$log2
$log2_
$logdet
$logsumexp
$long
$lt
$lt_
$map_
$masked_fill_
$masked_scatter_
$masked_select
$matmul
$matrix_power
$max
$mean
$median
$min
$mm
$mode
$mul
$mul_
$multinomial
$mv
$mvlgamma
$mvlgamma_
$narrow
$ndimension
$ne
$ne_
$neg
$neg_
$nelement
$new_empty
$new_full
$new_ones
$new_tensor
$new_zeros
$nonzero
$norm
$normal_
$numel
$numpy
$orgqr
$ormqr
$permute
$pin_memory
$pinverse
$potrf
$potri
$potrs
$pow
$pow_
$prod
$pstrf
$put_
$qr
$random_
$reciprocal
$reciprocal_
$remainder
$remainder_
$renorm
$renorm_
$repeat
$requires_grad_
$reshape
$reshape_as
$resize_
$resize_as_
$round
$round_
$rsqrt
$rsqrt_
$scatter_
$scatter_add_
$select
$set_
$share_memory_
$short
$sigmoid
$sigmoid_
$sign
$sign_
$sin
$sin_
$sinh
$sinh_
$size
$slogdet
$sort
$sparse_mask
$split
$sqrt
$sqrt_
$squeeze
$squeeze_
$std
$storage
$storage_offset
$storage_type
$stride
$sub
$sub_
$sum
$svd
$symeig
$t
$t_
$take
$tan
$tan_
$tanh
$tanh_
$Tensor
$to
$to_sparse
$tolist
$topk
$trace
$transpose
$transpose_
$tril
$tril_
$triu
$triu_
$trtrs
$trunc
$trunc_
$type
$type_as
$unfold
$uniform_
$unique
$unsqueeze
$unsqueeze_
$var
$view
$view_as
$zero_
The code used to create the list: