Пример #1
0
def batch_self_adjoint_eigvals(tensor, name=None):
  """Computes the eigenvalues of a batch of self-adjoint matrices.

  Args:
    tensor: `Tensor` of shape `[..., N, N]`.
    name: string, optional name of the operation.

  Returns:
    e: Eigenvalues. Shape is `[..., N]`. The vector `e[..., :]` contains the `N`
      eigenvalues of `tensor[..., :, :]`.
  """
  e, _ = gen_linalg_ops.batch_self_adjoint_eig_v2(
      tensor, compute_v=False, name=name)
  return e
Пример #2
0
def batch_self_adjoint_eigvals(tensor, name=None):
  """Computes the eigenvalues of a batch of self-adjoint matrices.

  Args:
    tensor: `Tensor` of shape `[..., N, N]`.
    name: string, optional name of the operation.

  Returns:
    e: Eigenvalues. Shape is `[..., N]`. The vector `e[..., :]` contains the `N`
      eigenvalues of `tensor[..., :, :]`.
  """
  e, _ = gen_linalg_ops.batch_self_adjoint_eig_v2(
      tensor, compute_v=False, name=name)
  return e
Пример #3
0
def batch_self_adjoint_eig(tensor, name=None):
  """Computes the eigen decomposition of a batch of self-adjoint matrices.

  Computes the eigenvalues and eigenvectors of the innermost N-by-N matrices
  in `tensor` such that
  `tensor[...,:,:] * v[..., :,i] = e(..., i) * v[...,:,i]`, for i=0...N-1.

  Args:
    tensor: `Tensor` of shape `[..., N, N]`.
    name: string, optional name of the operation.

  Returns:
    e: Eigenvalues. Shape is `[..., N]`.
    v: Eigenvectors. Shape is `[..., N, N]`. The columns of the inner most
    matrices
      contain eigenvectors of the corresponding matrices in `tensor`
  """
  e, v = gen_linalg_ops.batch_self_adjoint_eig_v2(
      tensor, compute_v=True, name=name)
  return e, v
Пример #4
0
def batch_self_adjoint_eig(tensor, name=None):
  """Computes the eigen decomposition of a batch of self-adjoint matrices.

  Computes the eigenvalues and eigenvectors of the innermost N-by-N matrices
  in `tensor` such that
  `tensor[...,:,:] * v[..., :,i] = e(..., i) * v[...,:,i]`, for i=0...N-1.

  Args:
    tensor: `Tensor` of shape `[..., N, N]`.
    name: string, optional name of the operation.

  Returns:
    e: Eigenvalues. Shape is `[..., N]`.
    v: Eigenvectors. Shape is `[..., N, N]`. The columns of the inner most
    matrices
      contain eigenvectors of the corresponding matrices in `tensor`
  """
  e, v = gen_linalg_ops.batch_self_adjoint_eig_v2(
      tensor, compute_v=True, name=name)
  return e, v