use crate::{Graph, NodeId, Op, Shape};
impl Graph {
pub fn reshape(&mut self, input: NodeId, new_shape: Vec<i64>, out_shape: Shape) -> NodeId {
self.push(Op::Reshape { new_shape }, vec![input], out_shape, None)
}
pub fn gather(&mut self, table: NodeId, indices: NodeId, axis: usize, shape: Shape) -> NodeId {
self.push(Op::Gather { axis }, vec![table, indices], shape, None)
}
pub fn concat(&mut self, inputs: Vec<NodeId>, axis: usize, shape: Shape) -> NodeId {
self.push(Op::Concat { axis }, inputs, shape, None)
}
}