Skip to main content

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)

Metadata

Release files for one-utils 0.0.3

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for one-utils 0.0.3
File Size Uploaded
one-utils-0.0.3.tar.gz 3.6 kB Details

Release files / one-utils-0.0.3.tar.gz

Download URL one-utils-0.0.3.tar.gz
Size 3.6 kB
Tags Source
SHA-256 checksum
How to use checksums
d0fd1d5ff995f6d9596f805fcbb37ab4f0123bca1b811c2d060919bd5e75462a
BLAKE2b-256 checksum
How to use checksums
d1680c853678439ca7156a1f78c167f56095e0e333ef007f80aaa6415da57cb1
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/3.4.2 importlib_metadata/3.10.0 pkginfo/1.7.1 requests/2.25.1 requests-toolbelt/0.9.1 tqdm/4.62.3 CPython/3.6.13

Release history Release notifications | RSS feed

This release

0.0.3 This release

1 release file

0.0.2

1 release file

0.0.1

1 release file

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page