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

关于ann to snn转换后测试代码段的问题 #42

Open
powerqjy opened this issue Mar 9, 2022 · 5 comments
Open

关于ann to snn转换后测试代码段的问题 #42

powerqjy opened this issue Mar 9, 2022 · 5 comments

Comments

@powerqjy
Copy link

powerqjy commented Mar 9, 2022

您好!
请问ann_to_snn.py代码中最后的test段落,
if opt.task == 'test': # (default) test normally
snn_results, maps, firing_ratios = snn_evaluate(opt,
data,
ann,
snn,
opt.timesteps,
batch_size,
imgsz_test,
opt.conf_thres,
opt.iou_thres,
opt.save_json,
opt.single_cls,
opt.augment)
函数snn_evaluate()测试过程中有两次内存爆炸的现象,请问这是为什么呢?
我遍历snn_evaluate()代码没有发现有优化网络结构相关的部分,这部分却产生了巨量数据。注释掉以后发现timesteps可以无限提高。请问此函数除了测试模型准确率,还具备其他什么作用吗?是否可以省略此部分呢?

@layne22
Copy link

layne22 commented May 23, 2022

请问有解决这个问题吗?

@powerqjy
Copy link
Author

请问有解决这个问题吗?

我转出来发现只要测试就需要巨量内存,没得办法,可能论文里对神经元相关处理没说全。我放弃这个模型了。

@cwq159
Copy link
Owner

cwq159 commented Jul 26, 2022

这部分需要把输入图片复制timesteps份,因此有可能导致内存溢出,可以通过调低timesteps来减少复制数据。

@powerqjy
Copy link
Author

powerqjy commented Jul 26, 2022 via email

@123456ZF
Copy link

@powerqjy 你好,请问,在运行ann-snn.py文件时,出现了这个问题:raise ValueError(cannot find tensor Size, tensor.size())。我安装了pytorch1.6,python3.7,然后出现:warnings.warn(incompatible_device_warn.format(device_name, capability, " ".join(arch_list), device_name)),这是怎么回事,是30系显卡的原因吗?请问您当初是怎么跑成功的吗?

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

4 participants