Home
last modified time | relevance | path

Searched refs:attr_def (Results 1 – 11 of 11) sorted by relevance

/external/tensorflow/tensorflow/python/framework/
Dop_def_library.py52 def _SatisfiesTypeConstraint(dtype, attr_def, param_name): argument
53 if attr_def.HasField("allowed_values"):
54 allowed_list = attr_def.allowed_values.list.type
172 def _MakeType(v, attr_def): argument
177 (attr_def.name, repr(v)))
179 _SatisfiesTypeConstraint(i, attr_def, param_name=attr_def.name)
397 for attr_def in op_def.attr:
398 if attr_def.type != "type":
400 key = attr_def.name
401 if attr_def.HasField("default_value"):
[all …]
Dimporter.py139 for attr_def in op_def.attr:
140 if attr_name == attr_def.name:
141 return attr_def
167 attr_def = _FindAttrInOpDef(key, producer_op_def)
168 if (attr_def and attr_def.HasField('default_value') and
169 node.attr[key] == attr_def.default_value):
332 for attr_def in op_def.attr:
333 key = attr_def.name
334 if attr_def.HasField('default_value'):
337 node_def.attr[key].CopyFrom(attr_def.default_value)
Dmeta_graph.py455 for attr_def in op_def.attr:
456 if attr_def.name == attr_name:
457 if not attr_def.HasField("default_value"):
463 attr_def.default_value.SerializeToString())
/external/tensorflow/tensorflow/java/src/gen/cc/
Dop_specs.cc64 std::pair<Type, Type> TypesOf(const OpDef_AttrDef& attr_def,
103 for (const auto& attr_def : op_def_.attr()) { in TypeOf() local
104 if (attr_def.name() == arg_def.type_attr()) { in TypeOf()
105 type = TypesOf(attr_def, iterable_out).first; in TypeOf()
128 std::pair<Type, Type> TypeResolver::TypesOf(const OpDef_AttrDef& attr_def, in TypesOf() argument
132 StringPiece attr_type = attr_def.type(); in TypesOf()
158 if (IsRealNumbers(attr_def.allowed_values())) { in TypesOf()
167 visited_attrs_.insert(std::make_pair(attr_def.name(), types.first)); in TypesOf()
301 AttributeSpec CreateAttribute(const OpDef_AttrDef& attr_def, in CreateAttribute() argument
305 std::pair<Type, Type> types = type_resolver->TypesOf(attr_def, &iterable); in CreateAttribute()
[all …]
/external/tensorflow/tensorflow/core/common_runtime/eager/
Dattr_builder.cc176 for (const auto& attr_def : op_def->attr()) { in FillAttrValueMap() local
177 if (attr_def.has_default_value() && !m->count(attr_def.name())) { in FillAttrValueMap()
178 SetInAttrValueMap(m, attr_def.name(), attr_def.default_value()); in FillAttrValueMap()
/external/tensorflow/tensorflow/core/framework/
Dfunction.cc669 for (const auto& attr_def : op_def->attr()) { in AddDefaultAttrs() local
670 if (attr_def.has_default_value() && !attr_slice.Find(attr_def.name())) { in AddDefaultAttrs()
671 if (!attrs->insert({attr_def.name(), attr_def.default_value()}).second) { in AddDefaultAttrs()
672 return errors::Internal("Somehow duplicated: ", attr_def.name()); in AddDefaultAttrs()
1538 gtl::ArraySlice<string> out_def, gtl::ArraySlice<string> attr_def, in Create() argument
1548 for (const auto& a : attr_def) b.Attr(a); in Create()
1588 gtl::ArraySlice<string> out_def, gtl::ArraySlice<string> attr_def, in Create() argument
1591 return Create(function_name, in_def, out_def, attr_def, node_def, ret_def, in Create()
1599 gtl::ArraySlice<string> attr_def, in Define() argument
1605 for (const auto& a : attr_def) b.Attr(a); in Define()
[all …]
Dop_def_util_test.cc36 OpDef::AttrDef attr_def; in ADef() local
37 EXPECT_TRUE(protobuf::TextFormat::MergeFromString(text, &attr_def)); in ADef()
38 return attr_def; in ADef()
Dfunction.h134 gtl::ArraySlice<string> out_def, gtl::ArraySlice<string> attr_def,
146 gtl::ArraySlice<string> attr_def,
154 gtl::ArraySlice<string> attr_def,
160 gtl::ArraySlice<string> attr_def,
Dnode_def_util.cc611 for (const auto& attr_def : op_def.attr()) { in AddDefaultsToNodeDef() local
613 if (attr_def.has_default_value() && !attrs.Find(attr_def.name())) { in AddDefaultsToNodeDef()
614 AddNodeAttr(attr_def.name(), attr_def.default_value(), node_def); in AddDefaultsToNodeDef()
/external/tensorflow/tensorflow/compiler/tf2xla/
Dxla_op_registry.cc222 for (const OpDef::AttrDef& attr_def : op_def->attr()) { in RegisterCompilationKernels() local
223 if (attr_def.type() == "type" || attr_def.type() == "list(type)") { in RegisterCompilationKernels()
224 type_attrs.insert(attr_def.name()); in RegisterCompilationKernels()
/external/tensorflow/tensorflow/c/
Dc_api_function.cc287 OpDef::AttrDef* attr_def = fdef->mutable_signature()->add_attr(); in FillFunctionBody() local
288 attr_def->set_name(func_attr_name); in FillFunctionBody()
289 attr_def->set_type(node_attr_def->type()); in FillFunctionBody()