20 static const float kMinInputRange = 1e-6
f;
31 template <
typename Type>
bool FeedForward(
const Type *inputs,
36 template <
typename Type>
bool GetNetOutput(
const Type *inputs,
106 template<
class ReadBuffType>
bool ReadBinary(ReadBuffType *input_buff) {
110 unsigned int read_val;
111 unsigned int auto_encode;
113 if (input_buff->Read(&read_val,
sizeof(read_val)) !=
sizeof(read_val)) {
119 if (input_buff->Read(&auto_encode,
sizeof(auto_encode)) !=
120 sizeof(auto_encode)) {
125 if (input_buff->Read(&read_val,
sizeof(read_val)) !=
sizeof(read_val)) {
138 if (input_buff->Read(&read_val,
sizeof(read_val)) !=
sizeof(read_val)) {
146 if (input_buff->Read(&read_val,
sizeof(read_val)) !=
sizeof(read_val)) {
159 }
else if (idx >= (neuron_cnt_ -
out_cnt_)) {
166 for (
int node_idx = 0; node_idx <
neuron_cnt_; node_idx++) {
168 if (input_buff->Read(&read_val,
sizeof(read_val)) !=
sizeof(read_val)) {
172 int fan_out_cnt = read_val;
173 for (
int fan_out_idx = 0; fan_out_idx < fan_out_cnt; fan_out_idx++) {
175 if (input_buff->Read(&read_val,
sizeof(read_val)) !=
sizeof(read_val)) {
185 for (
int node_idx = 0; node_idx <
neuron_cnt_; node_idx++) {
246 #endif // NEURAL_NET_H__