Categories
Misc

Problem with training VAE

Hello.

I’m new in to tensorflow. Been trying recreate VAE from tutorial ( author does not respond for questions) but i keeps getting error while training network :

ERROR:

Traceback (most recent call last): File "...train.py", line 45, in <module> autoencoder = train(x_train, LEARNING_RATE, BATCH_SIZE, EPOCHS) #here is problem File "...train.py", line 36, in train autoencoder.compile(learning_rate) File "...autoencoder.py", line 61, in compile self.model.compile(optimizer=optimizer, File "...libsite-packagestensorflowpythontrainingtrackingbase.py", line 530, in _method_wrapper result = method(self, *args, **kwargs) File "...libsite-packagestensorflowpythonkerasenginetraining_v1.py", line 444, in compile self._cache_output_metric_attributes(metrics, weighted_metrics) File "...libsite-packagestensorflowpythonkerasenginetraining_v1.py", line 1800, in _cache_output_metric_attributes self._per_output_metrics = training_utils_v1.collect_per_output_metric_info( File "...libsite-packagestensorflowpythonkerasenginetraining_utils_v1.py", line 910, in collect_per_output_metric_info metric_fn._from_serialized = from_serialized # pylint: disable=protected-access AttributeError: 'method' object has no attribute '_from_serialized' 

LINE 41-48 in train.py ( first two errors):

if __name__ == "__main__": x_train = load_fsdd(SPECTROGRAMS_PATH) autoencoder = train(x_train,LEARNING_RATE,BATCH_SIZE, EPOCHS) autoencoder.save("modelv1.0") 

LINE 59-64 in autoencoder.py:

def compile(self, learning_rate=0.0001): optimizer = Adam(learning_rate=learning_rate) self.model.compile(optimizer=optimizer, loss=self._calculate_combined_loss, metrics=[self._calculate_reconstruction_loss, self._calculate_kl_loss]) 

I’m using PyCharm CE 2021.1.1 and tensorflow 2.3.1

submitted by /u/MonstrousPudding
[visit reddit] [comments]

Leave a Reply

Your email address will not be published.