Library for simple DL structure
Project description
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
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
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 sapphiredl-0.1.6.tar.gz.
File metadata
- Download URL: sapphiredl-0.1.6.tar.gz
- Upload date:
- Size: 15.0 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/5.1.1 CPython/3.12.2
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
52e0e84aa32babb78aa7421dd449f40b37ad8212e7d17b8ce8bced4d03216f5e
|
|
| MD5 |
54e5b31b0fdb228f48500658ff8c9666
|
|
| BLAKE2b-256 |
7d7cee65e21f3ddfbee061f1020cd490ccbfcf9fa33f2ad029e760852c50386a
|
File details
Details for the file SapphireDL-0.1.6-py3-none-any.whl.
File metadata
- Download URL: SapphireDL-0.1.6-py3-none-any.whl
- Upload date:
- Size: 22.4 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/5.1.1 CPython/3.12.2
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
0e1dd923b99bcdd6bf07064a7ffb78d2ad880a0597a62ea75c0f1b9e83168af6
|
|
| MD5 |
7a3e4d4f08982e6de6b5207f24c379ab
|
|
| BLAKE2b-256 |
dc96a7d13a01b1e2407a15af02c1f354a0954c6bf7e75270785adb1ed5f41e61
|