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

Method GetUniqueNameForOp

tensorflow/cc/framework/scope.cc:392–404  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

390}
391
392string Scope::GetUniqueNameForOp(const string& default_name) const {
393 if (impl()->single_use_scope()) {
394 if (impl()->op_name_.empty() || *impl()->scope_used_) {
395 *impl()->status_ =
396 errors::InvalidArgument("Cannot get a unique name in this scope");
397 return "";
398 }
399 *impl()->scope_used_ = true;
400 return impl()->op_name_;
401 }
402 return impl()->op_name_.empty() ? impl()->GetNameForOp(default_name)
403 : impl()->GetNameForOp(impl()->op_name_);
404}
405
406Scope Scope::NewSubScope(const string& child_scope_name) const {
407 if (child_scope_name.empty()) {

Callers 15

DummyReadResourceCCMethod · 0.80
CreateSwitchNFunction · 0.80
CreateTestVariantMethod · 0.80
CreateConcatV1OpFunction · 0.80
BuildPlaceHolderOpFunction · 0.80
BuildAddOpMethod · 0.80
BuildFusedGraphDefMethod · 0.80
BuildAddOpsFunction · 0.80
BuildSoftmaxOpsFunction · 0.80
BuildConv2DOpsFunction · 0.80
BuildMaxPoolOpsFunction · 0.80

Calls 4

InvalidArgumentFunction · 0.85
single_use_scopeMethod · 0.80
emptyMethod · 0.45
GetNameForOpMethod · 0.45

Tested by 15

DummyReadResourceCCMethod · 0.64
CreateSwitchNFunction · 0.64
CreateTestVariantMethod · 0.64
CreateConcatV1OpFunction · 0.64
BuildPlaceHolderOpFunction · 0.64
BuildAddOpMethod · 0.64
BuildAddOpsFunction · 0.64
BuildSoftmaxOpsFunction · 0.64
BuildConv2DOpsFunction · 0.64
BuildMaxPoolOpsFunction · 0.64
ConstructOpFunction · 0.64