dnnpy Framework
Installation
pip install dnnpy
Example usage
from dnnpy.activations import ReLU
from dnnpy.data import make_regression_data
from dnnpy.layers import Sequential, Dense, Dropout
from dnnpy.loss_functions import MAELoss
from dnnpy.optimizers import Adam
from dnnpy.train import train
from dnnpy.utils import split_data
import matplotlib.pyplot as plt
n_inputs = 10
hidden_units = 32
n_outputs = 1
x, y = make_regression_data(n_samples=1000, n_features=n_inputs, n_labels=1)
(x_train, y_train), (x_test, y_test) = split_data(x, y, ratio=0.7)
model = Sequential(Dense(in_features=n_inputs, out_features=hidden_units, activation=ReLU()),
Dropout(0.3),
Dense(in_features=hidden_units, out_features=n_outputs))
opt = Adam(model.parameters(), lr=1e-3)
loss_func = MAELoss()
train_loss, valid_loss = train(data=(x_train, y_train), network=model, loss=loss_func, optimiser=opt, epochs=30,
batch_size=16)
plt.plot(train_loss, label='train')
plt.plot(valid_loss, label='val')
plt.legend()
plt.show()
Metadata
Release files for dnnpy 0.0.1
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 |
|---|---|---|---|---|
| dnnpy-0.0.1.tar.gz | 17.5 kB | Without provenance | Details for dnnpy-0.0.1.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| dnnpy-0.0.1-py3-none-any.whl | Python 3 | none | any | Details for dnnpy-0.0.1-py3-none-any.whl |
Total release size: 38.5 kB
Release files / dnnpy-0.0.1.tar.gz
| Download URL | dnnpy-0.0.1.tar.gz |
|---|---|
| Size | 17.5 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
f38c126f976305b50c9f6c33a822d476c9ddd823a20c0ca4a9734f988d89b834
|
|
BLAKE2b-256 checksum How to use checksums |
6eb66bc1e4fefd9b20f22f825ac9218cdb33b8445930fc7d98c0d3343e7d4c87
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/3.1.1 pkginfo/1.5.0.1 requests/2.22.0 setuptools/46.3.1 requests-toolbelt/0.9.1 tqdm/4.45.0 CPython/3.7.6
|
Release files / dnnpy-0.0.1-py3-none-any.whl
| Download URL | dnnpy-0.0.1-py3-none-any.whl |
|---|---|
| Size | 21.0 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
384f98514e192fdfab5bf8a33be83a705b08919b0d17e8c4378fd69cbf11a5f5
|
|
BLAKE2b-256 checksum How to use checksums |
9e2df2f12f7ddd671f418dcd38a87bbbb661d6fb8902fadc045332d186963583
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/3.1.1 pkginfo/1.5.0.1 requests/2.22.0 setuptools/46.3.1 requests-toolbelt/0.9.1 tqdm/4.45.0 CPython/3.7.6
|
Security for dnnpy 0.0.1
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.