void _create_iterator(IDatasetV2 dataset) { dataset = dataset.apply_options(); _dataset = dataset; _element_spec = dataset.element_spec; (_iterator_resource, _deleter) = ops.anonymous_iterator_v2(_dataset.output_types, _dataset.output_shapes); ops.make_iterator(dataset.variant_tensor, _iterator_resource); }
void _create_iterator(IDatasetV2 dataset) { dataset = dataset.apply_options(); _dataset = dataset; _element_spec = dataset.element_spec; (_iterator_resource, _deleter) = ops.anonymous_iterator_v2(_dataset.output_types, _dataset.output_shapes); ops.make_iterator(dataset.variant_tensor, _iterator_resource); // Delete the resource when this object is deleted _resource_deleter = new IteratorResourceDeleter(_iterator_resource, _deleter); }