How adynascimento/deep-learning works
This repository is a from-scratch Go machine-learning library. Its main user workflow is to configure an MLP or CNN, train it on sample-first data, then predict/evaluate and optionally save or reload the model. CNNs add convolution, pooling, flattening, and dense stages; MLPs train dense networks directly. Separate capabilities provide hyperparameter search, numerical utilities, and NLP vectorization. The graph reflects README-documented features and sampled source relationships; some unsampled implementations are represented at their exact tree paths, without assuming unverified calls.
Main entry points: cnn/train.go CNN Training · mlp/train.go MLP Training · dense.go Dense Layers · activation.go Activations and Loss
Components 24
Neural Models
- MLP Configuration
mlp/model.go - MLP Training
mlp/train.go - MLP Serialization
mlp/dataio.go - CNN Configuration
cnn/model.go - CNN Training
cnn/train.go - Convolution
cnn/convlayer.go - Max Pooling
cnn/poolinglayer.go - Flatten Layer
cnn/flatten.go - CNN Serialization
cnn/dataio.go - Dense Layers
nncore/dense.go - Activations and Loss
nncore/activation.go - Optimizers
nncore/optimizer.go
Search and Optimization
- Hyperparameter Search
hyperopt/hyperopt.go - Search Sampling
hyperopt/sampler.go - MLP Search Adapter
mlp/hyperopt.go - CNN Search Adapter
cnn/hyperopt.go
Math Utilities
- Matrix Operations
ngo/matrix.go - Convolution Math
ngo/convolution.go - Standard Scaler
ngo/scaler.go - PCA
ngo/pca.go - Numeric Helpers
ngo/floats.go
Text Features
- Bag of Words
nlp/bow.go - TF-IDF
nlp/tfidf.go
Other components
- Library User
Connections 28
- Library User → MLP Configuration: configures
README.md - MLP Configuration → MLP Training: creates trainer
mlp/model.go - MLP Training → Dense Layers: trains
mlp/train.go - MLP Training → Activations and Loss: uses modes
- MLP Training → MLP Serialization: saves model
README.md - Library User → CNN Configuration: configures
README.md - CNN Configuration → CNN Training: creates trainer
cnn/model.go - CNN Training → Convolution: runs convolution
cnn/train.go - CNN Training → Max Pooling: runs pooling
cnn/train.go - CNN Training → Flatten Layer: flattens output
cnn/train.go - CNN Training → Dense Layers: runs dense stage
cnn/train.go - CNN Training → Optimizers: updates parameters
README.md - CNN Training → CNN Serialization: saves model
README.md - Convolution → Convolution Math: uses
cnn/convlayer.go - Convolution → Activations and Loss: applies activation
- Dense Layers → Optimizers: updates parameters
nncore/dense.go - Dense Layers → Activations and Loss: applies activation
nncore/dense.go - MLP Search Adapter → Hyperparameter Search: delegates search
mlp/hyperopt.go - CNN Search Adapter → Hyperparameter Search: delegates search
cnn/hyperopt.go - Hyperparameter Search → Search Sampling: samples parameters
- Library User → Standard Scaler: transforms data
README.md - Library User → PCA: reduces dimensions
README.md - Library User → Bag of Words: vectorizes text
README.md - Library User → TF-IDF: weights text
README.md - TF-IDF → Bag of Words: uses counts
nlp/tfidf.go - TF-IDF → Matrix Operations: multiplies weights
nlp/tfidf.go - Activations and Loss → Matrix Operations: uses operations
nncore/activation.go - Optimizers → Matrix Operations: updates with
nncore/optimizer.go