You can not select more than 25 topics Topics must start with a chinese character,a letter or number, can include dashes ('-') and can be up to 35 characters long.

README.md 1.3 kB

2 years ago
1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950
  1. # 如何在启智平台上进行模型训练—GCU示例
  2. ## 1.启智集群和智算集群的GCU训练样例
  3. ###### 启智集群的示例代码:
  4. - 训练示例请参考示例中[train_gcu.py](./train_gcu.py)的代码注释
  5. ## 2. 在openi上获取数据集,预训练模型,输出路径
  6. 安装openi包
  7. ```
  8. pip install -U openi
  9. ```
  10. 使用openi包
  11. ```
  12. #导入包
  13. from openi.context import prepare, upload_openi
  14. #初始化导入数据集和预训练模型到容器内
  15. openi_context = prepare()
  16. #获取数据集路径,预训练模型路径,输出路径
  17. dataset_path = openi_context.dataset_path
  18. pretrain_model_path = openi_context.pretrain_model_path
  19. output_path = openi_context.output_path
  20. #回传结果到openi
  21. upload_openi()
  22. ```
  23. ## 3.FAQ
  24. ### 3.1 关于启智平台公共库[openi](https://openi.pcl.ac.cn/OpenIOSSG/openi-pypi):
  25. 主要使用的方法有以下几个:
  26. ```
  27. prepare 准备数据集,模型,输出路径
  28. upload_openi 将训练镜像的输出结果拷贝回启智平台
  29. ```
  30. ### 3.2 解决参数报错问题:
  31. 请在代码中加入 `args, unknown = parser.parse_known_args()`,可忽略掉 `--ckpt_url`, `--multi_date_url`等参数报错问题
  32. ## 对于示例代码有任何问题,欢迎在本项目中提issue。

No Description