Пример #1
0
void dllp::conv_layer::print(std::ostream& out) const {
    out << "dll::conv_layer_desc<" << c << ", " << v1 << ", " << v2 << ", " << k << ", " << w1 << ", " << w2;

    if (!activation.empty()) {
        out << "\n  , dll::activation<dll::function::" << activation_function(activation) << ">";
    }

    out << ">::layer_t";
}
Пример #2
0
void dllp::dense_layer::print(std::ostream& out) const {
    out << "dll::dense_layer_desc<" << visible << ", " << hidden;

    if (!activation.empty()) {
        out << "\n  , dll::activation<dll::function::" << activation_function(activation) << ">";
    }

    out << ">::layer_t";
}
Пример #3
0
const double Neuron::compute_activation()
{
  activation = 0;

  for(Synapse *synapse : incoming_synapses) {
    activation += synapse->weight * synapse->from->activation;
  }

  activation += bias;

  activation = activation_function(activation);
  return activation;
}
Пример #4
0
void dllp::function_layer::print(std::ostream& out) const {
    out << "dll::activation_layer_desc<"
        << "dll::function::" << activation_function(activation)
        << ">::layer_t";
}