MCPcopy Create free account
hub / github.com/davisking/dlib / train

Method train

dlib/mlp/mlp_kernel_c.h:84–109  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

82
83 template <typename EXP1, typename EXP2>
84 void train (
85 const matrix_exp<EXP1>& example_in,
86 const matrix_exp<EXP2>& example_out
87 )
88 {
89 // make sure requires clause is not broken
90 DLIB_CASSERT(example_in.nr() == this->input_layer_nodes() &&
91 example_in.nc() == 1 &&
92 example_out.nr() == this->output_layer_nodes() &&
93 example_out.nc() == 1 &&
94 max(example_out) <= 1.0 && min(example_out) >= 0.0,
95 "\tvoid mlp::train(matrix_exp, matrix_exp)"
96 << "\n\tthe training example dimensions are not correct"
97 << "\n\texample_in.nr(): " << example_in.nr()
98 << "\n\texample_in.nc(): " << example_in.nc()
99 << "\n\texample_out.nr(): " << example_out.nr()
100 << "\n\texample_out.nc(): " << example_out.nc()
101 << "\n\tmax(example_out): " << max(example_out)
102 << "\n\tmin(example_out): " << min(example_out)
103 << "\n\tinput_layer_nodes(): " << this->input_layer_nodes()
104 << "\n\toutput_layer_nodes(): " << this->output_layer_nodes()
105 << "\n\tthis: " << this
106 );
107
108 mlp_base::train(example_in,example_out);
109 }
110
111 template <typename EXP>
112 void train (

Callers

nothing calls this directly

Calls 7

trainFunction · 0.85
input_layer_nodesMethod · 0.80
output_layer_nodesMethod · 0.80
maxFunction · 0.50
minFunction · 0.50
nrMethod · 0.45
ncMethod · 0.45

Tested by

no test coverage detected