How to call a network in tf.keras.Sequential()?
If I use pytorch, I could use [index] to loop the layers:
layers = nn.ModuleList()
q = nn.ModuleList()
for _ in range(10):
        layers.append(attn)
        q.append(nn.Linear(dim1, dim2))
list = []
for index, layer in enumerate(self.layers):
        Q = q[index](inputTensor)
        list.append(layer(attn))

so when we use tensorflow, can we still use index like pytorch?
layers = tf.keras.Sequential()
q = tf.keras.Sequential()
for _ in range(10):
        layers.add(attn)
        q.add(Dense(dim2))
list = []
for index, layer in enumerate(layers):
        Q = layer[index](inputTensor)
        list.add(layer(att))


Yes - it is possible:
model = tf.keras.Sequential([ 
  tf.keras.layers.Dense(128), 
  tf.keras.layers.Dense(1) ])

for layer in model.layers:
        Q = layer

