Skip to content
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

关于输出维度的问题 #201

Open
panhu opened this issue Jun 5, 2023 · 4 comments
Open

关于输出维度的问题 #201

panhu opened this issue Jun 5, 2023 · 4 comments

Comments

@panhu
Copy link

panhu commented Jun 5, 2023

您好:
我想请问下假设我的输出是(1,256,2)也就是512个数。那么输出是什么样的,我看输出好像直接就是512个数了,那么它对于(1,256,2)的组织形式是啥样的,怎么区分或者找出这两个256呢?

@majianjia
Copy link
Owner

majianjia commented Jun 6, 2023

默认情况下数据是HWC数据结构,配置时恒定HWC格式(你看到的shape)
如果这两者匹配(默认情况),C语言下使用 data[1][256][2] 访问你的数据
你的数据是256个长度为2的数组,而不是2个长度为256个字节的数组

@panhu
Copy link
Author

panhu commented Jun 6, 2023

感谢您的回复,我看对于给定输出是tensor_output_dim = {1,256,2},输出的nnom_output_data好像是一维的数组512,它们的对应关系是什么样的,是前256为[0][256][0]维与后256为[0][256][1]组成还是交叉组成512的一维数组

@majianjia
Copy link
Owner

交叉的
实际排列方式为data[1][256][2]

@panhu
Copy link
Author

panhu commented Dec 11, 2023

谢谢,假设我有输入数据为实部128,虚部128,那我是不是可以之间将它们放在一起组成[256]个数组作为输入呢,是之间实部+虚部进行组合,还是应该实虚实虚这样交叉放入

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants