Autoencoder
Autoencoder class
docclean.autoencoder.Autoencoder(
img_rows=256, img_cols=256, nchans=3, mixed_precision_training=False, early_stopping=25
)
Autoencoder class.
Args:
img_rows (int): Number of pixel rows
img_cols (int): Number of pixel columns
nchans (int): Number of color channels
mixed_precision (bool): Train with fp16 mixed precision
early_stopping (int): Patience for early stopping
build_model method
Autoencoder.build_model()
Build the autoencoder model
Returns:
tf.keras.Model: The autoencoder model
train_model method
Autoencoder.train_model(train_dataset, epochs=100, validation_data=None)
Train the autoencoder
Args:
train_dataset (tf.data.Dataset) : Training dataset
epochs (int): Number of epochs to train for
validation_data (tf.data.Dataset) : Validation dataset
Returns:
dict: Training history