-
Notifications
You must be signed in to change notification settings - Fork 17
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
How to add a new model in flowvision #136
Comments
有了这个,能否公开,给别人一些类似志愿者的机会。 |
感觉可以 |
可以的,放在vision下就是感觉可以给大家看,然后社区有人愿意帮忙的话~也可以按照这个步骤来添加模型 |
测速脚本使用方式测试已有的模型运行脚本之前需要安装一些依赖项: pip 安装:
交互式安装:
然后: cd ci/check
bash run_speed_test.sh 速度对比结果会输出到当前运行脚本的目录的 新增模型如果是新增模型,就需要去读懂 测试 oneflow如果是测试oneflow会进入脚本的 72行的分支。 首先会删除一些开头的 import:
同时删除代码中的 接着就是将 测试 pytorch会进入 115行的分支 首先也是删除 接着就是替换 最后就是将 |
向flowvision中添加模型的几个步骤
整体分为以下几个过程:
1. 添加模型
添加新的模型,需要注意几个细节
python自带的包 - 额外安装的包 - 自身仓库的module
的顺序(注意:重复的代码模块需要写入单独的文件。如Drop Path,Patch Embedding等)model_urls
变量2. 转换对应的模型权重
3. 测试权重结果并记录
利用 https://github.com/Oneflow-Inc/vision/blob/main/projects/benchmark/classification/eval.sh 进行测试
4. 更新MODEL_ZOO
更新结果至 https://github.com/Oneflow-Inc/vision/blob/main/results/results_imagenet.md
5. 更新docstring
更新至 https://github.com/Oneflow-Inc/vision/blob/main/docs/source/flowvision.models.rst
6. 更新README中的表格
更新至 https://github.com/Oneflow-Inc/vision#overview-of-flowvision-structure
7. 添加与torch的速度对比,测试数据要列在pr里面,同时在测速脚本里添加对应的模型
The text was updated successfully, but these errors were encountered: