Module tensorflow::ops

source ·
Expand description

This module exposes functions for building standard operations.

Each operation has a struct which can be used as a builder and allows setting optional attributes:

MatMul::new().transpose_a(true).build(a, b, &mut scope)?;

and a function which is shorter when no attributes need to be set:

mat_mul(a, b, &mut scope)

Note that for some ops, the builder may always be required, because the op has required attributes with no default specified.