15 #ifdef USE_STD_NAMESPACE
22 static const float kInputNodeBias = 0.0f;
42 template <
class BuffType>
bool ReadBinary(BuffType *input_buff) {
44 if (input_buff->Read(&val,
sizeof(val)) !=
sizeof(val)) {
49 bias_ = kInputNodeBias;
55 if (input_buff->Read(&fan_in_cnt,
sizeof(fan_in_cnt)) !=
60 if (fan_in_cnt !=
fan_in_.size()) {
65 if (input_buff->Read(&val,
sizeof(val)) !=
sizeof(val)) {
91 static float Sigmoid(
float activation);
void AddFromConnection(Neuron *neuron_vec, float *wts_offset, int from_cnt)
static const float kSigmoidTable[]
float fan_in_wts(int idx) const
void set_output(float out_val)
vector< float * > fan_in_weights_
Neuron::NeuronTypes node_type() const
Neuron * fan_in(int idx) const
bool ReadBinary(BuffType *input_buff)
vector< Neuron * > fan_in_
static float Sigmoid(float activation)
void set_node_type(NeuronTypes type)