/external/tensorflow/tensorflow/contrib/boosted_trees/estimator_batch/ |
custom_export_strategy.py | 76 with ops.Graph().as_default() as graph: 77 with tf_session.Session(graph=graph) as sess: 81 ensemble_model = graph.get_operation_by_name(
|
/external/tensorflow/tensorflow/contrib/cudnn_rnn/python/kernel_tests/ |
cudnn_rnn_ops_test.py | 85 # set graph level random seed and numpy random seed. 514 with ops.Graph().as_default() as g: 515 with self.session(use_gpu=True, graph=g) as sess: 530 with ops.Graph().as_default() as g: 531 with self.session(use_gpu=True, graph=g) as sess: 572 # set graph level random seed and numpy random seed. [all...] |
/external/tensorflow/tensorflow/contrib/distribute/python/ |
combinations.py | 17 Here is an example of testing various optimizers in Eager and Graph mode: 21 combinations.combine(mode=["graph", "eager"], 28 Eager and 2 in Graph mode. 83 -- the "mode" argument can be either "eager" or "graph". It's "graph" by 103 ValueError - if "mode" argument wasn't either "eager" or "graph" or if other 154 mode = kwargs.pop("mode", "graph") 177 # TODO(priyag): Consider allowing tests in graph mode using soft 205 elif mode == "graph": 206 with ops.Graph().as_default(), context.graph_mode() [all...] |
keras_multi_worker_test.py | 232 # TODO(b/124171024): In between-graph replication, by default only the 239 # If in-graph, only the first worker calls callback methods. 259 with ops.Graph().as_default(): 309 mode=['graph'], 336 mode=['graph'], 395 mode=['graph'], 413 # without configuring the session (or building the graph) on PS.
|
/external/tensorflow/tensorflow/contrib/eager/python/examples/revnet/ |
revnet_test.py | 144 """Test model training in graph mode.""" 145 with tf.Graph().as_default(): 197 """Eager and graph benchmarks for RevNet."""
|
/external/tensorflow/tensorflow/contrib/framework/python/framework/ |
tensor_util_test.py | 361 with ops.Graph().as_default() as g:
|
/external/tensorflow/tensorflow/contrib/gan/python/estimator/python/ |
tpu_gan_estimator_test.py | 112 with ops.Graph().as_default():
|
/external/tensorflow/tensorflow/contrib/graph_editor/ |
subgraph.py | 15 """SubGraphView: a subgraph view on an existing tf.Graph. 74 """A subgraph view on an existing `tf.Graph`. 76 An instance of this class is a subgraph view on an existing `tf.Graph`. 77 "subgraph" means that it can represent part of the whole `tf.Graph`. 79 on the `tf.Graph`. Note that in this documentation, the term "subgraph" is 108 at all the underlying `tf.Graph` (remember, it is a view). It means that 116 before, this does not change at all the underlying `tf.Graph`. 161 data they observe (in this case, a `tf.Graph`). This is up to the user to 167 modified subgraph in place. This is typically the case of graph manipulation 169 `tf.Graph`. Since this modification is likely to render the subgraph vie 484 def graph(self): member in class:SubGraphView [all...] |
/external/tensorflow/tensorflow/contrib/opt/python/training/ |
agn_optimizer_test.py | 69 graph = ops.Graph() 71 with graph.as_default(): 127 graphs.append(graph)
|
drop_stale_gradient_optimizer_test.py | 61 graph = ops.Graph() 62 with graph.as_default(): 106 graphs.append(graph)
|
elastic_average_optimizer_test.py | 73 graph = ops.Graph() 75 with graph.as_default(): 138 graphs.append(graph) 203 ops.reset_default_graph() # restore on a new graph 259 ops.reset_default_graph() # restore on a new graph
|
/external/tensorflow/tensorflow/contrib/receptive_field/python/util/examples/ |
rf_benchmark.py | 221 """Constructs a model graph, returning GraphDef and end-points. 225 arg_sc: Optional arg scope to use in constructing the graph. 228 graph_def: GraphDef of constructed graph. 234 g = ops.Graph() 350 """Contructs model graph and desired end-points, and compute RF. 357 arg_sc: Optional arg scope to use in constructing the graph.
|
/external/tensorflow/tensorflow/contrib/recurrent/python/kernel_tests/ |
functional_rnn_test.py | 149 with ops.Graph().as_default() as graph: 168 with self.session(graph=graph) as sess: 174 graph_def = graph.as_graph_def()
|
/external/tensorflow/tensorflow/contrib/slim/python/slim/nets/ |
inception_v2_test.py | 77 with ops.Graph().as_default():
|
inception_v3_test.py | 80 with ops.Graph().as_default():
|
/external/tensorflow/tensorflow/contrib/timeseries/python/timeseries/ |
estimators_test.py | 103 with ops.Graph().as_default():
|
math_utils_test.py | 280 graph = ops.Graph() 281 with graph.as_default(): 296 with self.session(graph=graph) as session:
|
/external/tensorflow/tensorflow/core/grappler/optimizers/data/ |
graph_utils.cc | 44 std::vector<int> CreateNameIndex(const GraphDef& graph) { 46 for (int i = 0; i < graph.node_size(); ++i) { 47 names[graph.node(i).name()] = i; 49 std::vector<int> index(graph.node_size()); 72 MutableGraphView* graph) { 75 SetUniqueGraphNodeName(kConstOpName, graph->graph(), &node); 87 return graph->AddNode(std::move(node)); 92 NodeDef* AddScalarPlaceholder(DataType dtype, MutableGraphView* graph) { 95 SetUniqueGraphNodeName(node.op(), graph->graph(), &node) 125 DT_BOOL, [v](TensorProto* proto) { proto->add_bool_val(v); }, graph); member in namespace:tensorflow::grappler::graph_utils 131 DT_DOUBLE, [v](TensorProto* proto) { proto->add_double_val(v); }, graph); member in namespace:tensorflow::grappler 137 DT_FLOAT, [v](TensorProto* proto) { proto->add_float_val(v); }, graph); member in namespace:tensorflow [all...] |
/external/tensorflow/tensorflow/examples/tutorials/word2vec/ |
word2vec_basic.py | 160 graph = tf.Graph() 162 with graph.as_default(): 229 with tf.Session(graph=graph) as session: 231 writer = tf.summary.FileWriter(log_dir, session.graph) 250 # the graph in TensorBoard. 258 # Add metadata to visualize the graph for the last run.
|
/external/tensorflow/tensorflow/go/ |
graph_test.go | 26 func hasOperations(g *Graph, ops ...string) error { 34 return fmt.Errorf("Graph does not have the operations %v", missing) 49 return fmt.Errorf("Operations %v are missing from graph.Operations()", missing) 56 // Construct a graph 70 // Serialize the graph 76 // Import it into the same graph, with a prefix
|
session.go | 31 // Session drives a TensorFlow graph computation. 36 // After creating the session with a graph, the caller uses the Run() API to 49 // NewSession creates a new execution session with the associated graph. 51 func NewSession(graph *Graph, options *SessionOptions) (*Session, error) { 58 cSess := C.TF_NewSession(graph.c, cOpt, status.c) 126 // Run the graph with the associated session starting with the supplied feeds 162 // PartialRun allows the caller to pause the evaluation of a graph, run 163 // arbitrary code that depends on the intermediate computation of the graph, 164 // and then resume graph execution. The results of the arbitrary code can b [all...] |
/external/tensorflow/tensorflow/lite/python/ |
convert_saved_model_test.py | 17 - Tests converting simple SavedModel graph to TFLite FlatBuffer. 18 - Tests converting simple SavedModel graph to frozen graph. 50 sess.graph, ["Placeholder"]) 61 convert_saved_model.get_tensors_from_tensor_names(sess.graph, 294 with session.Session(graph=ops.Graph()) as sess:
|
/external/tensorflow/tensorflow/python/compiler/tensorrt/test/ |
quantization_mnist_test.py | 117 use_trt: whether use TF-TRT to convert the graph. 124 graph = ops.Graph() 125 with self.session(graph=graph) as sess: 126 with graph.device('/GPU:0'):
|
/external/tensorflow/tensorflow/python/framework/ |
convert_to_constants_test.py | 42 """Determines if a StatefulPartitionedCall op exists in the graph.""" 49 """Returns the number of ReadVariableOp in the graph.""" 55 sess.graph.get_tensor_by_name(tensor.name) for tensor in tensor_list 60 with ops.Graph().as_default() as graph: 62 func.add_to_graph(graph) 63 sess = session.Session(graph=graph) 83 variable_graph_def = input_func.graph.as_graph_def() 89 constant_graph_def = output_func.graph.as_graph_def( [all...] |
/external/tensorflow/tensorflow/python/keras/saving/ |
saving_utils_test.py | 173 """Import a SavedModel into a TF 1.x-style graph and run `signature_key`.""" 174 graph = ops.Graph() 175 with graph.as_default(), session_lib.Session() as session: 182 feed_dict[graph.get_tensor_by_name(signature.inputs[arg_name].name)] = ( 186 output_dict[output_name] = graph.get_tensor_by_name(
|