-
Notifications
You must be signed in to change notification settings - Fork 1.4k
add comments of Tensor and Tensormath #31
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
| * should be equal to the dimension number of the tensor. | ||
| * Tensor should not be empty. | ||
| * | ||
| * @param d1,( d2, d3, d4, d5) the given position |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
d1,( d2, d3, d4, d5) or d1 d2, d3, d4, d5 ?
| def view(sizes: Array[Int]): Tensor[T] | ||
|
|
||
| /** | ||
| * Returns a tensor which contains all slices of size size |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
why there are two 'size' words?
| implicit ev: TensorNumeric[T]): Tensor[T] = new DenseTensor[T](d1, d2, d3, d4, d5) | ||
|
|
||
| /** | ||
| * Create a tensor on an given dimensions. The tensor size will be the product of dims |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
on given dimensions (remove an)
| DenseTensor.size2Stride(dims.toArray), dims.length) | ||
|
|
||
| /** | ||
| * Create a tensor on an given sizes. The tensor size will be the product of sizes |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
on given sizes (remove an)
| } | ||
|
|
||
| /** | ||
| * create a tensor with an given tensor. The tensor will have same size |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
a given tensor
| } | ||
|
|
||
| /** | ||
| * create a tensor with an given tensor. The tensor will have same size |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
have the same size
| implicit ev: TensorNumeric[T]): Tensor[T] = new DenseTensor(other) | ||
|
|
||
| /** | ||
| * create a tensor with an given breeze vector. The tensor will have same size |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
a given, the same size
| if (matrix.isTranspose) Array(1, matrix.majorStride) else Array(matrix.majorStride, 1)) | ||
|
|
||
| /** | ||
| * create a tensor with an given spark Densematrix. The tensor will have same size with |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
a given, the same size
| apply[Double](Storage(vector.toArray)) | ||
|
|
||
| /** | ||
| * create a tensor with an given breeze matrix. The tensor will have same size with |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
a given, the same size
| vector.offset + 1, Array(vector.length), Array(vector.stride)) | ||
|
|
||
| /** | ||
| * create a tensor with an given spark Densevector. The tensor will have same size |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
a given, the same size
| package com.intel.analytics.sparkdl.tensor | ||
|
|
||
| /** | ||
| * It provides multiple math operation function for manipulating Tensor objects. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
functions
| /** | ||
| * It provides multiple math operation function for manipulating Tensor objects. | ||
| * All functions support both allocating a new Tensor to return the result | ||
| * and treating the caller as the target Tensor, in which case the target Tensor(s) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
as a target Tensor
| * It provides multiple math operation function for manipulating Tensor objects. | ||
| * All functions support both allocating a new Tensor to return the result | ||
| * and treating the caller as the target Tensor, in which case the target Tensor(s) | ||
| * will be resized accordingly and filled with result. This property is especially |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
with the result
| * All functions support both allocating a new Tensor to return the result | ||
| * and treating the caller as the target Tensor, in which case the target Tensor(s) | ||
| * will be resized accordingly and filled with result. This property is especially | ||
| * useful when one wants have tight control over when memory is allocated. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
wants to have
| } | ||
|
|
||
| /** | ||
| * subtract all elements of this with value not in place. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
with the value @param s
No description provided.