Unverified Commit c89ee05f authored by Hongzhi (Steve), Chen's avatar Hongzhi (Steve), Chen Committed by GitHub
Browse files
parent 5337d7b2
...@@ -99,8 +99,8 @@ class DiagMatrix: ...@@ -99,8 +99,8 @@ class DiagMatrix:
SparseMatrix SparseMatrix
The copy in sparse matrix format The copy in sparse matrix format
Example Examples
------- --------
>>> import torch >>> import torch
>>> val = torch.ones(5) >>> val = torch.ones(5)
...@@ -147,7 +147,7 @@ class DiagMatrix: ...@@ -147,7 +147,7 @@ class DiagMatrix:
DiagMatrix DiagMatrix
The transpose of the matrix The transpose of the matrix
Example Examples
-------- --------
>>> val = torch.arange(1, 5).float() >>> val = torch.arange(1, 5).float()
...@@ -176,7 +176,7 @@ class DiagMatrix: ...@@ -176,7 +176,7 @@ class DiagMatrix:
DiagMatrix DiagMatrix
The converted matrix The converted matrix
Example Examples
-------- --------
>>> val = torch.ones(2) >>> val = torch.ones(2)
...@@ -205,7 +205,7 @@ class DiagMatrix: ...@@ -205,7 +205,7 @@ class DiagMatrix:
DiagMatrix DiagMatrix
The matrix on GPU The matrix on GPU
Example Examples
-------- --------
>>> val = torch.ones(2) >>> val = torch.ones(2)
...@@ -225,7 +225,7 @@ class DiagMatrix: ...@@ -225,7 +225,7 @@ class DiagMatrix:
DiagMatrix DiagMatrix
The matrix on CPU The matrix on CPU
Example Examples
-------- --------
>>> val = torch.ones(2) >>> val = torch.ones(2)
...@@ -245,7 +245,7 @@ class DiagMatrix: ...@@ -245,7 +245,7 @@ class DiagMatrix:
DiagMatrix DiagMatrix
The matrix with float values The matrix with float values
Example Examples
-------- --------
>>> val = torch.ones(2) >>> val = torch.ones(2)
...@@ -265,7 +265,7 @@ class DiagMatrix: ...@@ -265,7 +265,7 @@ class DiagMatrix:
DiagMatrix DiagMatrix
The matrix with double values The matrix with double values
Example Examples
-------- --------
>>> val = torch.ones(2) >>> val = torch.ones(2)
...@@ -285,7 +285,7 @@ class DiagMatrix: ...@@ -285,7 +285,7 @@ class DiagMatrix:
DiagMatrix DiagMatrix
The matrix with int values The matrix with int values
Example Examples
-------- --------
>>> val = torch.ones(2) >>> val = torch.ones(2)
...@@ -305,7 +305,7 @@ class DiagMatrix: ...@@ -305,7 +305,7 @@ class DiagMatrix:
DiagMatrix DiagMatrix
The matrix with long values The matrix with long values
Example Examples
-------- --------
>>> val = torch.ones(2) >>> val = torch.ones(2)
......
...@@ -105,8 +105,8 @@ class SparseMatrix: ...@@ -105,8 +105,8 @@ class SparseMatrix:
torch.Tensor torch.Tensor
Column coordinate Column coordinate
Example Examples
------- --------
>>> dst = torch.tensor([1, 2, 1]) >>> dst = torch.tensor([1, 2, 1])
>>> src = torch.tensor([2, 4, 3]) >>> src = torch.tensor([2, 4, 3])
...@@ -137,8 +137,8 @@ class SparseMatrix: ...@@ -137,8 +137,8 @@ class SparseMatrix:
torch.Tensor torch.Tensor
Value indices Value indices
Example Examples
------- --------
>>> dst = torch.tensor([1, 2, 1]) >>> dst = torch.tensor([1, 2, 1])
>>> src = torch.tensor([2, 4, 3]) >>> src = torch.tensor([2, 4, 3])
...@@ -169,8 +169,8 @@ class SparseMatrix: ...@@ -169,8 +169,8 @@ class SparseMatrix:
torch.Tensor torch.Tensor
Value indices Value indices
Example Examples
------- --------
>>> dst = torch.tensor([1, 2, 1]) >>> dst = torch.tensor([1, 2, 1])
>>> src = torch.tensor([2, 4, 3]) >>> src = torch.tensor([2, 4, 3])
...@@ -212,8 +212,8 @@ class SparseMatrix: ...@@ -212,8 +212,8 @@ class SparseMatrix:
SparseMatrix SparseMatrix
The transpose of this sparse matrix. The transpose of this sparse matrix.
Example Examples
------- --------
>>> row = torch.tensor([1, 1, 3]) >>> row = torch.tensor([1, 1, 3])
>>> col = torch.tensor([2, 1, 3]) >>> col = torch.tensor([2, 1, 3])
...@@ -245,7 +245,7 @@ class SparseMatrix: ...@@ -245,7 +245,7 @@ class SparseMatrix:
SparseMatrix SparseMatrix
The converted matrix The converted matrix
Example Examples
-------- --------
>>> row = torch.tensor([1, 1, 2]) >>> row = torch.tensor([1, 1, 2])
...@@ -286,7 +286,7 @@ class SparseMatrix: ...@@ -286,7 +286,7 @@ class SparseMatrix:
SparseMatrix SparseMatrix
The matrix on GPU The matrix on GPU
Example Examples
-------- --------
>>> row = torch.tensor([1, 1, 2]) >>> row = torch.tensor([1, 1, 2])
...@@ -309,7 +309,7 @@ class SparseMatrix: ...@@ -309,7 +309,7 @@ class SparseMatrix:
SparseMatrix SparseMatrix
The matrix on CPU The matrix on CPU
Example Examples
-------- --------
>>> row = torch.tensor([1, 1, 2]).to('cuda') >>> row = torch.tensor([1, 1, 2]).to('cuda')
...@@ -332,7 +332,7 @@ class SparseMatrix: ...@@ -332,7 +332,7 @@ class SparseMatrix:
SparseMatrix SparseMatrix
The matrix with float values The matrix with float values
Example Examples
-------- --------
>>> row = torch.tensor([1, 1, 2]) >>> row = torch.tensor([1, 1, 2])
...@@ -356,7 +356,7 @@ class SparseMatrix: ...@@ -356,7 +356,7 @@ class SparseMatrix:
SparseMatrix SparseMatrix
The matrix with double values The matrix with double values
Example Examples
-------- --------
>>> row = torch.tensor([1, 1, 2]) >>> row = torch.tensor([1, 1, 2])
...@@ -379,7 +379,7 @@ class SparseMatrix: ...@@ -379,7 +379,7 @@ class SparseMatrix:
DiagMatrix DiagMatrix
The matrix with int values The matrix with int values
Example Examples
-------- --------
>>> row = torch.tensor([1, 1, 2]) >>> row = torch.tensor([1, 1, 2])
...@@ -402,7 +402,7 @@ class SparseMatrix: ...@@ -402,7 +402,7 @@ class SparseMatrix:
DiagMatrix DiagMatrix
The matrix with long values The matrix with long values
Example Examples
-------- --------
>>> row = torch.tensor([1, 1, 2]) >>> row = torch.tensor([1, 1, 2])
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment