I suppose you should use TFAutomodelForSequentialClassification instead of AutomodelForSequentialClassification.