Home
last modified time | relevance | path

Searched refs:node_def (Results 1 – 25 of 373) sorted by relevance

12345678910>>...15

/external/tensorflow/tensorflow/core/framework/
Dnode_def_util_test.cc41 NodeDef node_def; in ToNodeDef() local
42 EXPECT_TRUE(protobuf::TextFormat::MergeFromString(text, &node_def)); in ToNodeDef()
43 return node_def; in ToNodeDef()
47 NodeDef node_def; in ToNodeDef() local
48 TF_EXPECT_OK(builder.Finalize(&node_def)); in ToNodeDef()
49 return node_def; in ToNodeDef()
79 const NodeDef node_def = ToNodeDef(R"proto( in TEST() local
82 ExpectSuccess(node_def, op); in TEST()
84 EXPECT_EQ("{{node n}} = In[T=DT_FLOAT](a)", SummarizeNodeDef(node_def)); in TEST()
87 NodeDef bad = node_def; in TEST()
[all …]
Dnode_def_util.h51 string SummarizeNodeDef(const NodeDef& node_def);
52 string SummarizeAttrs(const NodeDef& node_def);
58 string FormatNodeDefForError(const NodeDef& node_def);
70 void AddNodeAttr(StringPiece name, const AttrValue& value, NodeDef* node_def);
71 void AddNodeAttr(StringPiece name, StringPiece value, NodeDef* node_def);
72 void AddNodeAttr(StringPiece name, const char* value, NodeDef* node_def);
73 void AddNodeAttr(StringPiece name, int32 value, NodeDef* node_def);
74 void AddNodeAttr(StringPiece name, int64 value, NodeDef* node_def);
75 void AddNodeAttr(StringPiece name, float value, NodeDef* node_def);
76 void AddNodeAttr(StringPiece name, double value, NodeDef* node_def);
[all …]
Dnode_def_util.cc48 AttrSlice::AttrSlice(const NodeDef& node_def) in AttrSlice() argument
49 : ndef_(&node_def), attrs_(&ndef_->attr()) {} in AttrSlice()
88 string SummarizeNodeDef(const NodeDef& node_def) { in SummarizeNodeDef() argument
89 string ret = strings::StrCat(errors::FormatNodeNameForError(node_def.name()), in SummarizeNodeDef()
90 " = ", node_def.op(), "["); in SummarizeNodeDef()
91 strings::StrAppend(&ret, SummarizeAttrsHelper(node_def, node_def.device())); in SummarizeNodeDef()
96 for (const string& input : node_def.input()) { in SummarizeNodeDef()
105 string SummarizeAttrs(const NodeDef& node_def) { in SummarizeAttrs() argument
106 return SummarizeAttrsHelper(node_def, node_def.device()); in SummarizeAttrs()
119 string FormatNodeDefForError(const NodeDef& node_def) { in FormatNodeDefForError() argument
[all …]
Dop_compatibility_test.cc46 TF_CHECK_OK(OpRegistry::Global()->LookUpOpDef(node_def()->op(), &op_def)); in RegisteredOpDef()
53 TF_ASSERT_OK(InOutTypesForNode(*node_def(), old_op_def, &old_in_types, in ExpectSuccess()
58 AddDefaultsToNodeDef(*new_op_def, node_def()); in ExpectSuccess()
61 TF_ASSERT_OK(ValidateNodeDef(*node_def(), *new_op_def)); in ExpectSuccess()
63 TF_ASSERT_OK(InOutTypesForNode(*node_def(), *new_op_def, &new_in_types, in ExpectSuccess()
109 TF_ASSERT_OK(InOutTypesForNode(*node_def(), old_op_def, &old_in_types, in ExpectInvalid()
114 AddDefaultsToNodeDef(*new_op_def, node_def()); in ExpectInvalid()
117 Status status = ValidateNodeDef(*node_def(), *new_op_def); in ExpectInvalid()
119 ADD_FAILURE() << SummarizeNodeDef(*node_def()); in ExpectInvalid()
133 TF_ASSERT_OK(InOutTypesForNode(*node_def(), old_op_def, &old_in_types, in ExpectTypeMismatch()
[all …]
Dgraph_def_util.cc71 NodeDef* node_def = graph_def->mutable_node(i); in AddDefaultAttrsToGraphDef() local
73 Status s = op_registry.LookUpOpDef(node_def->op(), &op_def); in AddDefaultAttrsToGraphDef()
75 AddDefaultsToNodeDef(*op_def, node_def); in AddDefaultAttrsToGraphDef()
85 NodeDef* node_def, const OpRegistryInterface& consumer_op_registry, in RemoveNewDefaultAttrsFromNodeDef() argument
91 producer_op_registry.LookUpOpDef(node_def->op(), &producer_op_def)); in RemoveNewDefaultAttrsFromNodeDef()
93 consumer_op_registry.LookUpOpDef(node_def->op(), &consumer_op_def)); in RemoveNewDefaultAttrsFromNodeDef()
96 for (const auto& attr : node_def->attr()) { in RemoveNewDefaultAttrsFromNodeDef()
106 " but found in node: ", FormatNodeDefForError(*node_def)); in RemoveNewDefaultAttrsFromNodeDef()
120 node_def->mutable_attr()->erase(attr_name); in RemoveNewDefaultAttrsFromNodeDef()
122 op_attr_removed->insert(std::make_pair(node_def->op(), attr_name)); in RemoveNewDefaultAttrsFromNodeDef()
[all …]
Dgraph_to_functiondef.cc162 NodeDef* node_def = fdef->add_node_def(); in GraphToFunctionDef() local
163 *node_def = node->def(); in GraphToFunctionDef()
165 node_def->set_device(node->assigned_device_name()); in GraphToFunctionDef()
167 node_def->set_name(node_names.Uniquify(node->name())); in GraphToFunctionDef()
168 MergeDebugInfo(NodeDebugInfo(node->def()), node_def); in GraphToFunctionDef()
171 node_def->clear_input(); in GraphToFunctionDef()
198 node_def->add_input( in GraphToFunctionDef()
204 node_def->add_input(strings::StrCat("^", edge->src()->name())); in GraphToFunctionDef()
214 node_def->name(), ":", output.first, ":", i - output.second.first); in GraphToFunctionDef()
232 NodeDef* node_def = fdef->mutable_node_def(n_index); in GraphToFunctionDef() local
[all …]
Dfake_input.cc31 FakeInputImpl(const OpDef* op_def, int in_index, const NodeDef* node_def,
60 const NodeDef* node_def, NodeDefBuilder* builder) in FakeInputImpl() argument
64 node_def_(node_def), in FakeInputImpl()
193 return [](const OpDef& op_def, int in_index, const NodeDef& node_def, in FakeInput()
195 FakeInputImpl impl(&op_def, in_index, &node_def, builder); in FakeInput()
201 return [dt](const OpDef& op_def, int in_index, const NodeDef& node_def, in FakeInput() argument
203 FakeInputImpl impl(&op_def, in_index, &node_def, builder); in FakeInput()
210 return [n](const OpDef& op_def, int in_index, const NodeDef& node_def, in FakeInput() argument
212 FakeInputImpl impl(&op_def, in_index, &node_def, builder); in FakeInput()
219 return [n, dt](const OpDef& op_def, int in_index, const NodeDef& node_def, in FakeInput() argument
[all …]
Dop_kernel_test.cc140 NodeDef node_def; in CreateNodeDef() local
141 TF_CHECK_OK(builder.Finalize(&node_def)); in CreateNodeDef()
142 return node_def; in CreateNodeDef()
173 NodeDef node_def; in ExpectFailure() local
174 protobuf::TextFormat::ParseFromString(ascii_node_def, &node_def); in ExpectFailure()
178 node_def, TF_GRAPH_DEF_VERSION, &status)); in ExpectFailure()
287 NodeDef node_def = CreateNodeDef("Test1", {DT_FLOAT, DT_INT32}); in TEST_F() local
288 node_def.clear_input(); in TEST_F()
289 ExpectFailure(node_def.DebugString(), DEVICE_CPU, invalid); in TEST_F()
290 node_def.add_input("a"); in TEST_F()
[all …]
/external/tensorflow/tensorflow/python/framework/
Derrors_impl.py58 def __init__(self, node_def, op, message, error_code): argument
69 self._node_def = node_def
107 def node_def(self): member in OpError
219 def __init__(self, node_def, op, message): argument
221 super(CancelledError, self).__init__(node_def, op, message, CANCELLED)
238 def __init__(self, node_def, op, message, error_code=UNKNOWN): argument
240 super(UnknownError, self).__init__(node_def, op, message, error_code)
258 def __init__(self, node_def, op, message): argument
260 super(InvalidArgumentError, self).__init__(node_def, op, message,
273 def __init__(self, node_def, op, message): argument
[all …]
Dfunction_def_to_graph.py135 node_def = graph_def.node.add()
136 node_def.name = arg_def.name
137 node_def.op = "Placeholder"
138 node_def.attr["dtype"].type = arg_def.type
140 node_def.attr["shape"].shape.CopyFrom(input_shapes[i].as_proto())
143 graph_def.node.extend(fdef.node_def)
157 for node_def in fdef.node_def:
158 op_def = ops.get_default_graph()._get_op_def(node_def.op) # pylint: disable=protected-access
162 fname = node_def.attr[attr.name].func.name
166 for fn in node_def.attr[attr.name].list.func:
[all …]
Dop_def_library_test.py123 """, out.op.node_def)
128 """, out.op.node_def)
133 """, out.op.node_def)
138 """, out.op.node_def)
187 """, op.node_def)
196 """, out.op.node_def)
203 """, out.op.node_def)
210 """, out.op.node_def)
224 """, out.op.node_def)
231 """, out.op.node_def)
[all …]
Dmeta_graph.py70 node_def = copy.deepcopy(from_node_def)
71 for i, v in enumerate(node_def.input):
73 not node_def.input[i].lstrip("^").startswith(export_scope)):
76 node_def.input[i] = re.sub(r"([\^]|^)(.*)",
79 unbound_inputs.append(node_def.input[i])
81 node_def.input[i] = ops.strip_name_scope(v, export_scope)
82 node_def.name = compat.as_bytes(
90 node_def.attr[k].CopyFrom(attr_value_pb2.AttrValue(
92 elif node_def.op in ("Enter", "RefEnter") and k == "frame_name":
95 node_def.attr[k].CopyFrom(attr_value_pb2.AttrValue(s=new_s))
[all …]
Dgraph_to_function_def.py61 return op.node_def # pylint: disable=protected-access
105 func.node_def.extend([_get_node_def(op)])
106 node_def = func.node_def[-1]
107 for i in range(len(node_def.input)):
108 if not node_def.input[i].startswith("^"):
109 assert node_def.input[i] in input_dict, ("%s missing from %s" %
110 (node_def.input[i],
112 node_def.input[i] = input_dict[node_def.input[i]]
/external/tensorflow/tensorflow/core/graph/
Dgraph_constructor.cc49 inline bool IsMerge(const NodeDef& node_def) { in IsMerge() argument
50 return node_def.op() == "Merge" || node_def.op() == "RefMerge"; in IsMerge()
53 inline bool IsNextIteration(const NodeDef& node_def) { in IsNextIteration() argument
54 return node_def.op() == "NextIteration" || in IsNextIteration()
55 node_def.op() == "RefNextIteration"; in IsNextIteration()
192 Status IsNodeFullyMapped(const NodeDef& node_def, bool* is_node_mapped);
193 Status ValidateColocationConstraints(const NodeDef& node_def);
194 Status MakeNode(const NodeDef& node_def, Node** node);
197 Status ModifyNodeDefForImport(NodeDef* node_def);
202 void RemapNodeDefInputs(NodeDef* node_def,
[all …]
Dgraph.cc39 NodeProperties(const OpDef* op_def, const NodeDef& node_def, in NodeProperties()
42 node_def(node_def), in NodeProperties()
47 NodeDef node_def; member
142 class_ = GetNodeClassForOp(props_->node_def.op()); in Initialize()
159 InOutTypesForNode(props_->node_def, *(props_->op_def), &inputs, &outputs); in UpdateProperties()
164 props_ = std::make_shared<NodeProperties>(props_->op_def, props_->node_def, in UpdateProperties()
168 const string& Node::name() const { return props_->node_def.name(); } in name()
169 const string& Node::type_string() const { return props_->node_def.op(); } in type_string()
170 const NodeDef& Node::def() const { return props_->node_def; } in def()
210 return &((*props_->node_def.mutable_attr())[name]); in AddAttrHelper()
[all …]
/external/tensorflow/tensorflow/core/grappler/optimizers/
Dimplementation_selector.cc37 Status UpdateNodeDef(NodeDef* node_def, const string& funcName, in UpdateNodeDef() argument
39 VLOG(3) << "Node def before swap is: " << node_def->DebugString(); in UpdateNodeDef()
40 auto tin = node_def->mutable_attr()->find("Tin"); in UpdateNodeDef()
46 auto tout = node_def->mutable_attr()->find("Tout"); in UpdateNodeDef()
61 const int prev_input_size = node_def->input_size(); in UpdateNodeDef()
64 for (int i = 0; i < diff; ++i) node_def->mutable_input()->RemoveLast(); in UpdateNodeDef()
78 const string last_input = node_def->input(prev_input_size - 1); in UpdateNodeDef()
93 node_def->add_input(strings::StrCat(node_name, ":", i + last_index)); in UpdateNodeDef()
97 node_def->mutable_attr()->find("f")->second.mutable_func()->set_name( in UpdateNodeDef()
100 VLOG(3) << "Node def after swap is: " << node_def->DebugString(); in UpdateNodeDef()
[all …]
/external/tensorflow/tensorflow/compiler/jit/
Dcreate_xla_launch_op.cc69 const NodeDef& node_def) { in CompilationRequested() argument
71 flr.GetFunctionLibraryDefinition()->Find(node_def.name()); in CompilationRequested()
84 const auto& it = node_def.attr().find(kXlaCompileAttr); in CompilationRequested()
85 if (it != node_def.attr().end()) { in CompilationRequested()
93 node_def, kXlaCompileAttr, &xla_compile); in CompilationRequested()
98 << node_def.op() << ". status=" << status.ToString(); in CompilationRequested()
100 VLOG(3) << node_def.op() << " is explicitly marked not to be compiled"; in CompilationRequested()
115 const NodeDef& node_def, in GetBodyAndConstantsAndResources() argument
123 flr->Instantiate(node_def.op(), AttrSlice(&node_def.attr()), &handle)); in GetBodyAndConstantsAndResources()
153 Status CreateXlaLaunchOp(FunctionLibraryRuntime* flr, const NodeDef& node_def, in CreateXlaLaunchOp() argument
[all …]
/external/tensorflow/tensorflow/compiler/tf2tensorrt/convert/
Dconvert_nodes_test.cc115 NodeDef node_def; local
116 node_def.set_name(name);
117 node_def.set_op(op);
119 node_def.add_input(input);
122 (*node_def.mutable_attr())[attr.first] = attr.second;
124 return node_def;
402 const NodeDef& node_def, int output_port, in ConvertToTensorOrWeights() argument
406 node_def, output_port, graph_properties, tensor_or_weights); in ConvertToTensorOrWeights()
424 NodeDef node_def = MakeConstNodeDef<float>("my_const", {1.0f, 2.0f}); in TEST_F() local
428 ExpectStatus(ConvertToTensorOrWeights(node_def, /*output_port=*/0, in TEST_F()
[all …]
Dconvert_nodes.cc466 TFAttrs attrs(params->node_def); in CreateBroadcastableScalarConstant()
494 TFTRT_RETURN_ERROR_IF_NULLPTR(*tensor, params->node_def.name()); in CreateBroadcastableScalarConstant()
894 const NodeDef& node_def, int output_port, in ConvertToTensorOrWeights() argument
897 if (node_def.op() == "Const") { in ConvertToTensorOrWeights()
909 return ConvertConstToWeights(node_def, inputs, tensor_or_weights); in ConvertToTensorOrWeights()
911 if (!graph_properties.HasOutputProperties(node_def.name())) { in ConvertToTensorOrWeights()
917 graph_properties.GetOutputProperties(node_def.name()); in ConvertToTensorOrWeights()
925 node_def.op(), dtype, shape, /*validation_only_=*/true, &trt_dtype, in ConvertToTensorOrWeights()
936 const NodeDef& node_def, in ValidateNode() argument
940 const string& op = node_def.op(); in ValidateNode()
[all …]
/external/tensorflow/tensorflow/core/ops/
Dstate_ops_test.cc31 .Finalize(&op.node_def)); in TEST()
46 .Finalize(&op.node_def)); in TEST()
56 .Finalize(&op.node_def)); in TEST()
68 .Finalize(&op.node_def)); in TEST()
78 .Finalize(&op.node_def)); in TEST()
85 .Finalize(&op.node_def)); in TEST()
91 .Finalize(&op.node_def)); in TEST()
101 .Finalize(&op.node_def)); in TEST()
107 .Finalize(&op.node_def)); in TEST()
113 .Finalize(&op.node_def)); in TEST()
/external/tensorflow/tensorflow/python/util/
Dkernel_registry.cc29 tensorflow::NodeDef node_def; in TryFindKernelClass() local
30 if (!node_def.ParseFromString(serialized_node_def)) { in TryFindKernelClass()
37 tensorflow::OpRegistry::Global()->LookUp(node_def.op(), &op_reg_data); in TryFindKernelClass()
39 LOG(WARNING) << "Op " << node_def.op() << " not found: " << status; in TryFindKernelClass()
42 AddDefaultsToNodeDef(op_reg_data->op_def, &node_def); in TryFindKernelClass()
45 if (!tensorflow::DeviceNameUtils::ParseFullName(node_def.device(), in TryFindKernelClass()
48 << node_def.ShortDebugString(); in TryFindKernelClass()
53 node_def, nullptr /* kernel_def */, &class_name) in TryFindKernelClass()
/external/tensorflow/tensorflow/contrib/receptive_field/python/util/
Dgraph_compute_order.py41 for node_def in graph_def.node:
42 name_to_node[node_def.name] = node_def
103 node_def = name_to_node[current]
109 node_info[current] = _node_info(order, node_def, input_size, output_size)
117 for each in node_def.input:
142 node_def, name_to_node, input_size, force=True))
155 node_info[current] = _node_info(order, node_def, input_size, output_size)
/external/tensorflow/tensorflow/core/kernels/
Dquantize_and_dequantize_op_test.cc50 .Finalize(node_def())); in TEST_F()
75 .Finalize(node_def())); in TEST_F()
102 .Finalize(node_def())); in TEST_F()
134 .Finalize(node_def())); in TEST_F()
166 .Finalize(node_def())); in TEST_F()
197 .Finalize(node_def())); in TEST_F()
226 .Finalize(node_def())); in TEST_F()
254 .Finalize(node_def())); in TEST_F()
283 .Finalize(node_def())); in TEST_F()
315 .Finalize(node_def())); in TEST_F()
[all …]
Dragged_gather_op_test.cc50 .Finalize(node_def())); in BuildRaggedGatherGraph()
250 (*op.node_def.mutable_attr())["PARAMS_RAGGED_RANK"].set_i(1); in TEST_F()
251 (*op.node_def.mutable_attr())["OUTPUT_RAGGED_RANK"].set_i(1); in TEST_F()
260 (*op.node_def.mutable_attr())["PARAMS_RAGGED_RANK"].set_i(2); in TEST_F()
261 (*op.node_def.mutable_attr())["OUTPUT_RAGGED_RANK"].set_i(2); in TEST_F()
267 (*op.node_def.mutable_attr())["PARAMS_RAGGED_RANK"].set_i(1); in TEST_F()
268 (*op.node_def.mutable_attr())["OUTPUT_RAGGED_RANK"].set_i(2); in TEST_F()
275 (*op.node_def.mutable_attr())["PARAMS_RAGGED_RANK"].set_i(1); in TEST_F()
276 (*op.node_def.mutable_attr())["OUTPUT_RAGGED_RANK"].set_i(0); in TEST_F()
/external/tensorflow/tensorflow/python/saved_model/
Dfunction_deserialization.py313 for node_def in fdef.node_def:
314 if "_gradient_op_type" in node_def.attr:
315 if node_def.op in ["StatefulPartitionedCall", "PartitionedCall"]:
319 fname = node_def.attr["f"].func.name
320 node_def.attr["_gradient_op_type"].s = compat.as_bytes(
326 for _, attr_value in node_def.attr.items():
333 if "shared_name" in node_def.attr:
334 node_def.attr["shared_name"].s += compat.as_bytes(shared_name_suffix)
345 for node_def in fdef.node_def:
346 for _, attr_value in node_def.attr.items():

12345678910>>...15