Open alexberd opened 8 months ago
I see, thank you for pointing this out. Probably the appropriate call for the logarithm now is tf.math.log https://www.tensorflow.org/api_docs/python/tf/math/log. If you would like to test it and if it works make a pull request and I would gladly merge it. Otherwise I will implement this a bit later.
I am using: python '3.8.16' tensorflow '2.10.1' imageio '2.34.0' scipy '1.10.1'
Below is the eror, I am receiving: Epoch 1/100 Reconstruction loss is binary cross entropy Traceback (most recent call last): File "diffusion_vae.py", line 142, in
main(sys.argv[1:])
File "diffusion_vae.py", line 132, in main
exp.run_vae()
File "C:\Users\alexberd\Desktop\github\Variational Autoencoders\diffusion_vae\modules\experiment_control\experiment_class.py", line 595, in run_vae
self.diffusionVAE.vae.fit(self.train_data, self.target_data,
File "C:\Users\alexberd.conda\envs\tensorflow\lib\site-packages\keras\utils\traceback_utils.py", line 70, in error_handler
raise e.with_traceback(filtered_tb) from None
File "C:\Users\alexberd\AppData\Local\Temp__autograph_generated_fileq9gx1evd.py", line 15, in tftrainfunction
retval = ag.converted_call(ag.ld(step_function), (ag.ld(self), ag.ld(iterator)), None, fscope)
File "C:\Users\alexberd\AppData\Local\Temp__autograph_generated_filev8iyt31v.py", line 12, in tf__vae_loss
loss = ag.converted_call(ag.ld(K).mean, ((ag.converted_call(ag.ld(r_loss), (ag.ld(inputs), ag.ld(outputs)), None, fscope) + ag__.converted_call(ag.ld(kl_loss), (ag.ld(inputs), ag.ld(outputs)), None, fscope)),), None, fscope)
File "C:\Users\alexberd\AppData\Local\Temp__autograph_generated_filedorldv1q.py", line 82, in tfr_loss
ag__.if_stmt((ag.ld(self).r_loss == 'mse'), if_body_1, else_body_1, get_state_3, set_state_3, ('loss',), 1)
File "C:\Users\alexberd\AppData\Local\Temp__autograph_generated_filedorldv1q.py", line 77, in else_body_1
ag.if_stmt((ag__.ld(self).r_loss == 'binary'), if_body, else_body, get_state_2, set_state_2, ('loss',), 1)
File "C:\Users\alexberd\AppData\Local\Temp__autograph_generated_filedorldv1q.py", line 54, in if_body
loss = (((- ag.ld(inputs)) ag__.converted_call(ag.ld(tf).log, ((ag.ld(epsilon) + ag.ld(outputs)),), None, fscope)) - ((1 - ag.ld(inputs)) ag__.converted_call(ag.ld(tf).log, (((ag.ld(epsilon) + 1) - ag__.ld(outputs)),), None, fscope)))
AttributeError: in user code: