huawei-noah / Efficient-AI-Backbones

Efficient AI Backbones including GhostNet, TNT and MLP, developed by Huawei Noah's Ark Lab.
4.07k stars 708 forks source link

g-ghost预训练权重 #155

Open 12moli opened 2 years ago

12moli commented 2 years ago

请问g-ghostnet有没有pytorch的预训练权重呢?

iamhankai commented 2 years ago

我们会尽快release

12moli commented 2 years ago

谢谢您的回复!我把gghost嵌入了yolo,但是由于gghost源码中有用到了lambda创建匿名函数,但torch.save时报错 Can‘t pickle local object ‘_initialize.<locals>.ResBasicBlock.init.<locals>.lambda,貌似无法解析lambda表达式,请问您有解决办法吗?

iamhankai commented 2 years ago

存储模型权重,别存整个模型,torch.save(model.state_dict(), 'save.pt')

12moli commented 2 years ago

谢谢您的回复,在修改期间我又出现了其他的问题。。我嵌入的是yolov5-v6.0,准备把所有的torch.save都修改成只存权重,但在这个保存checkpoint位置好像没办法修改,如图: image ;还有就是嵌入之后会导致后面无法生成混淆矩阵图和PR曲线图等图像,错误:“Using categorical units to plot a list of strings that are all parsable as floats or dates. If these strings should be plotted as numbers, cast to the appropriate data type before plotting.”,请问您有什么解决的办法吗?

iamhankai commented 2 years ago

你这个问题超纲了

12moli commented 2 years ago

好吧,谢谢您!

iamhankai commented 2 years ago

最新g-ghost代码和预训练权重:https://github.com/huawei-noah/Efficient-AI-Backbones/tree/master/g_ghost_pytorch

songjiahao-wq commented 2 years ago

好吧,谢谢您!

请问解决了吗?我也遇到这个问题了