Skip to content

Commit

Permalink
Merge branch 'main' into fix_fantasy_model
Browse files Browse the repository at this point in the history
  • Loading branch information
SaiAakash authored Nov 19, 2024
2 parents 2363eba + 3b2aad8 commit 9d7857f
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 1 deletion.
2 changes: 1 addition & 1 deletion gpytorch/likelihoods/softmax_likelihood.py
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ def __init__(
if num_classes is None:
raise ValueError("num_classes is required")
self.num_classes = num_classes
if mixing_weights is not None:
if mixing_weights:
if num_features is None:
raise ValueError("num_features is required with mixing weights")
self.num_features: int = num_features
Expand Down
4 changes: 4 additions & 0 deletions test/likelihoods/test_softmax_likelihood.py
Original file line number Diff line number Diff line change
Expand Up @@ -61,3 +61,7 @@ class TestSoftmaxLikelihoodNoMixing(TestSoftmaxLikelihood):

def create_likelihood(self):
return SoftmaxLikelihood(num_features=6, num_classes=6, mixing_weights=False)

def _test_learnable_parameters(self):
likelihood = self.create_likelihood()
self.assertEqual(len(list(likelihood.parameters())), 0)

0 comments on commit 9d7857f

Please sign in to comment.