Description of the Deep Learning Library Sapphire
Introduction
This documentation is dedicated to a deep learning library designed for the efficient creation and training of machine learning models.
Installation
To install the library, run the following command:
pip install SapphireDL
Key Features
Example for XOR
1. Creating a Model
The library allows you to easily create complex neural networks using high-level APIs.
import numpy as np
from sapphiredl.training import train
from sapphiredl.neural_networks import NeuralNetwork
from sapphiredl.layers import LinearLayer, HypTan
inputs = np.array([
[0, 0],
[1, 0],
[0, 1],
[1, 1]
])
targets = np.array([
[1, 0],
[0, 1],
[0, 1],
[1, 0]
])
nn = NeuralNetwork([
LinearLayer(input_size=2, output_size=2),
HypTan(),
LinearLayer(input_size=2, output_size=2)
])
2. Training the Model
Training models becomes simple with built-in methods.
num_epochs = 5000
train(neural_network=nn, inputs=inputs, targets=targets, epochs_count=num_epochs)
3. Prediction
After training, you can use the model to predict new data.
for x, y in zip(inputs, targets):
predicted = nn.forward(x)
print(x, predicted, y) # np.round(predicted, decimals=7)
API Documentation
For more detailed information about each method and class in the library, please refer to the API documentation.
Additional Resources
Metadata
Release files for SapphireDL 0.1.6
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| sapphiredl-0.1.6.tar.gz | 15.0 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| SapphireDL-0.1.6-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 37.4 kB
Release files / sapphiredl-0.1.6.tar.gz
| Download URL | sapphiredl-0.1.6.tar.gz |
|---|---|
| Size | 15.0 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
52e0e84aa32babb78aa7421dd449f40b37ad8212e7d17b8ce8bced4d03216f5e
|
|
BLAKE2b-256 checksum How to use checksums |
7d7cee65e21f3ddfbee061f1020cd490ccbfcf9fa33f2ad029e760852c50386a
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/5.1.1 CPython/3.12.2
|
Release files / SapphireDL-0.1.6-py3-none-any.whl
| Download URL | SapphireDL-0.1.6-py3-none-any.whl |
|---|---|
| Size | 22.4 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
0e1dd923b99bcdd6bf07064a7ffb78d2ad880a0597a62ea75c0f1b9e83168af6
|
|
BLAKE2b-256 checksum How to use checksums |
dc96a7d13a01b1e2407a15af02c1f354a0954c6bf7e75270785adb1ed5f41e61
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/5.1.1 CPython/3.12.2
|