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
//! Reduce mean operation.

use crate::{
    builder, node_to_inner,
    nodes::{Axes, Node},
};

/// Reduce mean node.
pub struct ReduceMean {
    inner: Node,
}

impl ReduceMean {
    /// Creates new reduce mean operation.
    pub fn new<S: Into<String>, A: Into<Axes>>(input: S, axes: A, keepdims: bool) -> Self {
        ReduceMean {
            inner: builder::Node::new("ReduceMean")
                .input(input)
                .attribute("axes", axes.into())
                .attribute("keepdims", keepdims)
                .build(),
        }
    }
}

node_to_inner!(ReduceMean);