This is a project for later lazy work! Only support for python3, ☹️, but maybe you can try in python2
Install
命令行直接安装
pip install poros
从代码库安装
git clone https://github.com/diqiuzhuanzhuan/poros.git
cd poros
python setup install
Some code is created by myself, and some code is inspired by others, such as allennlp etc.
poros_chars
Provide a set of small functions
usage:
- convert Chinese words into Arabic numbers:
from poros.poros_chars import chinese_to_arabic
>>> print(chinese_to_arabic.NumberAdapter.convert("四千三百万"))
43000000
poros_loss
Provide some loss functions, such as gravity loss, and dice loss usage:
from poros.poros_loss import GravityLoss
>>> gl = GravityLoss()
# [1, 2]
>>> input_a = torch.tensor([[1.0, 1]], requires_grad=True)
>>> input_b = torch.tensor([[1.0, 1]], requires_grad=True)
>>> target = torch.tensor([[4.0]])
>>> output = gl(input_a, input_b, target)
>>> torch.testing.assert_close(output, target)
clustering
from poros.poros_cluster import *
Thanks
PyCharm, Mircosoft Visual Studio Code
Release files for poros 0.0.73
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| poros-0.0.73.tar.gz | 41.9 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| poros-0.0.73-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 93.6 kB
Release files / poros-0.0.73.tar.gz
| Download URL | poros-0.0.73.tar.gz |
|---|---|
| Size | 41.9 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
65809c773d020753fd7ba93a53257f787469edb86793de6fc5628182ce03ae6c
|
|
BLAKE2b-256 checksum How to use checksums |
a71b07fd0a7f450de4cdcd9567dd7771aa6ca755147e3791a94a7e4cb70eac12
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/3.2.0 pkginfo/1.5.0.1 requests/2.22.0 setuptools/46.0.0.post20200309 requests-toolbelt/0.9.1 tqdm/4.65.0 CPython/3.7.6
|
Release files / poros-0.0.73-py3-none-any.whl
| Download URL | poros-0.0.73-py3-none-any.whl |
|---|---|
| Size | 51.6 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
9461c8036f6f78193e3e05795eb969cd4de0658e2a33772d5c08d0cb0296c1c2
|
|
BLAKE2b-256 checksum How to use checksums |
e437ca3d2900c4cba0ddfbe08c60f380f2456454873ba7797318dbb99ddafe06
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/3.2.0 pkginfo/1.5.0.1 requests/2.22.0 setuptools/46.0.0.post20200309 requests-toolbelt/0.9.1 tqdm/4.65.0 CPython/3.7.6
|