Module neuroflow::io
[−]
[src]
The module contains functions, structs, enums, and traits for input/output neural networks. E. g. it can save network to the file and then loads it back.
Example
Saving of neural network:
use neuroflow::FeedForward; use neuroflow::io; let mut nn = FeedForward::new(&[2, 2, 1]); /* train here your neural network */ io::save(&nn, "test.flow");
Restoring of neural network:
use neuroflow::FeedForward; use neuroflow::io; let mut new_nn: FeedForward = io::load("test.nn") .unwrap_or(FeedForward::new(&[2, 2, 1]));
Functions
from_json |
Function for deserializing of JSON to NN struct |
load |
Loads and restores the neural network from file. |
save |
Saves given neural network to file specified by |
to_json |
Future function for saving in JSON string. return: JSON string |