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

Method NewSubScope

tensorflow/cc/framework/scope.cc:406–418  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

404}
405
406Scope Scope::NewSubScope(const string& child_scope_name) const {
407 if (child_scope_name.empty()) {
408 return Scope(new Impl(*this, Impl::Tags::ScopeName(), impl()->name_,
409 true /* copy_names */));
410 }
411 const string unique_name =
412 impl()->GetUniqueName(child_scope_name, false /* check_single_use */);
413 const string sep =
414 impl()->name_.empty() || unique_name.empty() ? "" : kScopeSeparator;
415 return Scope(new Impl(*this, Impl::Tags::ScopeName(),
416 strings::StrCat(impl()->name_, sep, unique_name),
417 false /* copy_names */));
418}
419
420Scope Scope::WithOpNameImpl(const string& op_name) const {
421 if (impl()->single_use_scope()) {

Callers 15

IntroduceJitterToTensorFunction · 0.80
TEST_FFunction · 0.80
VectorizeMethod · 0.80
ExpandDimsForBroadcastFunction · 0.80
VectorizeMethod · 0.80
VectorizeMethod · 0.80
NestedLoopBodyFunction · 0.80
TESTFunction · 0.80

Calls 5

ScopeNameEnum · 0.85
ScopeClass · 0.70
StrCatFunction · 0.50
emptyMethod · 0.45
GetUniqueNameMethod · 0.45

Tested by 7

TEST_FFunction · 0.64
NestedLoopBodyFunction · 0.64
TESTFunction · 0.64
TESTFunction · 0.64
TESTFunction · 0.64
TESTFunction · 0.64