Convert

Convert // Convert a tensor from one element type to another

Description

Long description

Inputs

Name Element Type Shape
arg Any Any

Attributes

Name Type Notes
element_type ngraph::element::type The element type of the result

Outputs

Name Element Type Shape
output element_type Same as arg

Backprop

\[\overline{\mathtt{arg}} \leftarrow \mathtt{Convert}(\Delta,\mathtt{arg->get_element_type()})\]

C++ Interface

class Convert : public ngraph::op::Op

Elementwise type conversion operation.

Public Functions

Convert(const std::shared_ptr<Node> &arg, const ngraph::element::Type &element_type)

Constructs a conversion operation.

Parameters
  • arg: Node that produces the input tensor.
  • element_type: Element type for the output tensor.

void validate_and_infer_types()

Throws if the node is invalid.