pub struct OperationDescription<'a> { /* private fields */ }
Expand description

An OperationDescription is an Operation in the process of being built (i.e. the builder pattern).

An OperationDescription is required to be finished before the graph goes out of scope, so finish() will be called on drop if it was not already called.

Implementations

Builds the operation and adds it to the graph.

Sets the preferred device. The empty string means unconstrained.

Adds an input to this operation.

The index in the port is an index into the source operation’s output array.

Adds multiple inputs to this operation.

The index in the ports is an index into the source operation’s output array.

Adds a control input.

Sets the value of a string attribute.

Sets the value of an attribute which holds a list of strings.

Sets the value of a function attribute.

Sets an int-valued attribute.

Sets an attribute which holds an array of ints.

Sets a float-valued attribute.

Sets an attribute which holds an array of floats.

Sets a boolean-valued attribute.

Sets an attribute which holds an array of booleans.

Sets a type-valued attribute.

Sets an attribute which holds an array of types.

Sets a shape-valued attribute.

Sets an attribute which holds an array of shapes.

Sets an attribute with a TensorShapeProto protobuf.

Sets an attribute with an array of TensorShapeProto protobufs.

Sets a tensor-valued attribute.

Sets an attribute which holds an array of tensors.

👎Deprecated since 0.7.0:

Use set_attr_value_proto instead.

Sets an attribute with an AttrValue proto.

Sets an attribute with an AttrValue proto.

Trait Implementations

Formats the value using the given formatter. Read more

Executes the destructor for this type. Read more

Auto Trait Implementations

Blanket Implementations

Gets the TypeId of self. Read more

Immutably borrows from an owned value. Read more

Mutably borrows from an owned value. Read more

Returns the argument unchanged.

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

The type returned in the event of a conversion error.

Performs the conversion.

The type returned in the event of a conversion error.

Performs the conversion.