aboutsummaryrefslogtreecommitdiffhomepage
path: root/tensorflow/contrib/solvers
diff options
context:
space:
mode:
authorGravatar Jonathan Hseu <jhseu@google.com>2016-11-18 15:43:53 -0800
committerGravatar TensorFlower Gardener <gardener@tensorflow.org>2016-11-18 16:04:44 -0800
commit85eeec0d415a1478bbeffc3d4545c795bee64e9f (patch)
tree5d1bb5f7b015f933cdfe8f2d5fc1748d8a7e71f7 /tensorflow/contrib/solvers
parent068e2393edb3f0e43a303cf70c4b3c483b2cde23 (diff)
Automated rollback of change 139400135
Change: 139632235
Diffstat (limited to 'tensorflow/contrib/solvers')
-rw-r--r--tensorflow/contrib/solvers/python/ops/lanczos.py18
-rw-r--r--tensorflow/contrib/solvers/python/ops/least_squares.py12
-rw-r--r--tensorflow/contrib/solvers/python/ops/linear_equations.py12
3 files changed, 21 insertions, 21 deletions
diff --git a/tensorflow/contrib/solvers/python/ops/lanczos.py b/tensorflow/contrib/solvers/python/ops/lanczos.py
index 0a6c17eea2..2dfc9763a3 100644
--- a/tensorflow/contrib/solvers/python/ops/lanczos.py
+++ b/tensorflow/contrib/solvers/python/ops/lanczos.py
@@ -46,7 +46,7 @@ def lanczos_bidiag(operator,
Args:
operator: An object representing a linear operator with attributes:
- - shape: Either a list of integers or a 1-D `Output` of type `int32` of
+ - shape: Either a list of integers or a 1-D `Tensor` of type `int32` of
length 2. `shape[0]` is the dimension on the domain of the operator,
`shape[1]` is the dimension of the co-domain of the operator. On other
words, if operator represents an M x N matrix A, `shape` must contain
@@ -65,20 +65,20 @@ def lanczos_bidiag(operator,
may terminate before `k` steps have been run.
orthogonalize: If `True`, perform full orthogonalization. If `False` no
orthogonalization is performed.
- starting_vector: If not null, must be an `Output` of shape `[n]`.
+ starting_vector: If not null, must be a `Tensor` of shape `[n]`.
name: A name scope for the operation.
Returns:
output: A namedtuple representing a Lanczos bidiagonalization of
`operator` with attributes:
- u: A rank-2 `Output` of type `operator.dtype` and shape
+ u: A rank-2 `Tensor` of type `operator.dtype` and shape
`[operator.shape[0], k_actual+1]`, where `k_actual` is the number of
steps run.
- v: A rank-2 `Output` of type `operator.dtype` and shape
+ v: A rank-2 `Tensor` of type `operator.dtype` and shape
`[operator.shape[1], k_actual]`, where `k_actual` is the number of steps
run.
- alpha: A rank-1 `Output` of type `operator.dtype` and shape `[k]`.
- beta: A rank-1 `Output` of type `operator.dtype` and shape `[k]`.
+ alpha: A rank-1 `Tensor` of type `operator.dtype` and shape `[k]`.
+ beta: A rank-1 `Tensor` of type `operator.dtype` and shape `[k]`.
"""
def tarray(size, dtype, name):
@@ -209,9 +209,9 @@ def bidiag_matmul(matrix, alpha, beta, adjoint_b=False, name="bidiag_matmul"):
A * diag(alpha) + [zeros(m,1), A[:, :-1] * diag(beta[:-1])]
Args:
- matrix: A rank-2 `Output` representing matrix A.
- alpha: A rank-1 `Output` representing the diagonal of B.
- beta: A rank-1 `Output` representing the lower subdiagonal diagonal of B.
+ matrix: A rank-2 `Tensor` representing matrix A.
+ alpha: A rank-1 `Tensor` representing the diagonal of B.
+ beta: A rank-1 `Tensor` representing the lower subdiagonal diagonal of B.
adjoint_b: `bool` determining what to compute.
name: A name scope for the operation.
diff --git a/tensorflow/contrib/solvers/python/ops/least_squares.py b/tensorflow/contrib/solvers/python/ops/least_squares.py
index f80910ffe7..9a2d3b24dd 100644
--- a/tensorflow/contrib/solvers/python/ops/least_squares.py
+++ b/tensorflow/contrib/solvers/python/ops/least_squares.py
@@ -40,7 +40,7 @@ def cgls(operator, rhs, tol=1e-6, max_iter=20, name="cgls"):
Args:
operator: An object representing a linear operator with attributes:
- - shape: Either a list of integers or a 1-D `Output` of type `int32` of
+ - shape: Either a list of integers or a 1-D `Tensor` of type `int32` of
length 2. `shape[0]` is the dimension on the domain of the operator,
`shape[1]` is the dimension of the co-domain of the operator. On other
words, if operator represents an M x N matrix A, `shape` must contain
@@ -55,7 +55,7 @@ def cgls(operator, rhs, tol=1e-6, max_iter=20, name="cgls"):
to `x`, i.e. if `operator` represents matrix `A`, `apply_adjoint` should
return `conj(transpose(A)) * x`.
- rhs: A rank-1 `Output` of shape `[M]` containing the right-hand size vector.
+ rhs: A rank-1 `Tensor` of shape `[M]` containing the right-hand size vector.
tol: A float scalar convergence tolerance.
max_iter: An integer giving the maximum number of iterations.
name: A name scope for the operation.
@@ -63,10 +63,10 @@ def cgls(operator, rhs, tol=1e-6, max_iter=20, name="cgls"):
Returns:
output: A namedtuple representing the final state with fields:
- - i: A scalar `int32` `Output`. Number of iterations executed.
- - x: A rank-1 `Output` of shape `[N]` containing the computed solution.
- - r: A rank-1 `Output` of shape `[M]` containing the residual vector.
- - p: A rank-1 `Output` of shape `[N]`. The next descent direction.
+ - i: A scalar `int32` `Tensor`. Number of iterations executed.
+ - x: A rank-1 `Tensor` of shape `[N]` containing the computed solution.
+ - r: A rank-1 `Tensor` of shape `[M]` containing the residual vector.
+ - p: A rank-1 `Tensor` of shape `[N]`. The next descent direction.
- gamma: \\(||A^* r||_2^2\\)
"""
# ephemeral class holding CGLS state.
diff --git a/tensorflow/contrib/solvers/python/ops/linear_equations.py b/tensorflow/contrib/solvers/python/ops/linear_equations.py
index 38c94addd0..41fd6e466b 100644
--- a/tensorflow/contrib/solvers/python/ops/linear_equations.py
+++ b/tensorflow/contrib/solvers/python/ops/linear_equations.py
@@ -41,7 +41,7 @@ def conjugate_gradient(operator,
Args:
operator: An object representing a linear operator with attributes:
- - shape: Either a list of integers or a 1-D `Output` of type `int32` of
+ - shape: Either a list of integers or a 1-D `Tensor` of type `int32` of
length 2. `shape[0]` is the dimension on the domain of the operator,
`shape[1]` is the dimension of the co-domain of the operator. On other
words, if operator represents an N x N matrix A, `shape` must contain
@@ -50,17 +50,17 @@ def conjugate_gradient(operator,
- apply: Callable object taking a vector `x` as input and returning a
vector with the result of applying the operator to `x`, i.e. if
`operator` represents matrix `A`, `apply` should return `A * x`.
- rhs: A rank-1 `Output` of shape `[N]` containing the right-hand size vector.
+ rhs: A rank-1 `Tensor` of shape `[N]` containing the right-hand size vector.
tol: A float scalar convergence tolerance.
max_iter: An integer giving the maximum number of iterations.
name: A name scope for the operation.
Returns:
output: A namedtuple representing the final state with fields:
- - i: A scalar `int32` `Output`. Number of iterations executed.
- - x: A rank-1 `Output` of shape `[N]` containing the computed solution.
- - r: A rank-1 `Output` of shape `[M]` containing the residual vector.
- - p: A rank-1 `Output` of shape `[N]`. `A`-conjugate basis vector.
+ - i: A scalar `int32` `Tensor`. Number of iterations executed.
+ - x: A rank-1 `Tensor` of shape `[N]` containing the computed solution.
+ - r: A rank-1 `Tensor` of shape `[M]` containing the residual vector.
+ - p: A rank-1 `Tensor` of shape `[N]`. `A`-conjugate basis vector.
- gamma: \\(||r||_2^2\\)
"""
# ephemeral class holding CG state.