Bug fix in Linux compilation.

This commit is contained in:
davidjacnogueira
2018-03-31 02:59:42 +01:00
parent f924edd50a
commit 4f55a15543
3 changed files with 43 additions and 24 deletions

View File

@@ -28,7 +28,7 @@ MLP::MLP(const std::vector<uint64_t> & layers_nodes,
constant_weight_init);
};
MLP::MLP(std::string & filename) {
MLP::MLP(const std::string & filename) {
LoadMLPNetwork(filename);
}
@@ -58,7 +58,7 @@ void MLP::CreateMLP(const std::vector<uint64_t> & layers_nodes,
}
};
void MLP::SaveMLPNetwork(std::string & filename)const {
void MLP::SaveMLPNetwork(const std::string & filename)const {
FILE * file;
file = fopen(filename.c_str(), "wb");
fwrite(&m_num_inputs, sizeof(m_num_inputs), 1, file);
@@ -71,7 +71,7 @@ void MLP::SaveMLPNetwork(std::string & filename)const {
}
fclose(file);
};
void MLP::LoadMLPNetwork(std::string & filename) {
void MLP::LoadMLPNetwork(const std::string & filename) {
m_layers_nodes.clear();
m_layers.clear();