Skip to main content

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


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 details)

Uploaded Source

File details

Details for the file one-utils-0.0.3.tar.gz.

File metadata

  • Download URL: one-utils-0.0.3.tar.gz
  • Upload date:
  • Size: 3.6 kB
  • Tags: Source
  • Uploaded using 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

File hashes

Hashes for one-utils-0.0.3.tar.gz
Algorithm Hash digest
SHA256 d0fd1d5ff995f6d9596f805fcbb37ab4f0123bca1b811c2d060919bd5e75462a
MD5 f93de19f39aa3d24b05aff553913c994
BLAKE2b-256 d1680c853678439ca7156a1f78c167f56095e0e333ef007f80aaa6415da57cb1

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page