TorchFun (originally Torchure)
##for those who expect more convenient features from torch
Functionality
- flatten(tensor)
- imshow(tensor_batch)
- load
Install TorchFun
pip install torchfun
API
Flatten (Module)
used to reshape outputs
Usage:
flat = Flatten()
out = flat(x)
flatten (function)
Usage:
out = flatten(x)
imshow (function)
only deal with torch channel-first image batch,
Arguements:
- x: input data cube, torch tensor or numpy array.
- title: add title to plot. (Default None)
- title can be string, or any string-able object.
- auto_close: (default True)
- Close the pyplot session afterwards.
- Clean the environment just like you had never used matplotlib here.
- if set to False, the plot will remain in the memory for further drawings.
Usage:
imshow(batch) imshow(batch,title=[a,b,c]) imshow(batch,title='title') imshow(batch,auto_close=False)
load (function)
Arguements:
-
arbitrary arguemnts named :
aandbLoad weightainto modelb, or load modelbusing weightaThe order of the arguments doesn't matter. Example:load('weights.pts',model)
or
>load(model,'weights.pts')
or
>f = open('weight.pts')
>load(f,model)
or
>load(model,f)
Return value:
- None
Metadata
Release files for torchure 0.0.14
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 |
|---|---|---|---|---|
| torchure-0.0.14.tar.gz | 2.9 kB | Without provenance | Details for torchure-0.0.14.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| torchure-0.0.14-py3-none-any.whl | Python 3 | none | any | Details for torchure-0.0.14-py3-none-any.whl |
Total release size: 6.3 kB
Release files / torchure-0.0.14.tar.gz
| Download URL | torchure-0.0.14.tar.gz |
|---|---|
| Size | 2.9 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
b03b594fcbe225f734e6b920a2bf8d1778aba40e3736e8209138158753b5ab68
|
|
BLAKE2b-256 checksum How to use checksums |
132e59b35ba8bd0bdfd57c8cb445730c1cfa5ed2b76f965836dfb37713907fc1
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
Release files / torchure-0.0.14-py3-none-any.whl
| Download URL | torchure-0.0.14-py3-none-any.whl |
|---|---|
| Size | 3.4 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
470532be49d0b0caf95dd037566e4574f16d208f9752f7fb2dcd2fc68ddba5b0
|
|
BLAKE2b-256 checksum How to use checksums |
5a7bc956f56f8a6d27a1b7ae43e6f696579e7888018b5f5959620e2aac897b1b
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
Security for torchure 0.0.14
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.