1// This file is MACHINE GENERATED! Do not edit.
2
3
4#include "tensorflow/cc/ops/const_op.h"
5#include "tensorflow/cc/ops/resource_variable_ops.h"
6
7namespace tensorflow {
8namespace ops {
9
10AssignAddVariableOp::AssignAddVariableOp(const ::tensorflow::Scope& scope,
11 ::tensorflow::Input resource,
12 ::tensorflow::Input value) {
13 if (!scope.ok()) return;
14 auto _resource = ::tensorflow::ops::AsNodeOut(scope, resource);
15 if (!scope.ok()) return;
16 auto _value = ::tensorflow::ops::AsNodeOut(scope, value);
17 if (!scope.ok()) return;
18 ::tensorflow::Node* ret;
19 const auto unique_name = scope.GetUniqueNameForOp("AssignAddVariableOp");
20 auto builder = ::tensorflow::NodeBuilder(unique_name, "AssignAddVariableOp")
21 .Input(_resource)
22 .Input(_value)
23 ;
24 scope.UpdateBuilder(&builder);
25 scope.UpdateStatus(builder.Finalize(scope.graph(), &ret));
26 if (!scope.ok()) return;
27 scope.UpdateStatus(scope.DoShapeInference(ret));
28 this->operation = Operation(ret);
29 return;
30}
31
32AssignSubVariableOp::AssignSubVariableOp(const ::tensorflow::Scope& scope,
33 ::tensorflow::Input resource,
34 ::tensorflow::Input value) {
35 if (!scope.ok()) return;
36 auto _resource = ::tensorflow::ops::AsNodeOut(scope, resource);
37 if (!scope.ok()) return;
38 auto _value = ::tensorflow::ops::AsNodeOut(scope, value);
39 if (!scope.ok()) return;
40 ::tensorflow::Node* ret;
41 const auto unique_name = scope.GetUniqueNameForOp("AssignSubVariableOp");
42 auto builder = ::tensorflow::NodeBuilder(unique_name, "AssignSubVariableOp")
43 .Input(_resource)
44 .Input(_value)
45 ;
46 scope.UpdateBuilder(&builder);
47 scope.UpdateStatus(builder.Finalize(scope.graph(), &ret));
48 if (!scope.ok()) return;
49 scope.UpdateStatus(scope.DoShapeInference(ret));
50 this->operation = Operation(ret);
51 return;
52}
53
54AssignVariableOp::AssignVariableOp(const ::tensorflow::Scope& scope,
55 ::tensorflow::Input resource,
56 ::tensorflow::Input value, const
57 AssignVariableOp::Attrs& attrs) {
58 if (!scope.ok()) return;
59 auto _resource = ::tensorflow::ops::AsNodeOut(scope, resource);
60 if (!scope.ok()) return;
61 auto _value = ::tensorflow::ops::AsNodeOut(scope, value);
62 if (!scope.ok()) return;
63 ::tensorflow::Node* ret;
64 const auto unique_name = scope.GetUniqueNameForOp("AssignVariableOp");
65 auto builder = ::tensorflow::NodeBuilder(unique_name, "AssignVariableOp")
66 .Input(_resource)
67 .Input(_value)
68 .Attr("validate_shape", attrs.validate_shape_)
69 ;
70 scope.UpdateBuilder(&builder);
71 scope.UpdateStatus(builder.Finalize(scope.graph(), &ret));
72 if (!scope.ok()) return;
73 scope.UpdateStatus(scope.DoShapeInference(ret));
74 this->operation = Operation(ret);
75 return;
76}
77
78AssignVariableOp::AssignVariableOp(const ::tensorflow::Scope& scope,
79 ::tensorflow::Input resource,
80 ::tensorflow::Input value)
81 : AssignVariableOp(scope, resource, value, AssignVariableOp::Attrs()) {}
82
83ConsumeMutexLock::ConsumeMutexLock(const ::tensorflow::Scope& scope,
84 ::tensorflow::Input mutex_lock) {
85 if (!scope.ok()) return;
86 auto _mutex_lock = ::tensorflow::ops::AsNodeOut(scope, mutex_lock);
87 if (!scope.ok()) return;
88 ::tensorflow::Node* ret;
89 const auto unique_name = scope.GetUniqueNameForOp("ConsumeMutexLock");
90 auto builder = ::tensorflow::NodeBuilder(unique_name, "ConsumeMutexLock")
91 .Input(_mutex_lock)
92 ;
93 scope.UpdateBuilder(&builder);
94 scope.UpdateStatus(builder.Finalize(scope.graph(), &ret));
95 if (!scope.ok()) return;
96 scope.UpdateStatus(scope.DoShapeInference(ret));
97 this->operation = Operation(ret);
98 return;
99}
100
101DestroyResourceOp::DestroyResourceOp(const ::tensorflow::Scope& scope,
102 ::tensorflow::Input resource, const
103 DestroyResourceOp::Attrs& attrs) {
104 if (!scope.ok()) return;
105 auto _resource = ::tensorflow::ops::AsNodeOut(scope, resource);
106 if (!scope.ok()) return;
107 ::tensorflow::Node* ret;
108 const auto unique_name = scope.GetUniqueNameForOp("DestroyResourceOp");
109 auto builder = ::tensorflow::NodeBuilder(unique_name, "DestroyResourceOp")
110 .Input(_resource)
111 .Attr("ignore_lookup_error", attrs.ignore_lookup_error_)
112 ;
113 scope.UpdateBuilder(&builder);
114 scope.UpdateStatus(builder.Finalize(scope.graph(), &ret));
115 if (!scope.ok()) return;
116 scope.UpdateStatus(scope.DoShapeInference(ret));
117 this->operation = Operation(ret);
118 return;
119}
120
121DestroyResourceOp::DestroyResourceOp(const ::tensorflow::Scope& scope,
122 ::tensorflow::Input resource)
123 : DestroyResourceOp(scope, resource, DestroyResourceOp::Attrs()) {}
124
125DisableCopyOnRead::DisableCopyOnRead(const ::tensorflow::Scope& scope,
126 ::tensorflow::Input resource) {
127 if (!scope.ok()) return;
128 auto _resource = ::tensorflow::ops::AsNodeOut(scope, resource);
129 if (!scope.ok()) return;
130 ::tensorflow::Node* ret;
131 const auto unique_name = scope.GetUniqueNameForOp("DisableCopyOnRead");
132 auto builder = ::tensorflow::NodeBuilder(unique_name, "DisableCopyOnRead")
133 .Input(_resource)
134 ;
135 scope.UpdateBuilder(&builder);
136 scope.UpdateStatus(builder.Finalize(scope.graph(), &ret));
137 if (!scope.ok()) return;
138 scope.UpdateStatus(scope.DoShapeInference(ret));
139 this->operation = Operation(ret);
140 return;
141}
142
143MutexLock::MutexLock(const ::tensorflow::Scope& scope, ::tensorflow::Input
144 mutex) {
145 if (!scope.ok()) return;
146 auto _mutex = ::tensorflow::ops::AsNodeOut(scope, mutex);
147 if (!scope.ok()) return;
148 ::tensorflow::Node* ret;
149 const auto unique_name = scope.GetUniqueNameForOp("MutexLock");
150 auto builder = ::tensorflow::NodeBuilder(unique_name, "MutexLock")
151 .Input(_mutex)
152 ;
153 scope.UpdateBuilder(&builder);
154 scope.UpdateStatus(builder.Finalize(scope.graph(), &ret));
155 if (!scope.ok()) return;
156 scope.UpdateStatus(scope.DoShapeInference(ret));
157 this->operation = Operation(ret);
158 this->mutex_lock = Output(ret, 0);
159}
160
161MutexV2::MutexV2(const ::tensorflow::Scope& scope, const MutexV2::Attrs& attrs) {
162 if (!scope.ok()) return;
163 ::tensorflow::Node* ret;
164 const auto unique_name = scope.GetUniqueNameForOp("MutexV2");
165 auto builder = ::tensorflow::NodeBuilder(unique_name, "MutexV2")
166 .Attr("container", attrs.container_)
167 .Attr("shared_name", attrs.shared_name_)
168 ;
169 scope.UpdateBuilder(&builder);
170 scope.UpdateStatus(builder.Finalize(scope.graph(), &ret));
171 if (!scope.ok()) return;
172 scope.UpdateStatus(scope.DoShapeInference(ret));
173 this->operation = Operation(ret);
174 this->resource = Output(ret, 0);
175}
176
177MutexV2::MutexV2(const ::tensorflow::Scope& scope)
178 : MutexV2(scope, MutexV2::Attrs()) {}
179
180ReadVariableOp::ReadVariableOp(const ::tensorflow::Scope& scope,
181 ::tensorflow::Input resource, DataType dtype) {
182 if (!scope.ok()) return;
183 auto _resource = ::tensorflow::ops::AsNodeOut(scope, resource);
184 if (!scope.ok()) return;
185 ::tensorflow::Node* ret;
186 const auto unique_name = scope.GetUniqueNameForOp("ReadVariableOp");
187 auto builder = ::tensorflow::NodeBuilder(unique_name, "ReadVariableOp")
188 .Input(_resource)
189 .Attr("dtype", dtype)
190 ;
191 scope.UpdateBuilder(&builder);
192 scope.UpdateStatus(builder.Finalize(scope.graph(), &ret));
193 if (!scope.ok()) return;
194 scope.UpdateStatus(scope.DoShapeInference(ret));
195 this->operation = Operation(ret);
196 this->value = Output(ret, 0);
197}
198
199ResourceGather::ResourceGather(const ::tensorflow::Scope& scope,
200 ::tensorflow::Input resource,
201 ::tensorflow::Input indices, DataType dtype,
202 const ResourceGather::Attrs& attrs) {
203 if (!scope.ok()) return;
204 auto _resource = ::tensorflow::ops::AsNodeOut(scope, resource);
205 if (!scope.ok()) return;
206 auto _indices = ::tensorflow::ops::AsNodeOut(scope, indices);
207 if (!scope.ok()) return;
208 ::tensorflow::Node* ret;
209 const auto unique_name = scope.GetUniqueNameForOp("ResourceGather");
210 auto builder = ::tensorflow::NodeBuilder(unique_name, "ResourceGather")
211 .Input(_resource)
212 .Input(_indices)
213 .Attr("batch_dims", attrs.batch_dims_)
214 .Attr("validate_indices", attrs.validate_indices_)
215 .Attr("dtype", dtype)
216 ;
217 scope.UpdateBuilder(&builder);
218 scope.UpdateStatus(builder.Finalize(scope.graph(), &ret));
219 if (!scope.ok()) return;
220 scope.UpdateStatus(scope.DoShapeInference(ret));
221 this->operation = Operation(ret);
222 this->output = Output(ret, 0);
223}
224
225ResourceGather::ResourceGather(const ::tensorflow::Scope& scope,
226 ::tensorflow::Input resource,
227 ::tensorflow::Input indices, DataType dtype)
228 : ResourceGather(scope, resource, indices, dtype, ResourceGather::Attrs()) {}
229
230ResourceGatherNd::ResourceGatherNd(const ::tensorflow::Scope& scope,
231 ::tensorflow::Input resource,
232 ::tensorflow::Input indices, DataType dtype) {
233 if (!scope.ok()) return;
234 auto _resource = ::tensorflow::ops::AsNodeOut(scope, resource);
235 if (!scope.ok()) return;
236 auto _indices = ::tensorflow::ops::AsNodeOut(scope, indices);
237 if (!scope.ok()) return;
238 ::tensorflow::Node* ret;
239 const auto unique_name = scope.GetUniqueNameForOp("ResourceGatherNd");
240 auto builder = ::tensorflow::NodeBuilder(unique_name, "ResourceGatherNd")
241 .Input(_resource)
242 .Input(_indices)
243 .Attr("dtype", dtype)
244 ;
245 scope.UpdateBuilder(&builder);
246 scope.UpdateStatus(builder.Finalize(scope.graph(), &ret));
247 if (!scope.ok()) return;
248 scope.UpdateStatus(scope.DoShapeInference(ret));
249 this->operation = Operation(ret);
250 this->output = Output(ret, 0);
251}
252
253ResourceScatterAdd::ResourceScatterAdd(const ::tensorflow::Scope& scope,
254 ::tensorflow::Input resource,
255 ::tensorflow::Input indices,
256 ::tensorflow::Input updates) {
257 if (!scope.ok()) return;
258 auto _resource = ::tensorflow::ops::AsNodeOut(scope, resource);
259 if (!scope.ok()) return;
260 auto _indices = ::tensorflow::ops::AsNodeOut(scope, indices);
261 if (!scope.ok()) return;
262 auto _updates = ::tensorflow::ops::AsNodeOut(scope, updates);
263 if (!scope.ok()) return;
264 ::tensorflow::Node* ret;
265 const auto unique_name = scope.GetUniqueNameForOp("ResourceScatterAdd");
266 auto builder = ::tensorflow::NodeBuilder(unique_name, "ResourceScatterAdd")
267 .Input(_resource)
268 .Input(_indices)
269 .Input(_updates)
270 ;
271 scope.UpdateBuilder(&builder);
272 scope.UpdateStatus(builder.Finalize(scope.graph(), &ret));
273 if (!scope.ok()) return;
274 scope.UpdateStatus(scope.DoShapeInference(ret));
275 this->operation = Operation(ret);
276 return;
277}
278
279ResourceScatterDiv::ResourceScatterDiv(const ::tensorflow::Scope& scope,
280 ::tensorflow::Input resource,
281 ::tensorflow::Input indices,
282 ::tensorflow::Input updates) {
283 if (!scope.ok()) return;
284 auto _resource = ::tensorflow::ops::AsNodeOut(scope, resource);
285 if (!scope.ok()) return;
286 auto _indices = ::tensorflow::ops::AsNodeOut(scope, indices);
287 if (!scope.ok()) return;
288 auto _updates = ::tensorflow::ops::AsNodeOut(scope, updates);
289 if (!scope.ok()) return;
290 ::tensorflow::Node* ret;
291 const auto unique_name = scope.GetUniqueNameForOp("ResourceScatterDiv");
292 auto builder = ::tensorflow::NodeBuilder(unique_name, "ResourceScatterDiv")
293 .Input(_resource)
294 .Input(_indices)
295 .Input(_updates)
296 ;
297 scope.UpdateBuilder(&builder);
298 scope.UpdateStatus(builder.Finalize(scope.graph(), &ret));
299 if (!scope.ok()) return;
300 scope.UpdateStatus(scope.DoShapeInference(ret));
301 this->operation = Operation(ret);
302 return;
303}
304
305ResourceScatterMax::ResourceScatterMax(const ::tensorflow::Scope& scope,
306 ::tensorflow::Input resource,
307 ::tensorflow::Input indices,
308 ::tensorflow::Input updates) {
309 if (!scope.ok()) return;
310 auto _resource = ::tensorflow::ops::AsNodeOut(scope, resource);
311 if (!scope.ok()) return;
312 auto _indices = ::tensorflow::ops::AsNodeOut(scope, indices);
313 if (!scope.ok()) return;
314 auto _updates = ::tensorflow::ops::AsNodeOut(scope, updates);
315 if (!scope.ok()) return;
316 ::tensorflow::Node* ret;
317 const auto unique_name = scope.GetUniqueNameForOp("ResourceScatterMax");
318 auto builder = ::tensorflow::NodeBuilder(unique_name, "ResourceScatterMax")
319 .Input(_resource)
320 .Input(_indices)
321 .Input(_updates)
322 ;
323 scope.UpdateBuilder(&builder);
324 scope.UpdateStatus(builder.Finalize(scope.graph(), &ret));
325 if (!scope.ok()) return;
326 scope.UpdateStatus(scope.DoShapeInference(ret));
327 this->operation = Operation(ret);
328 return;
329}
330
331ResourceScatterMin::ResourceScatterMin(const ::tensorflow::Scope& scope,
332 ::tensorflow::Input resource,
333 ::tensorflow::Input indices,
334 ::tensorflow::Input updates) {
335 if (!scope.ok()) return;
336 auto _resource = ::tensorflow::ops::AsNodeOut(scope, resource);
337 if (!scope.ok()) return;
338 auto _indices = ::tensorflow::ops::AsNodeOut(scope, indices);
339 if (!scope.ok()) return;
340 auto _updates = ::tensorflow::ops::AsNodeOut(scope, updates);
341 if (!scope.ok()) return;
342 ::tensorflow::Node* ret;
343 const auto unique_name = scope.GetUniqueNameForOp("ResourceScatterMin");
344 auto builder = ::tensorflow::NodeBuilder(unique_name, "ResourceScatterMin")
345 .Input(_resource)
346 .Input(_indices)
347 .Input(_updates)
348 ;
349 scope.UpdateBuilder(&builder);
350 scope.UpdateStatus(builder.Finalize(scope.graph(), &ret));
351 if (!scope.ok()) return;
352 scope.UpdateStatus(scope.DoShapeInference(ret));
353 this->operation = Operation(ret);
354 return;
355}
356
357ResourceScatterMul::ResourceScatterMul(const ::tensorflow::Scope& scope,
358 ::tensorflow::Input resource,
359 ::tensorflow::Input indices,
360 ::tensorflow::Input updates) {
361 if (!scope.ok()) return;
362 auto _resource = ::tensorflow::ops::AsNodeOut(scope, resource);
363 if (!scope.ok()) return;
364 auto _indices = ::tensorflow::ops::AsNodeOut(scope, indices);
365 if (!scope.ok()) return;
366 auto _updates = ::tensorflow::ops::AsNodeOut(scope, updates);
367 if (!scope.ok()) return;
368 ::tensorflow::Node* ret;
369 const auto unique_name = scope.GetUniqueNameForOp("ResourceScatterMul");
370 auto builder = ::tensorflow::NodeBuilder(unique_name, "ResourceScatterMul")
371 .Input(_resource)
372 .Input(_indices)
373 .Input(_updates)
374 ;
375 scope.UpdateBuilder(&builder);
376 scope.UpdateStatus(builder.Finalize(scope.graph(), &ret));
377 if (!scope.ok()) return;
378 scope.UpdateStatus(scope.DoShapeInference(ret));
379 this->operation = Operation(ret);
380 return;
381}
382
383ResourceScatterSub::ResourceScatterSub(const ::tensorflow::Scope& scope,
384 ::tensorflow::Input resource,
385 ::tensorflow::Input indices,
386 ::tensorflow::Input updates) {
387 if (!scope.ok()) return;
388 auto _resource = ::tensorflow::ops::AsNodeOut(scope, resource);
389 if (!scope.ok()) return;
390 auto _indices = ::tensorflow::ops::AsNodeOut(scope, indices);
391 if (!scope.ok()) return;
392 auto _updates = ::tensorflow::ops::AsNodeOut(scope, updates);
393 if (!scope.ok()) return;
394 ::tensorflow::Node* ret;
395 const auto unique_name = scope.GetUniqueNameForOp("ResourceScatterSub");
396 auto builder = ::tensorflow::NodeBuilder(unique_name, "ResourceScatterSub")
397 .Input(_resource)
398 .Input(_indices)
399 .Input(_updates)
400 ;
401 scope.UpdateBuilder(&builder);
402 scope.UpdateStatus(builder.Finalize(scope.graph(), &ret));
403 if (!scope.ok()) return;
404 scope.UpdateStatus(scope.DoShapeInference(ret));
405 this->operation = Operation(ret);
406 return;
407}
408
409ResourceScatterUpdate::ResourceScatterUpdate(const ::tensorflow::Scope& scope,
410 ::tensorflow::Input resource,
411 ::tensorflow::Input indices,
412 ::tensorflow::Input updates) {
413 if (!scope.ok()) return;
414 auto _resource = ::tensorflow::ops::AsNodeOut(scope, resource);
415 if (!scope.ok()) return;
416 auto _indices = ::tensorflow::ops::AsNodeOut(scope, indices);
417 if (!scope.ok()) return;
418 auto _updates = ::tensorflow::ops::AsNodeOut(scope, updates);
419 if (!scope.ok()) return;
420 ::tensorflow::Node* ret;
421 const auto unique_name = scope.GetUniqueNameForOp("ResourceScatterUpdate");
422 auto builder = ::tensorflow::NodeBuilder(unique_name, "ResourceScatterUpdate")
423 .Input(_resource)
424 .Input(_indices)
425 .Input(_updates)
426 ;
427 scope.UpdateBuilder(&builder);
428 scope.UpdateStatus(builder.Finalize(scope.graph(), &ret));
429 if (!scope.ok()) return;
430 scope.UpdateStatus(scope.DoShapeInference(ret));
431 this->operation = Operation(ret);
432 return;
433}
434
435VarHandleOp::VarHandleOp(const ::tensorflow::Scope& scope, DataType dtype,
436 PartialTensorShape shape, const VarHandleOp::Attrs&
437 attrs) {
438 if (!scope.ok()) return;
439 ::tensorflow::Node* ret;
440 const auto unique_name = scope.GetUniqueNameForOp("VarHandleOp");
441 auto builder = ::tensorflow::NodeBuilder(unique_name, "VarHandleOp")
442 .Attr("container", attrs.container_)
443 .Attr("shared_name", attrs.shared_name_)
444 .Attr("dtype", dtype)
445 .Attr("shape", shape)
446 .Attr("allowed_devices", attrs.allowed_devices_)
447 ;
448 scope.UpdateBuilder(&builder);
449 scope.UpdateStatus(builder.Finalize(scope.graph(), &ret));
450 if (!scope.ok()) return;
451 scope.UpdateStatus(scope.DoShapeInference(ret));
452 this->operation = Operation(ret);
453 this->resource = Output(ret, 0);
454}
455
456VarHandleOp::VarHandleOp(const ::tensorflow::Scope& scope, DataType dtype,
457 PartialTensorShape shape)
458 : VarHandleOp(scope, dtype, shape, VarHandleOp::Attrs()) {}
459
460VarIsInitializedOp::VarIsInitializedOp(const ::tensorflow::Scope& scope,
461 ::tensorflow::Input resource) {
462 if (!scope.ok()) return;
463 auto _resource = ::tensorflow::ops::AsNodeOut(scope, resource);
464 if (!scope.ok()) return;
465 ::tensorflow::Node* ret;
466 const auto unique_name = scope.GetUniqueNameForOp("VarIsInitializedOp");
467 auto builder = ::tensorflow::NodeBuilder(unique_name, "VarIsInitializedOp")
468 .Input(_resource)
469 ;
470 scope.UpdateBuilder(&builder);
471 scope.UpdateStatus(builder.Finalize(scope.graph(), &ret));
472 if (!scope.ok()) return;
473 scope.UpdateStatus(scope.DoShapeInference(ret));
474 this->operation = Operation(ret);
475 this->is_initialized = Output(ret, 0);
476}
477
478VariableShape::VariableShape(const ::tensorflow::Scope& scope,
479 ::tensorflow::Input input, const
480 VariableShape::Attrs& attrs) {
481 if (!scope.ok()) return;
482 auto _input = ::tensorflow::ops::AsNodeOut(scope, input);
483 if (!scope.ok()) return;
484 ::tensorflow::Node* ret;
485 const auto unique_name = scope.GetUniqueNameForOp("VariableShape");
486 auto builder = ::tensorflow::NodeBuilder(unique_name, "VariableShape")
487 .Input(_input)
488 .Attr("out_type", attrs.out_type_)
489 ;
490 scope.UpdateBuilder(&builder);
491 scope.UpdateStatus(builder.Finalize(scope.graph(), &ret));
492 if (!scope.ok()) return;
493 scope.UpdateStatus(scope.DoShapeInference(ret));
494 this->operation = Operation(ret);
495 this->output = Output(ret, 0);
496}
497
498VariableShape::VariableShape(const ::tensorflow::Scope& scope,
499 ::tensorflow::Input input)
500 : VariableShape(scope, input, VariableShape::Attrs()) {}
501
502_ReadVariablesOp::_ReadVariablesOp(const ::tensorflow::Scope& scope,
503 ::tensorflow::InputList resources, const
504 DataTypeSlice& dtypes) {
505 if (!scope.ok()) return;
506 auto _resources = ::tensorflow::ops::AsNodeOutList(scope, resources);
507 if (!scope.ok()) return;
508 ::tensorflow::Node* ret;
509 const auto unique_name = scope.GetUniqueNameForOp("_ReadVariablesOp");
510 auto builder = ::tensorflow::NodeBuilder(unique_name, "_ReadVariablesOp")
511 .Input(_resources)
512 .Attr("dtypes", dtypes)
513 ;
514 scope.UpdateBuilder(&builder);
515 scope.UpdateStatus(builder.Finalize(scope.graph(), &ret));
516 if (!scope.ok()) return;
517 scope.UpdateStatus(scope.DoShapeInference(ret));
518 this->operation = Operation(ret);
519 for (int32 i = 0; i < ret->num_outputs(); ++i)
520 this->values.push_back(Output(ret, i));
521}
522
523_VarHandlesOp::_VarHandlesOp(const ::tensorflow::Scope& scope, const
524 gtl::ArraySlice<::tensorflow::tstring>&
525 containers, const
526 gtl::ArraySlice<::tensorflow::tstring>&
527 shared_names, int64 N, const DataTypeSlice&
528 dtypes, const gtl::ArraySlice<PartialTensorShape>&
529 shapes) {
530 if (!scope.ok()) return;
531 ::tensorflow::Node* ret;
532 const auto unique_name = scope.GetUniqueNameForOp("_VarHandlesOp");
533 auto builder = ::tensorflow::NodeBuilder(unique_name, "_VarHandlesOp")
534 .Attr("containers", containers)
535 .Attr("shared_names", shared_names)
536 .Attr("N", N)
537 .Attr("dtypes", dtypes)
538 .Attr("shapes", shapes)
539 ;
540 scope.UpdateBuilder(&builder);
541 scope.UpdateStatus(builder.Finalize(scope.graph(), &ret));
542 if (!scope.ok()) return;
543 scope.UpdateStatus(scope.DoShapeInference(ret));
544 this->operation = Operation(ret);
545 for (int32 i = 0; i < ret->num_outputs(); ++i)
546 this->resources.push_back(Output(ret, i));
547}
548
549/// @}
550
551} // namespace ops
552} // namespace tensorflow
553