"use strict";(self.webpackChunkrspress_doc_template=self.webpackChunkrspress_doc_template||[]).push([["2851"],{34759:function(e,s,n){n.r(s);var r=n(85893),i=n(50065);function l(e){let s=Object.assign({h1:"h1",a:"a",pre:"pre",code:"code",span:"span",p:"p",ul:"ul",li:"li",table:"table",thead:"thead",tr:"tr",th:"th",strong:"strong",tbody:"tbody",td:"td"},(0,i.ah)(),e.components);return(0,r.jsxs)(r.Fragment,{children:[(0,r.jsxs)(s.h1,{id:"hbdnntensorshape",children:[(0,r.jsx)(s.a,{className:"header-anchor","aria-hidden":"true",href:"#hbdnntensorshape",children:"#"}),"hbDNNTensorShape"]}),"\n",(0,r.jsx)(s.pre,{className:"code",children:(0,r.jsx)(s.pre,{className:"shiki css-variables has-line-number",style:{backgroundColor:"var(--shiki-color-background)"},tabIndex:"0",children:(0,r.jsxs)(s.code,{className:"language-cpp",meta:"",children:[(0,r.jsxs)(s.span,{className:"line line-number",children:[(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:"typedef"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:"struct"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" {"})]}),"\n",(0,r.jsxs)(s.span,{className:"line line-number",children:[(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"  "}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:"int32_t"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-constant)"},children:"dimensionSize"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"[HB_DNN_TENSOR_MAX_DIMENSIONS];"})]}),"\n",(0,r.jsxs)(s.span,{className:"line line-number",children:[(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"  "}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:"int32_t"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" numDimensions;"})]}),"\n",(0,r.jsxs)(s.span,{className:"line line-number",children:[(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"} "}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-function)"},children:"hbDNNTensorShape"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:";"})]}),"\n"]})})}),"\n",(0,r.jsx)(s.p,{children:"Tensor shape."}),"\n",(0,r.jsxs)(s.p,{children:["For example, a tensor with ",(0,r.jsx)(s.code,{children:"numDimensions=4"})," and data layout ",(0,r.jsx)(s.code,{children:"1x4x224x224"})," will have the ",(0,r.jsx)(s.code,{children:"dimensionSize"})," array storing the data in order as follows:\n",(0,r.jsx)(s.code,{children:"dimensionSize[0]=1"}),", ",(0,r.jsx)(s.code,{children:"dimensionSize[1]=4"}),", ",(0,r.jsx)(s.code,{children:"dimensionSize[2]=224"}),", ",(0,r.jsx)(s.code,{children:"dimensionSize[3]=224"}),"."]}),"\n",(0,r.jsxs)(s.ul,{children:["\n",(0,r.jsx)(s.li,{children:"Member"}),"\n"]}),"\n",(0,r.jsxs)(s.table,{children:[(0,r.jsx)(s.thead,{children:(0,r.jsxs)(s.tr,{children:[(0,r.jsx)(s.th,{children:(0,r.jsx)(s.strong,{children:"Member Name"})}),(0,r.jsx)(s.th,{children:(0,r.jsx)(s.strong,{children:"Description"})})]})}),(0,r.jsxs)(s.tbody,{children:[(0,r.jsxs)(s.tr,{children:[(0,r.jsx)(s.td,{children:(0,r.jsx)(s.code,{children:"dimensionSize"})}),(0,r.jsx)(s.td,{children:"Size of each dimension of the tensor."})]}),(0,r.jsxs)(s.tr,{children:[(0,r.jsx)(s.td,{children:(0,r.jsx)(s.code,{children:"numDimensions"})}),(0,r.jsx)(s.td,{children:"Dimension of the tensor."})]})]})]})]})}function o(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},{wrapper:s}=Object.assign({},(0,i.ah)(),e.components);return s?(0,r.jsx)(s,Object.assign({},e,{children:(0,r.jsx)(l,e)})):l(e)}s.default=o,o.__RSPRESS_PAGE_META={},o.__RSPRESS_PAGE_META["latest%2Fen%2Fguide%2Fucp%2Fruntime%2Fbpu_sdk_api%2Fdata_structure%2FhbDNNTensorShape.mdx"]={toc:[],title:"hbDNNTensorShape",frontmatter:{}}}}]);