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

yolov3 问题 #356

Open
wzy9813125 opened this issue Jul 13, 2022 · 3 comments
Open

yolov3 问题 #356

wzy9813125 opened this issue Jul 13, 2022 · 3 comments

Comments

@wzy9813125
Copy link

No description provided.

@wzy9813125 wzy9813125 changed the title yolov3 呢哇、 yolov3 问题 Jul 13, 2022
@wzy9813125
Copy link
Author

wzy9813125 commented Jul 13, 2022

1、from oneflow.cuda import amp报错:oneflow.cuda里没有amp模块

torch.cuda.amp自动混合精度训练 —— 节省显存并加快推理速度
解决方法:直接将torch里的amp模块复制到本地import

2、在套用torch_distributed_zero_first函数时,会报错:oneflow.distributed没有barrier

torch_distributed_zero_first函数是用来处理模型进行分布式训练时的同步问题
解决方法:直接注释掉与torch_distributed_zero_first有关代码,不采用分布式训练同步

3、oneflow.load加载pt模型参数时,报错:load() got an unexpected keyword argument 'map_location'

没有map_location这个参数
目前解决方法是去掉map_loaction,但是再运行会显示模型加载地址找不到的问题

@wzy9813125 wzy9813125 reopened this Jul 13, 2022
@MARD1NO
Copy link
Contributor

MARD1NO commented Jul 13, 2022

第一点,我们的amp暂时在Graph层支持(即静态图),Eager动态图还不支持AMP,所以直接复制amp模块import我大概率估计是跑不起来

@Ldpe2G
Copy link
Collaborator

Ldpe2G commented Jul 14, 2022

1、from oneflow.cuda import amp报错:oneflow.cuda里没有amp模块

torch.cuda.amp自动混合精度训练 —— 节省显存并加快推理速度 解决方法:直接将torch里的amp模块复制到本地import

oneflow 里如果没有对应的模块,可能是没实现,或者机制不同,可以注释掉相关代码,或者换个方式实现,不要直接硬搬过来。

2、在套用torch_distributed_zero_first函数时,会报错:oneflow.distributed没有barrier

torch_distributed_zero_first函数是用来处理模型进行分布式训练时的同步问题 解决方法:直接注释掉与torch_distributed_zero_first有关代码,不采用分布式训练同步

问题再描述清楚一些,具体这个函数内是做了啥,把具体代码段贴一下,方便他同事解答问题。

3、oneflow.load加载pt模型参数时,报错:load() got an unexpected keyword argument 'map_location'

没有map_location这个参数 目前解决方法是去掉map_loaction,但是再运行会显示模型加载地址找不到的问题

oneflow.load 不能直接加载torch的模型

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

3 participants