large refactor
This commit is contained in:
@@ -0,0 +1,20 @@
|
||||
import tensorflow as tf
|
||||
from models.base import AEEncoder, Decoder
|
||||
|
||||
|
||||
class AutoEncoder(tf.keras.Model):
|
||||
|
||||
def __init__(self, config):
|
||||
super(AutoEncoder, self).__init__()
|
||||
|
||||
self.encoder : AEEncoder = AEEncoder(config['latent_dim'], config['encoder_depths'], config['encoder_dims'], config['bottleneck_size'], config['kernel_size'])
|
||||
self.decoder : Decoder= Decoder(config['decoder_input'], config['decoder_depths'], config['decoder_dims'], kernel_size=config['kernel_size'], is_label=config['is_label'])
|
||||
|
||||
|
||||
def call(self, inputs, training=None):
|
||||
x = inputs
|
||||
|
||||
x = self.encoder(x, training=training)
|
||||
x = self.decoder(x, training=training)
|
||||
|
||||
return x
|
||||
Reference in New Issue
Block a user