Skip to content
Snippets Groups Projects
Commit b94b0d1c authored by Michal Kravcenko's avatar Michal Kravcenko
Browse files

Merge branch 'dev' of code.it4i.cz:bes0030/4Neuro into tmp

# Conflicts:
#	src/LearningMethods/GradientDescent.cpp
#	src/examples/net_test_pde_1.cpp
parent b44ad5fe
No related branches found
No related tags found
No related merge requests found
......@@ -18,14 +18,14 @@ int main() {
std::cout << "********************************************************************************************************************************************" <<std::endl;
NeuralNetwork XOR;
unsigned int i1 = XOR.add_neuron( new NeuronLinear( ), BIAS_TYPE::NO_BIAS );
unsigned int i2 = XOR.add_neuron( new NeuronLinear( ), BIAS_TYPE::NO_BIAS );
l4n::NeuralNetwork XOR;
unsigned int i1 = XOR.add_neuron( new l4n::NeuronLinear( ), l4n::BIAS_TYPE::NO_BIAS );
unsigned int i2 = XOR.add_neuron( new l4n::NeuronLinear( ), l4n::BIAS_TYPE::NO_BIAS );
unsigned int h1 = XOR.add_neuron( new NeuronLogistic( ) );
unsigned int h2 = XOR.add_neuron( new NeuronLogistic( ) );
unsigned int h1 = XOR.add_neuron( new l4n::NeuronLogistic( ) );
unsigned int h2 = XOR.add_neuron( new l4n::NeuronLogistic( ) );
unsigned int o1 = XOR.add_neuron( new NeuronLinear( ), BIAS_TYPE::NO_BIAS );
unsigned int o1 = XOR.add_neuron( new l4n::NeuronLinear( ), l4n::BIAS_TYPE::NO_BIAS );
XOR.add_connection_simple( i1, h1 );
XOR.add_connection_simple( i2, h1 );
......@@ -56,7 +56,7 @@ int main() {
out = {0};
data_vec.emplace_back(std::make_pair(inp, out));
DataSet ds(&data_vec);
l4n::DataSet ds(&data_vec);
/* specification of the input/output neurons */
std::vector<size_t> net_input_neurons_indices(2);
......@@ -71,7 +71,7 @@ int main() {
/* ERROR FUNCTION SPECIFICATION */
MSE mse(&XOR, &ds);
l4n::MSE mse(&XOR, &ds);
......@@ -98,16 +98,16 @@ int main() {
double epsilon = 0.02;
double delta = 0.7;
ParticleSwarm swarm_01(
&domain_bounds,
c1,
c2,
w,
gamma,
epsilon,
delta,
n_particles,
iter_max
l4n::ParticleSwarm swarm_01(
&domain_bounds,
c1,
c2,
w,
gamma,
epsilon,
delta,
n_particles,
iter_max
);
swarm_01.optimize( mse );
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment