|
12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849 |
- # 如何在启智平台上进行模型训练—GPU示例
-
- ## 1.启智集群和智算集群的GPU训练样例
-
- ###### 启智集群的示例代码:
-
- - 训练任务示例请参考示例中[train.py](./train.py)的代码注释
- - 推理任务示例请参考示例中[inference.py](./inference.py)的代码注释
-
- ## 2. 在云脑上获取数据集,预训练模型,输出路径
-
- 使用c2net包
-
- ```
- #导入包
- from c2net.context import prepare,upload_output
-
- #初始化导入数据集和预训练模型到容器内
- c2net_context = prepare()
-
- #获取代码路径,数据集路径,预训练模型路径,输出路径
- code_path = c2net_context.code_path
- dataset_path = c2net_context.dataset_path
- pretrain_model_path = c2net_context.pretrain_model_path
- output_path = openi_context.output_path
-
- #回传结果
- upload_output()
-
- ```
-
- ## 3.[创建GPU训练示例任务界面教程](./Example_Picture/快速创建GPU训练任务.md)
-
- ## 4.FAQ
-
- ### 4.1 关于启智平台公共库[c2net](https://openi.pcl.ac.cn/OpenIOSSG/c2net-pypi):
-
- 主要使用的方法有以下几个:
-
- ```
- prepare 准备数据集,模型,输出路径
- upload_output 将训练镜像的输出结果拷贝回启智平台
- ```
-
- ### 4.2 解决参数报错问题:
-
- 请在代码中加入 `args, unknown = parser.parse_known_args()`,可忽略掉 `--ckpt_url`,`--data_url`, `--multi_date_url`等参数报错问题
-
- ## 对于示例代码有任何问题,欢迎在本项目中提issue。
|