Crates.io | esp-idf-triton |
lib.rs | esp-idf-triton |
version | 0.1.6 |
source | src |
created_at | 2024-01-24 17:35:41.691088 |
updated_at | 2024-01-26 12:19:12.721711 |
description | Embedded neural network forward feeding for precompiled models created by the triton_grow crate |
homepage | |
repository | |
max_upload_size | |
id | 1112644 |
size | 146,739 |
esp-idf-triton can be used to run precompiled ML models created by the main triton crate. Creating a model in a Triton program and using the network.serialize_triton_fmt("out.triton");
will create a .triton file that is compatible with being deserialized by esp-idf-triton.
File IO support is soon to come, but as a quick proof of concept esp-idf-triton can currently parse neural network strings copied from the .triton file and perform forwards predictions.
let model_str = "D|3|2|10.845654 11.002682 -13.501029 -14.699452 -53.440483 -53.715294|
-6.101849 49.06853 61.28852#D|1|3|30.350481 -78.40228 70.861206|-19.532055#D|1|1|15.161753|-3.7315714".to_string();
let mut xor_net = Network::deserialize_triton_fmt_string(model_str);
creates a simple Network based on a trained SIGMOID XoR predictor.
The .triton file format currently defaults to SIGMOID activations, but its a top priority to implement activation function support in this file format
Licensed under the Apache License, Version 2.0 http://www.apache.org/licenses/LICENSE-2.0 or the MIT license http://opensource.org/licenses/MIT, at your option. This file may not be copied, modified, or distributed except according to those terms.