使用onnxruntime训练Pytorch模型
项目描述
使用onnxruntime训练pytorch模型
构建(您需要更新version.txt中的版本号才能上传python whl文件)
rm dist/*
python setup.py bdist_wheel
发布
twine upload dist/*
安装
稳定版
(uninstall onnxruntime version that do not support gpu and training)
pip install torchort onnxruntime=1.9.0+cu111_training
夜间版
(make sure you are not in the ort repo folder - otherwise torchort is taken as already installed)
pip install --pre torchort ort-gpu-nightly-training
(eventually we are aiming at: pip install --pre torchort onnxruntime=1.9.0+cu111_training)
测试
python ./ort/tests/bert_for_sequence_classification.py
在PyTorch训练脚本中使用torchort
import onnxruntime
from torchort import ORTModule
model = ORTModule(model)
# normal PyTorch training script follows
项目详情
关闭
哈希值 for torchort-0.0.8.dev20210317-py3-none-any.whl
算法 | 哈希摘要 | |
---|---|---|
SHA256 | 9c8fcde3216f8d6f3442dd9240d506660b858166629285a796e919ef8ae2add5 |
|
MD5 | 4861f7aaf19fa6228af675df4d83109f |
|
BLAKE2b-256 | bf9ef1b02d5d8bd7fc1eb03b2ad98a711bae4f32a650e06485c1ce30d05f787c |