How pustoslov/neural-kt works
• Neural Network Library Module (NeuralNetLib):
– Contains the core implementations: NeuralNet1L, NeuralNet2L, and NeuralNet3L.
– Organized under package com.github.pustoslov.NeuralNetLib.
– Represents the “engine” of the project that handles network creation, training, weight management, and querying.
• Sample Application:
– Located in src/main/kotlin with Main.kt.
– Demonstrates how to use the NeuralNetLib, including loading the MNIST dataset (CSV files in src/main/resources).
• Data Resources:
– Training and testing CSV files (e.g., test.csv and train.csv) that provide the MNIST dataset for experimentation.
• Build and Configuration Components:
– Gradle build scripts (build.gradle.kts, settings.gradle.kts, gradle wrapper files) that orchestrate the build, dependency inclusion, and configuration.
– README instructions on how to add the dependency for using the library in other projects.
Component Relationships and Data Flows
• The Sample Application (Main.kt) acts as a client:
– It initializes a neural network object (e.g., NeuralNet1L).
– Passes the input data (from CSV files) into the neural network.
– Invokes the training (train()) and querying (query()) methods, representing data flow from the application to the library.
• Inside the Neural Network Library:
– Show interactions between methods: for example, weights being set or retrieved using getWeights() and setWeights().
Important Architectural Patterns and Design Principles
• Modularity: The project is split into a reusable library (NeuralNetLib) and an application demonstration.
• Encapsulation: The neural network details (e.g., architecture parameters, learning rate) are encapsulated within dedicated classes.
• Flexibility/Extensibility: Multiple neural network variants (1L, 2L, 3L) are provided, which hints at a design that allows easy extension or variation in network architecture.
Relevant Technologies and Frameworks
• Programming Language: Kotlin.
• Build Tool: Gradle (with both Groovy and Kotlin DSL support, as evident in build.gradle and build.gradle.kts).
• External Dependency: Instructions in the README show how to pull the neural network library from the jitpack.io repository.
• Data Input: CSV formatted files to simulate a dataset (in this case, MNIST).