Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

example_dnn_nsga2 does not link #6

Open
Antymon opened this issue May 20, 2019 · 3 comments
Open

example_dnn_nsga2 does not link #6

Antymon opened this issue May 20, 2019 · 3 comments

Comments

@Antymon
Copy link

Antymon commented May 20, 2019

Recently added example_dnn_nsga2 causes 2 types of errors during the linking under g++:

../modules/nn2/example_dnn_nsga2.cpp: In member function 'void FitXOR<Params, Exact>::eval(Indiv&)':
../modules/nn2/example_dnn_nsga2.cpp:156:25: error: 'powf' is not a member of 'std'
fit -= std::powf(outf[0] - outputs[i], 2.0);

../modules/nn2/example_dnn_nsga2.cpp:216:1: required from here
/git/sferes2/sferes/ea/crowd.hpp:171:23: error: ... FitXOR, Params> >' has no member named 'data'
assert((*it)->data().size() == (*it2)->data().size());

@Antymon
Copy link
Author

Antymon commented May 20, 2019

As for the first problem: it seems to be gcc incompatibility, which can be solved by replacing all (2) std::powf calls with std::pow

As for the 2nd problem: it seems that the only purpose of the branch QD_nn 's existence is to counter this problem despite the fact that the example does not exist there. The solution is therefore to use changes of that branch. I locally merged it into master, but I understand there must have been a reason to keep things separate.

@jbmouret
Copy link
Member

Hi

I will look into this, as example_dnn_nsga.cpp is still a work in progress. I am using clang and the powf probably comes from this.

@jbmouret
Copy link
Member

(I probably did not see the other error as I did not compile in debug for a while)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants