How to add Dense layer on top of TFBertForSequenceClassification model?
I am having a really hard time adding the dense layers on the top of this model. I have tried to add the layers of `TFBertForSequenceClassification` in a sequential model with some dense layers like this:

```
bert_model = TFBertForSequenceClassification.from_pretrained("bert-base-cased", config=config)

model = keras.models.Sequential()
model.add(bert_model.layers[0])
model.add(keras.layers.Dense(10, activation='relu'))
model.add(keras.layers.Dense(1, activation='sigmoid'))
```
But when I fit the model using: 
``` 
model.fit(
    [padded, attention_mask],
    [np.array(df[1][:2000])],
    epochs=100,
)
```

I am getting this error:
```AttributeError: 'list' object has no attribute 'shape'```


I have also tried to use the layers of the `TFBertForSequenceClassification` in `keras.models.Model() class`. But, again there is no way to get the input layer. For example using `bert_model.layers[0].input_shape` gives the following error:
```
   1571     """
   1572     if not self._inbound_nodes:
-> 1573       raise AttributeError('The layer has never been called '
   1574                            'and thus has no defined input shape.')
   1575     all_input_shapes = set(

AttributeError: The layer has never been called and thus has no defined input shape.
```

What is the right way to add layers on the top of this model. 
Found the solution on [1936](https://github.com/huggingface/transformers/issues/1936). Closing.<|||||>Can you write down the solution here? @sainimohit23 