How ulichovick/ann_fashion_mnist works
Project Overview & Purpose
• This is a Flask-based web application that provides endpoints for working with neural networks.
• It integrates two different neural network implementations – one built using pure NumPy and one using TensorFlow – which serve for different experimentation or performance use cases.
• The application is designed to offer front-end interactions (through templates, static assets) and back-end processing via its neural network modules.
Main Components
a. Frontend (Web Presentation Layer)
• Templates: Located in the “templates” directory. These include base.html, index.html, predict.html, train.html, etc.
• Static Assets: Including CSS, JavaScript, graphics, and Sass files in the “static” directory that define the look-and-feel.
b. Flask Application (Backend Server)
• Flask initialization and route management (likely initiated via the “init_flask” directory and “network.py” script). This is the glue that connects the HTTP requests from the browser to the business logic.
c. Neural Network Modules
• NumPy Network Component:
• Directory: “numpy_network”
• Contains scripts for activation neurons, backpropagation, forward propagation, cost, data preparation, parameters initialization, updating, predictions, and model training/evaluation.
• Also includes pre-generated score files and a “parameters.npy” file.
• TensorFlow Network Component:
• Directory: “tf_network”
• Contains similar functionality for data preparation, model creation, compilation, and prediction specific to TensorFlow (including a pre-trained or pre-built model “ann_tf_fashmnist.h5”).
d. Configuration & Dependencies
• Files: requirements.txt, LICENSE, and additional configuration files that help manage project dependencies.
Relationships and Interactions
• The Flask server acts as the central hub, receiving requests from the client’s browser (through the UI) and then delegating tasks.
• For operations related to prediction or training:
• The Flask routes (web API) will call either the NumPy-based or the TensorFlow-based neural network processing.
• Static assets and templates flow from the server to the client, while the neural network modules work behind the scenes to process data, train models, and return results.
Architectural Patterns & Design Principles
• Modular Design: Emphasize the modular nature of the neural network components. Each (numpy_network and tf_network) is encapsulated and could be updated independently.
• MVC-Like Structure: The “templates” (view) and “init_flask”/”network.py” (controller and model management logic) indicate an approach similar to MVC.