*/
typedef struct nnfw_session nnfw_session;
-typedef struct nnfw_tensorinfo nnfw_tensorinfo;
-
typedef enum {
NNFW_TYPE_TENSOR_FLOAT32 = 0,
NNFW_TYPE_TENSOR_INT32 = 1,
} NNFW_LAYOUT;
/**
- * tensor_info
+ * tensor_info describes the type and shape of tensors
+ *
+ * <p>This structure is used to describe input and output tensors.
+ * Application can get input and output tensor type and shape described in model by using
+ * {@link nnfw_input_tensorinfo} and {@link nnfw_output_tensorinfo}
+ *
+ * <p>Maximum rank is 6. And tensor's dimension value is filled in 'dims' field from index 0.
+ * For example, if tensor's rank is 4,
+ * application can get dimension value from dims[0], dims[1], dims[2], and dims[3]
*/
-struct nnfw_tensorinfo
+typedef struct nnfw_tensorinfo
{
NNFW_TYPE dtype;
int rank;
- int dims[6]; // MAX rank is 6
-};
+ int dims[6];
+} nnfw_tensorinfo;
/*
* Create a new session instance