Like IteratorHandleOp, but creates handles which are never shared, and does not hold a reference to these handles. The latter is important for eager execution, since OpKernel instances generally live as long as the program running them.
| 377 | // execution, since OpKernel instances generally live as long as the program |
| 378 | // running them. |
| 379 | AnonymousIteratorHandleOp::AnonymousIteratorHandleOp( |
| 380 | OpKernelConstruction* context) |
| 381 | : AnonymousResourceOp<IteratorResource>(context), |
| 382 | graph_def_version_(context->graph_def_version()) { |
| 383 | OP_REQUIRES_OK(context, context->GetAttr(kOutputTypes, &output_dtypes_)); |
| 384 | OP_REQUIRES_OK(context, context->GetAttr(kOutputShapes, &output_shapes_)); |
| 385 | create_deleter_ = context->def().op() == kAnonymousIteratorV2; |
| 386 | } |
| 387 | |
| 388 | string AnonymousIteratorHandleOp::name() { return kAnonymousIterator; } |
| 389 |
nothing calls this directly
no test coverage detected