26 #include <boost/thread/thread.hpp>
27 #include <boost/bind.hpp>
29 #include <types/MNISTTypes.hpp>
31 #include <logger/Log.hpp>
32 #include <logger/ConsoleOutput.hpp>
33 using namespace mic::logger;
37 using namespace mic::opengl::visualization;
49 mic::types::MNISTBatch<float> batch;
50 for(
size_t i=0; i< 15; i++) {
52 MatrixXfPtr data (
new MatrixXf(3, 5));
55 batch.data().push_back(data);
58 batch.labels().push_back(std::make_shared<unsigned int>(i));
61 batch.indices().push_back(i);
65 while (!APP_STATE->Quit()) {
68 if (!APP_STATE->isPaused()) {
71 if (APP_STATE->isSingleStepModeOn())
72 APP_STATE->pressPause();
75 APP_DATA_SYNCHRONIZATION_SCOPED_LOCK();
78 mic::types::MNISTSample<float> sample = batch.getRandomSample();
81 w_batch->setSampleUnsynchronized(sample.data());
101 int main(
int argc,
char* argv[]) {
103 LOGGER->addOutput(
new ConsoleOutput());
104 LOG(LINFO) <<
"Logger initialized. Starting application";
117 LOG(LINFO) <<
"Waiting for threads to join...";
120 LOG(LINFO) <<
"Threads joined - ending application";
void test_thread_body(void)
Function for testing ImageEncoder/WindowImage2D classes.
OpenGL-based window responsible for displaying grayscale (singlechannel) batch in a window...
WindowGrayscaleBatch< float > * w_batch
Window displaying the image.
#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.