Returns tensors of all keys and values in the table. Args: name: A name for the operation (optional). Returns: A pair of tensors with the first tensor containing all keys and the second tensors containing all values in the table.
(self, name=None)
| 353 | return self._table_name |
| 354 | |
| 355 | def export(self, name=None): |
| 356 | """Returns tensors of all keys and values in the table. |
| 357 | |
| 358 | Args: |
| 359 | name: A name for the operation (optional). |
| 360 | |
| 361 | Returns: |
| 362 | A pair of tensors with the first tensor containing all keys and the |
| 363 | second tensors containing all values in the table. |
| 364 | """ |
| 365 | with ops.name_scope(name, "%s_Export" % self.name, |
| 366 | [self.resource_handle]) as name: |
| 367 | exported_keys, exported_values = gen_lookup_ops.lookup_table_export_v2( |
| 368 | self.resource_handle, self._key_dtype, self._value_dtype, name=name) |
| 369 | |
| 370 | exported_values.set_shape(exported_keys.get_shape().concatenate( |
| 371 | self._value_shape)) |
| 372 | return exported_keys, exported_values |
| 373 | |
| 374 | |
| 375 | MutableHashTable = lookup_ops.MutableHashTable |