LawrenceBai commited on
Commit
88e2bb2
·
1 Parent(s): 6f4651f

fix: add all_tied_weights_keys property to HubertForSpeechClassification to resolve loading error

Browse files
models/emotion_recognition/emotion.py CHANGED
@@ -52,6 +52,10 @@ class HubertForSpeechClassification(HubertPreTrainedModel):
52
  self.classifier = HubertClassificationHead(config)
53
  self.init_weights()
54
 
 
 
 
 
55
  def forward(self, x):
56
  outputs = self.hubert(x)
57
  hidden_states = outputs[0]
 
52
  self.classifier = HubertClassificationHead(config)
53
  self.init_weights()
54
 
55
+ @property
56
+ def all_tied_weights_keys(self):
57
+ return []
58
+
59
  def forward(self, x):
60
  outputs = self.hubert(x)
61
  hidden_states = outputs[0]