#include "/cvmfs/nova-development.opensciencegrid.org/novasoft/releases/N21-01-21/ExoticsTriggers/KerasModel.h"
Definition at line 164 of file KerasModel.h.
keras::LayerConv2D::LayerConv2D |
( |
| ) |
|
|
inline |
keras::LayerConv2D::LayerConv2D |
( |
| ) |
|
|
inline |
Implements keras::Layer.
Definition at line 278 of file KerasModel.cxx.
References keras::conv_single_depth_same(), keras::conv_single_depth_valid(), keras::DataChunk::get_3d(), MECModelEnuComparisons::i, calib::j, m, confusionMatrixTree::out, keras::DataChunk::set_data(), gen_hdf5record::size, tmp, submit_syst::x, and submit_syst::y.
Referenced by keras::missing_activation_impl().
280 unsigned int st_x = (
m_kernels[0][0].size()-1)/2;
281 unsigned int st_y = (
m_kernels[0][0][0].size()-1)/2;
282 vector< vector< vector<float> > > y_ret;
283 auto const & im = dc->
get_3d();
285 size_t size_x = (
m_border_mode ==
"valid")? im[0].
size() - 2 * st_x : im[0].size();
286 size_t size_y = (
m_border_mode ==
"valid")? im[0][0].
size() - 2 * st_y: im[0][0].size();
288 vector<vector<float> >
tmp;
290 for(
unsigned int j = 0;
j < size_x; ++
j) {
291 tmp.emplace_back(vector<float>(size_y, 0.0));
293 y_ret.push_back(tmp);
297 for(
unsigned int m = 0;
m < im.size(); ++
m) {
303 for(
unsigned int x = 0;
x < tmp_w.size(); ++
x) {
304 for(
unsigned int y = 0;
y < tmp_w[0].size(); ++
y) {
305 y_ret[
j][
x][
y] += tmp_w[
x][
y];
310 for(
unsigned int x = 0;
x < y_ret[0].size(); ++
x) {
311 for(
unsigned int y = 0;
y < y_ret[0][0].size(); ++
y) {
std::vector< std::vector< float > > conv_single_depth_same(std::vector< std::vector< float > > const &im, std::vector< std::vector< float > > const &k)
virtual void set_data(std::vector< std::vector< std::vector< float > > > const &)
virtual std::vector< std::vector< std::vector< float > > > const & get_3d() const
std::vector< float > m_bias
std::vector< std::vector< std::vector< std::vector< float > > > > m_kernels
std::string m_border_mode
std::vector< std::vector< float > > conv_single_depth_valid(std::vector< std::vector< float > > const &im, std::vector< std::vector< float > > const &k)
virtual unsigned int keras::LayerConv2D::get_input_cols |
( |
| ) |
const |
|
inlinevirtual |
virtual unsigned int keras::LayerConv2D::get_input_cols |
( |
| ) |
const |
|
inlinevirtual |
virtual unsigned int keras::LayerConv2D::get_input_rows |
( |
| ) |
const |
|
inlinevirtual |
virtual unsigned int keras::LayerConv2D::get_input_rows |
( |
| ) |
const |
|
inlinevirtual |
virtual unsigned int keras::LayerConv2D::get_output_units |
( |
| ) |
const |
|
inlinevirtual |
virtual unsigned int keras::LayerConv2D::get_output_units |
( |
| ) |
const |
|
inlinevirtual |
void keras::LayerConv2D::load_weights |
( |
std::ifstream & |
fin | ) |
|
|
virtual |
void keras::LayerConv2D::load_weights |
( |
std::ifstream & |
fin | ) |
|
|
virtual |
Implements keras::Layer.
Definition at line 40 of file KerasModel.cxx.
References plot_validation_datamc::c, d, r(), and compare_h5_caf::skip.
46 if (m_border_mode ==
"[") { m_border_mode =
"valid"; skip =
true; }
50 vector<vector<vector<float> > > tmp_depths;
52 vector<vector<float> > tmp_single_depth;
54 if (!skip) {
fin >> tmp_char; }
55 else { skip =
false; }
56 vector<float> tmp_row;
59 tmp_row.push_back(tmp_float);
62 tmp_single_depth.push_back(tmp_row);
64 tmp_depths.push_back(tmp_single_depth);
72 m_bias.push_back(tmp_float);
std::vector< float > m_bias
std::vector< std::vector< std::vector< std::vector< float > > > > m_kernels
std::string m_border_mode
std::vector< float > keras::LayerConv2D::m_bias |
int keras::LayerConv2D::m_cols |
int keras::LayerConv2D::m_depth |
std::vector< std::vector< std::vector< std::vector< float > > > > keras::LayerConv2D::m_kernels |
int keras::LayerConv2D::m_kernels_cnt |
int keras::LayerConv2D::m_rows |
The documentation for this class was generated from the following files:
- /cvmfs/nova-development.opensciencegrid.org/novasoft/releases/N21-01-21/ExoticsTriggers/KerasModel.h
- /cvmfs/nova-development.opensciencegrid.org/novasoft/releases/N21-01-21/ExoticsTriggers/KerasModel.cxx