- Rbm: fixed parameter import

git-svn-id: http://moon:8086/svn/software/trunk/projects/Rbm@607 b431acfa-c32f-4a4a-93f1-934dc6c82436
This commit is contained in:
2019-11-06 06:24:48 +00:00
parent 3ef7b07f5e
commit b20604e4f4
4 changed files with 21 additions and 9 deletions
+3 -3
View File
@@ -43,16 +43,16 @@ void Rbm::weightsInit(double stddev, double mu)
}
void Rbm::fromJson(Json::Value params)
void Rbm::fromJson(Json::Value rbm)
{
std::cout << "Importing Rbm" << std::endl;
m_params.fromJson(rbm["params"]);
}
Json::Value Rbm::toJson() const
{
std::cout << "Exporting Rbm" << std::endl;
Json::Value rbm;
rbm["numVisible"] = m_bv.n_elem;
rbm["numHidden"] = m_bh.n_elem;
rbm["params"] = m_params.toJson();
return rbm;
}