Tongzhou Wang
c681b03d37
Add determinant function on variable; Add backward on svd ( #3816 )
...
* determinant on variable
* svd bwd
2017-12-01 13:22:46 -05:00
Luca Antiga
9b31280ccf
Have __sizeof__ account for size of stored elements ( #3821 )
...
* Have __sizeof__ account for size of stored elements
* Conform to sizeof specification
2017-11-27 11:22:34 -05:00
Sam Gross
4bce69be22
Implement Variable.storage() ( #3765 )
...
This still uses THPStorage, but avoids touching THPTensor
2017-11-20 14:18:07 -05:00
Sam Gross
10d24d8f84
Add Tensor.slice() ( #3750 )
...
The slice function is very similar to narrow, except that it takes an
optional "step" argument. Unlike narrow, the arguments use the same
conventions as Python indexing: negative values wrap around and start
and stop are clamped to the size of the Tensor.
2017-11-20 13:58:12 -05:00
Philipp Lang
c4b0db5079
Remove hard file offset reset in load() ( #3695 )
...
* improved file offset logic
* load offset test
* whitespace
* needless exception handling
* test integer in binary
2017-11-17 15:21:37 -05:00
SsnL
43d1405d0d
Fix ld* conditions for gemv ger gemm ( #3604 )
2017-11-09 19:43:29 -05:00
gchanan
aabfae0503
CPU all/any should work with empty tensors. ( #3581 )
2017-11-08 20:18:26 -05:00
Holger Kohr
5e382894be
add numpy() and from_numpy() to HalfTensor ( #2953 )
2017-11-08 15:01:29 +01:00
Sam Gross
ecbc4b0dc3
Fix float uniform generation in TH ( #3541 )
...
Generate random uniform floats in the range [0, 1) by generating random
uniform uint32 in the range [0, 2^24-1] and dividing by 2^24. This
ensures that the largest value is representable as a float32 less than
one.
This also changes the uniform double generation to use more bits of
randomness.
2017-11-07 16:26:11 -05:00
avmgithub
68116d7f84
Fix test_torch.py test for Power see issue #3277 ( #3517 )
2017-11-06 18:51:02 -05:00
Richard Zou
3d06a1e075
Make THCTensor_varInnermostDim numerically stable using Welford's algorithm ( #3425 )
...
* Use Welford's algorithm when reducing along inner dimension for THCTensor's variance fn
* Use accreals in THCTensor's varInnermostDim
* Skip cuda tests if no cuda
* Variance testing
2017-11-06 16:00:29 -05:00
SsnL
8fd171a6fd
add test_index to test_cuda
2017-11-06 14:21:31 -05:00
SsnL
0bb0ee883e
relax index dim check
2017-11-06 14:21:31 -05:00
Dhanton
74d1bb54e6
Add single argument version of torch.arange ( #3494 )
2017-11-06 12:26:04 -05:00
Richard Zou
e11d2b9c9c
Better error messages for Aten tensor types ( #3449 )
...
* Better error messages for Aten tensor types
* Address comments, add unit test
2017-11-03 07:59:05 -04:00
Sam Gross
7c0b16c140
Add torch.take and Tensor.put_ ( #3263 )
...
* Add torch.take and Tensor.put_
These are similar to numpy.take and numpy.put. The take function allows
you to linearly index into a tensor without viewing it as a 1D tensor
first. The output has the same shape as the indices. The put function
copies value into a tensor also using linear indices.
2017-11-01 06:04:44 -04:00
Richard Zou
81b995514e
Make THTensor_(var) and THTensor_(std) more numerically stable ( #3410 )
2017-10-31 18:36:26 -04:00
Filip Binkiewicz
e4a3747cd8
Add unit tests for casting onto scalars
2017-10-31 08:51:55 -04:00
albanD
1ae10a4831
add test to check zero_strided tensors in blas level 2 and 3 functions
2017-10-30 16:00:21 -04:00
Priya Goyal
129336cb06
[dlpack] Memory management for dlpack
2017-10-21 20:19:51 +02:00
Richard Zou
ed9c43774c
Don't resize output in cpu torch.gels ( #3204 )
...
* Don't resize output in cpu torch.gels when m > n
2017-10-21 00:43:42 +02:00
SsnL
634c8315a4
isContiguous problems ( #3148 )
...
* with the size=1 case, impossible to do single point check, replace with isContiguousRange
* fix stride in desc; fix undef scope
* add test for this case for cudnn
* assertTrue
2017-10-20 10:20:33 -04:00
SsnL
38f87cc9c4
Limit print scale by sys.float_info ( #3113 )
...
* limit print scale by sys.float_info
* test print tiny/huge values in test_print
* fix lint
2017-10-14 08:52:01 +02:00
Priya Goyal
756ab3f24f
Adding conversion from python tensor to dlpack tensor ( #2933 )
2017-10-04 08:35:42 -04:00
Holger Kohr
fa8044d92f
Add tests for array interface
2017-10-03 10:27:56 -04:00
Taehoon Lee
5d9de014bd
Fix typos
2017-10-01 03:09:25 -04:00
gchanan
805ad16924
Support "expanding" an empty tensor to an empty tensor. ( #2824 )
...
This doesn't currently support expanding the sizes to (0,), but
we can handle that eventually at the ATen level.
2017-09-22 11:58:03 -04:00
IraKorshunova
2b9765ad02
Erf and erfinv ( #2799 )
2017-09-20 21:23:45 -04:00
Trevor Killeen
9c39e8cecb
Parity with NumPy newaxis placement in indexing ( #2779 )
2017-09-19 10:38:18 -04:00
Gregory Chanan
08eb88f3de
Duplicate what is tested in function tests in the method tests.
...
Also make some function-vs-method tests uniform and change method
tests so they will pass gradchecks (i.e. avoid nans)
2017-09-12 21:07:48 -04:00
Francisco Massa
1da87118cc
Optimize pow for different exponents and add tests
2017-09-10 13:51:05 -04:00
Trevor Killeen
8820d467d6
handle useless ellipsis in advanced indexing ( #2589 )
2017-09-01 14:27:47 -04:00
Trevor Killeen
26cdfcd9cf
allow single non-tuple sequence to trigger advanced indexing ( #2323 )
2017-09-01 00:28:45 -04:00
Alykhan Tejani
bc228b2409
auto_gpu:True for ones_like and zeros_like ( #2559 )
2017-08-29 09:51:36 -04:00
Zhou Mo
2c07f88ea3
Fix typos.
2017-08-25 14:27:07 -04:00
Alykhan Tejani
eb58740651
add ones_like and zeros_like
2017-08-25 14:11:04 -04:00
rluo
3b155fa305
Not changing dimension size for expand when target size is -1
2017-08-25 14:04:23 -04:00
Anton Osokin
0d34a6451a
fixing the bug with squeezing a singleton dimension in torch.min and torch.max
2017-08-16 17:51:48 -04:00
Luca Antiga
21d8465d8b
Add test for Tensor creation from NumPy on CPU and CUDA
2017-08-16 17:44:58 -04:00
Gregory Chanan
b3db52fe36
Support __neg__, .neg(), and neg_() for Long, Int, Short tensor types.
2017-08-15 02:51:25 -04:00
Gregory Chanan
50c208a50b
Revert "Fix typos."
...
This reverts commit 4622b33952 .
2017-08-10 13:57:00 -04:00
Zhou Mo
4622b33952
Fix typos.
2017-08-08 11:05:38 -04:00
Adam Paszke
e708de37cc
Allow keyword args in long_arg options
2017-07-20 01:45:57 -04:00
Trevor Killeen
31894cafdd
add support for advanced indexing with less than ndim indexers, ellipsis ( #2144 )
2017-07-19 15:51:03 -04:00
Trevor Killeen
c4120f34bf
move to model with cuda indexing tensors for cuda tensor adv indexing
2017-07-19 11:05:10 -04:00
Luca Antiga
366299f9f3
Wrap unbiased flag in var, std, varall, stdall
2017-07-14 17:29:06 -04:00
lynic
54cabb8bf3
Correct negative dim behavior in torch.stack ( #2084 )
...
Fixes #1950
2017-07-13 16:29:31 -04:00
lynic
f98c384973
Raise error when call from_numpy on 0-dim array ( #2075 )
...
* Raise error when call from_numpy on 0-dim array
Fixes : #2055
* reword error message
2017-07-13 09:56:12 -04:00
Christian Sarofeen
27da4eafc2
Remove more advanced indexing duplicate tests ( #2071 )
2017-07-13 00:30:52 -04:00
Sam Gross
841173c530
Use NamedTemporaryFile to avoid filename collisions ( #2069 )
2017-07-12 17:14:42 -04:00