1pub type Operand = u8;
2
3#[derive(Debug)]
4pub enum Operation {
5 Add,
6 Dot,
7 LeakyRelu(f32),
8}
9
10pub mod add {
11 use super::*;
12 pub fn operation() -> Operation { Operation::Add }
13 pub mod operands {
14 pub fn input() -> super::Operand { 0 }
15 }
16}
17
18pub mod dot {
19 use super::*;
20 pub fn operation() -> Operation { Operation::Dot }
21 pub mod operands {
22 pub fn input() -> super::Operand { 0 }
23 pub fn weights() -> super::Operand { 1 }
24 }
25}
26
27pub mod leaky_relu {
28 use super::*;
29 pub fn operation(param: f32) -> Operation { Operation::LeakyRelu(param) }
30 pub mod operands {
31 pub fn input() -> super::Operand { 0 }
32 }
33}