Unexpected Training Error

I was trying to implement an image captioning project, I got this no gradients provided for any variable error.

I tried google searching but couldn’t able to find a proper answer.

Can anyone please help me ?

https://colab.research.google.com/drive/10seKwt3mqe7Tn3eRnnhJNld5ErFHPwD_

Hey @nuts2021, that is probably due to the tensorflow and keras version mismatch.

Try this,

import tensorflow as tf

tf.compat.v1.disable_eager_execution()

from keras.datasets import mnist
from tensorflow.python.keras.layers import *
from tensorflow.python.keras.layers.advanced_activations import LeakyReLU
from tensorflow.python.keras.models import Sequential,Model
from tensorflow.compat.v1.keras.optimizers import Adam

import matplotlib.pyplot as plt
import math
import numpy as np