.. java:import:: org.tensorflow DataType .. java:import:: org.tensorflow Graph .. java:import:: org.tensorflow Output .. java:import:: org.tensorflow Tensor GraphBuilder ============ .. java:package:: ch.epfl.leb.defcon.utils :noindex: .. java:type:: public class GraphBuilder Appends various operations to TensorFlow graphs. :author: Baptiste Ottino **See also:** \ `Output | TensorFlow `_\, \ `Graph | TensorFlow `_\ Methods ------- constant ^^^^^^^^ .. java:method:: public static Output constant(Graph g, String name, Object value, Class type) :outertype: GraphBuilder Builds an Output tensor with a single scalar value. :param : :param g: The TensorFlow graph to modify. :param name: The full name of the operation. :param value: The value output by the operation. :param type: The output datatype. :return: Symbolic handle to the tensor produced by the appended operation. constant ^^^^^^^^ .. java:method:: public static Output constant(Graph g, String name, int value) :outertype: GraphBuilder Builds an Output tensor with a single scalar value. :param g: The TensorFlow graph to modify. :param name: The full name of the operation. :param value: The value output by the operation. :return: Symbolic handle to the tensor produced by the appended operation. expandDims ^^^^^^^^^^ .. java:method:: public static Output expandDims(Graph g, String name, Output input, Output dim) :outertype: GraphBuilder 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) :param : :param g: The TensorFlow graph to modify. :param name: The full name of the operation. :param input: The input operation to expand. :param dim: :return: Symbolic handle to the tensor produced by the appended operation.