Fix test and comments.
- Remove useless initialization
- Change comment and docs
Signed-off-by: Yelin Jeong <yelini.jeong@samsung.com>
rank = shape.size ();
if (rank > NNS_TENSOR_RANK_LIMIT) {
- /* supposed max rank is less than 4 (NNS_TENSOR_RANK_LIMIT) */
+ /* supposed max rank is less than 16 (NNS_TENSOR_RANK_LIMIT) */
snap_loge ("The rank is invalid (%lu).", rank);
return false;
}
- Enum "gtt_mode_type" Default: -1, "unknown"
- (0): dimchg
- A mode for changing tensor dimensions
- - An option should be provided as option=FROM_DIM:TO_DIM (with a regex, ^([0-3]):([0-3])$, where NNS_TENSOR_RANK_LIMIT is 4).
+ - An option should be provided as option=FROM_DIM:TO_DIM (with a regex, ^([0-9]|1[0-5]):([0-9]|1[0-5])$, where NNS_TENSOR_RANK_LIMIT is 16).
- Example: Move 1st dim to 2nd dim (i.e., [a][H][W][C] ==> [a][C][H][W])
```bash
/**
* @brief Parse tensor dimension parameter string
* @return The Rank. 0 if error.
- * @param dimstr The dimension string in the format of d1:...:d8, d1:d2:d3, d1:d2, or d1, where dN is a positive integer and d1 is the innermost dimension; i.e., dim[d8][d7][d6][d5][d4][d3][d2][d1];
+ * @param dimstr The dimension string in the format of d1:...:d16, d1:d2:d3, d1:d2, or d1, where dN is a positive integer and d1 is the innermost dimension; i.e., dim[d16]...[d1];
* @param dim dimension to be filled.
*/
extern guint
/**
* @brief Get dimension string from given tensor dimension.
* @param dim tensor dimension
- * @return Formatted string of given dimension (d1:d2:d3:d4:d5:d6:d7:d8).
+ * @return Formatted string of given dimension (d1:d2:d3:...:d15:d16).
* @note The returned value should be freed with g_free()
*/
extern gchar *
/**
* @brief Parse tensor dimension parameter string
* @return The Rank. 0 if error.
- * @param dimstr The dimension string in the format of d1:...:d8, d1:d2:d3, d1:d2, or d1, where dN is a positive integer and d1 is the innermost dimension; i.e., dim[d8][d7][d6][d5][d4][d3][d2][d1];
+ * @param dimstr The dimension string in the format of d1:...:d16, d1:d2:d3, d1:d2, or d1, where dN is a positive integer and d1 is the innermost dimension; i.e., dim[d16]...[d1];
* @param dim dimension to be filled.
*/
guint
/**
* @brief Get dimension string from given tensor dimension.
* @param dim tensor dimension
- * @return Formatted string of given dimension (d1:d2:d3:d4:d5:d6:d7:d8).
+ * @return Formatted string of given dimension (d1:d2:d3:...:d15:d16).
* @note The returned value should be freed with g_free()
*/
gchar *
D1 = 3
D2 = 280
D3 = 40
-D4 = 1
-D5 = 1
-D6 = 1
-D7 = 1
-D8 = 1
##
##
# @brief The constructor for custom filter: passthrough
def __init__(self, *args):
- self.input_dims = [nns.TensorShape([D1, D2, D3, D4, D5, D6, D7, D8], np.uint8)]
- self.output_dims = [nns.TensorShape([D1, D2, D3, D4, D5, D6, D7, D8], np.uint8)]
+ self.input_dims = [nns.TensorShape([D1, D2, D3], np.uint8)]
+ self.output_dims = [nns.TensorShape([D1, D2, D3], np.uint8)]
##
# @brief python callback: getInputDim