onnx_helpers/nodes/ops/
mod.rs1mod abs;
2mod add;
3mod and;
4mod concat;
5mod constant;
6mod div;
7mod equal;
8mod greater;
9mod less;
10mod mul;
11mod neg;
12mod not;
13mod or;
14mod pow;
15mod reduce_max;
16mod reduce_mean;
17mod reduce_min;
18mod reduce_sum;
19mod relu;
20mod size;
21mod sqrt;
22mod sub;
23mod tanh;
24
25pub use self::abs::*;
26pub use self::add::*;
27pub use self::and::*;
28pub use self::concat::*;
29pub use self::constant::*;
30pub use self::div::*;
31pub use self::equal::*;
32pub use self::greater::*;
33pub use self::less::*;
34pub use self::mul::*;
35pub use self::neg::*;
36pub use self::not::*;
37pub use self::or::*;
38pub use self::pow::*;
39pub use self::reduce_max::*;
40pub use self::reduce_mean::*;
41pub use self::reduce_min::*;
42pub use self::reduce_sum::*;
43pub use self::relu::*;
44pub use self::size::*;
45pub use self::sqrt::*;
46pub use self::sub::*;
47pub use self::tanh::*;
48
49#[macro_export]
50macro_rules! node_to_inner {
51 ( $t: ty ) => {
52 impl Into<crate::nodes::Node> for $t {
53 #[inline(always)]
54 fn into(self) -> crate::nodes::Node {
55 self.inner
56 }
57 }
58
59 impl Into<onnx_pb::NodeProto> for $t {
60 #[inline(always)]
61 fn into(self) -> onnx_pb::NodeProto {
62 self.inner.into()
63 }
64 }
65
66 impl Into<String> for &$t {
67 #[inline(always)]
68 fn into(self) -> String {
69 (&self.inner).into()
70 }
71 }
72
73 impl AsRef<crate::nodes::Node> for $t {
74 #[inline(always)]
75 #[inline(always)]
76 fn as_ref(&self) -> &crate::nodes::Node {
77 &self.inner
78 }
79 }
80 };
81}