generated from OBJNULL/Dockerized-Rust
Compare commits
No commits in common. "e62131ba1f1e816521397b72bfc3333ba2d3349a" and "7f6a9c41c9c9b64ef0919a7e9e7d7c328966fa16" have entirely different histories.
e62131ba1f
...
7f6a9c41c9
7 changed files with 1 additions and 72 deletions
|
@ -1,21 +0,0 @@
|
||||||
// Libraries
|
|
||||||
use std::env;
|
|
||||||
|
|
||||||
// Enums
|
|
||||||
pub enum OperationMode {
|
|
||||||
Training,
|
|
||||||
Infrence,
|
|
||||||
}
|
|
||||||
|
|
||||||
// Functions
|
|
||||||
pub fn get_operation_mode() -> Option<OperationMode> {
|
|
||||||
// Getting command line arguments
|
|
||||||
let args: Vec<String> = env::args().collect();
|
|
||||||
|
|
||||||
// Getting operation mode
|
|
||||||
match &args[1] {
|
|
||||||
"training" => Some(OperationMode::Training),
|
|
||||||
"infrence" => Some(OperationMode::Infrence),
|
|
||||||
_ => None,
|
|
||||||
}
|
|
||||||
}
|
|
|
@ -1,26 +1,6 @@
|
||||||
// Libraries
|
// Libraries
|
||||||
mod config;
|
|
||||||
mod neural;
|
|
||||||
use neural::NeuralNetwork;
|
|
||||||
|
|
||||||
use std::error::Error;
|
|
||||||
|
|
||||||
// Entry-Point
|
// Entry-Point
|
||||||
fn main() {
|
fn main() {
|
||||||
// Getting Running Mode First
|
println!("Hello, world!");
|
||||||
let operation_mode = config::get_operation_mode();
|
|
||||||
|
|
||||||
// Creating a Neural Network
|
|
||||||
let neural: NeuralNetwork;
|
|
||||||
|
|
||||||
// Creating a Neural Network with the Operation Mode
|
|
||||||
match operation_mode {
|
|
||||||
None => panic!("Main: `OperationMode` not defined!"),
|
|
||||||
Some(mode) => {
|
|
||||||
neural = NeuralNetwork::new(mode);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
// Starting the network
|
|
||||||
neural.start();
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,30 +0,0 @@
|
||||||
// Libraries
|
|
||||||
mod data;
|
|
||||||
mod infrence;
|
|
||||||
mod model;
|
|
||||||
mod training;
|
|
||||||
|
|
||||||
use super::config::OperationMode;
|
|
||||||
|
|
||||||
// Structures
|
|
||||||
pub struct NeuralNetwork {
|
|
||||||
mode: OperationMode,
|
|
||||||
}
|
|
||||||
|
|
||||||
// Implementaions
|
|
||||||
impl NeuralNetwork {
|
|
||||||
// Constructors
|
|
||||||
pub fn new(mode: OperationMode) -> Self {
|
|
||||||
// Return Result
|
|
||||||
Self { mode }
|
|
||||||
}
|
|
||||||
|
|
||||||
// Functions
|
|
||||||
pub fn start(&self) {
|
|
||||||
// Switching based on mode
|
|
||||||
match self.mode {
|
|
||||||
OperationMode::Training => {}
|
|
||||||
OperationMode::Infrence => {}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
Loading…
Reference in a new issue