- added contextTrain and ContextReconst to RbmComponent
git-svn-id: http://moon:8086/svn/software/trunk/projects/Rbm@763 b431acfa-c32f-4a4a-93f1-934dc6c82436
This commit is contained in:
+6
-1
@@ -144,7 +144,7 @@ public:
|
||||
|
||||
arma::mat toHiddenProbs(const arma::mat &visible) const
|
||||
{
|
||||
return Rbm::prob(v_to_h(arma::join_rows(visible, m_ctx)));
|
||||
return Rbm::prob(v_to_h(arma::join_rows(visible, m_ctx)));
|
||||
}
|
||||
|
||||
arma::mat toVisibleProbs(const arma::mat &hidden) const
|
||||
@@ -152,6 +152,11 @@ public:
|
||||
return arma::reshape(Rbm::prob(h_to_v(hidden)), 1, numVisible() - numContext());
|
||||
}
|
||||
|
||||
arma::mat toContextProbs(const arma::mat &hidden) const
|
||||
{
|
||||
return Rbm::prob(h_to_v(hidden)).submat(0, numVisible() - numContext(), 0, numVisible() - 1);
|
||||
}
|
||||
|
||||
size_t numContext() const
|
||||
{
|
||||
return m_ctx.size();
|
||||
|
||||
Reference in New Issue
Block a user