1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58
mod add; mod constant; mod div; mod mul; mod neg; mod pow; mod reduce_mean; mod reduce_sum; mod sqrt; mod sub; pub use self::add::*; pub use self::constant::*; pub use self::div::*; pub use self::mul::*; pub use self::neg::*; pub use self::pow::*; pub use self::reduce_mean::*; pub use self::reduce_sum::*; pub use self::sqrt::*; pub use self::sub::*; #[macro_export] macro_rules! node_to_inner { ( $t: ty ) => { impl Into<crate::nodes::Node> for $t { fn into(self) -> crate::nodes::Node { self.inner } } impl Into<onnx_pb::NodeProto> for $t { fn into(self) -> onnx_pb::NodeProto { self.inner.into() } } impl Into<String> for &$t { fn into(self) -> String { (&self.inner).into() } } impl AsRef<crate::nodes::Node> for $t { #[inline(always)] fn as_ref(&self) -> &crate::nodes::Node { &self.inner } } impl AsRef<onnx_pb::NodeProto> for $t { #[inline(always)] fn as_ref(&self) -> &onnx_pb::NodeProto { &self.inner.inner } } }; }