tjl223 commited on
Commit
581e78a
1 Parent(s): dd54a42

adjusted score

Browse files
Files changed (1) hide show
  1. ArtistCoherencyModel.py +6 -3
ArtistCoherencyModel.py CHANGED
@@ -72,11 +72,14 @@ class ArtistCoherencyModel(nn.Module, PyTorchModelHubMixin):
72
  logits = self.generate_artist_coherency_logits(song_or_embedding)
73
  coherent_score = logits[coherent_index]
74
  incoherent_score = logits[incoherent_index]
75
- score = (coherent_score + incoherent_score) * (
76
- coherent_score / incoherent_score
 
 
 
77
  )
78
  print(f"coherent_score: {float(coherent_score)}")
79
- print(f"coherent_score: {float(incoherent_score)}")
80
  return float(score)
81
 
82
  def predict(
 
72
  logits = self.generate_artist_coherency_logits(song_or_embedding)
73
  coherent_score = logits[coherent_index]
74
  incoherent_score = logits[incoherent_index]
75
+ score = (
76
+ 100
77
+ * coherent_score
78
+ * (coherent_score - incoherent_score)
79
+ / (coherent_score + incoherent_score)
80
  )
81
  print(f"coherent_score: {float(coherent_score)}")
82
+ print(f"incoherent_score: {float(incoherent_score)}")
83
  return float(score)
84
 
85
  def predict(