oneflow tools
Project description
OneUtils
A collection of useful tools for oneflow
Installation
pip install one-utils==0.0.2
Usage
- Weight Transfer
from one_utils import convert_torch_to_flow
model = model()
torch_weight = "path/to/pytorch_pretrained_weight.pth"
save_path = "path/to/save"
convert_torch_to_flow(model, torch_weight_path, save_path)
- Eval Pytorch Model Acc on ImageNet
from one_utils import eval_torch_acc
model = model()
data_path = "path/to/imagenet/val"
eval_torch_acc(model, data_path, n_gpu_use=1)
- Eval OneFlow Model Acc on ImageNet
from one_utils import eval_flow_acc
import multiprocessing as mp
mp.set_start_method("spawn")
model = model()
data_path = "path/to/imagenet/val"
eval_flow_acc(model, data_path)
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
one-utils-0.0.3.tar.gz
(3.6 kB
view hashes)