Flappy-Bird-Genetic-Algorithms icon indicating copy to clipboard operation
Flappy-Bird-Genetic-Algorithms copied to clipboard

Disregarding model.compile()

Open franciscogmm opened this issue 6 years ago • 1 comments

Posted this on https://threads-iiith.quora.com/Neuro-Evolution-with-Flappy-Bird-Genetic-Evolution-on-Neural-Networks:

Thanks for this!! I thought I’d get stuck with Pybrain because I never figured out how to do the same with Keras. I didn’t know that you could disregard the optimizer and cost function even if it is implemented.

Question re the quote below:

“Often you would also be required to define a loss function and an optimizer to train the network via back-propagation (but here we don’t need to perform back-propagation, so we can just ignore this part).”

Why did you still define the sgd and mode.comile()?

Is it because you’re not calling .fit() before the .predict()? Thanks!

franciscogmm avatar Nov 21 '17 22:11 franciscogmm

I think, and I can be completely wrong here, that Keras doesn't actually go ahead and make the network UNLESS you compile it.

AroMorin avatar May 25 '18 17:05 AroMorin