zea.models.taesd

Tiny Autoencoder (TAESD) model converted to Tensorflow.

For the original implementation, see the TAESD repository.

You can see an example of how to use this model in the example notebook: Autoencoder for Ultrasound Images.

Classes

TinyAutoencoder(*args, **kwargs)

[TAESD](https://github.com/madebyollin/taesd) model in TensorFlow.

TinyBase(*args, **kwargs)

Base class for TAESD encoder and decoder.

TinyDecoder(*args, **kwargs)

Decoder from TAESD model.

TinyEncoder(*args, **kwargs)

Encoder from TAESD model.

class zea.models.taesd.TinyAutoencoder(*args, **kwargs)[source]

Bases: BaseModel

[TAESD](https://github.com/madebyollin/taesd) model in TensorFlow.

call(inputs)[source]

Applies the full autoencoder to the input.

custom_load_weights(preset, **kwargs)[source]

Load the weights for the encoder and decoder.

decode(inputs)[source]

Decode the encoded images.

Parameters:

inputs (tensor) – Input images of shape (batch_size, height, width, 4).

encode(inputs)[source]

Encode the input images.

Parameters:

inputs (tensor) – Input images of shape (batch_size, height, width, channels).

class zea.models.taesd.TinyBase(*args, **kwargs)[source]

Bases: BaseModel

Base class for TAESD encoder and decoder.

build(input_shape)[source]

Builds the network.

call(inputs)[source]

Applies the network to the input.

custom_load_weights(preset, **kwargs)[source]

Load the weights for the encoder or decoder.

maybe_convert_to_jax(input_shape)[source]

Converts the network to Jax if backend is Jax.

class zea.models.taesd.TinyDecoder(*args, **kwargs)[source]

Bases: TinyBase

Decoder from TAESD model.

class zea.models.taesd.TinyEncoder(*args, **kwargs)[source]

Bases: TinyBase

Encoder from TAESD model.