Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add required spaces to markdown #168

Open
wants to merge 5 commits into
base: master
Choose a base branch
from
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
4 changes: 2 additions & 2 deletions GRT/CoreModules/MLBase.h
Original file line number Diff line number Diff line change
Expand Up @@ -462,7 +462,7 @@ class GRT_API MLBase : public GRTBase, public Observer< TrainingResult >, public

@return returns the minimum change value
*/
// Float getMinChange() const;
Float getMinChange() const;

/**
Gets the current learningRate value, this is value used to update the weights at each step of a learning algorithm such as stochastic gradient descent.
Expand Down Expand Up @@ -538,7 +538,7 @@ class GRT_API MLBase : public GRTBase, public Observer< TrainingResult >, public

@return returns true if the order of the training dataset should be randomized, false otherwise
*/
// bool getRandomiseTrainingOrder() const;
bool getRandomiseTrainingOrder() const;

/**
Gets if the model for the derived class has been succesfully trained.
Expand Down
16 changes: 8 additions & 8 deletions build/README.md
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
##Build
## Build
This folder contains a CMakeLists.txt that can be used to generate a makefile for building the GRT (as a shared or static library) and also for building the GRT examples.

##Supported Operating Systems
## Supported Operating Systems
This CMakeLists file has been tested on Windows, Linux (Ubuntu 14.04), and OSX (10.9).

##C++11
## C++11
The default build of the GRT uses C++11, you should therefore ensure you add C++11 support to any project using the GRT.

If it is difficult to add C++11 to your setup, then you can still build the by disabling GRT C++11 functionality (note, this will limit the full functionality of the toolkit).
Expand Down Expand Up @@ -34,13 +34,13 @@ int main (int argc, const char * argv[])
}
```

##Build Instructions
## Build Instructions

- [Linux Build Instructions](#linux-build-instructions)
- [OSX Build Instructions](#osx-build-instructions)
- [Windows Build Instructions](#windows-build-instructions)

##Linux Build Instructions
## Linux Build Instructions

Note, you will need to install make (http://www.gnu.org/software/make/) and cmake (http://www.cmake.org/) and a compiler that supports C++11 (such as g++ 4.7 and later).

Expand Down Expand Up @@ -93,7 +93,7 @@ $ pkg-config --cflags --libs grt
- the GRT examples will be: build/examples


##OSX Build Instructions
## OSX Build Instructions

Note, you will need to install make (http://www.gnu.org/software/make/) and cmake (http://www.cmake.org/) and a compiler that supports C++11 (such as g++ 4.7 and later).

Expand Down Expand Up @@ -165,7 +165,7 @@ int main (int argc, const char * argv[])
}
```

##Windows Build Instructions
## Windows Build Instructions

Note, you will need to download and install the cmake Windows installer (http://www.cmake.org/) and a compiler that supports C++11 (such as VisualStudio 2015).

Expand Down Expand Up @@ -240,7 +240,7 @@ int main (int argc, const char * argv[])
- select the 'Linker','Input', 'Additional Dependencies' and add the GRT static library (grt.lib)
- click 'Apply', you should now be able to build your custom project and link against the GRT

##Contributors
## Contributors
Thanks to:

- Romain Guillemot for creating the original CMake file and for improving the support for Windows!
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -56,12 +56,14 @@ int main (int argc, const char * argv[])
return EXIT_FAILURE;
}

if( !ctree.save(std::fstream("Model.grt")) ){
auto file = std::fstream("Model.grt");

if( !ctree.save( file ) ){
log << "Failed to train model!" << endl;
return EXIT_FAILURE;
}

if( !ctree.load(std::fstream("Model.grt")) ){
if( !ctree.load( file ) ){
log << "Failed to train model!" << endl;
return EXIT_FAILURE;
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -58,14 +58,16 @@ int main (int argc, const char * argv[])

cout << "GMM Trained in " << gmm.getNumTrainingIterationsToConverge() << " iterations.\n\n";

auto file = std::fstream("GMM.grt");

//Save the model to a file
if( !gmm.save( std::fstream("GMM.grt") ) ){
if( !gmm.save( file ) ){
cout << "Failed to save model to file!\n";
return EXIT_FAILURE;
}

//Load the model back from a file
if( !gmm.load( std::fstream("GMM.grt") ) ){
if( !gmm.load( file ) ){
cout << "Failed to load model from file!\n";
return EXIT_FAILURE;
}
Expand Down