Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion BHM/pytorch/bhmtorch_cuda.py
Original file line number Diff line number Diff line change
Expand Up @@ -145,7 +145,7 @@ def predictSampling(self, Xq, nSamples=50):
mu_a = Xq.mm(w).squeeze()
probs = pt.sigmoid(mu_a)

mean = pt.std(probs, dim=1).squeeze()
mean = pt.mean(probs, dim=1).squeeze()
std = pt.std(probs, dim=1).squeeze()

return mean, std
4 changes: 2 additions & 2 deletions BHM_Online_Learning/bhmtorch_cpu.py
Original file line number Diff line number Diff line change
Expand Up @@ -154,7 +154,7 @@ def predictSampling(self, Xq, nSamples=50):
mu_a = Xq.mm(w).squeeze()
probs = pt.sigmoid(mu_a)

mean = pt.std(probs, dim=1).squeeze()
mean = pt.mean(probs, dim=1).squeeze()
std = pt.std(probs, dim=1).squeeze()

return mean, std
Expand Down Expand Up @@ -289,7 +289,7 @@ def predictSampling(self, Xq, nSamples=50):
mu_a = Xq.mm(w).squeeze()
probs = pt.sigmoid(mu_a)

mean = pt.std(probs, dim=1).squeeze()
mean = pt.mean(probs, dim=1).squeeze()
std = pt.std(probs, dim=1).squeeze()

return mean, std
Expand Down