This is a machine learning--more specifically deep learning--library from my independent study on deep learning. This library is both a result of my learning and a tool for AI development.
Project description
Deeplearning Package
Overview
This package is designed to be similar to the PyTorch system of a building block system, providing functions that can be mixed, matched, and customized for any given model. It implements core deep learning concepts including automatic differentiation, sequential modeling, and various layer types.
Modules
This project has six main modules:
autogradient.pysequence.pyoptimizer.pyneural_net.pycnn_layers.pyrnn_layers.py
All of which are automatically part of the initial import of the package.
Detailed Module Descriptions
autogradient.py
This module forms the core of the automatic differentiation system. It introduces the Values class, which tracks computational history to compute gradients.
ValuesClass: Encapsulates numerical values (vals) and their corresponding gradients (grad).- Broadcasting Support: Includes a sophisticated
_broadcast_gradstatic method that automatically handles gradient shape adjustments during backpropagation when operations involve broadcasted NumPy arrays (e.g., adding a bias vector to a matrix). - Operations: Supports a wide array of operations including arithmetic (
+,-,*,/,@,**), activation functions (relu,tanh,softmax), and tensor manipulations (reshape,transpose,pad,sum,mean,max, and slicing/indexing).
rnn_layers.py (New)
This module provides implementations for Recurrent Neural Networks, suitable for sequential data processing.
RNNCell: The fundamental building block for recurrent layers, performing the basic hidden state update: $h_t = \text{activation}(W_{ih} x_t + b_{ih} + W_{hh} h_{t-1} + b_{hh})$.RNNLayer: A high-level wrapper that processes entire sequences, maintaining hidden states across time steps and supporting both many-to-many and many-to-one architectures.
cnn_layers.py
Implements fundamental building blocks for Convolutional Neural Networks.
Convo2D: Supports 'valid' and 'same' padding, custom strides, and automated gradient computation for kernels.- Pooling: Includes
MaxPoolingandAvgPoolingfor spatial down-sampling.
neural_net.py
Defines high-level components for model construction.
Layer&Dense: Fully connected layers with customizable activations.Dropout: Regularization technique to prevent overfitting by randomly zeroing activations during training.Model: The central class for training. It handles the training loop, batching, and integration with loss functions (cross_entropy_loss,mse_loss) and penalty functions (l1_reg,l2_reg).
optimizer.py
Implements parameter update algorithms: Optim_SGD, Optim_SGD_Momentum, Optim_AdaGrad, Optim_RMSPropclass, and Optim_Adam.
sequence.py
Provides the Sequence container to stack layers and manage parameter retrieval across the model.
Dependencies
The package relies heavily on numpy for numerical operations and gradient tracking.
Project details
Release history Release notifications | RSS feed
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 rb_deeplearning_lib-0.5.2.tar.gz.
File metadata
- Download URL: rb_deeplearning_lib-0.5.2.tar.gz
- Upload date:
- Size: 14.2 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.12.13
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
439e6437a70146b972c41ada469264c8aec3be6fbe26819783f8ebd829ed68e8
|
|
| MD5 |
4b994b8814f5c544f9173b96a59633a3
|
|
| BLAKE2b-256 |
b8509f89ccb9faa34a0e7555ea9403449a2b3da89537f391491154c3e1787e6f
|
File details
Details for the file rb_deeplearning_lib-0.5.2-py3-none-any.whl.
File metadata
- Download URL: rb_deeplearning_lib-0.5.2-py3-none-any.whl
- Upload date:
- Size: 15.1 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.12.13
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
e0317da6ba8ca0952050e44d3bc093771ccd4994356ef0ce73c1bc565a1c0513
|
|
| MD5 |
69a6dc4b3b0030a77fd5044da7936bce
|
|
| BLAKE2b-256 |
6b578d186d5bbef77f6908c291e333e6b35c58e93b26b37e80714b6657c92ca8
|