com.intel.analytics.bigdl.tensor

Tensor

object Tensor extends Serializable

Linear Supertypes
Serializable, Serializable, AnyRef, Any
Ordering
  1. Alphabetic
  2. By inheritance
Inherited
  1. Tensor
  2. Serializable
  3. Serializable
  4. AnyRef
  5. Any
  1. Hide All
  2. Show all
Learn more about member selection
Visibility
  1. Public
  2. All

Value Members

  1. final def !=(arg0: AnyRef): Boolean

    Definition Classes
    AnyRef
  2. final def !=(arg0: Any): Boolean

    Definition Classes
    Any
  3. final def ##(): Int

    Definition Classes
    AnyRef → Any
  4. final def ==(arg0: AnyRef): Boolean

    Definition Classes
    AnyRef
  5. final def ==(arg0: Any): Boolean

    Definition Classes
    Any
  6. val START_INDEX: Int

    Start index in BigDL.

    Start index in BigDL. We count from 1.

  7. def apply(matrix: DenseMatrix): Tensor[Double]

    create a tensor with a given spark Densematrix.

    create a tensor with a given spark Densematrix. The tensor will have the same size with the given spark Densematrix.

    matrix
    returns

  8. def apply[T](matrix: DenseMatrix[T])(implicit arg0: ClassTag[T], ev: TensorNumeric[T]): Tensor[T]

    create a tensor with a given breeze matrix.

    create a tensor with a given breeze matrix. The tensor will have the same size with the given breeze matrix.

    T
    matrix

    the given breeze matrix

    ev
    returns

  9. def apply(vector: DenseVector): Tensor[Double]

    create a tensor with a given spark Densevector.

    create a tensor with a given spark Densevector. The tensor will have the same size with the given spark Densevector.

    vector

    the given spark Densevector

    returns

  10. def apply[T](vector: DenseVector[T])(implicit arg0: ClassTag[T], ev: TensorNumeric[T]): Tensor[T]

    create a tensor with a given breeze vector.

    create a tensor with a given breeze vector. The tensor will have the same size with the given breeze vector.

    T
    vector

    the given breeze vector

    ev
    returns

  11. def apply[T](other: Tensor[T])(implicit arg0: ClassTag[T], ev: TensorNumeric[T]): Tensor[T]

    create a tensor with a given tensor.

    create a tensor with a given tensor. The tensor will have same size with the given tensor.

    T
    other

    the given tensor

    ev
    returns

  12. def apply[T](storage: Storage[T], storageOffset: Int, size: Array[Int] = null, stride: Array[Int] = null)(implicit arg0: ClassTag[T], ev: TensorNumeric[T]): Tensor[T]

    Returns a tensor which uses the existing Storage storage, starting at position storageOffset (>=1).

    Returns a tensor which uses the existing Storage storage, starting at position storageOffset (>=1). The size of each dimension of the tensor is given by the optional Array size. If not given, the size will be computed as the length of storage. The jump necessary to go from one element to the next one in each dimension is given by the optional Array stride. If not given, the stride() will be computed such that the tensor is as contiguous as possible in memory.

    T
    storage
    storageOffset
    size
    stride
    ev
    returns

  13. def apply[T](data: Array[T], shape: Array[Int])(implicit arg0: ClassTag[T], ev: TensorNumeric[T]): Tensor[T]

    Returns a tensor with the given array and shape

    Returns a tensor with the given array and shape

    T
    data

    the given storage

    shape

    the given shape

    ev
    returns

  14. def apply[T](storage: Storage[T])(implicit arg0: ClassTag[T], ev: TensorNumeric[T]): Tensor[T]

    Returns a tensor which uses the existing Storage storage.

    Returns a tensor which uses the existing Storage storage.

    T
    storage

    the given storage

    ev
    returns

  15. def apply[T](sizes: Array[Int])(implicit arg0: ClassTag[T], ev: TensorNumeric[T]): Tensor[T]

    Create a tensor on given sizes.

    Create a tensor on given sizes. The tensor size will be the product of sizes

    T
    sizes
    ev
    returns

  16. def apply[T](dims: Int*)(implicit arg0: ClassTag[T], ev: TensorNumeric[T]): Tensor[T]

    Create a tensor on given dimensions.

    Create a tensor on given dimensions. The tensor size will be the product of dims

    T
    dims
    ev
    returns

  17. def apply[T](xs: Table)(implicit arg0: ClassTag[T], ev: TensorNumeric[T]): Tensor[T]

    Create a tensor with a table

    Create a tensor with a table

    xs

    the table contains a multi-dimensional numbers

    returns

    a new Tensor

  18. def apply[T](d1: Int, d2: Int, d3: Int, d4: Int, d5: Int)(implicit arg0: ClassTag[T], ev: TensorNumeric[T]): Tensor[T]

  19. def apply[T](d1: Int, d2: Int, d3: Int, d4: Int)(implicit arg0: ClassTag[T], ev: TensorNumeric[T]): Tensor[T]

  20. def apply[T](d1: Int, d2: Int, d3: Int)(implicit arg0: ClassTag[T], ev: TensorNumeric[T]): Tensor[T]

  21. def apply[T](d1: Int, d2: Int)(implicit arg0: ClassTag[T], ev: TensorNumeric[T]): Tensor[T]

  22. def apply[T](d1: Int)(implicit arg0: ClassTag[T], ev: TensorNumeric[T]): Tensor[T]

    Create a tensor up to 5 dimensions.

    Create a tensor up to 5 dimensions. The tensor size will be d1 x d2 x d3 x d4 x d5.

    T
    ev
    returns

  23. def apply[T]()(implicit arg0: ClassTag[T], ev: TensorNumeric[T]): Tensor[T]

    Returns an empty tensor.

    Returns an empty tensor.

    T
    ev
    returns

  24. final def asInstanceOf[T0]: T0

    Definition Classes
    Any
  25. def clone(): AnyRef

    Attributes
    protected[java.lang]
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  26. def dense[T](sparseTensor: Tensor[T], res: Tensor[T] = null)(implicit arg0: ClassTag[T], ev: TensorNumeric[T]): Tensor[T]

    Transform a sparseTensor to DenseTensor.

    Transform a sparseTensor to DenseTensor.

    T
    sparseTensor

    a sparse tensor

    res

    if defined, override to res, else will generate a new tensor.

    ev
    returns

    a DenseTensor.

  27. final def eq(arg0: AnyRef): Boolean

    Definition Classes
    AnyRef
  28. def equals(arg0: Any): Boolean

    Definition Classes
    AnyRef → Any
  29. def expand[T](tensor: Tensor[T], sizes: Int*): Tensor[T]

    This is equivalent to tensor.

    This is equivalent to tensor.expand(sizes.toArray)

    T
    tensor
    sizes
    returns

  30. def expandAs[T](tensor: Tensor[T], template: Tensor[T]): Tensor[T]

    This is equivalent to tensor.

    This is equivalent to tensor.expandAs(template)

    T
    tensor
    template
    returns

  31. def finalize(): Unit

    Attributes
    protected[java.lang]
    Definition Classes
    AnyRef
    Annotations
    @throws( classOf[java.lang.Throwable] )
  32. def gaussian1D[T](size: Int = 3, sigma: Double = 0.25, amplitude: Int = 1, normalize: Boolean = false, mean: Double = 0.5, tensor: Tensor[T] = null)(implicit arg0: ClassTag[T], ev: TensorNumeric[T]): Tensor[T]

    Returns a 1D Gaussian kernel of size size, mean mean and standard deviation sigma.

    Returns a 1D Gaussian kernel of size size, mean mean and standard deviation sigma.

    size
    sigma
    amplitude
    normalize
    mean
    tensor

    If tensor is set, will discard size, and write result to tensor.

    returns

  33. final def getClass(): Class[_]

    Definition Classes
    AnyRef → Any
  34. def hashCode(): Int

    Definition Classes
    AnyRef → Any
  35. final def isInstanceOf[T0]: Boolean

    Definition Classes
    Any
  36. def load[T](path: String): Tensor[T]

  37. final def ne(arg0: AnyRef): Boolean

    Definition Classes
    AnyRef
  38. final def notify(): Unit

    Definition Classes
    AnyRef
  39. final def notifyAll(): Unit

    Definition Classes
    AnyRef
  40. def ones[T](sizes: Int*)(implicit arg0: ClassTag[T], ev: TensorNumeric[T]): Tensor[T]

    return a tensor of sizes filled with 1.

    return a tensor of sizes filled with 1.

    sizes
    returns

    a tensor

  41. def randperm[T](size: Int)(implicit arg0: ClassTag[T], ev: TensorNumeric[T]): Tensor[T]

    This is equivalent to DenseTensor.

    This is equivalent to DenseTensor.randperm[T](size)

    T
    size
    ev
    returns

  42. def range[T](xmin: Double, xmax: Double, step: Int = 1)(implicit arg0: ClassTag[T], ev: TensorNumeric[T]): Tensor[T]

    This is equivalent to DenseTensor.

    This is equivalent to DenseTensor.range(xmin, xmax, step)

    xmin
    xmax
    step
    returns

  43. def repeatTensor[T](tensor: Tensor[T], sizes: Int*): Tensor[T]

    This is equivalent to tensor.

    This is equivalent to tensor.repeatTensor(sizes.toArray)

    T
    tensor
    sizes
    returns

  44. def scalar[T](value: T)(implicit arg0: ClassTag[T], ev: TensorNumeric[T]): Tensor[T]

    Create a scalar tensor of this value

    Create a scalar tensor of this value

    returns

    the created scalar tensor

  45. def sparse[T](shape: Array[Int], nElement: Int = 1)(implicit arg0: ClassTag[T], ev: TensorNumeric[T]): Tensor[T]

    Create a sparse tensor with shape and number of non-zero elements.

    Create a sparse tensor with shape and number of non-zero elements.

    T
    shape

    tensor's shape.

    nElement

    number of non-zero elements.

    ev
    returns

  46. def sparse[T](denseTensor: Tensor[T])(implicit arg0: ClassTag[T], ev: TensorNumeric[T]): Tensor[T]

    Transform a DenseTensor to SparseTensor.

    Transform a DenseTensor to SparseTensor.

    T
    denseTensor
    ev
    returns

  47. def sparse[T](indices: Array[Array[Int]], values: Array[T], shape: Array[Int], dimension: Int)(implicit arg0: ClassTag[T], ev: TensorNumeric[T]): Tensor[T]

    Create a SparseTensor.

    Create a SparseTensor.

    T
    indices

    dimension-D array to describe the indices of values.

    values

    non-zero values in this SparseTensor.

    shape

    shape

    dimension

    dimension

    ev
    returns

  48. def sparse[T](indices: Array[Array[Int]], values: Storage[T], shape: Array[Int], dimension: Int)(implicit arg0: ClassTag[T], ev: TensorNumeric[T]): Tensor[T]

    Create a SparseTensor.

    Create a SparseTensor.

    T
    indices

    dimension-D array to describe the indices of values.

    values

    non-zero values in this SparseTensor.

    shape

    shape

    dimension

    dimension

    ev
    returns

  49. def sparse[T](indices: Array[Array[Int]], values: Array[T], shape: Array[Int])(implicit arg0: ClassTag[T], ev: TensorNumeric[T]): Tensor[T]

    Create a SparseTensor.

    Create a SparseTensor.

    T
    indices

    dimension-D array to describe the indices of values.

    values

    non-zero values in this SparseTensor.

    shape

    shape

    ev
    returns

  50. def sparse[T](indices: Array[Array[Int]], values: Storage[T], shape: Array[Int])(implicit arg0: ClassTag[T], ev: TensorNumeric[T]): Tensor[T]

    Create a SparseTensor.

    Create a SparseTensor.

    T
    indices

    dimension-D array to describe the indices of values.

    values

    non-zero values in this SparseTensor.

    shape

    shape

    ev
    returns

  51. final def synchronized[T0](arg0: ⇒ T0): T0

    Definition Classes
    AnyRef
  52. def toString(): String

    Definition Classes
    AnyRef → Any
  53. final def wait(): Unit

    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  54. final def wait(arg0: Long, arg1: Int): Unit

    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  55. final def wait(arg0: Long): Unit

    Definition Classes
    AnyRef
    Annotations
    @throws( ... )

Inherited from Serializable

Inherited from Serializable

Inherited from AnyRef

Inherited from Any

Ungrouped