MCPcopy Create free account
hub / github.com/DeepRec-AI/DeepRec / Graph

Method Graph

tensorflow/core/graph/graph.cc:376–402  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

374// Graph
375
376Graph::Graph(const OpRegistryInterface* ops)
377 : ops_(ops, FunctionDefLibrary()),
378 versions_(new VersionDef),
379 arena_(8 << 10 /* 8kB */) {
380 versions_->set_producer(TF_GRAPH_DEF_VERSION);
381 versions_->set_min_consumer(TF_GRAPH_DEF_VERSION_MIN_CONSUMER);
382
383 // Initialize the name interning table for assigned_device_name.
384 device_names_.push_back("");
385 DCHECK_EQ(0, InternDeviceName(""));
386
387 // Source and sink have no endpoints, just control edges.
388 NodeDef def;
389 def.set_name("_SOURCE");
390 def.set_op("NoOp");
391 Status status;
392 Node* source = AddNode(def, &status);
393 TF_CHECK_OK(status);
394 CHECK_EQ(source->id(), kSourceId);
395
396 def.set_name("_SINK");
397 Node* sink = AddNode(def, &status);
398 TF_CHECK_OK(status);
399 CHECK_EQ(sink->id(), kSinkId);
400
401 AddControlEdge(source, sink);
402}
403
404Graph::Graph(const FunctionLibraryDefinition& flib_def)
405 : Graph(flib_def.default_registry()) {

Callers 15

optimizeFunction · 0.45
_generate_saved_modelFunction · 0.45
mainFunction · 0.45
test_invalid_dtypeMethod · 0.45
test_invalid_shapeMethod · 0.45
test_get_global_stepMethod · 0.45

Calls 9

set_opMethod · 0.80
default_registryMethod · 0.80
AddLibraryMethod · 0.80
AddNodeFunction · 0.70
push_backMethod · 0.45
set_nameMethod · 0.45
idMethod · 0.45
ToProtoMethod · 0.45
okMethod · 0.45