You should know what's in your model. Train locally.
-
Custom neural network implementation with:
- Configurable layer architecture via JSON
- Multiple activation functions (ReLU, Leaky ReLU, ELU, Sigmoid, Tanh, Softmax)
- Various optimizers (SGD, Adam, AdaGuard)
- Support for different loss functions (MSE, Categorical/Binary Cross-entropy)
- L2 regularization
- Early stopping
- Network visualization tools
-
Flask web interface for:
- Model training
- File uploads
- Status monitoring
- Clone the repository:
git clone https://github.com/gcox32/neuralnet.git- Install dependencies:
pip install -r requirements.txtfrom src import DenseLayer, NeuralNetwork
# Load architecture from JSON file
with open('data/architecture.json', 'r') as file:
architecture = json.load(file)
# Create neural network instance
net = NeuralNetwork(architecture=architecture, loss='categorical crossentropy', optimizer='sgd')
# Train the network
net.train(X_train, y_train, iterations=1000, learning_rate=0.01, decay=0.0, momentum=0.9)
# Make predictions
predictions = net.predict(X_test)
# Visualize the network
net.visualize_network()
# Visualize the validation accuracy
net.visualize_validation()
# Visualize the predictions
net.visualize_predictions(X_test, y_test)
# Save the model
net.save('data/model.pkl')
# Load the model
net = NeuralNetwork.load('data/model.pkl')yea, this is not even close to being done.
python app.pyThe network supports:
- Activation Functions: ReLU, Leaky ReLU, ELU, Sigmoid, Tanh, Softmax
- Loss Functions: MSE, Categorical Cross-entropy, Binary Cross-entropy
- Optimizers: SGD, Adam, AdaGuard
- Training Modes: Batch, Mini-batch, Stochastic
- Regularization: L2 regularization
- Early Stopping: Based on validation loss
seems like a good idea.
- Fork the repository
- Create your feature branch (
git checkout -b feature/amazing-feature) - Commit your changes (
git commit -m 'Add amazing feature') - Push to the branch (
git push origin feature/amazing-feature) - Open a Pull Request
This project is licensed under the MIT License - see the LICENSE file for details.
Grant Cox - @Grant07549375
Project Link: https://github.com/gcox32/neuralnet
- How do I do specifically so and so?
- No problem! Just do this.
Reach out to me at one of the following places!
- Website at
letmedemo.com - Twitter at
@Grant07549375