diff options
author | li-roy <8813817+li-roy@users.noreply.github.com> | 2018-04-21 04:35:37 -0700 |
---|---|---|
committer | Soumith Chintala <soumith@gmail.com> | 2018-04-21 07:35:37 -0400 |
commit | d564ecb4a515e34184c976617f57b2eb01665660 (patch) | |
tree | 7422124e974a1693745b81222d4f5eab98c83b3a /torch/serialization.py | |
parent | 34fa355f27b7614e2a37a7704b3c3acbca02969b (diff) | |
download | pytorch-d564ecb4a515e34184c976617f57b2eb01665660.tar.gz pytorch-d564ecb4a515e34184c976617f57b2eb01665660.tar.bz2 pytorch-d564ecb4a515e34184c976617f57b2eb01665660.zip |
Update docs with new tensor repr (#6454)
* Update docs with new tensor repr
* remove cuda in dtype
* remove changes to gloo submodule
* [docs] document tensor.new_* ctor
* [docs] Add docs for tensor.to(), tensor.float(), etc
* [docs] Moar examples for docs.
* [docs] Warning for tensor ctor copy behavior
* Quick fix
* [docs] Document requires_grad_()
* [docs] Add example for requires_grad_()
* update slogdet and *fft
* update tensor rst
* small fixes
* update some docs
* additional doc changes
* update torch and tensor docs
* finish changing tensor docs
* fix flake8
* slogdet with negative det
* Update functional.py tensor ctors
* Fix nll_loss docs
* reorder to move device up
* torch.LongTensor -> torch.tensor or torch.empty in docs
* update tensor constructors in docs
* change tensor constructors
* change constructors
* change more Tensor() to tensor()
* Show requires_grads_ docs
* Fix set_default_dtype docs
* Update docs with new tensor repr
* remove cuda in dtype
* remove changes to gloo submodule
* [docs] document tensor.new_* ctor
* [docs] Add docs for tensor.to(), tensor.float(), etc
* [docs] Moar examples for docs.
* [docs] Warning for tensor ctor copy behavior
* Quick fix
* [docs] Document requires_grad_()
* [docs] Add example for requires_grad_()
* update slogdet and *fft
* update tensor rst
* small fixes
* update some docs
* additional doc changes
* update torch and tensor docs
* finish changing tensor docs
* fix flake8
* slogdet with negative det
* Update functional.py tensor ctors
* Fix nll_loss docs
* reorder to move device up
* torch.LongTensor -> torch.tensor or torch.empty in docs
* update tensor constructors in docs
* change tensor constructors
* change constructors
* change more Tensor() to tensor()
* Show requires_grads_ docs
* Fix set_default_dtype docs
* Link to torch.no_grad, etc, from torch doc
* Add dtype aliases to table
* regen docs again
* Tensor attributes stub page
* link to inplace sampling
* Link torch.dtype, device, and layout
* fix dots after nonfinite floats
* better layout docs
Diffstat (limited to 'torch/serialization.py')
-rw-r--r-- | torch/serialization.py | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/torch/serialization.py b/torch/serialization.py index 4e1295ae0c..37e9f8587c 100644 --- a/torch/serialization.py +++ b/torch/serialization.py @@ -152,7 +152,7 @@ def save(obj, f, pickle_module=pickle, pickle_protocol=DEFAULT_PROTOCOL): Example: >>> # Save to file - >>> x = torch.Tensor([0, 1, 2, 3, 4]) + >>> x = torch.tensor([0, 1, 2, 3, 4]) >>> torch.save(x, 'tensor.pt') >>> # Save to io.BytesIO buffer >>> buffer = io.BytesIO() |