27 #include <boost/thread/thread.hpp>
28 #include <boost/bind.hpp>
30 #include <types/MNISTTypes.hpp>
32 #include <logger/Log.hpp>
33 #include <logger/ConsoleOutput.hpp>
34 using namespace mic::logger;
38 using namespace mic::opengl::visualization;
50 mic::types::MNISTBatch<float> batch(6);
51 for(
size_t i=0; i< 18; i++) {
53 MatrixXfPtr data (
new MatrixXf(3, 6));
55 (*data)(i)=(
float)(i-9.0)/18.0;
56 batch.data().push_back(data);
59 batch.labels().push_back(std::make_shared<unsigned int>(i));
62 batch.indices().push_back(i);
66 while (!APP_STATE->Quit()) {
69 if (!APP_STATE->isPaused()) {
72 if (APP_STATE->isSingleStepModeOn())
73 APP_STATE->pressPause();
76 APP_DATA_SYNCHRONIZATION_SCOPED_LOCK();
79 mic::types::MNISTBatch<float> bt = batch.getNextBatch();
82 w_batch->setBatchUnsynchronized(bt.data());
102 int main(
int argc,
char* argv[]) {
104 LOGGER->addOutput(
new ConsoleOutput());
105 LOG(LINFO) <<
"Logger initialized. Starting application";
118 LOG(LINFO) <<
"Waiting for threads to join...";
121 LOG(LINFO) <<
"Threads joined - ending application";
OpenGL-based window responsible for displaying grayscale (singlechannel) batch in a window...
WindowGrayscaleBatch< float > * w_batch
Window displaying the image.
void test_thread_body(void)
Function for testing ImageEncoder/WindowImage2D classes.
#define VGL_MANAGER
Macro returning OpenGL window manager instance.
int main(int argc, char *argv[])
Main program function. Runs two threads: main (for GLUT) and another one (for data processing)...
Declaration of WindowManager class along with a bunch of helpful types and macros.