open-alcnet icon indicating copy to clipboard operation
open-alcnet copied to clipboard

运行visualize_local_contrast_networks.py报错

Open CPF-314127 opened this issue 3 years ago • 8 comments

运行visualize_local_contrast_networks.py报错 RuntimeError: Parameter 'mpcmresnetfpn0_batchnorm0_gamma' was not initialized on context cpu(0). It was only initialized on [gpu(0)].

请问戴老师这该如何解决,望戴老师告知,谢谢

CPF-314127 avatar Dec 19 '21 12:12 CPF-314127

请问您的问题解决了吗?我也遇到同样的问题

DongGuangchang avatar Apr 01 '22 03:04 DongGuangchang

抱歉 我也没能解决

------------------ 原始邮件 ------------------ 发件人: "YimianDai/open-alcnet" @.>; 发送时间: 2022年4月1日(星期五) 中午11:40 @.>; @.@.>; 主题: Re: [YimianDai/open-alcnet] 运行visualize_local_contrast_networks.py报错 (Issue #10)

请问您的问题解决了吗?我也遇到同样的问题

— Reply to this email directly, view it on GitHub, or unsubscribe. You are receiving this because you authored the thread.Message ID: @.***>

CPF-314127 avatar Apr 01 '22 04:04 CPF-314127

请问您的问题解决了吗?我也遇到同样的问题

你好,请问你的问题解决了吗?我也遇到了...

xiexing0916 avatar Jul 11 '22 16:07 xiexing0916

因为exp_img默认建立在cpu上了,加上这两行代码就行 if not (len(mx.test_utils.list_gpus()) == 0): exp_img = exp_img.copyto(mx.gpu())

Victor4869 avatar Oct 04 '22 07:10 Victor4869

因为exp_img默认建立在cpu上了,加上这两行代码就行 if not (len(mx.test_utils.list_gpus()) == 0): exp_img = exp_img.copyto(mx.gpu())

能告知下,加在哪里吗?我也是报相同错误

Drinkwaterever avatar Oct 24 '22 02:10 Drinkwaterever

exp_img 后面

Victor4869 avatar Oct 24 '22 07:10 Victor4869

exp_img 后面

AttributeError: 'NDArray' object has no attribute 'view' 添加之后,这个报错,你有遇到吗?

Drinkwaterever avatar Oct 24 '22 11:10 Drinkwaterever

pred 后面再加这个 pred = pred.squeeze().asnumpy() > 0

我正在把修改后的版本同步到我的fork 版本,目前上传的版本把这里常见的问题修好了。可以去这里下载我的版本https://github.com/Victor4869/open-alcnet
另外我还增加了一些功能,完善log信息合在预测后的图片画上真实目标的bounding box方便比对。本地文件的代码已经写好了,现在正在完善commit 信息,迟点会陆续上传。

Victor4869 avatar Oct 24 '22 23:10 Victor4869