Commit Graph

247 Commits

Author SHA1 Message Date
8aa0ae3836 Support arbitrary number of batch dimensions in *FFT (#6528) 2018-04-12 15:03:22 -04:00
0dff2b5e35 [fft] [3 of 3] Implements backward of fft ifft rfft irfft (#5537)
* change irfft signal_sizes arg to be the last

* add docs for fft, ifft, rfft, irfft; update doc for stft

* fix typo in window function docs

* improve gradcheck error message

* implement backward of fft, ifft, rfft, irfft

* add grad tests for fft, ifft, rfft, irfft

* fix nits and typos from #6118

* address comments
2018-04-10 22:09:36 -04:00
acb7df11a2 Add torch.randint and torch.randint_like functions (#6136)
Adds randint and randint_like to TensorFactories.cpp
2018-04-10 12:08:21 -04:00
3b58b859b2 Fix typos in docs (#6389) 2018-04-07 12:41:15 -04:00
0aa35780bf [ready] Implement log2 and log10 in PyTorch (#6272)
* Implemented log2 and log10

* Re-add incorrectly removed files

* Fix minor bugs

* Fix log1p docs

* Add a try-except for python2 math module in log2 test

* Revert changes made to aten/doc/*

* Fix docstring errors

* Fix windows build
2018-04-05 14:28:37 -04:00
32ba2ca203 add documentation for diagflat and diagonal (#6161) 2018-03-31 18:03:21 +02:00
7ffcb20295 small math cleanups in the docs (#6057) 2018-03-29 22:50:08 +02:00
39829c1670 Improve docs (#5999)
* Clarify det and svd doc on when backward is not stable

* Fix some links in nn.functional doc; improve upsampling doc
2018-03-26 14:09:11 -04:00
940a0ab67b Add logdet and slogdet (#5393)
* 1. Add logdet and slogdet in ATen side
2. Previously, det can return result with incorrect sign upon seeing symmetric
   matrices. This is caused by the wrong assumption I had on SVD (when input is
   symmetric U=V^T). This fixes it.
3. Moreover, after fixing 2 now QR is always needed for det forward. So I moved
   SVD to backward call. Since this is a specific variant of SVD, it is named as
   _svd_with_positive_UV_det, with derivative.yaml entry being svd_backward.
4. Updated/added backward functions for det, logdet and slogdet, which uses
   _svd_with_positive_UV_det and svd_backward inside.
5. Optimized svd_backward:
   a. Avoid unnecessary kernels when only sigma has gradient (this is the usual
      case, and also true with *det backward functions).
   b. Fix SVD double backward by avoiding a nan.

* 1. Add/update grad checks for det, logdet, and slogdet.
2. Fix an incorrect check for dim_args_idx in test_autograd.py
3. Add option to only test a subset of output values, specified by
   test_output_indices, for cases like slogdet where only the
   second output is differentiable.
4. Add better doc for the test generating list.

* Add/improve output tests for det, logdet and slogdet
Add a scaling to random matrices so closeness checks are more robust

* Remove unnecessaery Variable wrappers in some test files

* Add logdet slogdet docs

* Improve an err msg in THTensorLapack.c

* add inverse-based backward for invertible matrices
use svd only for non-invertible case, so don't need the special variant anymore

* use LU rather than QR
2018-03-16 09:23:00 -04:00
76a283db40 [ready] General Documentation Improvements - 2 (#5685)
* Fix some minor errors in existing docs.

* Fix Convolution and Pooling docs in torch.nn.functional

* Cleaned up torch.nn.functional docs

* Address @SsnL 's comments

* Add multiplication sign missing in docs

* Fix more typos, and clear some warnings

* Change infinity symbol in LPPool2d

* Revert some changes in torch.nn.functional

* Few more minor changes
2018-03-13 09:47:43 -04:00
a2641500bf Implement torch.reshape and Tensor.reshape (#5575)
* Implement torch.reshape and Tensor.reshape

This implements reshape which has similar semantics to numpy.reshape. It
will return a view of the source tensor if possible. Otherwise, it
returns a copy.

* Remove in-place reshape_ that was an alias for resize_

* Update documentation
2018-03-12 16:20:40 -04:00
42bf2f9289 Explain floating point issue in torch.arange doc (#5708)
* Explain floating point issue in torch.arange doc

https://github.com/pytorch/pytorch/issues/5556
https://github.com/pytorch/pytorch/issues/5704
https://github.com/pytorch/pytorch/pull/5600

* Add line break to stay below max comment length

* Copyedit

* Typofix
2018-03-12 12:04:51 -04:00
4e190c2fed Fix floor latex rendering (#5682)
* Make floors larger

* Improve Latex rendering of floor

* Improve latex rendering of ceil

* Fix flake8
2018-03-09 23:53:14 -05:00
74043b69c2 Alias torch.diagonal, torch.diagflat (#5622)
* Alias torch.diagonal, torch.diagflat

* Address comments; Add sanity tests for torch.diagonal and torch.diagflat
2018-03-09 23:46:42 -05:00
71d73211f4 [ready] torch.* doc update for Variable/Tensor merge, and other improvements (#5443)
* 1. Update doc to reflect changes in Variable/Tensor merge, and new printing style
2. Remove functions in torch/functional.py that are already implemented with native_function
3. Add set_detault_tensor_type doc

* fix torch.split

* py2 unicode string fix

* update torch.gels doc

* address @fmassa 's comments

* double-colon
2018-03-08 23:02:38 -05:00
32b3841553 [ready] General documentation improvements (#5450)
* Improvize documentation
1. Add formula for erf, erfinv
2. Make exp, expm1 similar to log, log1p
3. Symbol change in ge, le, ne, isnan

* Fix minor nit in the docstring

* More doc improvements
1. Added some formulae
2. Complete scanning till "Other Operations" in Tensor docs

* Add more changes
1. Modify all torch.Tensor wherever required

* Fix Conv docs
1. Fix minor nits in the references for LAPACK routines

* Improve Pooling docs
1. Fix lint error

* Improve docs for RNN, Normalization and Padding
1. Fix flake8 error for pooling

* Final fixes for torch.nn.* docs.
1. Improve Loss Function documentation
2. Improve Vision Layers documentation

* Fix lint error

* Improve docstrings in torch.nn.init

* Fix lint error

* Fix minor error in torch.nn.init.sparse

* Fix Activation and Utils Docs
1. Fix Math Errors
2. Add explicit clean to Makefile in docs to prevent running graph generation script
while cleaning
3. Fix utils docs

* Make PYCMD a Makefile argument, clear up prints in the build_activation_images.py

* Fix batch norm doc error
2018-03-08 13:21:12 -05:00
8720d72d7c Fixing inconsistent docs (missing parameters docs). (#5620) 2018-03-08 10:42:40 +01:00
30ec06c140 Merge Variable and Tensor classes (#5225)
This replaces the torch.Tensor constructors with factories that produce
Variables. Similarly, functions on the torch module (e.g. torch.randn)
now return Variables.

To keep the PR to a reasonable size, I've left most of the unused tensor
code. Subsequent PRs will remove the dead code, clean-up calls to
torch.autograd.Variable, and rename Variable to Tensor everywhere.

There are some breaking changes because Variable and Tensors had
slightly different semantics. There's a list of those changes here:

 https://github.com/pytorch/pytorch/wiki/Breaking-Changes-from-Variable-and-Tensor-merge
2018-02-23 18:03:31 -05:00
fae6c67121 Configurable flushing denormal numbers on CPU (#5294)
* Configurable flushing denormal numbers on CPU

* Formatting

* Update docs

* Minor doc changes
2018-02-19 19:23:43 -05:00
da79697d45 make explicit about keyword-onlyness of out (#5165)
* make explicit about keyword-onlyness of `out`

fix issue 2 of https://github.com/pytorch/pytorch/issues/5156#issuecomment-364521510
2018-02-13 09:55:36 -08:00
6dc41f9e63 fixed doc for cholesky potrs (#5180) 2018-02-11 20:23:10 -05:00
47ee86776e Fix CPU torch.multinomial with noncontiguous prob tensor (#5093)
* fix CPU torch.multinomial not working on noncontiguous probability distn'

* address comments

* change some tabs to spaces in THStorage.c
2018-02-06 22:11:43 -05:00
e519ef5337 Adding torch.expm1() and its inplace function (#4350) 2017-12-28 18:56:03 +09:00
15163a3273 Improved documentation of several index operations. 2017-12-26 06:08:44 +08:00
658d4c7ea8 allow optional int tensor 2017-12-24 03:08:28 +08:00
d8b2e5d091 Add python only default init expression; Implement stft, hann/hamming/bartlett window. (#4095)
* implement stft

* addressed comments; implemented window functions; added support for python only default initialization
2017-12-18 12:28:23 -05:00
9394e65b44 Add proper shape checking to torch.cat (#4087)
* Fix catArray in THTensor

Asserts that the inputs have the same size except in the
cat dimension or are empty (or a mix of both).

* Fix catArray for THCTensor

* Document torch.cat shape checks

* Fix types
2017-12-18 02:05:58 -05:00
fc8ad6fde6 improve svd doc (#4155) 2017-12-15 12:57:14 -05:00
d76f7a806d Fix potrf gradient and enable gradchecks (#3861) 2017-12-04 16:50:41 -05:00
932e484029 fix doc change lint; (#3974) 2017-12-01 17:24:30 -05:00
fe12ac57a4 Improve docs for torch and torch.Tensor (#3969)
* doc overhaul

* update split doc
2017-12-01 14:56:48 -05:00
c681b03d37 Add determinant function on variable; Add backward on svd (#3816)
* determinant on variable

* svd bwd
2017-12-01 13:22:46 -05:00
80c8635a7e fix math notation (#3962) 2017-12-01 10:15:10 -05:00
2b5a38b1a8 Add missing trtrs, orgqr, ormqr docs (#3720)
* trtrs docs

* orgqr and ormqr docs
2017-11-15 15:37:34 -05:00
dd6d04ddf2 doc: Normalize all true/false in docstrings to `True|False` (#3593)
* doc: Normalize all true/false in docstrings to ``True|False``

This makes them more apparent in the documentation.

* doc: fix flake8
2017-11-09 08:12:29 -05:00
74d1bb54e6 Add single argument version of torch.arange (#3494) 2017-11-06 12:26:04 -05:00
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
d4a0ec62dc Typo fix in torch.median (#3399) 2017-10-31 17:19:40 -04:00
2b9765ad02 Erf and erfinv (#2799) 2017-09-20 21:23:45 -04:00
bfbd1bbb50 Update torch.triu/torch.tril doc (#2619) 2017-09-05 00:05:44 -04:00
2c07f88ea3 Fix typos. 2017-08-25 14:27:07 -04:00
61e4723132 Fix typos (#2472) 2017-08-25 14:13:38 -04:00
eb58740651 add ones_like and zeros_like 2017-08-25 14:11:04 -04:00
a32e98b700 Add documentation for std/var unbiased argument (#2509) 2017-08-22 03:45:54 -04:00
50c208a50b Revert "Fix typos."
This reverts commit 4622b3395276b37e10141fab43ffea33941ca0c2.
2017-08-10 13:57:00 -04:00
4622b33952 Fix typos. 2017-08-08 11:05:38 -04:00
8983bf13f4 fix max and min docs 2017-07-13 03:03:27 -04:00
58e4caf80f add missing docs 2017-07-13 01:01:04 -04:00
46a868dab7 [Ready] Limit docs line length (#1900)
* some docs are ready

* docs

* docs

* fix some more

* fix some more
2017-07-10 10:24:54 -04:00
1aaa24d99b add medianall prototype to docs 2017-07-04 16:52:36 -04:00