pytorch/test
Sam Gross 3003ebe67a
Replace None grad_inputs with zero tensors in some cases (#3433)
Replace None grad_inputs with zero tensors in some cases

In Python-implemented autograd functions, we sometimes return None as
the grad_input if the output is marked "non-differentiable". This
replaces those None values with zero-filled Variables if the
corresponding input has requires_grad=True.

C++ implemented autograd functions expect the input (grad_outputs) to
be defined if they're executed. They always return non-null grad_inputs
if should_compute_output(i) is true. This could lead to segfaults if a
subsequent Python-implemented function returned None.

See #3412, #3241
2017-11-02 17:23:25 -04:00
..
data Revert structure changes; Minor fixes 2017-05-01 01:49:08 -07:00
error_messages
expect Improve const-correctness of JIT. 2017-11-01 09:49:53 -04:00
ffi/src
optim
common.py Fix E722 ('do not use bare except') (#3239) 2017-10-23 23:03:37 -04:00
common_nn.py Implement reduce keyword for SmoothL1Loss (#3382) 2017-11-01 06:29:34 -04:00
run_test.sh Replace StochasticFunctions v2 (#3165) 2017-10-19 15:05:07 -04:00
test_autograd.py Replace None grad_inputs with zero tensors in some cases (#3433) 2017-11-02 17:23:25 -04:00
test_cuda.py Add torch.take and Tensor.put_ (#3263) 2017-11-01 06:04:44 -04:00
test_dataloader.py implements operator + for Dataset class (#3180) 2017-10-29 01:19:59 +05:30
test_distributed.py Make distributed recv return sender rank 2017-09-25 12:11:52 -04:00
test_distributions.py adds sample_n function (#3249) 2017-10-31 09:04:05 -04:00
test_jit.py Skip cpp tests if CUDA not available. 2017-11-02 02:21:10 -04:00
test_legacy_nn.py update 2017-10-24 20:30:49 +02:00
test_multiprocessing.py fix empty Tensor mmap 2017-07-14 02:55:05 -04:00
test_nccl.py
test_nn.py Add reduce keyword to L1Loss (#3366) 2017-11-01 06:33:18 -04:00
test_optim.py fix optimizer when given single parameters (instead of an iterable) 2017-06-05 23:47:56 -04:00
test_potrf.py adding backward capability for potrf (Cholesky) (#2386) 2017-08-24 17:18:11 -04:00
test_sparse.py make sparse (new) functions conform that storage is not NULL (#3381) 2017-10-30 18:55:26 -04:00
test_torch.py Add torch.take and Tensor.put_ (#3263) 2017-11-01 06:04:44 -04:00
test_utils.py update the comments, move the expect check logic into the helper function 2017-10-16 16:57:16 -04:00