Open dfalbel opened 5 years ago
does tch_zeros_like() make sense to be implemented? The doc says that this is the same as tch_zeros() but without the out
parameter.
I think yes, it's commom to see codes like this in pytorch:
def NLLLoss(logs, targets):
out = torch.zeros_like(targets, dtype=torch.float)
for i in range(len(targets)):
out[i] = logs[i][targets[i]]
return -out.sum()/len(out)
What are the plans for the package development? I would willingly contribute to this repo from time to time, if I know what's the most important at the current stage. I think the list above is out-of-date and I've seen you tried to merge a branch with code autogeneration, so the project isn't abandoned :stuck_out_tongue:
Hi @krzjoa,
I have plans to push this package forward in 1 or 2 months. For now, I'm sporadically building code-generation tools so we don't need to wrap every torch function.
Ok, so I'll be watching the project :sunglasses: I may try to contribute if I'm sure I do not duplicate any auto-generated piece of code.
Here is a complete list of torch functions we need to implement. I will use this issue to track progress. The goal is to implement them all in the next 2 weeks.
tch_abs
tch_acos
tch_add
tch_addbmm
tch_addcdiv
tch_addcmul
tch_addmm
tch_addmv
tch_addr
tch_allclose
tch_arange
tch_argmax
tch_argmin
tch_argsort
tch_as_tensor
tch_asin
tch_atan
tch_atan2
tch_baddbmm
tch_bartlett_window
tch_bernoulli
tch_bincount
tch_blackman_window
tch_bmm
tch_broadcast_tensors
tch_btrifact
tch_btrifact_with_info
tch_btrisolve
tch_btriunpack
tch_cat
tch_ceil
tch_chain_matmul
tch_cholesky
tch_chunk
tch_clamp
tch_compiled_with_cxx11_abi
tch_cos
tch_cosh
tch_cross
tch_cumprod
tch_cumsum
tch_default_generator
tch_det
tch_diag
tch_diag_embed
tch_diagflat
tch_diagonal
tch_digamma
tch_dist
tch_div
tch_dot
tch_eig
tch_einsum
tch_empty
tch_empty_like
tch_eq
tch_equal
tch_erf
tch_erfc
tch_erfinv
tch_exp
tch_expm1
tch_eye
tch_fft
tch_flatten
tch_flip
tch_floor
tch_fmod
tch_frac
tch_from_numpy
tch_full
tch_full_like
tch_gather
tch_ge
tch_gels
tch_geqrf
tch_ger
tch_gesv
tch_get_default_dtype
tch_get_num_threads
tch_get_rng_state
tch_gt
tch_hamming_window
tch_hann_window
tch_histc
tch_ifft
tch_index_select
tch_initial_seed
tch_inverse
tch_irfft
tch_is_storage
tch_is_tensor
tch_isfinite
tch_isinf
tch_isnan
tch_kthvalue
tch_le
tch_lerp
tch_linspace
tch_load
tch_log
tch_log10
tch_log1p
tch_log2
tch_logdet
tch_logspace
tch_logsumexp
tch_lt
tch_manual_seed
tch_masked_select
tch_matmul
tch_matrix_power
tch_matrix_rank
tch_max
tch_mean
tch_median
tch_meshgrid
tch_min
tch_mm
tch_mode
tch_mul
tch_multinomial
tch_mv
tch_mvlgamma
tch_narrow
tch_ne
tch_neg
tch_nonzero
tch_norm
tch_normal
tch_numel
tch_ones
tch_ones_like
tch_orgqr
tch_ormqr
tch_pinverse
tch_potrf
tch_potri
tch_potrs
tch_pow
tch_prod
tch_pstrf
tch_qr
tch_rand
tch_rand_like
tch_randint
tch_randint_like
tch_randn
tch_randn_like
tch_randperm
tch_range
tch_reciprocal
tch_remainder
tch_renorm
tch_reshape
tch_rfft
tch_round
tch_rsqrt
tch_save
tch_set_default_dtype
tch_set_default_tensor_type
tch_set_flush_denormal
tch_set_num_threads
tch_set_printoptions
tch_set_rng_state
tch_sigmoid
tch_sign
tch_sin
tch_sinh
tch_slogdet
tch_sort
tch_sparse_coo_tensor
tch_split
tch_sqrt
tch_squeeze
tch_stack
tch_std
tch_stft
tch_sum
tch_svd
tch_symeig
tch_t
tch_take
tch_tan
tch_tanh
tch_tensor
tch_tensordot
tch_topk
tch_trace
tch_transpose
tch_tril
tch_triu
tch_trtrs
tch_trunc
tch_unbind
tch_unique
tch_unsqueeze
tch_var
tch_where
tch_zeros
tch_zeros_like
Here's the code uses to generate the list: