The first argument to `Layer.call` must always be passed

Hello Everyone,

I am trying to simply import a model

model = TFElectraForSentenceSplitting.from_pretrained(“google/electra-base-discriminator”)

An error keeps popping up,

Can you please help me out?

Kind Regards

Hi, this is an interesting one! TFElectraForSentenceSplitting has a name that looks a lot like one of our classes, but I can’t find it in our docs or codebase anywhere. Can you tell me where you found that model? I don’t think it’s one of ours!

Hello @Rocketknight1

Here’s how I got it,

Also, is this used to split sentences? meaning is it possible to pass a dataframe from it to get split sentences?

Regards

Hi @Saad20x, I’m still confused! The reason is that TFElectraForSentenceSplitting is not a class in our library, which means that no matter what model a user has saved, that code shouldn’t work (without some external library that defines that class).

Have you installed some other sentence-splitting library that defines that class? If so, that’s probably where the source of this issue is!