Trait tensorflow::expr::ExprImpl
source · pub trait ExprImpl<T: TensorType>: Display + Debug {
// Required methods
fn op_level(&self) -> OpLevel;
fn children(&self) -> Vec<Box<dyn AnyExpr>>;
fn create_operation(
&self,
graph: &mut Graph,
children: &[Operation],
id_gen: &mut dyn FnMut() -> String
) -> Result<Operation, Status>;
fn derivative_by_variable(&self, var: &str) -> Result<Expr<T>, Status>;
// Provided method
fn shape_hint(&self) -> ShapeHint<'_> { ... }
}
Expand description
Trait implemented by all expression types. Most users will want to store an Expr instead.
Required Methods§
sourcefn children(&self) -> Vec<Box<dyn AnyExpr>>
fn children(&self) -> Vec<Box<dyn AnyExpr>>
Returns the child expressions.
For example, the child expressions of x + y
would be x
and y
.
Provided Methods§
sourcefn shape_hint(&self) -> ShapeHint<'_>
fn shape_hint(&self) -> ShapeHint<'_>
Returns a hint about the expression’s shape.