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)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| one-utils-0.0.3.tar.gz | 3.6 kB | Without provenance | Details for one-utils-0.0.3.tar.gz |
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
|
Security for one-utils 0.0.3
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.