We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
请问各种主干网络是否有预训练权重应该在哪看? 我只能从config中翻到一些
The text was updated successfully, but these errors were encountered:
你好,我来回答一下,各个主干网络的与训练权重大部分都是从现有torch模型保存的模型转化来的,如果有需要可以下载对应的pth模型通过代码转化,我这边提供一个简单版本的模型转化,供你参考(实际过程需要你根据模型的信息调整一些内容)。
##pth -> pdparams import torch import numpy as np import paddle model_dict = torch.load('pth/eformer_s0_450.pth')['model'] paddle_dict = {} for key, value in model_dict.items(): if "running_mean" in key: key = key.replace("running_mean", "_mean") elif "running_var" in key: key = key.replace("running_var", "_variance") # if len(value.shape) == 2: # paddle_dict[key] = np.transpose(value.detach().cpu().numpy(), ([1, 0])) if len(value.shape) == 0: print('jump',value, key) continue else: paddle_dict[key] = value.detach().cpu().numpy() # print(key, value.shape) print(len(paddle_dict.keys())) paddle.save(paddle_dict, "pdparams/eformer_s0_450.pdparams")
$emsp;对应的模型项目链接为:efficientformerV2,可以从图中位置下载模型
Sorry, something went wrong.
以上回答已经充分解答了问题,如果有新的问题欢迎随时提交issue,或者在此条issue下继续回复~
我们开启了飞桨套件的ISSUE攻关活动,欢迎感兴趣的开发者参加:PaddlePaddle/PaddleOCR#10223
marshall-dteach
No branches or pull requests
问题确认 Search before asking
请提出你的问题 Please ask your question
请问各种主干网络是否有预训练权重应该在哪看?
我只能从config中翻到一些
The text was updated successfully, but these errors were encountered: