custom tensorflow layer that inherits another class I am trying to make my own custom layer in tensorflow which looks like:

class custom_LSTM(RNN):
    # implementation of class


where RNN is another class.

However, to use this custom layer in model it needs to inherit tf.keras.layers.Layer. I am creating models using tf.keras.

Any idea how do I solve this problem?
Although I'm not an export of RNN's, the following should work given that RNN is inherited from Layer:

from keras.layers import RNN
class custom_LSTM(RNN):
   # implementation of class
   ...


It might be good to provide the smallest piece of code that can reproduce your error.