GraphBuilder¶
-
public class
GraphBuilder
¶ Appends various operations to TensorFlow graphs.
Author: Baptiste Ottino See also: Output | TensorFlow, Graph | TensorFlow
Methods¶
constant¶
-
public static <T> Output<T>
constant
(Graph g, String name, Object value, Class<T> type)¶ Builds an Output tensor with a single scalar value.
Parameters: - <T> –
- g – The TensorFlow graph to modify.
- name – The full name of the operation.
- value – The value output by the operation.
- type – The output datatype.
Returns: Symbolic handle to the tensor produced by the appended operation.
constant¶
-
public static Output<Integer>
constant
(Graph g, String name, int value)¶ Builds an Output tensor with a single scalar value.
Parameters: - g – The TensorFlow graph to modify.
- name – The full name of the operation.
- value – The value output by the operation.
Returns: Symbolic handle to the tensor produced by the appended operation.
expandDims¶
-
public static <T> Output<T>
expandDims
(Graph g, String name, Output<T> input, Output<Integer> dim)¶ Adds a dimension to a TensorFlow Output tensor. The dimension as added at the position “dim.” (with numpy/tensorflow syntax: 0 for the first position, -1 in the end)
Parameters: - <T> –
- g – The TensorFlow graph to modify.
- name – The full name of the operation.
- input – The input operation to expand.
- dim –
Returns: Symbolic handle to the tensor produced by the appended operation.