Update
Function Prototype
void Update(Shape shape, Format format = FORMAT_NCHW, DataType dt = DT_FLOAT);
Function Description
Updates shape, format, and datatype of a TensorDesc object.
Parameter Description
Parameter |
Input/Output |
Type |
Description |
---|---|---|---|
shape |
Input |
Shape |
shape object to be updated |
format |
Input |
Format |
format object to be updated. The default value is FORMAT_NCHW. For the definition of the Format data types, see Format. |
dt |
Input |
DataType |
datatype object to be updated. The default value is DT_FLOAT. For the definition of the DataType data types, see DataType. |
Return Value
None
Exception Handling
None
Restriction
None
Data Type Description
- Format
enum Format { FORMAT_NCHW = 0, /**< NCHW */ FORMAT_NHWC, /**< NHWC */ FORMAT_ND, /**< Nd Tensor */ FORMAT_NC1HWC0, /**< NC1HWC0 */ FORMAT_FRACTAL_Z, /**< FRACTAL_Z */ FORMAT_NC1C0HWPAD, FORMAT_NHWC1C0, FORMAT_FSR_NCHW, FORMAT_FRACTAL_DECONV, FORMAT_C1HWNC0, FORMAT_FRACTAL_DECONV_TRANSPOSE, FORMAT_FRACTAL_DECONV_SP_STRIDE_TRANS, FORMAT_NC1HWC0_C04, /**< NC1HWC0, C0 =4*/ FORMAT_FRACTAL_Z_C04,/**< FRACZ, C0 = 4 */ FORMAT_CHWN, FORMAT_FRACTAL_DECONV_SP_STRIDE8_TRANS, FORMAT_HWCN, FORMAT_NC1KHKWHWC0, /** < KH,KW kernel h& kernel w maxpooling max output format*/ FORMAT_BN_WEIGHT, FORMAT_FILTER_HWCK, /* filter input tensor format */ FORMAT_HASHTABLE_LOOKUP_LOOKUPS=20, FORMAT_HASHTABLE_LOOKUP_KEYS, FORMAT_HASHTABLE_LOOKUP_VALUE, FORMAT_HASHTABLE_LOOKUP_OUTPUT, FORMAT_HASHTABLE_LOOKUP_HITS=24, FORMAT_RESERVED };
- DataType
enum DataType { DT_UNDEFINED = 16, // Used to indicate a DataType field has not been set. DT_FLOAT = 0, // float type DT_FLOAT16 = 1, // fp16 type DT_INT8 = 2, // int8 type DT_INT16 = 6, // int16 type DT_UINT16 = 7, // uint16 type DT_UINT8 = 4, // uint8 type DT_INT32 = 3, // DT_INT64 = 9, // int64 type DT_UINT32 = 8, // unsigned int32 DT_UINT64 = 10, // unsigned int64 DT_BOOL = 12, // bool type DT_DOUBLE = 11, // double type DT_DUAL = 13, /**< dual output type */ DT_DUAL_SUB_INT8 = 14, /**< dual output int8 type */ DT_DUAL_SUB_UINT8 = 15, /**< dual output uint8 type */ };
Feedback
Was this page helpful?
Provide feedbackThank you very much for your feedback. We will continue working to improve the documentation.See the reply and handling status in My Cloud VOC.
For any further questions, feel free to contact us through the chatbot.
Chatbot