MachineIntelligenceCore:NeuralNets
|
Program for visualization of features of convolutional neural net trained on MNIST digits. More...
#include <boost/thread/thread.hpp>
#include <boost/bind.hpp>
#include <importers/MNISTMatrixImporter.hpp>
#include <logger/Log.hpp>
#include <logger/ConsoleOutput.hpp>
#include <application/ApplicationState.hpp>
#include <configuration/ParameterServer.hpp>
#include <opengl/visualization/WindowManager.hpp>
#include <opengl/visualization/WindowGrayscaleBatch.hpp>
#include <opengl/visualization/WindowCollectorChart.hpp>
#include <mlnn/BackpropagationNeuralNetwork.hpp>
#include <encoders/MatrixXfMatrixXfEncoder.hpp>
#include <encoders/UIntMatrixXfEncoder.hpp>
Go to the source code of this file.
Functions | |
void | batch_function (void) |
Function for batch sampling. More... | |
int | main (int argc, char *argv[]) |
Main program function. Runs two threads: main (for GLUT) and another one (for data processing). More... | |
Variables | |
WindowGrayscaleBatch< float > * | w_conv10 |
Windows for displaying activations. More... | |
WindowGrayscaleBatch< float > * | w_conv11 |
WindowGrayscaleBatch< float > * | w_conv12 |
WindowGrayscaleBatch< float > * | w_conv13 |
WindowGrayscaleBatch< float > * | w_conv14 |
WindowGrayscaleBatch< float > * | w_conv15 |
WindowGrayscaleBatch< float > * | w_conv16 |
WindowGrayscaleBatch< float > * | w_conv20 |
WindowGrayscaleBatch< float > * | w_conv21 |
WindowGrayscaleBatch< float > * | w_conv22 |
WindowGrayscaleBatch< float > * | w_conv23 |
WindowGrayscaleBatch< float > * | w_conv24 |
WindowGrayscaleBatch< float > * | w_conv25 |
WindowGrayscaleBatch< float > * | w_conv30 |
WindowGrayscaleBatch< float > * | w_conv31 |
WindowGrayscaleBatch< float > * | w_conv32 |
WindowGrayscaleBatch< float > * | w_conv33 |
WindowGrayscaleBatch< float > * | w_conv34 |
WindowGrayscaleBatch< float > * | w_conv35 |
WindowCollectorChart< float > * | w_chart |
Window for displaying chart with statistics. More... | |
mic::utils::DataCollectorPtr < std::string, float > | collector_ptr |
Data collector. More... | |
mic::importers::MNISTMatrixImporter < float > * | importer |
MNIST importer. More... | |
BackpropagationNeuralNetwork < float > | neural_net |
Multi-layer neural network. More... | |
mic::encoders::MatrixXfMatrixXfEncoder * | mnist_encoder |
MNIST matrix encoder. More... | |
mic::encoders::UIntMatrixXfEncoder * | label_encoder |
Label 2 matrix encoder (1 hot). More... | |
const size_t | batch_size = 1 |
const char * | convent_filename = "nn_convent.txt" |
const char * | convnet_log = "nn_convent_log.csv" |
Program for visualization of features of convolutional neural net trained on MNIST digits.
Copyright (C) tkornuta, IBM Corporation 2015-2019
Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.
Copyright (c) 2017, Tomasz Kornuta, IBM Corporation. All rights reserved.
Definition in file mnist_convnet_features_visualization_test.cpp.
void batch_function | ( | void | ) |
Function for batch sampling.
Definition at line 81 of file mnist_convnet_features_visualization_test.cpp.
References collector_ptr, convnet_log, mic::mlnn::MultiLayerNeuralNetwork< eT >::getLayer(), importer, label_encoder, mnist_encoder, neural_net, mic::mlnn::MultiLayerNeuralNetwork< eT >::pushLayer(), mic::mlnn::BackpropagationNeuralNetwork< eT >::setLoss(), mic::mlnn::MultiLayerNeuralNetwork< eT >::setOptimization(), mic::mlnn::BackpropagationNeuralNetwork< eT >::train(), mic::mlnn::BackpropagationNeuralNetwork< eT >::verify(), w_conv10, w_conv11, w_conv12, w_conv13, w_conv14, w_conv15, w_conv16, w_conv20, w_conv21, w_conv22, w_conv23, w_conv24, w_conv25, w_conv30, w_conv31, w_conv32, w_conv33, w_conv34, and w_conv35.
Referenced by main().
int main | ( | int | argc, |
char * | argv[] | ||
) |
Main program function. Runs two threads: main (for GLUT) and another one (for data processing).
[in] | argc | Number of parameters (passed to glManaged). |
[in] | argv | List of parameters (passed to glManaged). |
Definition at line 242 of file mnist_convnet_features_visualization_test.cpp.
References batch_function(), batch_size, collector_ptr, importer, label_encoder, mnist_encoder, w_chart, w_conv10, w_conv11, w_conv12, w_conv13, w_conv14, w_conv15, w_conv16, w_conv20, w_conv21, w_conv22, w_conv23, w_conv24, w_conv25, w_conv30, w_conv31, w_conv32, w_conv33, w_conv34, and w_conv35.
const size_t batch_size = 1 |
Definition at line 72 of file mnist_convnet_features_visualization_test.cpp.
Referenced by main().
mic::utils::DataCollectorPtr<std::string, float> collector_ptr |
Data collector.
Definition at line 59 of file mnist_convnet_features_visualization_test.cpp.
Referenced by batch_function(), and main().
const char* convent_filename = "nn_convent.txt" |
Definition at line 73 of file mnist_convnet_features_visualization_test.cpp.
const char* convnet_log = "nn_convent_log.csv" |
Definition at line 74 of file mnist_convnet_features_visualization_test.cpp.
Referenced by batch_function().
mic::importers::MNISTMatrixImporter<float>* importer |
MNIST importer.
Definition at line 63 of file mnist_convnet_features_visualization_test.cpp.
Referenced by batch_function(), and main().
mic::encoders::UIntMatrixXfEncoder* label_encoder |
Label 2 matrix encoder (1 hot).
Definition at line 70 of file mnist_convnet_features_visualization_test.cpp.
Referenced by batch_function(), and main().
mic::encoders::MatrixXfMatrixXfEncoder* mnist_encoder |
MNIST matrix encoder.
Definition at line 68 of file mnist_convnet_features_visualization_test.cpp.
Referenced by batch_function(), and main().
BackpropagationNeuralNetwork<float> neural_net |
Multi-layer neural network.
Definition at line 65 of file mnist_convnet_features_visualization_test.cpp.
Referenced by batch_function().
WindowCollectorChart<float>* w_chart |
Window for displaying chart with statistics.
Definition at line 57 of file mnist_convnet_features_visualization_test.cpp.
Referenced by main().
WindowGrayscaleBatch<float>* w_conv10 |
Windows for displaying activations.
Definition at line 53 of file mnist_convnet_features_visualization_test.cpp.
Referenced by batch_function(), and main().
WindowGrayscaleBatch<float> * w_conv11 |
Definition at line 53 of file mnist_convnet_features_visualization_test.cpp.
Referenced by batch_function(), and main().
WindowGrayscaleBatch<float> * w_conv12 |
Definition at line 53 of file mnist_convnet_features_visualization_test.cpp.
Referenced by batch_function(), and main().
WindowGrayscaleBatch<float> * w_conv13 |
Definition at line 53 of file mnist_convnet_features_visualization_test.cpp.
Referenced by batch_function(), and main().
WindowGrayscaleBatch<float> * w_conv14 |
Definition at line 53 of file mnist_convnet_features_visualization_test.cpp.
Referenced by batch_function(), and main().
WindowGrayscaleBatch<float> * w_conv15 |
Definition at line 53 of file mnist_convnet_features_visualization_test.cpp.
Referenced by batch_function(), and main().
WindowGrayscaleBatch<float> * w_conv16 |
Definition at line 53 of file mnist_convnet_features_visualization_test.cpp.
Referenced by batch_function(), and main().
WindowGrayscaleBatch<float>* w_conv20 |
Definition at line 54 of file mnist_convnet_features_visualization_test.cpp.
Referenced by batch_function(), and main().
WindowGrayscaleBatch<float> * w_conv21 |
Definition at line 54 of file mnist_convnet_features_visualization_test.cpp.
Referenced by batch_function(), and main().
WindowGrayscaleBatch<float> * w_conv22 |
Definition at line 54 of file mnist_convnet_features_visualization_test.cpp.
Referenced by batch_function(), and main().
WindowGrayscaleBatch<float> * w_conv23 |
Definition at line 54 of file mnist_convnet_features_visualization_test.cpp.
Referenced by batch_function(), and main().
WindowGrayscaleBatch<float> * w_conv24 |
Definition at line 54 of file mnist_convnet_features_visualization_test.cpp.
Referenced by batch_function(), and main().
WindowGrayscaleBatch<float> * w_conv25 |
Definition at line 54 of file mnist_convnet_features_visualization_test.cpp.
Referenced by batch_function(), and main().
WindowGrayscaleBatch<float>* w_conv30 |
Definition at line 55 of file mnist_convnet_features_visualization_test.cpp.
Referenced by batch_function(), and main().
WindowGrayscaleBatch<float> * w_conv31 |
Definition at line 55 of file mnist_convnet_features_visualization_test.cpp.
Referenced by batch_function(), and main().
WindowGrayscaleBatch<float> * w_conv32 |
Definition at line 55 of file mnist_convnet_features_visualization_test.cpp.
Referenced by batch_function(), and main().
WindowGrayscaleBatch<float> * w_conv33 |
Definition at line 55 of file mnist_convnet_features_visualization_test.cpp.
Referenced by batch_function(), and main().
WindowGrayscaleBatch<float> * w_conv34 |
Definition at line 55 of file mnist_convnet_features_visualization_test.cpp.
Referenced by batch_function(), and main().
WindowGrayscaleBatch<float> * w_conv35 |
Definition at line 55 of file mnist_convnet_features_visualization_test.cpp.
Referenced by batch_function(), and main().