Skip to content

TensorFlow lesser known features

Albert Zeyer edited this page Jun 5, 2020 · 16 revisions

I sometimes stumble upon features in TensorFlow which look potentially powerful or interesting, which I did not know about before. This wiki page is supposed to be a collection of such features. (Once some of them becomes more central to RETURNN, we might want to have a separate wiki page for it. E.g. Distributed TensorFlow. To find them, it is interesting to just browse through tf.raw_ops.

Also note that it is actually quite simple to write native simple ops to return custom information (e.g. like the OS pid).

Operations / functions

Resources

  • DenseHashTable and other (hash) tables, LookupTable, MutableHashTable, ...
  • MapStagingArea
  • TensorList. List of tensors.
  • Stack. Stack of tensors.
  • TensorArray (probably more well known). Array of tensors.
  • BoostedTrees
  • ConditionalAccumulator. Accumulate / aggregate gradients.
  • TemporaryVariable. Variable which only lives within a single step.
  • Barrier / Mutex
  • Optional. Wraps a value (tensor) that may/may not be present at runtime. Wrapped in a tf.variant tensor.
  • RaggedTensor. Tensor with one or more ragged dimensions, which are dimensions whose slices may have different lengths.