PyTensorForge is a lightweight Python machine learning framework designed for learning, experimentation, and rapid prototyping. It provides a modular core for tensor operations, neural network layers, activation functions, optimizers, loss metrics, and model definitions.
- Core tensor and scalar abstractions for numerical computation
- Layer-based neural network support with dense and sequential model building
- Common activation functions such as ReLU, Sigmoid, Tanh, ELU, and SELU
- Standard optimization algorithms with SGD and batch optimization
- Loss functions including mean squared error, mean absolute error, and binary cross-entropy
- Weight initialization utilities with Glorot, He, LeCun, and zeros initializers
- Model implementations for regression and logistic classification
src/core/– Tensor, scalar, matrix, and vector primitivessrc/neural/– Neural layer abstractions, parameters, and dense layerssrc/activations/– Activation function implementationssrc/optimizer/– Optimizer base classes and SGD implementationsrc/loss/– Loss function abstractions and implementationssrc/initializers/– Weight initializer utilitiessrc/models/– High-level model APIs for regression, classification, and sequential modelssrc/scaling/– Data scaling utilitiespredict/– Prediction utilities and example datasetstest/– Unit tests and example usage scripts
-
Clone the repository:
git clone https://github.com/<your-username>/PyTensorForge.git cd PyTensorForge
-
Install dependencies (if any):
pip install -r requirements.txt
Note: This repository is intended for educational use and may require additional dependencies depending on the development environment.
Import components from the package and build models using the provided modules. Example:
from src.neural.Dense import Dense
from src.neural.Layer import Layer
from src.optimizers.SGD import SGD
from src.loss.MSE import MSERefer to the test/ directory for example scripts and usage patterns.
Contributions are welcome. Please open an issue or submit a pull request for feature requests, bug fixes, or documentation improvements.
This project is provided under the terms of the repository license. Check the project root for license details.