codertimo / BERT-pytorch

Google AI 2018 BERT pytorch implementation
Apache License 2.0
6.09k stars 1.29k forks source link

An error occurred【AttributeError: type object 'BERT' has no attribute 'hidden'】 #87

Open XueqiangF opened 3 years ago

XueqiangF commented 3 years ago

class BERTLM:self.next_sentence = NextSentencePrediction(self.bert.hidden) This error appeared when I ran: 【AttributeError: type object 'BERT' has no attribute 'hidden'】 How to deal with it? Thank you!