libeblearngui
|
00001 /*************************************************************************** 00002 * Copyright (C) 2009 by Pierre Sermanet * 00003 * pierre.sermanet@gmail.com * 00004 * All rights reserved. 00005 * 00006 * Redistribution and use in source and binary forms, with or without 00007 * modification, are permitted provided that the following conditions are met: 00008 * * Redistributions of source code must retain the above copyright 00009 * notice, this list of conditions and the following disclaimer. 00010 * * Redistributions in binary form must reproduce the above copyright 00011 * notice, this list of conditions and the following disclaimer in the 00012 * documentation and/or other materials provided with the distribution. 00013 * * Redistribution under a license not approved by the Open Source 00014 * Initiative (http://www.opensource.org) must display the 00015 * following acknowledgement in all advertising material: 00016 * This product includes software developed at the Courant 00017 * Institute of Mathematical Sciences (http://cims.nyu.edu). 00018 * * The names of the authors may not be used to endorse or promote products 00019 * derived from this software without specific prior written permission. 00020 * 00021 * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESS OR IMPLIED 00022 * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED 00023 * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE 00024 * DISCLAIMED. IN NO EVENT SHALL ThE AUTHORS BE LIABLE FOR ANY 00025 * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES 00026 * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; 00027 * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND 00028 * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 00029 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS 00030 * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 00031 ***************************************************************************/ 00032 00033 #ifndef EBL_LAYERS_GUI_H_ 00034 #define EBL_LAYERS_GUI_H_ 00035 00036 #include "libidxgui.h" 00037 #include "ebl_layers.h" 00038 #include "ebl_normalization_gui.h" 00039 00040 namespace ebl { 00041 00043 00044 class full_layer_gui { 00045 public: 00046 full_layer_gui(); 00047 virtual ~full_layer_gui(); 00048 00049 template <typename T, class Tstate> 00050 static void display_fprop(full_layer<T,Tstate> &nn, 00051 Tstate &in, Tstate &out, 00052 unsigned int &h0, unsigned int &w0, double zoom, 00053 T vmin = 0, T vmax = 0, 00054 bool show_out = false); 00055 00056 template <typename T, class Tstate> 00057 static void display_bprop(full_layer<T,Tstate> &nn, 00058 Tstate &in, Tstate &out, 00059 unsigned int &h0, unsigned int &w0, double zoom, 00060 T vmin = 0, T vmax = 0, 00061 bool show_out = false); 00062 00063 template <typename T, class Tstate> 00064 static void display_bbprop(full_layer<T,Tstate> &nn, 00065 Tstate &in, Tstate &out, 00066 unsigned int &h0, unsigned int &w0, double zoom, 00067 T vmin = 0, T vmax = 0, 00068 bool show_out = false); 00069 }; 00070 00072 00073 class convolution_layer_gui { 00074 public: 00075 convolution_layer_gui(); 00076 virtual ~convolution_layer_gui(); 00077 00078 template <typename T, class Tstate> 00079 static void display_fprop(convolution_layer<T,Tstate> &nn, 00080 Tstate &in, Tstate &out, 00081 unsigned int &h0, unsigned int &w0, double zoom, 00082 T vmin = 0, T vmax = 0, 00083 bool show_out = false, bool run = true); 00084 00085 template <typename T, class Tstate> 00086 static void display_bprop(convolution_layer<T,Tstate> &nn, 00087 Tstate &in, Tstate &out, 00088 unsigned int &h0, unsigned int &w0, double zoom, 00089 T vmin = 0, T vmax = 0, 00090 bool show_out = false, bool run = true); 00091 00092 template <typename T, class Tstate> 00093 static void display_bbprop(convolution_layer<T,Tstate> &nn, 00094 Tstate &in, Tstate &out, 00095 unsigned int &h0, unsigned int &w0, double zoom, 00096 T vmin = 0, T vmax = 0, 00097 bool show_out = false, bool run = true); 00098 }; 00099 00101 00102 class convabsnorm_layer_gui { 00103 public: 00104 convabsnorm_layer_gui(); 00105 virtual ~convabsnorm_layer_gui(); 00106 00107 template <typename T, class Tstate> 00108 static void display_fprop(convabsnorm_layer<T,Tstate> &nn, 00109 Tstate &in, Tstate &out, 00110 unsigned int &h0, unsigned int &w0, double zoom, 00111 T vmin = 0, T vmax = 0, 00112 bool show_out = false); 00113 00114 template <typename T, class Tstate> 00115 static void display_bprop(convabsnorm_layer<T,Tstate> &nn, 00116 Tstate &in, Tstate &out, 00117 unsigned int &h0, unsigned int &w0, double zoom, 00118 T vmin = 0, T vmax = 0, 00119 bool show_out = false); 00120 00121 template <typename T, class Tstate> 00122 static void display_bbprop(convabsnorm_layer<T,Tstate> &nn, 00123 Tstate &in, Tstate &out, 00124 unsigned int &h0, unsigned int &w0, double zoom, 00125 T vmin = 0, T vmax = 0, 00126 bool show_out = false); 00127 }; 00128 00130 00131 class subsampling_layer_gui { 00132 public: 00133 subsampling_layer_gui(); 00134 virtual ~subsampling_layer_gui(); 00135 00136 template <typename T, class Tstate> 00137 static void display_fprop(subsampling_layer<T,Tstate> &nn, 00138 Tstate &in, Tstate &out, 00139 unsigned int &h0, unsigned int &w0, double zoom, 00140 T vmin = 0, T vmax = 0, 00141 bool show_out = false); 00142 00143 template <typename T, class Tstate> 00144 static void display_bprop(subsampling_layer<T,Tstate> &nn, 00145 Tstate &in, Tstate &out, 00146 unsigned int &h0, unsigned int &w0, double zoom, 00147 T vmin = 0, T vmax = 0, 00148 bool show_out = false); 00149 00150 template <typename T, class Tstate> 00151 static void display_bbprop(subsampling_layer<T,Tstate> &nn, 00152 Tstate &in, Tstate &out, 00153 unsigned int &h0, unsigned int &w0, double zoom, 00154 T vmin = 0, T vmax = 0, 00155 bool show_out = false); 00156 }; 00157 00158 } // namespace ebl { 00159 00160 #include "ebl_layers_gui.hpp" 00161 00162 #endif /* EBL_LAYERS_GUI_H_ */