Pipeline
class
keras.layers.Pipeline(layers, name=None)
Applies a series of layers to an input.
This class is useful to build a preprocessing pipeline, in particular an image data augmentation pipeline. Compared to a Sequential
model, Pipeline
features a few important differences:
Model
, just a plain layer.tf.data
, the pipeline will also remain tf.data
compatible. That is to say, the pipeline will not attempt to convert its inputs to backend-native tensors when in a tf.data context (unlike a Sequential
model).Example
from keras import layers
preprocessing_pipeline = layers.Pipeline([
layers.AutoContrast(),
layers.RandomZoom(0.2),
layers.RandomRotation(0.2),
])
# `ds` is a tf.data.Dataset
preprocessed_ds = ds.map(
preprocessing_pipeline,
num_parallel_calls=4,
)
RetroSearch is an open source project built by @garambo | Open a GitHub Issue
Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo
HTML:
3.2
| Encoding:
UTF-8
| Version:
0.7.4