Delightful and useful neural networks models, including OrdinalRegressionLoss, etc.
Project description
handy-nn
Delightful and useful neural networks models, including OrdinalRegressionLoss, etc.
Install
$ pip install handy-nn
Usage
from handy_nn import OrdinalRegressionLoss
# Initialize the loss function
num_classes = 5
criterion = OrdinalRegressionLoss(num_classes)
# For training
logits = model(inputs) # Shape: (batch_size, 1)
loss = criterion(logits, targets)
loss.backward()
# To get class probabilities
probas = criterion.predict_probas(logits) # Shape: (batch_size, num_classes)
License
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
handy_nn-0.0.1.tar.gz
(4.3 kB
view details)
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file handy_nn-0.0.1.tar.gz.
File metadata
- Download URL: handy_nn-0.0.1.tar.gz
- Upload date:
- Size: 4.3 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/5.1.1 CPython/3.12.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
498f986e2aa41b2ea39d350d2383fc470daf48f2599cca702ed338e36c7a173f
|
|
| MD5 |
575d62531c09e891e0bd9aeee9b50fe2
|
|
| BLAKE2b-256 |
6a344ab80d31c7574fb6f081591525e9154df43f70f2f07dfcabd5d9c8c93a0c
|
File details
Details for the file handy_nn-0.0.1-py3-none-any.whl.
File metadata
- Download URL: handy_nn-0.0.1-py3-none-any.whl
- Upload date:
- Size: 4.8 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/5.1.1 CPython/3.12.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
4bbc56fc12ab6bed6ea7b0c36981118c016db12d21aa802d75da7a711bf1ada8
|
|
| MD5 |
0ace1f9547c01d7416213f86b5419491
|
|
| BLAKE2b-256 |
06e13822bf77566c9fd5fe8e6be2ec0967d031f8742373bca06b123c585a97a1
|