diff options
author | TYLVY <574819595@qq.com> | 2017-04-21 17:04:38 +0300 |
---|---|---|
committer | Soumith Chintala <soumith@gmail.com> | 2017-04-21 17:04:38 +0300 |
commit | 7c26baf41b3e29d6b99473300d07cace1d34a764 (patch) | |
tree | d6553fe3b5eae01708a26bb5f9f30ffc1a884d9b /doc | |
parent | d0c51fc6975233c517b978e5f277cc653f1ce22b (diff) |
Fix typo in tensor.md (#1010)
Diffstat (limited to 'doc')
-rw-r--r-- | doc/tensor.md | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/doc/tensor.md b/doc/tensor.md index f2f69ee..5a7df0f 100644 --- a/doc/tensor.md +++ b/doc/tensor.md @@ -1627,7 +1627,7 @@ y:maskedCopy(mask, x) [torch.DoubleTensor of dimension 2x4] ``` -Note how the dimensions of the above `x`, `mask` and `y' do not match, +Note how the dimensions of the above `x`, `mask` and `y` do not match, but the number of elements do. <a name="torch.Tensor.maskedFill"></a> @@ -1663,8 +1663,8 @@ but the number of elements do. Each of these methods returns a `LongTensor` corresponding to the indices of the given search operation. -<a name="torch.Tensor.nonzero"/> -### [LongTensor] nonzero(tensor) +<a name="torch.Tensor.nonzero"></a> +### [LongTensor] nonzero(tensor) ### Finds and returns a `LongTensor` corresponding to the *subscript* indices of all non-zero elements in `tensor`. @@ -1741,7 +1741,7 @@ These methods returns a Tensor which is created by replications of the original tensor. <a name="torch.expand"></a> -#### [result] expand([result,] sizes) #### +### [result] expand([result,] sizes) ### `sizes` can either be a `torch.LongStorage` or numbers. Expanding a tensor does not allocate new memory, but only creates a new view on the existing tensor where @@ -1835,12 +1835,12 @@ i=0; y:apply(function() i=i+1;return i end) ``` <a name="torch.Tensor.expandAs"></a> -#### [result] expandAs([result,] tensor) #### +### [result] expandAs([result,] tensor) ### This is equivalent to `self:expand(tensor:size())` <a name="torch.repeatTensor"></a> -#### [Tensor] repeatTensor([result,] sizes) #### +### [Tensor] repeatTensor([result,] sizes) ### `sizes` can either be a `torch.LongStorage` or numbers. Repeating a tensor allocates new memory, unless `result` is provided, in which case its memory is @@ -1879,7 +1879,7 @@ x = torch.rand(5) ``` <a name="torch.squeeze"></a> -#### [Tensor] squeeze([dim]) #### +### [Tensor] squeeze([dim]) ### Removes all singleton dimensions of the tensor. If `dim` is given, squeezes only that particular dimension of the tensor. |