Skip to content

tf_data_layer

tf.data.Dataset Pipeline Layer

This module provides a class to build a tf.data.Dataset pipeline layer.

Classes:

  • TFDataLayer

    Layer that can safely used in a tf.data pipeline

Classes

TFDataLayer

TFDataLayer(device: str = 'cpu', **kwargs)

Layer that can safely be used in a tf.data pipeline.

The call() method must solely rely on self.backend ops.

Note

Only supports a single input tensor argument.

Source code in neuralspot_edge/layers/preprocessing/tf_data_layer.py
def __init__(self, device: str = "cpu", **kwargs):
    super().__init__(**kwargs)
    self.device = device
    self.backend = backend_utils.DynamicBackend()
    self._allow_non_tensor_positional_args = True